summaryrefslogtreecommitdiff
path: root/basctl/source/inc
diff options
context:
space:
mode:
Diffstat (limited to 'basctl/source/inc')
-rw-r--r--basctl/source/inc/accessibledialogcontrolshape.hxx150
-rw-r--r--basctl/source/inc/accessibledialogwindow.hxx178
-rw-r--r--basctl/source/inc/baside3.hxx122
-rw-r--r--basctl/source/inc/basidectrlr.hxx77
-rw-r--r--basctl/source/inc/basidesh.hxx242
-rw-r--r--basctl/source/inc/basobj.hxx130
-rw-r--r--basctl/source/inc/bastypes.hxx335
-rw-r--r--basctl/source/inc/dlged.hxx212
-rw-r--r--basctl/source/inc/dlgedclip.hxx68
-rw-r--r--basctl/source/inc/dlgeddef.hxx86
-rw-r--r--basctl/source/inc/dlgedfac.hxx52
-rw-r--r--basctl/source/inc/dlgedfunc.hxx98
-rw-r--r--basctl/source/inc/dlgedlist.hxx87
-rw-r--r--basctl/source/inc/dlgedmod.hxx68
-rw-r--r--basctl/source/inc/dlgedobj.hxx199
-rw-r--r--basctl/source/inc/dlgedpage.hxx64
-rw-r--r--basctl/source/inc/dlgedview.hxx63
-rw-r--r--basctl/source/inc/dlgresid.hrc80
-rw-r--r--basctl/source/inc/doceventnotifier.hxx99
-rw-r--r--basctl/source/inc/docsignature.hxx92
-rw-r--r--basctl/source/inc/iderid.hxx43
-rw-r--r--basctl/source/inc/localizationmgr.hxx158
-rw-r--r--basctl/source/inc/managelang.hxx128
-rw-r--r--basctl/source/inc/propbrw.hxx118
-rw-r--r--basctl/source/inc/sbxitem.hxx79
-rw-r--r--basctl/source/inc/scriptdocument.hxx539
-rw-r--r--basctl/source/inc/svheader.hxx92
27 files changed, 3659 insertions, 0 deletions
diff --git a/basctl/source/inc/accessibledialogcontrolshape.hxx b/basctl/source/inc/accessibledialogcontrolshape.hxx
new file mode 100644
index 000000000000..ab7d469e1e21
--- /dev/null
+++ b/basctl/source/inc/accessibledialogcontrolshape.hxx
@@ -0,0 +1,150 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: accessibledialogcontrolshape.hxx,v $
+ * $Revision: 1.5 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _BASCTL_ACCESSIBLEDIALOGCONTROLSHAPE_HXX_
+#define _BASCTL_ACCESSIBLEDIALOGCONTROLSHAPE_HXX_
+
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/beans/XPropertyChangeListener.hpp>
+#include <comphelper/accessiblecomponenthelper.hxx>
+#include <cppuhelper/implbase3.hxx>
+#include <com/sun/star/beans/XPropertySet.hpp>
+
+#include <vector>
+
+class Window;
+class DialogWindow;
+class DlgEdObj;
+class VCLExternalSolarLock;
+
+namespace utl {
+class AccessibleStateSetHelper;
+}
+
+
+// ----------------------------------------------------
+// class AccessibleDialogControlShape
+// ----------------------------------------------------
+
+typedef ::comphelper::OAccessibleExtendedComponentHelper AccessibleExtendedComponentHelper_BASE;
+
+typedef ::cppu::ImplHelper3<
+ ::com::sun::star::accessibility::XAccessible,
+ ::com::sun::star::lang::XServiceInfo,
+ ::com::sun::star::beans::XPropertyChangeListener > AccessibleDialogControlShape_BASE;
+
+class AccessibleDialogControlShape : public AccessibleExtendedComponentHelper_BASE,
+ public AccessibleDialogControlShape_BASE
+{
+ friend class AccessibleDialogWindow;
+
+private:
+ VCLExternalSolarLock* m_pExternalLock;
+ DialogWindow* m_pDialogWindow;
+ DlgEdObj* m_pDlgEdObj;
+ sal_Bool m_bFocused;
+ sal_Bool m_bSelected;
+
+ ::com::sun::star::awt::Rectangle m_aBounds;
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xControlModel;
+
+protected:
+ sal_Bool IsFocused();
+ sal_Bool IsSelected();
+
+ void SetFocused( sal_Bool bFocused );
+ void SetSelected( sal_Bool bSelected );
+
+ ::com::sun::star::awt::Rectangle GetBounds();
+ void SetBounds( const ::com::sun::star::awt::Rectangle& aBounds );
+
+ Window* GetWindow() const;
+
+ ::rtl::OUString GetModelStringProperty( const sal_Char* pPropertyName );
+
+ virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet );
+
+ // OCommonAccessibleComponent
+ virtual ::com::sun::star::awt::Rectangle SAL_CALL implGetBounds( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XComponent
+ virtual void SAL_CALL disposing();
+
+public:
+ AccessibleDialogControlShape( DialogWindow* pDialogWindow, DlgEdObj* pDlgEdObj );
+ virtual ~AccessibleDialogControlShape();
+
+ // XInterface
+ DECLARE_XINTERFACE()
+
+ // XTypeProvider
+ DECLARE_XTYPEPROVIDER()
+
+ // XEventListener
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& rSource ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XPropertyChangeListener
+ virtual void SAL_CALL propertyChange( const ::com::sun::star::beans::PropertyChangeEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName() throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& rServiceName ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw (::com::sun::star::uno::RuntimeException);
+
+ // XAccessible
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XAccessibleContext
+ virtual sal_Int32 SAL_CALL getAccessibleChildCount( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleParent( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getAccessibleIndexInParent( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int16 SAL_CALL getAccessibleRole( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getAccessibleDescription( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getAccessibleName( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleStateSet > SAL_CALL getAccessibleStateSet( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::lang::Locale SAL_CALL getLocale( ) throw (::com::sun::star::accessibility::IllegalAccessibleComponentStateException, ::com::sun::star::uno::RuntimeException);
+
+ // XAccessibleComponent
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL grabFocus( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getForeground( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getBackground( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XAccessibleExtendedComponent
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFont > SAL_CALL getFont( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getTitledBorderText( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getToolTipText( ) throw (::com::sun::star::uno::RuntimeException);
+};
+
+
+#endif // _BASCTL_ACCESSIBLEDIALOGCONTROLSHAPE_HXX_
diff --git a/basctl/source/inc/accessibledialogwindow.hxx b/basctl/source/inc/accessibledialogwindow.hxx
new file mode 100644
index 000000000000..db446d479ead
--- /dev/null
+++ b/basctl/source/inc/accessibledialogwindow.hxx
@@ -0,0 +1,178 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: accessibledialogwindow.hxx,v $
+ * $Revision: 1.7 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _BASCTL_ACCESSIBLEDIALOGWINDOW_HXX_
+#define _BASCTL_ACCESSIBLEDIALOGWINDOW_HXX_
+
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#include <com/sun/star/accessibility/XAccessibleSelection.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <comphelper/accessiblecomponenthelper.hxx>
+#include <cppuhelper/implbase3.hxx>
+#include <tools/link.hxx>
+#include <svl/lstner.hxx>
+
+#include <vector>
+
+class DialogWindow;
+class DlgEditor;
+class DlgEdModel;
+class DlgEdObj;
+class VCLExternalSolarLock;
+class VclSimpleEvent;
+class VclWindowEvent;
+
+namespace utl {
+class AccessibleStateSetHelper;
+}
+
+
+// ----------------------------------------------------
+// class AccessibleDialogWindow
+// ----------------------------------------------------
+
+typedef ::comphelper::OAccessibleExtendedComponentHelper AccessibleExtendedComponentHelper_BASE;
+
+typedef ::cppu::ImplHelper3 <
+ ::com::sun::star::accessibility::XAccessible,
+ ::com::sun::star::accessibility::XAccessibleSelection,
+ ::com::sun::star::lang::XServiceInfo > AccessibleDialogWindow_BASE;
+
+class AccessibleDialogWindow : public AccessibleExtendedComponentHelper_BASE,
+ public AccessibleDialogWindow_BASE,
+ public SfxListener
+{
+private:
+
+ class ChildDescriptor
+ {
+ public:
+ DlgEdObj* pDlgEdObj;
+ ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > rxAccessible;
+
+ ChildDescriptor( DlgEdObj* _pDlgEdObj );
+ ~ChildDescriptor();
+
+ ChildDescriptor( const ChildDescriptor& rDesc );
+ ChildDescriptor& operator=( const ChildDescriptor& rDesc );
+
+ bool operator==( const ChildDescriptor& rDesc );
+ bool operator<( const ChildDescriptor& rDesc ) const;
+ };
+
+ typedef ::std::vector< ChildDescriptor > AccessibleChildren;
+
+ AccessibleChildren m_aAccessibleChildren;
+ VCLExternalSolarLock* m_pExternalLock;
+ DialogWindow* m_pDialogWindow;
+ DlgEditor* m_pDlgEditor;
+ DlgEdModel* m_pDlgEdModel;
+
+protected:
+ void UpdateFocused();
+ void UpdateSelected();
+ void UpdateBounds();
+
+ sal_Bool IsChildVisible( const ChildDescriptor& rDesc );
+
+ void InsertChild( const ChildDescriptor& rDesc );
+ void RemoveChild( const ChildDescriptor& rDesc );
+ void UpdateChild( const ChildDescriptor& rDesc );
+ void UpdateChildren();
+ void SortChildren();
+
+ DECL_LINK( WindowEventListener, VclSimpleEvent* );
+
+ virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent );
+ virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet );
+
+ // OCommonAccessibleComponent
+ virtual ::com::sun::star::awt::Rectangle SAL_CALL implGetBounds( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XComponent
+ virtual void SAL_CALL disposing();
+
+public:
+ AccessibleDialogWindow( DialogWindow* pDialogWindow );
+ ~AccessibleDialogWindow();
+
+ // SfxListener
+ virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
+
+ // XInterface
+ DECLARE_XINTERFACE()
+
+ // XTypeProvider
+ DECLARE_XTYPEPROVIDER()
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName() throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& rServiceName ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw (::com::sun::star::uno::RuntimeException);
+
+ // XAccessible
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XAccessibleContext
+ virtual sal_Int32 SAL_CALL getAccessibleChildCount( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleParent( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getAccessibleIndexInParent( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int16 SAL_CALL getAccessibleRole( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getAccessibleDescription( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getAccessibleName( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleStateSet > SAL_CALL getAccessibleStateSet( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::lang::Locale SAL_CALL getLocale( ) throw (::com::sun::star::accessibility::IllegalAccessibleComponentStateException, ::com::sun::star::uno::RuntimeException);
+
+ // XAccessibleComponent
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL grabFocus( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getForeground( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getBackground( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XAccessibleExtendedComponent
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFont > SAL_CALL getFont( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getTitledBorderText( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getToolTipText( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XAccessibleSelection
+ virtual void SAL_CALL selectAccessibleChild( sal_Int32 nChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL isAccessibleChildSelected( sal_Int32 nChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL clearAccessibleSelection( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL selectAllAccessibleChildren( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getSelectedAccessibleChildCount( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL deselectAccessibleChild( sal_Int32 nChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+};
+
+
+#endif // _BASCTL_ACCESSIBLEDIALOGWINDOW_HXX_
+
diff --git a/basctl/source/inc/baside3.hxx b/basctl/source/inc/baside3.hxx
new file mode 100644
index 000000000000..7920e9ebdfc6
--- /dev/null
+++ b/basctl/source/inc/baside3.hxx
@@ -0,0 +1,122 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: baside3.hxx,v $
+ * $Revision: 1.9 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _BASIDE3_HXX
+#define _BASIDE3_HXX
+
+#ifndef _SVHEADER_HXX
+//#include <svheader.hxx>
+#endif
+
+#include <bastypes.hxx>
+#include <svl/undo.hxx>
+#include <vcl/dialog.hxx>
+#include <vcl/button.hxx>
+#include <vcl/lstbox.hxx>
+#include <vcl/fixed.hxx>
+
+#ifndef _COM_SUN_STAR_SCRIPT_XLIBRYARYCONTAINER_HPP_
+#include <com/sun/star/script/XLibraryContainer.hpp>
+#endif
+
+class Printer;
+class StarBASIC;
+class SfxItemSet;
+class DlgEditor;
+class DlgEdModel;
+class DlgEdPage;
+class DlgEdView;
+class SfxUndoManager;
+
+class DialogWindow: public IDEBaseWindow
+{
+private:
+ DlgEditor* pEditor;
+ SfxUndoManager* pUndoMgr;
+ Link aOldNotifyUndoActionHdl;
+ String aCurPath;
+
+protected:
+ virtual void Paint( const Rectangle& );
+ virtual void Resize();
+
+ virtual void MouseButtonDown( const MouseEvent& rMEvt );
+ virtual void MouseButtonUp( const MouseEvent& rMEvt );
+ virtual void MouseMove( const MouseEvent& rMEvt );
+ virtual void KeyInput( const KeyEvent& rKEvt );
+ virtual void Command( const CommandEvent& rCEvt );
+ virtual void LoseFocus();
+
+ DECL_LINK( NotifyUndoActionHdl, SfxUndoAction * );
+ virtual void DoInit();
+ virtual void DoScroll( ScrollBar* pCurScrollBar );
+ virtual void DataChanged( const DataChangedEvent& rDCEvt );
+ void InitSettings(BOOL bFont,BOOL bForeground,BOOL bBackground);
+
+public:
+ TYPEINFO();
+ DialogWindow( Window* pParent, const ScriptDocument& rDocument, String aLibName, String aName,
+ const com::sun::star::uno::Reference< com::sun::star::container::XNameContainer >& xDialogModel );
+ DialogWindow( DialogWindow* pCurView ); // never implemented
+ ~DialogWindow();
+
+ virtual void ExecuteCommand( SfxRequest& rReq );
+ virtual void GetState( SfxItemSet& );
+ DlgEditor* GetEditor() const { return pEditor; }
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > GetDialog() const;
+ DlgEdModel* GetModel() const;
+ DlgEdPage* GetPage() const;
+ DlgEdView* GetView() const;
+ BOOL RenameDialog( const String& rNewName );
+ void DisableBrowser();
+ void UpdateBrowser();
+ BOOL SaveDialog();
+ BOOL ImportDialog();
+
+ virtual String GetTitle();
+ virtual BasicEntryDescriptor CreateEntryDescriptor();
+ virtual void SetReadOnly( BOOL bReadOnly );
+ virtual BOOL IsReadOnly();
+
+ virtual void StoreData();
+ virtual BOOL IsModified();
+ virtual BOOL IsPasteAllowed();
+
+ virtual SfxUndoManager* GetUndoManager();
+ // return number of pages to be printed
+ virtual sal_Int32 countPages( Printer* pPrinter );
+ // print page
+ virtual void printPage( sal_Int32 nPage, Printer* pPrinter );
+ virtual void Deactivating();
+
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible();
+};
+
+#endif // _BASIDE3_HXX
diff --git a/basctl/source/inc/basidectrlr.hxx b/basctl/source/inc/basidectrlr.hxx
new file mode 100644
index 000000000000..fe56db8cb68b
--- /dev/null
+++ b/basctl/source/inc/basidectrlr.hxx
@@ -0,0 +1,77 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: basidectrlr.hxx,v $
+ * $Revision: 1.3 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _BASCTL_BASICIDECTRLR_HXX
+#define _BASCTL_BASICIDECTRLR_HXX
+
+#include <comphelper/broadcasthelper.hxx>
+#include <comphelper/propertycontainer.hxx>
+#include <comphelper/proparrhlp.hxx>
+#include <sfx2/sfxbasecontroller.hxx>
+
+
+class BasicIDEShell;
+
+
+class BasicIDEController :public comphelper::OMutexAndBroadcastHelper
+ ,public ::comphelper::OPropertyContainer
+ ,public ::comphelper::OPropertyArrayUsageHelper< BasicIDEController >
+ ,public SfxBaseController
+{
+private:
+ // properties
+ sal_Int32 m_nIconId;
+
+public:
+ BasicIDEController( BasicIDEShell* pViewShell );
+ virtual ~BasicIDEController();
+
+ // XInterface
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL acquire() throw();
+ virtual void SAL_CALL release() throw();
+
+ // XTypeProvider ( ::SfxBaseController )
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw( ::com::sun::star::uno::RuntimeException );
+
+ // XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+
+ // OPropertySetHelper
+ virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
+
+protected:
+ // OPropertyArrayUsageHelper
+ virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const;
+};
+
+#endif // _BASCTL_BASICIDECTRLR_HXX
+
diff --git a/basctl/source/inc/basidesh.hxx b/basctl/source/inc/basidesh.hxx
new file mode 100644
index 000000000000..f4f118b0b277
--- /dev/null
+++ b/basctl/source/inc/basidesh.hxx
@@ -0,0 +1,242 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: basidesh.hxx,v $
+ * $Revision: 1.10 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _BASIDESH_HXX
+#define _BASIDESH_HXX
+
+#include "sbxitem.hxx"
+
+#include "scriptdocument.hxx"
+#include "doceventnotifier.hxx"
+#include <sfx2/viewfac.hxx>
+#include <sfx2/shell.hxx>
+#ifndef _SCRBAR_HXX //autogen
+#include <vcl/scrbar.hxx>
+#endif
+#ifndef _TABLE_HXX //autogen
+#include <tools/table.hxx>
+#endif
+#include <sfx2/viewsh.hxx>
+#include <svx/ifaceids.hxx>
+
+#ifndef _COM_SUN_STAR_IO_XINPUTSTREAMPROVIDER_HXX_
+#include <com/sun/star/io/XInputStreamProvider.hpp>
+#endif
+
+
+//----------------------------------------------------------------------------
+
+const ULONG BASICIDE_UI_FEATURE_SHOW_BROWSER = 0x00000001;
+
+//----------------------------------------------------------------------------
+
+class ModulWindow;
+class ModulWindowLayout;
+class DialogWindow;
+class SdrView;
+class ObjectCatalog;
+class BasicIDETabBar;
+class TabBar;
+class IDEBaseWindow;
+class SbxObject;
+class SbModule;
+class StarBASIC;
+class LocalizationMgr;
+struct BasicIDEShell_Impl;
+
+#if _SOLAR__PRIVATE
+DECLARE_TABLE( IDEWindowTable, IDEBaseWindow* )
+#else
+typedef Table IDEWindowTable;
+#endif
+
+namespace BasicIDE
+{
+ bool RemoveDialog( const ScriptDocument& rDocument, const String& rLibName, const String& rDlgName );
+}
+
+class BasicIDEShell :public SfxViewShell
+ ,public ::basctl::DocumentEventListener
+{
+friend class JavaDebuggingListenerImpl;
+friend class LocalizationMgr;
+friend BOOL implImportDialog( Window* pWin, const String& rCurPath, const ScriptDocument& rDocument, const String& aLibName );
+friend bool BasicIDE::RemoveDialog( const ScriptDocument& rDocument, const String& rLibName, const String& rDlgName );
+
+ ObjectCatalog* pObjectCatalog;
+
+ IDEWindowTable aIDEWindowTable;
+ USHORT nCurKey;
+ IDEBaseWindow* pCurWin;
+ ScriptDocument m_aCurDocument;
+ String m_aCurLibName;
+ LocalizationMgr* m_pCurLocalizationMgr;
+
+ ScrollBar aHScrollBar;
+ ScrollBar aVScrollBar;
+ ScrollBarBox aScrollBarBox;
+ BasicIDETabBar* pTabBar;
+ BOOL bTabBarSplitted;
+ BOOL bCreatingWindow;
+ ModulWindowLayout* pModulLayout;
+ BOOL m_bAppBasicModified;
+ ::basctl::DocumentEventNotifier
+ m_aNotifier;
+
+#if _SOLAR__PRIVATE
+ void Init();
+ void InitTabBar();
+ void InitScrollBars();
+ void CheckWindows();
+ void RemoveWindows( const ScriptDocument& rDocument, const String& rLibName, BOOL bDestroy );
+ void UpdateWindows();
+ void ShowObjectDialog( BOOL bShow, BOOL bCreateOrDestroy );
+ void InvalidateBasicIDESlots();
+ void StoreAllWindowData( BOOL bPersistent = TRUE );
+ void SetMDITitle();
+ void EnableScrollbars( BOOL bEnable );
+ void SetCurLib( const ScriptDocument& rDocument, String aLibName, bool bUpdateWindows = true , bool bCheck = true );
+ void SetCurLibForLocalization( const ScriptDocument& rDocument, String aLibName );
+
+ void ImplStartListening( StarBASIC* pBasic );
+
+ DECL_LINK( TabBarHdl, TabBar* );
+ DECL_LINK( AccelSelectHdl, Accelerator* );
+ DECL_LINK( ObjectDialogCancelHdl, ObjectCatalog * );
+ DECL_LINK( TabBarSplitHdl, TabBar * );
+#endif
+
+protected:
+ virtual void AdjustPosSizePixel( const Point &rPos, const Size &rSize );
+ virtual void OuterResizePixel( const Point &rPos, const Size &rSize );
+ virtual Size GetOptimalSizePixel() const;
+ USHORT InsertWindowInTable( IDEBaseWindow* pNewWin );
+ virtual USHORT PrepareClose( BOOL bUI, BOOL bForBrowsing );
+
+ void SetCurWindow( IDEBaseWindow* pNewWin, BOOL bUpdateTabBar = FALSE, BOOL bRememberAsCurrent = TRUE );
+ void ManageToolbars();
+ void RemoveWindow( IDEBaseWindow* pWindow, BOOL bDestroy, BOOL bAllowChangeCurWindow = TRUE );
+ void ArrangeTabBar();
+
+ ModulWindow* CreateBasWin( const ScriptDocument& rDocument, const String& rLibName, const String& rModName );
+ DialogWindow* CreateDlgWin( const ScriptDocument& rDocument, const String& rLibName, const String& rDlgName );
+
+ ModulWindow* FindBasWin( const ScriptDocument& rDocument, const String& rLibName, const String& rModName, BOOL bCreateIfNotExist, BOOL bFindSuspended = FALSE );
+ ModulWindow* ShowActiveModuleWindow( StarBASIC* pBasic );
+
+ virtual void SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
+ const SfxHint& rHint, const TypeId& rHintType );
+
+ virtual void Activate(BOOL bMDI);
+ virtual void Deactivate(BOOL bMDI);
+
+ virtual void Move();
+ virtual void ShowCursor( FASTBOOL bOn = TRUE );
+
+ void CreateModulWindowLayout();
+ void DestroyModulWindowLayout();
+ void UpdateModulWindowLayout( bool bBasicStopped );
+
+ // DocumentEventListener
+ virtual void onDocumentCreated( const ScriptDocument& _rDocument );
+ virtual void onDocumentOpened( const ScriptDocument& _rDocument );
+ virtual void onDocumentSave( const ScriptDocument& _rDocument );
+ virtual void onDocumentSaveDone( const ScriptDocument& _rDocument );
+ virtual void onDocumentSaveAs( const ScriptDocument& _rDocument );
+ virtual void onDocumentSaveAsDone( const ScriptDocument& _rDocument );
+ virtual void onDocumentClosed( const ScriptDocument& _rDocument );
+ virtual void onDocumentTitleChanged( const ScriptDocument& _rDocument );
+ virtual void onDocumentModeChanged( const ScriptDocument& _rDocument );
+
+public:
+ TYPEINFO();
+ SFX_DECL_INTERFACE( SVX_INTERFACE_BASIDE_VIEWSH )
+ SFX_DECL_VIEWFACTORY(BasicIDEShell);
+
+ BasicIDEShell( SfxViewFrame *pFrame, SfxViewShell *pOldSh );
+ ~BasicIDEShell();
+
+ IDEBaseWindow* GetCurWindow() const { return pCurWin; }
+ const ScriptDocument&
+ GetCurDocument() const { return m_aCurDocument; }
+ const String& GetCurLibName() const { return m_aCurLibName; }
+ ObjectCatalog* GetObjectCatalog() const { return pObjectCatalog; }
+ LocalizationMgr* GetCurLocalizationMgr() const { return m_pCurLocalizationMgr; }
+
+ ScrollBar& GetHScrollBar() { return aHScrollBar; }
+ ScrollBar& GetVScrollBar() { return aVScrollBar; }
+ ScrollBarBox& GetScrollBarBox() { return aScrollBarBox; }
+ TabBar* GetTabBar() { return (TabBar*)pTabBar; }
+ IDEWindowTable& GetIDEWindowTable() { return aIDEWindowTable; }
+
+ SdrView* GetCurDlgView() const;
+
+ SfxUndoManager* GetUndoManager();
+
+ virtual com::sun::star::uno::Reference< com::sun::star::view::XRenderable > GetRenderable();
+
+ // virtual USHORT Print( SfxProgress &rProgress, BOOL bIsAPI, PrintDialog *pPrintDialog = 0 );
+ virtual SfxPrinter* GetPrinter( BOOL bCreate );
+ virtual USHORT SetPrinter( SfxPrinter *pNewPrinter, USHORT nDiffFlags = SFX_PRINTER_ALL, bool bIsAPI=false );
+ virtual String GetSelectionText( BOOL bCompleteWords );
+ virtual BOOL HasSelection( BOOL bText ) const;
+
+ void GetState( SfxItemSet& );
+ void ExecuteGlobal( SfxRequest& rReq );
+ void ExecuteCurrent( SfxRequest& rReq );
+ void ExecuteBasic( SfxRequest& rReq );
+ void ExecuteDialog( SfxRequest& rReq );
+
+ virtual sal_Bool HasUIFeature( sal_uInt32 nFeature );
+
+ long CallBasicErrorHdl( StarBASIC* pBasic );
+ long CallBasicBreakHdl( StarBASIC* pBasic );
+
+ ModulWindowLayout* GetLayoutWindow() const { return pModulLayout; }
+
+ IDEBaseWindow* FindWindow( const ScriptDocument& rDocument, const String& rLibName = String(), const String& rName = String(), USHORT nType = BASICIDE_TYPE_UNKNOWN, BOOL bFindSuspended = FALSE );
+ DialogWindow* FindDlgWin( const ScriptDocument& rDocument, const String& rLibName, const String& rDlgName, BOOL bCreateIfNotExist, BOOL bFindSuspended = FALSE );
+ IDEBaseWindow* FindApplicationWindow();
+ BOOL NextPage( BOOL bPrev = FALSE );
+
+ BOOL IsAppBasicModified() const { return m_bAppBasicModified; }
+ void SetAppBasicModified( BOOL bModified = TRUE ) { m_bAppBasicModified = bModified; }
+
+ // For Dialog Drag&Drop in Dialog Organizer
+ static void CopyDialogResources(
+ ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStreamProvider >& io_xISP,
+ const ScriptDocument& rSourceDoc, const String& rSourceLibName, const ScriptDocument& rDestDoc,
+ const String& rDestLibName, const String& rDlgName );
+
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >
+ GetCurrentDocument() const;
+
+};
+
+#endif // _BASIDESH_HXX
diff --git a/basctl/source/inc/basobj.hxx b/basctl/source/inc/basobj.hxx
new file mode 100644
index 000000000000..a2911dcccb8f
--- /dev/null
+++ b/basctl/source/inc/basobj.hxx
@@ -0,0 +1,130 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: basobj.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _BASOBJ_HXX
+#define _BASOBJ_HXX
+
+#include "scriptdocument.hxx"
+#include <tools/string.hxx>
+#include <svl/lstner.hxx>
+
+#ifndef _COM_SUN_STAR_IO_XINPUTSTREAMPROVIDER_HXX_
+#include <com/sun/star/io/XInputStreamProvider.hpp>
+#endif
+#include <com/sun/star/script/XLibraryContainer.hpp>
+#include <com/sun/star/frame/XModel.hpp>
+
+class SfxMacro;
+class SbMethod;
+class SbModule;
+class SbxObject;
+class SbxVariable;
+class StarBASIC;
+class BasicManager;
+class SfxUInt16Item;
+class SfxBindings;
+class Window;
+struct BasicIDE_Impl;
+
+namespace BasicIDE
+{
+ void Organize( INT16 tabId );
+
+
+ // Hilfsmethoden fuer den allg. Gebrauch:
+ SbMethod* CreateMacro( SbModule* pModule, const String& rMacroName );
+ void RunMethod( SbMethod* pMethod );
+
+ StarBASIC* FindBasic( const SbxVariable* pVar );
+ void StopBasic();
+ long HandleBasicError( StarBASIC* pBasic );
+ void BasicStopped( BOOL* pbAppWindowDisabled = 0, BOOL* pbDispatcherLocked = 0, USHORT* pnWaitCount = 0,
+ SfxUInt16Item** ppSWActionCount = 0, SfxUInt16Item** ppSWLockViewCount = 0 );
+
+ BOOL IsValidSbxName( const String& rName );
+
+ BasicManager* FindBasicManager( StarBASIC* pLib );
+
+ SfxBindings* GetBindingsPtr();
+
+ void InvalidateDebuggerSlots();
+
+ // libraries
+
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > GetMergedLibraryNames(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::script::XLibraryContainer >& xModLibContainer,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::script::XLibraryContainer >& xDlgLibContainer );
+
+ // new methods for modules
+
+ ::rtl::OUString GetModule(
+ const ScriptDocument& rDocument, const String& rLibName, const String& rModName )
+ throw( ::com::sun::star::container::NoSuchElementException );
+
+ /** renames a module
+
+ Will show an error message when renaming fails because the new name is already used.
+ */
+ bool RenameModule(
+ Window* pErrorParent, const ScriptDocument& rDocument,
+ const String& rLibName, const String& rOldName, const String& rNewName );
+
+ // new methods for macros
+
+ ::rtl::OUString ChooseMacro( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& rxLimitToDocument,
+ BOOL bChooseOnly, const ::rtl::OUString& rMacroDesc );
+
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > GetMethodNames(
+ const ScriptDocument& rDocument, const String& rLibName, const String& rModName )
+ throw( ::com::sun::star::container::NoSuchElementException );
+
+ BOOL HasMethod(
+ const ScriptDocument& rDocument, const String& rLibName, const String& rModName, const String& rMethName );
+
+ // new methods for dialogs
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStreamProvider > GetDialog(
+ const ScriptDocument& rDocument, const String& rLibName, const String& rDlgName )
+ throw( ::com::sun::star::container::NoSuchElementException );
+
+ /** renames a dialog
+
+ Will show an error message when renaming fails because the new name is already used.
+ */
+ bool RenameDialog(
+ Window* pErrorParent, const ScriptDocument& rDocument, const String& rLibName, const String& rOldName, const String& rNewName )
+ throw( ::com::sun::star::container::ElementExistException, ::com::sun::star::container::NoSuchElementException );
+
+ bool RemoveDialog(
+ const ScriptDocument& rDocument, const String& rLibName, const String& rDlgName );
+
+ void MarkDocumentModified( const ScriptDocument& rDocument );
+}
+
+#endif // _BASOBJ_HXX
diff --git a/basctl/source/inc/bastypes.hxx b/basctl/source/inc/bastypes.hxx
new file mode 100644
index 000000000000..a9540762172d
--- /dev/null
+++ b/basctl/source/inc/bastypes.hxx
@@ -0,0 +1,335 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: bastypes.hxx,v $
+ * $Revision: 1.10.30.1 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _BASTYPES_HXX
+#define _BASTYPES_HXX
+
+#include <svheader.hxx>
+
+#include <iderid.hxx>
+
+#include "scriptdocument.hxx"
+
+class ModulWindow;
+class SfxRequest;
+class SvTreeListBox;
+class SvLBoxEntry;
+class ScrollBar;
+class SbModule;
+class BasicManager;
+class SfxItemSet;
+#include <vcl/dockwin.hxx>
+#include <vcl/toolbox.hxx>
+#include <basic/sbstar.hxx>
+
+#include <iderid.hxx>
+
+#include <tools/table.hxx>
+
+#include <svtools/tabbar.hxx>
+#include <com/sun/star/script/XLibraryContainer.hpp>
+
+#include <hash_map>
+
+#define LINE_SEP_CR 0x0D
+#define LINE_SEP 0x0A
+
+// Implementation: baside2b.cxx
+sal_Int32 searchEOL( const ::rtl::OUString& rStr, sal_Int32 fromIndex );
+
+
+// Bedeutung von bToBeKilled:
+// Wenn in Reschedule-Schleife, darf ich das Fenster nicht zerstoeren.
+// Es muss erst aus der Reschedule-Schleife Fallen, um sich dann
+// selbst zu zerstoeren.
+// Geht so leider nicht: Destroying Window with living Child!
+
+
+struct BasicStatus
+{
+// BOOL bCompiled : 1;
+ BOOL bIsRunning : 1;
+ BOOL bError : 1;
+ BOOL bIsInReschedule : 1;
+ USHORT nBasicFlags;
+
+ BasicStatus() {
+ bIsRunning = FALSE; bError = FALSE;
+ nBasicFlags = 0; bIsInReschedule = FALSE; }
+};
+
+struct BreakPoint
+{
+ BOOL bEnabled;
+ BOOL bTemp;
+ ULONG nLine;
+ ULONG nStopAfter;
+ ULONG nHitCount;
+
+ BreakPoint( ULONG nL ) { nLine = nL; nStopAfter = 0; nHitCount = 0; bEnabled = TRUE; bTemp = FALSE; }
+
+};
+
+class BasicDockingWindow : public DockingWindow
+{
+ Rectangle aFloatingPosAndSize;
+
+protected:
+ virtual BOOL Docking( const Point& rPos, Rectangle& rRect );
+ virtual void EndDocking( const Rectangle& rRect, BOOL bFloatMode );
+ virtual void ToggleFloatingMode();
+ virtual BOOL PrepareToggleFloatingMode();
+ virtual void StartDocking();
+
+public:
+ BasicDockingWindow( Window* pParent );
+};
+
+DECLARE_LIST( BreakPL, BreakPoint* )
+class BreakPointList : public BreakPL
+{
+private:
+ void operator =(BreakPointList); // not implemented
+
+public:
+ BreakPointList();
+
+ BreakPointList(BreakPointList const & rList);
+
+ ~BreakPointList();
+
+ void reset();
+
+ void transfer(BreakPointList & rList);
+
+ void InsertSorted( BreakPoint* pBrk );
+ BreakPoint* FindBreakPoint( ULONG nLine );
+ void AdjustBreakPoints( ULONG nLine, BOOL bInserted );
+ void SetBreakPointsInBasic( SbModule* pModule );
+ void ResetHitCount();
+};
+
+// helper class for sorting TabBar
+class TabBarSortHelper
+{
+public:
+ USHORT nPageId;
+ String aPageText;
+
+ bool operator<(const TabBarSortHelper& rComp) const { return (aPageText.CompareIgnoreCaseToAscii( rComp.aPageText ) == COMPARE_LESS); }
+};
+
+class BasicIDETabBar : public TabBar
+{
+protected:
+ virtual void MouseButtonDown( const MouseEvent& rMEvt );
+ virtual void Command( const CommandEvent& rCEvt );
+
+ virtual long AllowRenaming();
+ virtual void EndRenaming();
+
+public:
+ BasicIDETabBar( Window* pParent );
+
+ void Sort();
+};
+
+#define BASWIN_OK 0x00
+#define BASWIN_RUNNINGBASIC 0x01
+#define BASWIN_TOBEKILLED 0x02
+#define BASWIN_SUSPENDED 0x04
+#define BASWIN_INRESCHEDULE 0x08
+
+class Printer;
+class SfxUndoManager;
+class BasicEntryDescriptor;
+
+class IDEBaseWindow : public Window
+{
+private:
+ ScrollBar* pShellHScrollBar;
+ ScrollBar* pShellVScrollBar;
+
+ DECL_LINK( ScrollHdl, ScrollBar * );
+ BYTE nStatus;
+
+ ScriptDocument m_aDocument;
+ String m_aLibName;
+ String m_aName;
+
+protected:
+ virtual void DoScroll( ScrollBar* pCurScrollBar );
+
+public:
+ TYPEINFO();
+ IDEBaseWindow( Window* pParent, const ScriptDocument& rDocument, String aLibName, String aName );
+ virtual ~IDEBaseWindow();
+
+ void Init();
+ virtual void DoInit();
+ virtual void Deactivating();
+ void GrabScrollBars( ScrollBar* pHScroll, ScrollBar* pVScroll );
+
+ ScrollBar* GetHScrollBar() const { return pShellHScrollBar; }
+ ScrollBar* GetVScrollBar() const { return pShellVScrollBar; }
+
+ virtual void ExecuteCommand( SfxRequest& rReq );
+ virtual void GetState( SfxItemSet& );
+ virtual long Notify( NotifyEvent& rNEvt );
+
+ virtual void StoreData();
+ virtual void UpdateData();
+ virtual BOOL CanClose();
+
+ // return number of pages to be printed
+ virtual sal_Int32 countPages( Printer* pPrinter ) = 0;
+ // print page
+ virtual void printPage( sal_Int32 nPage, Printer* pPrinter ) = 0;
+
+ virtual String GetTitle();
+ String CreateQualifiedName();
+ virtual BasicEntryDescriptor CreateEntryDescriptor() = 0;
+
+ virtual BOOL IsModified();
+ virtual BOOL IsPasteAllowed();
+
+ virtual BOOL AllowUndo();
+
+ virtual void SetReadOnly( BOOL bReadOnly );
+ virtual BOOL IsReadOnly();
+
+ BYTE GetStatus() { return nStatus; }
+ void SetStatus( BYTE n ) { nStatus = n; }
+ void AddStatus( BYTE n ) { nStatus = nStatus | n; }
+ void ClearStatus( BYTE n ) { nStatus = nStatus & ~n; }
+
+ virtual Window* GetLayoutWindow();
+
+ virtual SfxUndoManager* GetUndoManager();
+
+ virtual USHORT GetSearchOptions();
+
+ virtual void BasicStarted();
+ virtual void BasicStopped();
+
+ BOOL IsSuspended() const
+ { return ( nStatus & BASWIN_SUSPENDED ) ? TRUE : FALSE; }
+
+ const ScriptDocument&
+ GetDocument() const { return m_aDocument; }
+ void SetDocument( const ScriptDocument& rDocument ) { m_aDocument = rDocument; }
+ bool IsDocument( const ScriptDocument& rDocument ) const { return rDocument == m_aDocument; }
+ const String& GetLibName() const { return m_aLibName; }
+ void SetLibName( const String& aLibName ) { m_aLibName = aLibName; }
+ const String& GetName() const { return m_aName; }
+ void SetName( const String& aName ) { m_aName = aName; }
+};
+
+class LibInfoKey
+{
+private:
+ ScriptDocument m_aDocument;
+ String m_aLibName;
+
+public:
+ LibInfoKey( const ScriptDocument& rDocument, const String& rLibName );
+ ~LibInfoKey();
+
+ LibInfoKey( const LibInfoKey& rKey );
+ LibInfoKey& operator=( const LibInfoKey& rKey );
+
+ bool operator==( const LibInfoKey& rKey ) const;
+
+ const ScriptDocument&
+ GetDocument() const { return m_aDocument; }
+ const String& GetLibName() const { return m_aLibName; }
+};
+
+class LibInfoItem
+{
+private:
+ ScriptDocument m_aDocument;
+ String m_aLibName;
+ String m_aCurrentName;
+ USHORT m_nCurrentType;
+
+public:
+ LibInfoItem( const ScriptDocument& rDocument, const String& rLibName, const String& rCurrentName, USHORT nCurrentType );
+ ~LibInfoItem();
+
+ LibInfoItem( const LibInfoItem& rItem );
+ LibInfoItem& operator=( const LibInfoItem& rItem );
+
+ const ScriptDocument&
+ GetDocument() const { return m_aDocument; }
+ const String& GetLibName() const { return m_aLibName; }
+ const String& GetCurrentName() const { return m_aCurrentName; }
+ USHORT GetCurrentType() const { return m_nCurrentType; }
+};
+
+class LibInfos
+{
+private:
+
+ struct LibInfoKeyHash
+ {
+ size_t operator()( const LibInfoKey& rKey ) const
+ {
+ size_t nHash = (size_t) rKey.GetDocument().hashCode();
+ nHash += (size_t) ::rtl::OUString( rKey.GetLibName() ).hashCode();
+ return nHash;
+ }
+ };
+
+ typedef ::std::hash_map< LibInfoKey, LibInfoItem*, LibInfoKeyHash, ::std::equal_to< LibInfoKey > > LibInfoMap;
+ LibInfoMap m_aLibInfoMap;
+
+public:
+ LibInfos();
+ ~LibInfos();
+
+ void InsertInfo( LibInfoItem* pItem );
+ void RemoveInfoFor( const ScriptDocument& _rDocument );
+
+ LibInfoItem* GetInfo( const LibInfoKey& rKey );
+};
+
+void CutLines( ::rtl::OUString& rStr, sal_Int32 nStartLine, sal_Int32 nLines, BOOL bEraseTrailingEmptyLines = FALSE );
+String CreateMgrAndLibStr( const String& rMgrName, const String& rLibName );
+ULONG CalcLineCount( SvStream& rStream );
+
+BOOL QueryReplaceMacro( const String& rName, Window* pParent = 0 );
+BOOL QueryDelMacro( const String& rName, Window* pParent = 0 );
+BOOL QueryDelDialog( const String& rName, Window* pParent = 0 );
+BOOL QueryDelModule( const String& rName, Window* pParent = 0 );
+BOOL QueryDelLib( const String& rName, BOOL bRef = FALSE, Window* pParent = 0 );
+BOOL QueryPassword( const ::com::sun::star::uno::Reference< ::com::sun::star::script::XLibraryContainer >& xLibContainer, const String& rLibName, String& rPassword, BOOL bRepeat = FALSE, BOOL bNewTitle = FALSE );
+
+
+#endif // _BASTYPES_HXX
diff --git a/basctl/source/inc/dlged.hxx b/basctl/source/inc/dlged.hxx
new file mode 100644
index 000000000000..001c689a78a5
--- /dev/null
+++ b/basctl/source/inc/dlged.hxx
@@ -0,0 +1,212 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: dlged.hxx,v $
+ * $Revision: 1.20 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _BASCTL_DLGED_HXX
+#define _BASCTL_DLGED_HXX
+
+#include <com/sun/star/container/XNameContainer.hpp>
+#include <com/sun/star/awt/XControlContainer.hpp>
+#include <com/sun/star/datatransfer/DataFlavor.hpp>
+#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
+#include <tools/link.hxx>
+#include <tools/gen.hxx>
+#include <vcl/timer.hxx>
+#include <svl/hint.hxx>
+#include <svl/brdcst.hxx>
+
+#define DLGED_PAGE_WIDTH_MIN 1280
+#define DLGED_PAGE_HEIGHT_MIN 1024
+
+
+//============================================================================
+// DlgEdHint
+//============================================================================
+
+enum DlgEdHintKind
+{
+ DLGED_HINT_UNKNOWN,
+ DLGED_HINT_WINDOWSCROLLED,
+ DLGED_HINT_LAYERCHANGED,
+ DLGED_HINT_OBJORDERCHANGED,
+ DLGED_HINT_SELECTIONCHANGED
+};
+
+class DlgEdObj;
+
+class DlgEdHint: public SfxHint
+{
+private:
+ DlgEdHintKind eHintKind;
+ DlgEdObj* pDlgEdObj;
+
+public:
+ TYPEINFO();
+ DlgEdHint( DlgEdHintKind eHint );
+ DlgEdHint( DlgEdHintKind eHint, DlgEdObj* pObj );
+ virtual ~DlgEdHint();
+
+ DlgEdHintKind GetKind() const { return eHintKind; }
+ DlgEdObj* GetObject() const { return pDlgEdObj; }
+};
+
+
+//============================================================================
+// DlgEditor
+//============================================================================
+
+enum DlgEdMode { DLGED_INSERT, DLGED_SELECT, DLGED_TEST, DLGED_READONLY };
+
+class ScrollBar;
+class DlgEdModel;
+class DlgEdPage;
+class DlgEdView;
+class DlgEdForm;
+class DlgEdFactory;
+class DlgEdFunc;
+class Printer;
+class KeyEvent;
+class MouseEvent;
+class Timer;
+class Window;
+
+class DlgEditor: public SfxBroadcaster
+{
+private:
+ DECL_LINK( PaintTimeout, Timer * );
+ DECL_LINK( MarkTimeout, Timer * );
+
+ void Print( Printer* pPrinter, const String& rTitle );
+
+protected:
+ ScrollBar* pHScroll;
+ ScrollBar* pVScroll;
+ DlgEdModel* pDlgEdModel;
+ DlgEdPage* pDlgEdPage;
+ DlgEdView* pDlgEdView;
+ DlgEdForm* pDlgEdForm;
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > m_xUnoControlDialogModel;
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer > m_xControlContainer;
+ ::com::sun::star::uno::Sequence< ::com::sun::star::datatransfer::DataFlavor > m_ClipboardDataFlavors;
+ ::com::sun::star::uno::Sequence< ::com::sun::star::datatransfer::DataFlavor > m_ClipboardDataFlavorsResource;
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatsSupplier > m_xSupplier;
+ DlgEdFactory* pObjFac;
+ Window* pWindow;
+ DlgEdFunc* pFunc;
+ DlgEdMode eMode;
+ USHORT eActObj;
+ BOOL bFirstDraw;
+ Size aGridSize;
+ BOOL bGridVisible;
+ BOOL bGridSnap;
+ BOOL bCreateOK;
+ Timer aPaintTimer;
+ Rectangle aPaintRect;
+ BOOL bDialogModelChanged;
+ Timer aMarkTimer;
+ long mnPaintGuard;
+
+public:
+ DlgEditor();
+ ~DlgEditor();
+
+ void SetWindow( Window* pWindow );
+ Window* GetWindow() const { return pWindow; }
+
+ /** returns the control container associated with our window
+ @see GetWindow
+ @see SetWindow
+ */
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer >
+ GetWindowControlContainer();
+
+ void SetDlgEdForm( DlgEdForm* pForm ) { pDlgEdForm = pForm; }
+ DlgEdForm* GetDlgEdForm() const { return pDlgEdForm; }
+
+ void SetScrollBars( ScrollBar* pHScroll, ScrollBar* pVScroll );
+ void InitScrollBars();
+ ScrollBar* GetHScroll() const { return pHScroll; }
+ ScrollBar* GetVScroll() const { return pVScroll; }
+ void DoScroll( ScrollBar* pActScroll );
+ void UpdateScrollBars();
+
+ void SetDialog( ::com::sun::star::uno::Reference<
+ ::com::sun::star::container::XNameContainer > xUnoControlDialogModel );
+ void ResetDialog( void );
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > GetDialog() const
+ {return m_xUnoControlDialogModel;}
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatsSupplier > const & GetNumberFormatsSupplier();
+
+ DlgEdModel* GetModel() const { return pDlgEdModel; }
+ DlgEdView* GetView() const { return pDlgEdView; }
+ DlgEdPage* GetPage() const { return pDlgEdPage; }
+
+ void ShowDialog();
+
+ BOOL UnmarkDialog();
+ BOOL RemarkDialog();
+
+ void SetDialogModelChanged( BOOL bChanged = TRUE ) { bDialogModelChanged = bChanged; }
+ BOOL IsDialogModelChanged() const { return bDialogModelChanged; }
+
+ BOOL IsModified() const;
+ void ClearModifyFlag();
+
+ void MouseButtonDown( const MouseEvent& rMEvt );
+ void MouseButtonUp( const MouseEvent& rMEvt );
+ void MouseMove( const MouseEvent& rMEvt );
+ void Paint( const Rectangle& rRect );
+ BOOL KeyInput( const KeyEvent& rKEvt );
+
+ void SetMode( DlgEdMode eMode );
+ void SetInsertObj( USHORT eObj );
+ USHORT GetInsertObj() const;
+ void CreateDefaultObject();
+ DlgEdMode GetMode() const { return eMode; }
+ BOOL IsCreateOK() const { return bCreateOK; }
+
+ void Cut();
+ void Copy();
+ void Paste();
+ void Delete();
+ BOOL IsPasteAllowed();
+
+ void ShowProperties();
+ void UpdatePropertyBrowserDelayed();
+
+ sal_Int32 countPages( Printer* pPrinter );
+ void printPage( sal_Int32 nPage, Printer* pPrinter, const String& );
+
+ bool AdjustPageSize();
+
+ bool isInPaint() const { return mnPaintGuard > 0; }
+};
+
+#endif //_BASCTL_DLGED_HXX
diff --git a/basctl/source/inc/dlgedclip.hxx b/basctl/source/inc/dlgedclip.hxx
new file mode 100644
index 000000000000..530f39a71e29
--- /dev/null
+++ b/basctl/source/inc/dlgedclip.hxx
@@ -0,0 +1,68 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: dlgedclip.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _BASCTL_DLGEDCLIP_HXX
+#define _BASCTL_DLGEDCLIP_HXX
+
+#include <cppuhelper/implbase2.hxx>
+#include <com/sun/star/datatransfer/XTransferable.hpp>
+#include <com/sun/star/datatransfer/DataFlavor.hpp>
+#include <com/sun/star/datatransfer/clipboard/XClipboardOwner.hpp>
+
+
+//============================================================================
+// DlgEdTransferableImpl
+//============================================================================
+
+typedef ::cppu::WeakImplHelper2< ::com::sun::star::datatransfer::XTransferable, ::com::sun::star::datatransfer::clipboard::XClipboardOwner > DlgEdTransferableHelper;
+
+class DlgEdTransferableImpl : public DlgEdTransferableHelper
+{
+private:
+ ::com::sun::star::uno::Sequence< ::com::sun::star::datatransfer::DataFlavor > m_SeqFlavors;
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > m_SeqData;
+
+protected:
+ virtual sal_Bool compareDataFlavors( const ::com::sun::star::datatransfer::DataFlavor& lFlavor, const ::com::sun::star::datatransfer::DataFlavor& rFlavor );
+
+public:
+ DlgEdTransferableImpl( const ::com::sun::star::uno::Sequence< ::com::sun::star::datatransfer::DataFlavor >& aSeqFlavors, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aSeqData );
+ virtual ~DlgEdTransferableImpl();
+
+ // XTransferable
+ virtual ::com::sun::star::uno::Any SAL_CALL getTransferData( const ::com::sun::star::datatransfer::DataFlavor& rFlavor ) throw(::com::sun::star::datatransfer::UnsupportedFlavorException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::datatransfer::DataFlavor > SAL_CALL getTransferDataFlavors() throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL isDataFlavorSupported( const ::com::sun::star::datatransfer::DataFlavor& rFlavor ) throw(::com::sun::star::uno::RuntimeException);
+
+ // XClipboardOwner
+ virtual void SAL_CALL lostOwnership( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboard >& xClipboard, const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& xTrans ) throw(::com::sun::star::uno::RuntimeException);
+};
+
+#endif // _BASCTL_DLGEDCLIP_HXX
diff --git a/basctl/source/inc/dlgeddef.hxx b/basctl/source/inc/dlgeddef.hxx
new file mode 100644
index 000000000000..1f665965203b
--- /dev/null
+++ b/basctl/source/inc/dlgeddef.hxx
@@ -0,0 +1,86 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: dlgeddef.hxx,v $
+ * $Revision: 1.8 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _BASCTL_DLGEDDEF_HXX
+#define _BASCTL_DLGEDDEF_HXX
+
+#include <tools/solar.h>
+
+
+const UINT32 DlgInventor = UINT32('D')*0x00000001+
+ UINT32('L')*0x00000100+
+ UINT32('G')*0x00010000+
+ UINT32('1')*0x01000000;
+
+
+#define OBJ_DLG_CONTROL ((UINT16) 1)
+#define OBJ_DLG_DIALOG ((UINT16) 2)
+#define OBJ_DLG_PUSHBUTTON ((UINT16) 3)
+#define OBJ_DLG_RADIOBUTTON ((UINT16) 4)
+#define OBJ_DLG_CHECKBOX ((UINT16) 5)
+#define OBJ_DLG_LISTBOX ((UINT16) 6)
+#define OBJ_DLG_COMBOBOX ((UINT16) 7)
+#define OBJ_DLG_GROUPBOX ((UINT16) 8)
+#define OBJ_DLG_EDIT ((UINT16) 9)
+#define OBJ_DLG_FIXEDTEXT ((UINT16)10)
+#define OBJ_DLG_IMAGECONTROL ((UINT16)11)
+#define OBJ_DLG_PROGRESSBAR ((UINT16)12)
+#define OBJ_DLG_HSCROLLBAR ((UINT16)13)
+#define OBJ_DLG_VSCROLLBAR ((UINT16)14)
+#define OBJ_DLG_HFIXEDLINE ((UINT16)15)
+#define OBJ_DLG_VFIXEDLINE ((UINT16)16)
+#define OBJ_DLG_DATEFIELD ((UINT16)17)
+#define OBJ_DLG_TIMEFIELD ((UINT16)18)
+#define OBJ_DLG_NUMERICFIELD ((UINT16)19)
+#define OBJ_DLG_CURRENCYFIELD ((UINT16)20)
+#define OBJ_DLG_FORMATTEDFIELD ((UINT16)21)
+#define OBJ_DLG_PATTERNFIELD ((UINT16)22)
+#define OBJ_DLG_FILECONTROL ((UINT16)23)
+#define OBJ_DLG_TREECONTROL ((UINT16)24)
+
+// control properties
+#define DLGED_PROP_BACKGROUNDCOLOR ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "BackgroundColor" ) )
+#define DLGED_PROP_DROPDOWN ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Dropdown" ) )
+#define DLGED_PROP_FORMATSSUPPLIER ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FormatsSupplier" ) )
+#define DLGED_PROP_HEIGHT ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Height" ) )
+#define DLGED_PROP_LABEL ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Label" ) )
+#define DLGED_PROP_NAME ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Name" ) )
+#define DLGED_PROP_ORIENTATION ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Orientation" ) )
+#define DLGED_PROP_POSITIONX ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PositionX" ) )
+#define DLGED_PROP_POSITIONY ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PositionY" ) )
+#define DLGED_PROP_STEP ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Step" ) )
+#define DLGED_PROP_TABINDEX ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TabIndex" ) )
+#define DLGED_PROP_TEXTCOLOR ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TextColor" ) )
+#define DLGED_PROP_TEXTLINECOLOR ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TextLineColor" ) )
+#define DLGED_PROP_WIDTH ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Width" ) )
+#define DLGED_PROP_DECORATION ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Decoration" ) )
+
+
+#endif // _BASCTL_DLGEDDEF_HXX
diff --git a/basctl/source/inc/dlgedfac.hxx b/basctl/source/inc/dlgedfac.hxx
new file mode 100644
index 000000000000..47e7af741a40
--- /dev/null
+++ b/basctl/source/inc/dlgedfac.hxx
@@ -0,0 +1,52 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: dlgedfac.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+#ifndef _BASCTL_DLGEDFAC_HXX
+#define _BASCTL_DLGEDFAC_HXX
+
+#include <svx/svdobj.hxx>
+
+
+//============================================================================
+// DlgEdFactory
+//============================================================================
+
+class DlgEdFactory
+{
+public:
+ DlgEdFactory();
+ ~DlgEdFactory();
+
+ DECL_LINK( MakeObject, SdrObjFactory * );
+};
+
+#endif // _BASCTL_DLGEDFAC_HXX
+
diff --git a/basctl/source/inc/dlgedfunc.hxx b/basctl/source/inc/dlgedfunc.hxx
new file mode 100644
index 000000000000..fc4f10f0305f
--- /dev/null
+++ b/basctl/source/inc/dlgedfunc.hxx
@@ -0,0 +1,98 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: dlgedfunc.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _BASCTL_DLGEDFUNC_HXX
+#define _BASCTL_DLGEDFUNC_HXX
+
+#include <vcl/timer.hxx>
+
+class DlgEditor;
+class Timer;
+class MouseEvent;
+class Point;
+
+//============================================================================
+// DlgEdFunc
+//============================================================================
+
+class DlgEdFunc /* : public LinkHdl */
+{
+protected:
+ DlgEditor* pParent;
+ Timer aScrollTimer;
+
+ DECL_LINK( ScrollTimeout, Timer * );
+ void ForceScroll( const Point& rPos );
+
+public:
+ DlgEdFunc( DlgEditor* pParent );
+ virtual ~DlgEdFunc();
+
+ virtual BOOL MouseButtonDown( const MouseEvent& rMEvt );
+ virtual BOOL MouseButtonUp( const MouseEvent& rMEvt );
+ virtual BOOL MouseMove( const MouseEvent& rMEvt );
+ virtual BOOL KeyInput( const KeyEvent& rKEvt );
+};
+
+//============================================================================
+// DlgEdFuncInsert
+//============================================================================
+
+class DlgEdFuncInsert : public DlgEdFunc
+{
+public:
+ DlgEdFuncInsert( DlgEditor* pParent );
+ ~DlgEdFuncInsert();
+
+ virtual BOOL MouseButtonDown( const MouseEvent& rMEvt );
+ virtual BOOL MouseButtonUp( const MouseEvent& rMEvt );
+ virtual BOOL MouseMove( const MouseEvent& rMEvt );
+};
+
+//============================================================================
+// DlgEdFuncSelect
+//============================================================================
+
+class DlgEdFuncSelect : public DlgEdFunc
+{
+protected:
+ BOOL bMarkAction;
+
+public:
+ DlgEdFuncSelect( DlgEditor* pParent );
+ ~DlgEdFuncSelect();
+
+ virtual BOOL MouseButtonDown( const MouseEvent& rMEvt );
+ virtual BOOL MouseButtonUp( const MouseEvent& rMEvt );
+ virtual BOOL MouseMove( const MouseEvent& rMEvt );
+};
+
+
+#endif //_BASCTL_DLGEDFUNC_HXX
diff --git a/basctl/source/inc/dlgedlist.hxx b/basctl/source/inc/dlgedlist.hxx
new file mode 100644
index 000000000000..18c6d2504a18
--- /dev/null
+++ b/basctl/source/inc/dlgedlist.hxx
@@ -0,0 +1,87 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: dlgedlist.hxx,v $
+ * $Revision: 1.5 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _BASCTL_DLGEDLIST_HXX
+#define _BASCTL_DLGEDLIST_HXX
+
+#include <cppuhelper/implbase1.hxx>
+#include <com/sun/star/beans/XPropertyChangeListener.hpp>
+#include <com/sun/star/container/XContainerListener.hpp>
+
+class DlgEdObj;
+
+//============================================================================
+// DlgEdPropListenerImpl
+//============================================================================
+
+typedef ::cppu::WeakImplHelper1< ::com::sun::star::beans::XPropertyChangeListener > PropertyChangeListenerHelper;
+
+class DlgEdPropListenerImpl: public PropertyChangeListenerHelper
+{
+private:
+ DlgEdObj* pDlgEdObj;
+
+public:
+ DlgEdPropListenerImpl(DlgEdObj* pObj);
+ virtual ~DlgEdPropListenerImpl();
+
+ // XEventListener
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException);
+
+ // XPropertyChangeListener
+ virtual void SAL_CALL propertyChange( const ::com::sun::star::beans::PropertyChangeEvent& evt ) throw(::com::sun::star::uno::RuntimeException);
+
+};
+
+//============================================================================
+// DlgEdEvtContListenerImpl
+//============================================================================
+
+typedef ::cppu::WeakImplHelper1< ::com::sun::star::container::XContainerListener > ContainerListenerHelper;
+
+class DlgEdEvtContListenerImpl: public ContainerListenerHelper
+{
+private:
+ DlgEdObj* pDlgEdObj;
+
+public:
+ DlgEdEvtContListenerImpl(DlgEdObj* pObj);
+ virtual ~DlgEdEvtContListenerImpl();
+
+ // XEventListener
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException);
+
+ // XContainerListener
+ virtual void SAL_CALL elementInserted( const ::com::sun::star::container::ContainerEvent& Event ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL elementReplaced( const ::com::sun::star::container::ContainerEvent& Event ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL elementRemoved( const ::com::sun::star::container::ContainerEvent& Event ) throw(::com::sun::star::uno::RuntimeException);
+};
+
+#endif // _BASCTL_DLGEDLIST_HXX
diff --git a/basctl/source/inc/dlgedmod.hxx b/basctl/source/inc/dlgedmod.hxx
new file mode 100644
index 000000000000..5ccca22e5e58
--- /dev/null
+++ b/basctl/source/inc/dlgedmod.hxx
@@ -0,0 +1,68 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: dlgedmod.hxx,v $
+ * $Revision: 1.7 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+#ifndef _BASCTL_DLGEDMOD_HXX
+#define _BASCTL_DLGEDMOD_HXX
+
+#include <svx/svdmodel.hxx>
+
+
+//============================================================================
+// DlgEdModel
+//============================================================================
+
+class DlgEdPage;
+class Window;
+class SfxObjectShell;
+
+class DlgEdModel : public SdrModel
+{
+ friend class DlgEdPage;
+
+private:
+ DlgEdModel( const DlgEdModel& ); // not implemented
+ void operator=(const DlgEdModel& rSrcModel); // not implemented
+
+public:
+ TYPEINFO();
+
+ DlgEdModel();
+ virtual ~DlgEdModel();
+
+ virtual void DlgEdModelChanged( FASTBOOL bChanged = TRUE );
+
+ virtual SdrPage* AllocPage(FASTBOOL bMasterPage);
+
+ virtual Window* GetCurDocViewWin();
+};
+
+#endif
+
diff --git a/basctl/source/inc/dlgedobj.hxx b/basctl/source/inc/dlgedobj.hxx
new file mode 100644
index 000000000000..e352ad738da4
--- /dev/null
+++ b/basctl/source/inc/dlgedobj.hxx
@@ -0,0 +1,199 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: dlgedobj.hxx,v $
+ * $Revision: 1.26 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _BASCTL_DLGEDOBJ_HXX
+#define _BASCTL_DLGEDOBJ_HXX
+
+#include <svx/svdouno.hxx>
+#include <comphelper/processfactory.hxx>
+#include <com/sun/star/beans/XPropertyChangeListener.hpp>
+#include <com/sun/star/container/XContainerListener.hpp>
+
+#include <vector>
+#include <map>
+
+#include <boost/optional.hpp>
+
+typedef ::std::multimap< sal_Int16, ::rtl::OUString, ::std::less< sal_Int16 > > IndexToNameMap;
+
+
+class DlgEdForm;
+class DlgEditor;
+
+//============================================================================
+// DlgEdObj
+//============================================================================
+
+class DlgEdObj: public SdrUnoObj
+{
+ friend class DlgEditor;
+ friend class DlgEdFactory;
+ friend class DlgEdPropListenerImpl;
+ friend class DlgEdForm;
+
+private:
+ sal_Bool bIsListening;
+ DlgEdForm* pDlgEdForm;
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener> m_xPropertyChangeListener;
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener> m_xContainerListener;
+
+protected:
+ DlgEdObj();
+ DlgEdObj(const ::rtl::OUString& rModelName,
+ const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rxSFac);
+
+ virtual void NbcMove( const Size& rSize );
+ virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact);
+ virtual FASTBOOL EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd);
+
+ DECL_LINK(OnCreate, void* );
+
+ using SfxListener::StartListening;
+ void StartListening();
+ using SfxListener::EndListening;
+ void EndListening(sal_Bool bRemoveListener = sal_True);
+ sal_Bool isListening() const { return bIsListening; }
+
+ virtual bool TransformSdrToControlCoordinates(
+ sal_Int32 nXIn, sal_Int32 nYIn, sal_Int32 nWidthIn, sal_Int32 nHeightIn,
+ sal_Int32& nXOut, sal_Int32& nYOut, sal_Int32& nWidthOut, sal_Int32& nHeightOut );
+ virtual bool TransformSdrToFormCoordinates(
+ sal_Int32 nXIn, sal_Int32 nYIn, sal_Int32 nWidthIn, sal_Int32 nHeightIn,
+ sal_Int32& nXOut, sal_Int32& nYOut, sal_Int32& nWidthOut, sal_Int32& nHeightOut );
+ virtual bool TransformControlToSdrCoordinates(
+ sal_Int32 nXIn, sal_Int32 nYIn, sal_Int32 nWidthIn, sal_Int32 nHeightIn,
+ sal_Int32& nXOut, sal_Int32& nYOut, sal_Int32& nWidthOut, sal_Int32& nHeightOut );
+ virtual bool TransformFormToSdrCoordinates(
+ sal_Int32 nXIn, sal_Int32 nYIn, sal_Int32 nWidthIn, sal_Int32 nHeightIn,
+ sal_Int32& nXOut, sal_Int32& nYOut, sal_Int32& nWidthOut, sal_Int32& nHeightOut );
+
+public:
+ TYPEINFO();
+
+ virtual ~DlgEdObj();
+ virtual void SetPage(SdrPage* pNewPage);
+
+ virtual void SetDlgEdForm( DlgEdForm* pForm ) { pDlgEdForm = pForm; }
+ virtual DlgEdForm* GetDlgEdForm() const { return pDlgEdForm; }
+
+ virtual sal_uInt32 GetObjInventor() const;
+ virtual sal_uInt16 GetObjIdentifier() const;
+
+ virtual SdrObject* Clone() const; // not working yet
+ virtual void operator= (const SdrObject& rObj); // not working yet
+ virtual void clonedFrom(const DlgEdObj* _pSource); // not working yet
+
+ // FullDrag support
+ virtual SdrObject* getFullDragClone() const;
+
+ virtual sal_Bool supportsService( const sal_Char* _pServiceName ) const;
+ virtual ::rtl::OUString GetDefaultName() const;
+ virtual ::rtl::OUString GetUniqueName() const;
+
+ virtual sal_Int32 GetStep() const;
+ virtual void UpdateStep();
+
+ virtual void SetDefaults();
+ virtual void SetRectFromProps();
+ virtual void SetPropsFromRect();
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl > GetControl() const;
+
+ virtual void PositionAndSizeChange( const ::com::sun::star::beans::PropertyChangeEvent& evt );
+ virtual void SAL_CALL NameChange( const ::com::sun::star::beans::PropertyChangeEvent& evt ) throw( ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL TabIndexChange( const ::com::sun::star::beans::PropertyChangeEvent& evt ) throw( ::com::sun::star::uno::RuntimeException);
+
+ // PropertyChangeListener
+ virtual void SAL_CALL _propertyChange( const ::com::sun::star::beans::PropertyChangeEvent& evt ) throw(::com::sun::star::uno::RuntimeException);
+
+ // ContainerListener
+ virtual void SAL_CALL _elementInserted( const ::com::sun::star::container::ContainerEvent& Event ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL _elementReplaced( const ::com::sun::star::container::ContainerEvent& Event ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL _elementRemoved( const ::com::sun::star::container::ContainerEvent& Event ) throw(::com::sun::star::uno::RuntimeException);
+
+ virtual void SetLayer(SdrLayerID nLayer);
+};
+
+
+//============================================================================
+// DlgEdForm
+//============================================================================
+
+class DlgEdForm: public DlgEdObj
+{
+ friend class DlgEditor;
+ friend class DlgEdFactory;
+
+private:
+ DlgEditor* pDlgEditor;
+ ::std::vector<DlgEdObj*> pChilds;
+
+ mutable ::boost::optional< ::com::sun::star::awt::DeviceInfo > mpDeviceInfo;
+
+
+protected:
+ DlgEdForm();
+
+ virtual void NbcMove( const Size& rSize );
+ virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact);
+ virtual FASTBOOL EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd);
+
+public:
+ TYPEINFO();
+
+ virtual ~DlgEdForm();
+
+ virtual void SetDlgEditor( DlgEditor* pEditor );
+ virtual DlgEditor* GetDlgEditor() const { return pDlgEditor; }
+
+ virtual void AddChild( DlgEdObj* pDlgEdObj );
+ virtual void RemoveChild( DlgEdObj* pDlgEdObj );
+ virtual ::std::vector<DlgEdObj*> GetChilds() const { return pChilds; }
+
+ virtual void UpdateStep();
+
+ virtual void SetRectFromProps();
+ virtual void SetPropsFromRect();
+
+ virtual void PositionAndSizeChange( const ::com::sun::star::beans::PropertyChangeEvent& evt );
+
+ virtual void UpdateTabIndices();
+ virtual void UpdateTabOrder();
+ virtual void UpdateGroups();
+ virtual void UpdateTabOrderAndGroups();
+
+ ::com::sun::star::awt::DeviceInfo getDeviceInfo() const;
+
+private:
+ void ImplInvalidateDeviceInfo();
+};
+
+#endif // _BASCTL_DLGEDOBJ_HXX
+
diff --git a/basctl/source/inc/dlgedpage.hxx b/basctl/source/inc/dlgedpage.hxx
new file mode 100644
index 000000000000..ad7a6238a726
--- /dev/null
+++ b/basctl/source/inc/dlgedpage.hxx
@@ -0,0 +1,64 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: dlgedpage.hxx,v $
+ * $Revision: 1.6 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _BASCTL_DLGEDPAGE_HXX
+#define _BASCTL_DLGEDPAGE_HXX
+
+#include "svx/svdpage.hxx"
+
+//============================================================================
+// DlgEdPage
+//============================================================================
+
+class DlgEdModel;
+class DlgEdForm;
+
+class DlgEdPage : public SdrPage
+{
+private:
+ DlgEdForm* pDlgEdForm;
+
+public:
+ TYPEINFO();
+
+ DlgEdPage( DlgEdModel& rModel, FASTBOOL bMasterPage=FALSE );
+ DlgEdPage( const DlgEdPage& );
+ virtual ~DlgEdPage();
+
+ using SdrPage::Clone;
+ virtual SdrPage* Clone() const;
+
+ void SetDlgEdForm( DlgEdForm* pForm ) { pDlgEdForm = pForm; }
+ DlgEdForm* GetDlgEdForm() const { return pDlgEdForm; }
+
+ virtual SdrObject* SetObjectOrdNum(ULONG nOldObjNum, ULONG nNewObjNum);
+};
+
+#endif //_BASCTL_DLGEDPAGE_HXX
diff --git a/basctl/source/inc/dlgedview.hxx b/basctl/source/inc/dlgedview.hxx
new file mode 100644
index 000000000000..11d580634e99
--- /dev/null
+++ b/basctl/source/inc/dlgedview.hxx
@@ -0,0 +1,63 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: dlgedview.hxx,v $
+ * $Revision: 1.6 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+#ifndef _BASCTL_DLGEDVIEW_HXX
+#define _BASCTL_DLGEDVIEW_HXX
+
+#include <svx/svdview.hxx>
+
+class DlgEditor;
+
+//============================================================================
+// DlgEdView
+//============================================================================
+
+class DlgEdView : public SdrView
+{
+private:
+ DlgEditor* pDlgEditor;
+
+public:
+ TYPEINFO();
+
+ DlgEdView( SdrModel* pModel, OutputDevice* pOut, DlgEditor* pEditor );
+ virtual ~DlgEdView();
+
+ virtual void MarkListHasChanged();
+ virtual void MakeVisible( const Rectangle& rRect, Window& rWin );
+
+protected:
+ // overloaded to handle HitTest for some objects special
+ using SdrView::CheckSingleSdrObjectHit;
+ virtual SdrObject* CheckSingleSdrObjectHit(const Point& rPnt, USHORT nTol, SdrObject* pObj, SdrPageView* pPV, ULONG nOptions, const SetOfByte* pMVisLay) const;
+};
+
+#endif //_BASCTL_DLGEDVIEW_HXX
diff --git a/basctl/source/inc/dlgresid.hrc b/basctl/source/inc/dlgresid.hrc
new file mode 100644
index 000000000000..b92be11b286f
--- /dev/null
+++ b/basctl/source/inc/dlgresid.hrc
@@ -0,0 +1,80 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: dlgresid.hrc,v $
+ * $Revision: 1.10 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _BASCTL_DLGRESID_HRC
+#define _BASCTL_DLGRESID_HRC
+
+// include -----------------------------------------------------------
+
+#include <svl/solar.hrc>
+
+// Dialog Control Id's -----------------------------------------------------------
+
+#define RID_STR_CLASS_CONTROL ( RID_DLG_START + 0 )
+#define RID_STR_CLASS_DIALOG ( RID_DLG_START + 1 )
+#define RID_STR_CLASS_BUTTON ( RID_DLG_START + 2 )
+#define RID_STR_CLASS_RADIOBUTTON ( RID_DLG_START + 3 )
+#define RID_STR_CLASS_CHECKBOX ( RID_DLG_START + 4 )
+#define RID_STR_CLASS_LISTBOX ( RID_DLG_START + 5 )
+#define RID_STR_CLASS_COMBOBOX ( RID_DLG_START + 6 )
+#define RID_STR_CLASS_GROUPBOX ( RID_DLG_START + 7 )
+#define RID_STR_CLASS_EDIT ( RID_DLG_START + 8 )
+#define RID_STR_CLASS_FIXEDTEXT ( RID_DLG_START + 9 )
+#define RID_STR_CLASS_IMAGECONTROL ( RID_DLG_START + 10 )
+#define RID_STR_CLASS_PROGRESSBAR ( RID_DLG_START + 11 )
+#define RID_STR_CLASS_SCROLLBAR ( RID_DLG_START + 12 )
+#define RID_STR_CLASS_FIXEDLINE ( RID_DLG_START + 13 )
+#define RID_STR_CLASS_DATEFIELD ( RID_DLG_START + 14 )
+#define RID_STR_CLASS_TIMEFIELD ( RID_DLG_START + 15 )
+#define RID_STR_CLASS_NUMERICFIELD ( RID_DLG_START + 16 )
+#define RID_STR_CLASS_CURRENCYFIELD ( RID_DLG_START + 17 )
+#define RID_STR_CLASS_FORMATTEDFIELD ( RID_DLG_START + 18 )
+#define RID_STR_CLASS_PATTERNFIELD ( RID_DLG_START + 19 )
+#define RID_STR_CLASS_FILECONTROL ( RID_DLG_START + 20 )
+#define RID_STR_TRANSLATION_NOTLOCALIZED ( RID_DLG_START + 21 )
+#define RID_STR_TRANSLATION_DEFAULT ( RID_DLG_START + 22 )
+#define RID_STR_CLASS_TREECONTROL ( RID_DLG_START + 23 )
+// Property Browser Headline Id's -----------------------------------------------------------
+
+#define RID_STR_BRWTITLE_PROPERTIES ( RID_DLG_START + 60 )
+#define RID_STR_BRWTITLE_NO_PROPERTIES ( RID_DLG_START + 61 )
+#define RID_STR_BRWTITLE_MULTISELECT ( RID_DLG_START + 62 )
+
+// Manage Language Dialogs
+
+#define RID_DLG_MANAGE_LANGUAGE ( RID_DLG_START + 70 )
+#define RID_QRYBOX_LANGUAGE ( RID_DLG_START + 71 )
+#define RID_DLG_SETDEF_LANGUAGE ( RID_DLG_START + 72 )
+#define RID_DLG_ADD_LANGUAGE ( RID_DLG_START + 73 )
+
+// -----------------------------------------------------------------------
+
+#endif // _BASCTL_DLGRESID_HRC
+
diff --git a/basctl/source/inc/doceventnotifier.hxx b/basctl/source/inc/doceventnotifier.hxx
new file mode 100644
index 000000000000..f5c54b7ffd0c
--- /dev/null
+++ b/basctl/source/inc/doceventnotifier.hxx
@@ -0,0 +1,99 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: doceventnotifier.hxx,v $
+ * $Revision: 1.3 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef BASCTL_DOCEVENTNOTIFIER_HXX
+#define BASCTL_DOCEVENTNOTIFIER_HXX
+
+/** === begin UNO includes === **/
+#include <com/sun/star/frame/XModel.hpp>
+/** === end UNO includes === **/
+
+#include <rtl/ref.hxx>
+
+#include <boost/noncopyable.hpp>
+
+//........................................................................
+namespace basctl
+{
+//........................................................................
+
+ class ScriptDocument;
+
+ //====================================================================
+ //= DocumentEventListener
+ //====================================================================
+ class SAL_NO_VTABLE DocumentEventListener : ::boost::noncopyable
+ {
+ public:
+ virtual void onDocumentCreated( const ScriptDocument& _rDocument ) = 0;
+ virtual void onDocumentOpened( const ScriptDocument& _rDocument ) = 0;
+ virtual void onDocumentSave( const ScriptDocument& _rDocument ) = 0;
+ virtual void onDocumentSaveDone( const ScriptDocument& _rDocument ) = 0;
+ virtual void onDocumentSaveAs( const ScriptDocument& _rDocument ) = 0;
+ virtual void onDocumentSaveAsDone( const ScriptDocument& _rDocument ) = 0;
+ virtual void onDocumentClosed( const ScriptDocument& _rDocument ) = 0;
+ virtual void onDocumentTitleChanged( const ScriptDocument& _rDocument ) = 0;
+ virtual void onDocumentModeChanged( const ScriptDocument& _rDocument ) = 0;
+
+ virtual ~DocumentEventListener();
+ };
+
+ //====================================================================
+ //= DocumentEventNotifier
+ //====================================================================
+ class DocumentEventNotifier_Impl;
+ /** allows registering at the GlobalEventBroadcaster for global document events
+ */
+ class DocumentEventNotifier
+ {
+ public:
+ /** create a notifier instance which notifies about events of all documents in the whole application
+ */
+ DocumentEventNotifier( DocumentEventListener& _rListener );
+
+ /** creates a notifier instance which notifies about events at a single document
+ */
+ DocumentEventNotifier( DocumentEventListener& _rListener,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& _rxDocument );
+
+ ~DocumentEventNotifier();
+
+ public:
+ void dispose();
+
+ private:
+ ::rtl::Reference< DocumentEventNotifier_Impl > m_pImpl;
+ };
+
+//........................................................................
+} // namespace basctl
+//........................................................................
+
+#endif // BASCTL_DOCEVENTNOTIFIER_HXX
diff --git a/basctl/source/inc/docsignature.hxx b/basctl/source/inc/docsignature.hxx
new file mode 100644
index 000000000000..93f11b4a1b18
--- /dev/null
+++ b/basctl/source/inc/docsignature.hxx
@@ -0,0 +1,92 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: docsignature.hxx,v $
+ * $Revision: 1.3 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef BASCTL_DOCSIGNATURE_HXX
+#define BASCTL_DOCSIGNATURE_HXX
+
+/** === begin UNO includes === **/
+#include <com/sun/star/frame/XModel.hpp>
+/** === end UNO includes === **/
+
+#include <memory>
+
+//........................................................................
+namespace basctl
+{
+//........................................................................
+
+ class ScriptDocument;
+ //====================================================================
+ //= DocumentSignature
+ //====================================================================
+ struct DocumentSignature_Data;
+ /// encapsulates (actions on) the signature/state of a document
+ class DocumentSignature
+ {
+ public:
+ /** creates a DocumentSignature instance for the given document
+
+ If the given ScriptDocument instance refers to the application, or to a document
+ which does not support being signed, the DocumentSignature instance is invalid afterwards.
+ */
+ DocumentSignature( const ScriptDocument& _rDocument );
+ ~DocumentSignature();
+
+ /** determines whether the instance is valid
+
+ An instance is valid if and only if it has been constructed with a document
+ which supports signatures.
+ */
+ bool supportsSignatures() const;
+
+ /** signs the scripting content inside the document
+
+ @precond
+ isValid returns <TRUE/>
+ */
+ void signScriptingContent() const;
+
+ /** retrieves the state of the signature of the scripting content inside the document
+
+ If the instance is not valid, then SIGNATURESTATE_NOSIGNATURES is returned.
+ */
+ sal_uInt16 getScriptingSignatureState() const;
+
+ private:
+ DocumentSignature(); // not implemented
+
+ private:
+ ::std::auto_ptr< DocumentSignature_Data > m_pData;
+ };
+
+//........................................................................
+} // namespace basctl
+//........................................................................
+
+#endif // BASCTL_DOCSIGNATURE_HXX
diff --git a/basctl/source/inc/iderid.hxx b/basctl/source/inc/iderid.hxx
new file mode 100644
index 000000000000..c42a1cea5c2a
--- /dev/null
+++ b/basctl/source/inc/iderid.hxx
@@ -0,0 +1,43 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: iderid.hxx,v $
+ * $Revision: 1.3 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _IDERID_HXX
+#define _IDERID_HXX
+
+#include <tools/resid.hxx>
+
+class IDEResId: public ResId
+{
+public:
+ IDEResId( USHORT nId );
+};
+
+
+#endif //_IDERID_HXX
diff --git a/basctl/source/inc/localizationmgr.hxx b/basctl/source/inc/localizationmgr.hxx
new file mode 100644
index 000000000000..2380f47089bd
--- /dev/null
+++ b/basctl/source/inc/localizationmgr.hxx
@@ -0,0 +1,158 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: localizationmgr.hxx,v $
+ * $Revision: 1.9 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _LOCALIZATIONMGR_HXX
+#define _LOCALIZATIONMGR_HXX
+
+#include <com/sun/star/resource/XStringResourceManager.hpp>
+#include <com/sun/star/container/XNameContainer.hpp>
+
+#include "scriptdocument.hxx"
+
+class BasicIDEShell;
+class DlgEditor;
+
+class LocalizationMgr
+{
+ ::com::sun::star::uno::Reference
+ < ::com::sun::star::resource::XStringResourceManager > m_xStringResourceManager;
+
+ BasicIDEShell* m_pIDEShell;
+
+ ScriptDocument m_aDocument;
+ String m_aLibName;
+
+ ::com::sun::star::lang::Locale m_aLocaleBeforeBasicStart;
+
+ enum HandleResourceMode
+ {
+ SET_IDS,
+ RESET_IDS,
+ RENAME_DIALOG_IDS,
+ RENAME_CONTROL_IDS,
+ REMOVE_IDS_FROM_RESOURCE,
+ MOVE_RESOURCES,
+ COPY_RESOURCES
+ };
+ static sal_Int32 implHandleControlResourceProperties( ::com::sun::star::uno::Any aControlAny,
+ const ::rtl::OUString& aDialogName, const ::rtl::OUString& aCtrlName,
+ ::com::sun::star::uno::Reference< ::com::sun::star::resource::XStringResourceManager >
+ xStringResourceManager, ::com::sun::star::uno::Reference< ::com::sun::star::resource::
+ XStringResourceResolver > xSourceStringResolver, HandleResourceMode eMode );
+
+ void enableResourceForAllLibraryDialogs( void )
+ {
+ implEnableDisableResourceForAllLibraryDialogs( SET_IDS );
+ }
+ void disableResourceForAllLibraryDialogs( void )
+ {
+ implEnableDisableResourceForAllLibraryDialogs( RESET_IDS );
+ }
+ void implEnableDisableResourceForAllLibraryDialogs( HandleResourceMode eMode );
+
+public:
+ LocalizationMgr( BasicIDEShell* pIDEShell, const ScriptDocument& rDocument, String aLibName,
+ const ::com::sun::star::uno::Reference
+ < ::com::sun::star::resource::XStringResourceManager >& xStringResourceManager );
+ ::com::sun::star::uno::Reference
+ < ::com::sun::star::resource::XStringResourceManager >getStringResourceManager( void )
+ {
+ return m_xStringResourceManager;
+ }
+
+ bool isLibraryLocalized( void );
+
+ void handleTranslationbar( void );
+
+ void handleAddLocales( ::com::sun::star::uno::Sequence
+ < ::com::sun::star::lang::Locale > aLocaleSeq );
+
+ void handleRemoveLocales( ::com::sun::star::uno::Sequence
+ < ::com::sun::star::lang::Locale > aLocaleSeq );
+
+ void handleSetDefaultLocale( ::com::sun::star::lang::Locale aLocale );
+
+ void handleSetCurrentLocale( ::com::sun::star::lang::Locale aLocale );
+
+ void handleBasicStarted( void );
+
+ void handleBasicStopped( void );
+
+ static void setControlResourceIDsForNewEditorObject( DlgEditor* pEditor,
+ ::com::sun::star::uno::Any aControlAny, const ::rtl::OUString& aCtrlName );
+
+ static void renameControlResourceIDsForEditorObject( DlgEditor* pEditor,
+ ::com::sun::star::uno::Any aControlAny, const ::rtl::OUString& aNewCtrlName );
+
+ static void deleteControlResourceIDsForDeletedEditorObject( DlgEditor* pEditor,
+ ::com::sun::star::uno::Any aControlAny, const ::rtl::OUString& aCtrlName );
+
+ static void setStringResourceAtDialog( const ScriptDocument& rDocument, const String& aLibName, const String& aDlgName,
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > xDialogModel );
+
+ static void renameStringResourceIDs( const ScriptDocument& rDocument, const String& aLibName, const String& aDlgName,
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > xDialogModel );
+
+ static void removeResourceForDialog( const ScriptDocument& rDocument, const String& aLibName, const String& aDlgName,
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > xDialogModel );
+
+ static ::com::sun::star::uno::Reference< ::com::sun::star::resource::XStringResourceManager >
+ getStringResourceFromDialogLibrary( ::com::sun::star::uno::Reference
+ < ::com::sun::star::container::XNameContainer > xDialogLib );
+
+ // Clipboard / Drag & Drop
+ static void resetResourceForDialog(
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > xDialogModel,
+ ::com::sun::star::uno::Reference< ::com::sun::star::resource::XStringResourceManager > xStringResourceManager );
+
+ static void setResourceIDsForDialog(
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > xDialogModel,
+ ::com::sun::star::uno::Reference< ::com::sun::star::resource::XStringResourceManager > xStringResourceManager );
+
+ static void copyResourcesForPastedEditorObject( DlgEditor* pEditor,
+ ::com::sun::star::uno::Any aControlAny, const ::rtl::OUString& aCtrlName,
+ ::com::sun::star::uno::Reference< ::com::sun::star::resource::
+ XStringResourceResolver > xSourceStringResolver );
+
+ static void copyResourceForDroppedDialog(
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > xDialogModel,
+ const ::rtl::OUString& aDialogName,
+ ::com::sun::star::uno::Reference< ::com::sun::star::resource::XStringResourceManager > xStringResourceManager,
+ ::com::sun::star::uno::Reference< ::com::sun::star::resource::XStringResourceResolver > xSourceStringResolver );
+
+ static void copyResourceForDialog(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >& xDialogModel,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::resource::
+ XStringResourceResolver >& xSourceStringResolver,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::resource::
+ XStringResourceManager >& xTargetStringResourceManager );
+};
+
+#endif
diff --git a/basctl/source/inc/managelang.hxx b/basctl/source/inc/managelang.hxx
new file mode 100644
index 000000000000..a166334dacb5
--- /dev/null
+++ b/basctl/source/inc/managelang.hxx
@@ -0,0 +1,128 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: managelang.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _BASCTL_MANAGELANG_HXX
+#define _BASCTL_MANAGELANG_HXX
+
+#include <vcl/dialog.hxx>
+#ifndef _FIXED_HXX
+#include <vcl/fixed.hxx>
+#endif
+#ifndef _LSTBOX_HXX
+#include <vcl/lstbox.hxx>
+#endif
+#ifndef _BUTTON_HXX
+#include <vcl/button.hxx>
+#endif
+#include <svx/langbox.hxx>
+#include <svx/checklbx.hxx>
+
+class LocalizationMgr;
+
+struct LanguageEntry
+{
+ String m_sLanguage;
+ ::com::sun::star::lang::Locale m_aLocale;
+ bool m_bIsDefault;
+
+ LanguageEntry( const String& _rLanguage,
+ const ::com::sun::star::lang::Locale& _rLocale,
+ bool _bIsDefault ) :
+ m_sLanguage( _rLanguage ),
+ m_aLocale( _rLocale ),
+ m_bIsDefault( _bIsDefault ) {}
+};
+
+extern bool localesAreEqual( const ::com::sun::star::lang::Locale& rLocaleLeft,
+ const ::com::sun::star::lang::Locale& rLocaleRight );
+
+class ManageLanguageDialog : public ModalDialog
+{
+private:
+ FixedText m_aLanguageFT;
+ ListBox m_aLanguageLB;
+ PushButton m_aAddPB;
+ PushButton m_aDeletePB;
+ PushButton m_aMakeDefPB;
+ FixedText m_aInfoFT;
+
+ FixedLine m_aBtnLine;
+ HelpButton m_aHelpBtn;
+ OKButton m_aCloseBtn;
+
+ LocalizationMgr* m_pLocalizationMgr;
+
+ String m_sDefLangStr;
+ String m_sDeleteStr;
+ String m_sCreateLangStr;
+
+ void Init();
+ void CalcInfoSize();
+ void FillLanguageBox();
+ void ClearLanguageBox();
+
+ DECL_LINK( AddHdl, Button * );
+ DECL_LINK( DeleteHdl, Button * );
+ DECL_LINK( MakeDefHdl, Button * );
+ DECL_LINK( SelectHdl, ListBox * );
+
+public:
+ ManageLanguageDialog( Window* pParent, LocalizationMgr* _pLMgr );
+ ~ManageLanguageDialog();
+};
+
+class SetDefaultLanguageDialog : public ModalDialog
+{
+private:
+ FixedText m_aLanguageFT;
+ SvxLanguageBox* m_pLanguageLB;
+ SvxCheckListBox* m_pCheckLangLB;
+ FixedText m_aInfoFT;
+
+ FixedLine m_aBtnLine;
+ OKButton m_aOKBtn;
+ CancelButton m_aCancelBtn;
+ HelpButton m_aHelpBtn;
+
+ bool m_bIsDefaultMode;
+ LocalizationMgr* m_pLocalizationMgr;
+
+ void FillLanguageBox();
+ void CalcInfoSize();
+
+public:
+ SetDefaultLanguageDialog( Window* pParent, LocalizationMgr* _pLMgr );
+ ~SetDefaultLanguageDialog();
+
+ ::com::sun::star::uno::Sequence< ::com::sun::star::lang::Locale > GetLocales() const;
+};
+
+#endif //_BASCTL_MANAGELANG_HXX
+
diff --git a/basctl/source/inc/propbrw.hxx b/basctl/source/inc/propbrw.hxx
new file mode 100644
index 000000000000..f9be90b38b4b
--- /dev/null
+++ b/basctl/source/inc/propbrw.hxx
@@ -0,0 +1,118 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: propbrw.hxx,v $
+ * $Revision: 1.8 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _BASCTL_PROPBRW_HXX
+#define _BASCTL_PROPBRW_HXX
+
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/awt/XControlContainer.hpp>
+#include <com/sun/star/frame/XFrame.hpp>
+#include <comphelper/composedprops.hxx>
+#include <sfx2/basedlgs.hxx>
+#include <svl/brdcst.hxx>
+#include <svl/lstner.hxx>
+#include <sfx2/childwin.hxx>
+#include <svx/svdmark.hxx>
+
+//============================================================================
+// PropBrwMgr
+//============================================================================
+
+class PropBrwMgr : public SfxChildWindow
+{
+public:
+ PropBrwMgr(Window *pParent, sal_uInt16 nId, SfxBindings *pBindings, SfxChildWinInfo *pInfo);
+ SFX_DECL_CHILDWINDOW(PropBrwMgr);
+};
+
+//============================================================================
+// PropBrw
+//============================================================================
+
+class SfxBindings;
+class SdrView;
+
+class PropBrw : public SfxFloatingWindow , public SfxListener, public SfxBroadcaster
+{
+private:
+ sal_Bool m_bInitialStateChange;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >
+ m_xORB;
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >
+ m_xMeAsFrame;
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >
+ m_xBrowserController;
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >
+ m_xBrowserComponentWindow;
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >
+ m_xContextDocument;
+
+protected:
+ SdrView* pView;
+ virtual void Resize();
+ virtual void FillInfo( SfxChildWinInfo& rInfo ) const;
+ virtual sal_Bool Close();
+
+ DECLARE_STL_VECTOR(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>, InterfaceArray);
+
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > >
+ CreateMultiSelectionSequence( const SdrMarkList& _rMarkList );
+ void implSetNewObjectSequence( const ::com::sun::star::uno::Sequence
+ < ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > >& _rObjectSeq );
+
+ void implSetNewObject(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxObject);
+
+ ::rtl::OUString GetHeadlineName(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxObject);
+
+public:
+ PropBrw( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _xORB,
+ SfxBindings *pBindings,
+ PropBrwMgr* pMgr,
+ Window* pParent,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& _rxContextDocument
+ );
+ virtual ~PropBrw();
+ using Window::Update;
+ // note: changing the Context document to an instance other than the one given in the ctor is not supported
+ // currently
+ void Update( const SfxViewShell* _pShell );
+ SdrView* GetCurView() const { return pView; }
+
+private:
+ void ImplUpdate( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& _rxContextDocument, SdrView* pView );
+ void ImplDestroyController();
+ void ImplReCreateController();
+};
+
+#endif // _BASCTL_PROPBRW_HXX
diff --git a/basctl/source/inc/sbxitem.hxx b/basctl/source/inc/sbxitem.hxx
new file mode 100644
index 000000000000..b1192b51d9bf
--- /dev/null
+++ b/basctl/source/inc/sbxitem.hxx
@@ -0,0 +1,79 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: sbxitem.hxx,v $
+ * $Revision: 1.3 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SBXITEM_HXX
+#define _SBXITEM_HXX
+
+#include "scriptdocument.hxx"
+#include <svl/poolitem.hxx>
+
+const USHORT BASICIDE_TYPE_UNKNOWN = 0;
+const USHORT BASICIDE_TYPE_SHELL = 1;
+const USHORT BASICIDE_TYPE_LIBRARY = 2;
+const USHORT BASICIDE_TYPE_MODULE = 3;
+const USHORT BASICIDE_TYPE_DIALOG = 4;
+const USHORT BASICIDE_TYPE_METHOD = 5;
+
+
+class SbxItem : public SfxPoolItem
+{
+ ScriptDocument m_aDocument;
+ String m_aLibName;
+ String m_aName;
+ String m_aMethodName;
+ USHORT m_nType;
+
+public:
+ TYPEINFO();
+ SbxItem( USHORT nWhich, const ScriptDocument& rDocument, const String& aLibName, const String& aName, USHORT nType );
+ SbxItem( USHORT nWhich, const ScriptDocument& rDocument, const String& aLibName, const String& aName, const String& aMethodName, USHORT nType );
+ SbxItem( const SbxItem& );
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual int operator==( const SfxPoolItem& ) const;
+
+ const ScriptDocument&
+ GetDocument() const { return m_aDocument; }
+ void SetDocument( const ScriptDocument& rDocument ) { m_aDocument = rDocument; }
+
+ const String& GetLibName() const { return m_aLibName; }
+ void SetLibName( const String& aLibName ) { m_aLibName = aLibName; }
+
+ const String& GetName() const { return m_aName; }
+ void SetName( const String& aName ) { m_aName = aName; }
+
+ const String& GetMethodName() const { return m_aMethodName; }
+ void SetMethodName( const String& aMethodName ) { m_aMethodName = aMethodName; }
+
+ USHORT GetType() const { return m_nType; }
+ void SetType( USHORT nType ) { m_nType = nType; }
+};
+
+
+#endif
diff --git a/basctl/source/inc/scriptdocument.hxx b/basctl/source/inc/scriptdocument.hxx
new file mode 100644
index 000000000000..c96a62c14112
--- /dev/null
+++ b/basctl/source/inc/scriptdocument.hxx
@@ -0,0 +1,539 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: scriptdocument.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SCRIPTDOCUMENT_HXX
+#define SCRIPTDOCUMENT_HXX
+
+/** === begin UNO includes === **/
+#include <com/sun/star/script/XLibraryContainer.hpp>
+#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/task/XStatusIndicator.hpp>
+#include <com/sun/star/io/XInputStreamProvider.hpp>
+/** === end UNO includes === **/
+
+#include <boost/shared_ptr.hpp>
+#include <vector>
+
+class BasicManager;
+class SfxListener;
+
+//........................................................................
+namespace basctl
+{
+//........................................................................
+
+ //====================================================================
+ //= LibraryContainerType
+ //====================================================================
+ enum LibraryContainerType
+ {
+ E_SCRIPTS,
+ E_DIALOGS
+ };
+
+ enum LibraryLocation
+ {
+ LIBRARY_LOCATION_UNKNOWN,
+ LIBRARY_LOCATION_USER,
+ LIBRARY_LOCATION_SHARE,
+ LIBRARY_LOCATION_DOCUMENT
+ };
+
+ enum LibraryType
+ {
+ LIBRARY_TYPE_UNKNOWN,
+ LIBRARY_TYPE_MODULE,
+ LIBRARY_TYPE_DIALOG,
+ LIBRARY_TYPE_ALL
+ };
+
+ //====================================================================
+ //= ScriptDocument
+ //====================================================================
+ class ScriptDocument_Impl;
+
+ class ScriptDocument;
+ typedef ::std::vector< ScriptDocument > ScriptDocuments;
+
+ /** encapsulates a document which contains Basic scripts and dialogs
+ */
+ class ScriptDocument
+ {
+ private:
+ ::boost::shared_ptr< ScriptDocument_Impl > m_pImpl;
+
+ private:
+ /** creates a ScriptDocument instance which operates on the application-wide
+ scripts and dialogs
+ */
+ ScriptDocument();
+
+ public:
+ enum SpecialDocument { NoDocument };
+ /** creates a ScriptDocument instance which does refers to neither the application-wide,
+ nor a specific real document's scripts.
+
+ This constructor might come handy when you need some kind of uninitialized
+ ScriptDocument, which you do not want to operate on (yet), but initialize later
+ by assignment.
+
+ <member>isValid</member> will return <FALSE/> for a ScriptDocument constructed
+ this way.
+ */
+ explicit ScriptDocument( SpecialDocument _eType );
+
+ /** creates a ScriptDocument instance which refers to a document given as
+ XModel
+
+ @param _rxDocument
+ the document. Must not be <NULL/>.
+ */
+ explicit ScriptDocument( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& _rxDocument );
+
+ /// copy constructor
+ ScriptDocument( const ScriptDocument& _rSource );
+
+ /// destructor
+ ~ScriptDocument();
+
+ /** returns a reference to a shared ScriptDocument instance which
+ operates on the application-wide scripts and dialogs
+ */
+ static const ScriptDocument&
+ getApplicationScriptDocument();
+
+ /** returns a (newly created) ScriptDocument instance for the document to
+ which a given BasicManager belongs
+
+ If the basic manager is the application's basic manager, then the (shared)
+ ScriptDocument instance which is responsible for the application is returned.
+
+ @see getApplicationScriptDocument
+ */
+ static ScriptDocument
+ getDocumentForBasicManager( const BasicManager* _pManager );
+
+ /** returns a (newly created) ScriptDocument instance for the document
+ with a given caption or URL
+
+ If there is no document with the given caption, then the (shared)
+ ScriptDocument instance which is responsible for the application is returned.
+
+ @see getApplicationScriptDocument
+ */
+ static ScriptDocument
+ getDocumentWithURLOrCaption( const ::rtl::OUString& _rUrlOrCaption );
+
+ /** operation mode for getAllScriptDocuments
+ */
+ enum ScriptDocumentList
+ {
+ /** all ScriptDocuments, including the dedicated one which represents
+ the application-wide scripts/dialogs.
+ */
+ AllWithApplication,
+ /** real documents only
+ */
+ DocumentsOnly,
+ /** real documents only, sorted lexicographically by their title (using the sys locale's default
+ collator)
+ */
+ DocumentsSorted
+ };
+
+ /** returns the set of ScriptDocument instances, one for each open document which
+ contains Basic/Dialog containers; plus an additional instance for
+ the application, if desired
+
+ Documents which are not visible - i.e. do not have a visible frame.
+
+ @param _bIncludingApplication
+ <TRUE/> if the application-wide scripts/dialogs should also be represented
+ by a ScriptDocument
+ */
+ static ScriptDocuments
+ getAllScriptDocuments( ScriptDocumentList _eListType );
+
+ // comparison
+ bool operator==( const ScriptDocument& _rhs ) const;
+ inline bool operator!=( const ScriptDocument& _rhs ) const { return !( *this == _rhs ); }
+
+ /// retrieves a (pretty simple) hash code for the document
+ sal_Int32 hashCode() const;
+
+ /** determines whether the document is actually able to contain Basic/Dialog libraries
+
+ Note that validity does not automatically imply the document can be used for active
+ work. Instead, it is possible the document is closed already (or being closed currently).
+ In this case, isValid will return <TRUE/>, but isAlive will return <FALSE/>.
+
+ @return
+ <TRUE/> if the instance refers to a document which contains Basic/Dialog libraries,
+ or the application as a whole, <FALSE/> otherwise.
+
+ @see isAlive
+ */
+ bool isValid() const;
+
+ /** determines whether the document instance is alive
+
+ If the instance is not valid, <FALSE/> is returned.
+
+ If the instance refers to a real document, which is already closed, or just being closed,
+ the method returns <FALSE/>.
+
+ If the instance refers to the application, <TRUE/> is returned.
+
+ @see isValid
+ */
+ bool isAlive() const;
+
+ /// returns the BasicManager associated with this instance
+ BasicManager*
+ getBasicManager() const;
+
+ /** returns the UNO component representing the document which the instance operates on
+
+ Must not be used when the instance operates on the application-wide
+ Basic/Dialog libraries.
+ */
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >
+ getDocument() const;
+
+ /** returns the UNO component representing the document which the instance operates on
+
+ May be used when the instance operates on the application-wide
+ Basic/Dialog libraries, in this case it returns <NULL/>.
+ */
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >
+ getDocumentOrNull() const;
+
+ /** returns the Basic or Dialog library container of the document
+
+ If the document is not valid, <NULL/> is returned.
+ */
+ ::com::sun::star::uno::Reference< ::com::sun::star::script::XLibraryContainer >
+ getLibraryContainer( LibraryContainerType _eType ) const;
+
+ /** determines whether there exists a library of the given type, with the given name
+ */
+ bool hasLibrary( LibraryContainerType _eType, const ::rtl::OUString& _rLibName ) const;
+
+ /** returns a script or dialog library given by name
+
+ @param _eType
+ the type of library to load
+ @param _rLibName
+ the name of the script library
+ @param _bLoadLibrary
+ <TRUE/> if and only if the library should be loaded.
+
+ @throws NoSuchElementException
+ if there is no script library with the given name
+ */
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >
+ getLibrary( LibraryContainerType _eType, const ::rtl::OUString& _rLibName, bool _bLoadLibrary ) const
+ SAL_THROW((::com::sun::star::container::NoSuchElementException));
+
+ /** creates a script or dialog library in the document, or returns an existing one
+
+ If <code>_rLibName</code> denotes an existing library which does not need to be created,
+ then this library will automatically be loaded, and then returned.
+ */
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >
+ getOrCreateLibrary( LibraryContainerType _eType, const ::rtl::OUString& _rLibName ) const;
+
+ /** returns the names of the modules in a given script or dialog library of the document
+ */
+ ::com::sun::star::uno::Sequence< ::rtl::OUString >
+ getObjectNames( LibraryContainerType _eType, const ::rtl::OUString& _rLibName ) const;
+
+ /** retrieves a name for a newly to be created module or dialog
+ */
+ ::rtl::OUString
+ createObjectName( LibraryContainerType _eType, const ::rtl::OUString& _rLibName ) const;
+
+ /** loads a script or dialog library given by name, if there is such a library
+ */
+ void loadLibraryIfExists( LibraryContainerType _eType, const ::rtl::OUString& _rLibrary );
+
+ /// retrieves the (combined) names of all script and dialog libraries
+ ::com::sun::star::uno::Sequence< ::rtl::OUString >
+ getLibraryNames() const;
+
+ /** removes a given script module from the document
+
+ @return
+ <TRUE/> if and only if the removal was successful. When <FALSE/> is returned,
+ this will reported as assertion in a non-product build.
+ */
+ bool removeModule( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rModuleName ) const;
+
+ /** creates a module with the given name in the given library
+ @param _rLibName
+ the library name
+ @param _rModName
+ the name of the to-be-created module
+ @param _bCreateMain
+ determines whether or not a function Main should be created
+ @param _out_rNewModuleCode
+ the source code of the newly created module
+ @return
+ <TRUE/> if and only if the creation was successful
+ */
+ bool createModule( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rModName, bool _bCreateMain, ::rtl::OUString& _out_rNewModuleCode ) const;
+
+ /** inserts a given piece as code as module
+ @param _rLibName
+ the name of the library to insert the module into. If a library with this name does
+ not yet exist, it will be created.
+ @param _rModName
+ the name of the module to insert the code as. Must denote a name which is not yet
+ used in the module library.
+ @param _rModuleCode
+ the code of the new module
+ @return
+ <TRUE/> if and only if the insertion was successful.
+ */
+ bool insertModule( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rModName, const ::rtl::OUString& _rModuleCode ) const;
+
+ /** updates a given module with new code
+ @param _rLibName
+ the name of the library the modules lives in. Must denote an existing module library.
+ @param _rModName
+ the name of the module to update. Must denote an existing module in the given library.
+ @param _rModuleCode
+ the new module code.
+ @return
+ <TRUE/> if and only if the insertion was successful.
+ */
+ bool updateModule( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rModName, const ::rtl::OUString& _rModuleCode ) const;
+
+ /// determines whether a module with the given name exists in the given library
+ bool hasModule( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rModName ) const;
+
+ /** retrieves a module's source
+ @param _rLibName
+ the library name where the module is located
+ @param _rModName
+ the module name
+ @param _out_rModuleSource
+ takes the module's source upon successful return
+ @return
+ <TRUE/> if and only if the code could be successfully retrieved, <FALSE/> otherwise
+ */
+ bool getModule( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rModName, ::rtl::OUString& _rModuleSource ) const;
+
+ /** renames a module
+ @param _rLibName
+ the library where the module lives in. Must denote an existing library.
+ @param _rOldName
+ the old module name. Must denote an existing module.
+ @param _rNewName
+ the new module name
+ @return
+ <TRUE/> if and only if renaming was successful.
+ */
+ bool renameModule( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rOldName, const ::rtl::OUString& _rNewName ) const;
+
+ /** removes a given dialog from the document
+
+ @return
+ <TRUE/> if and only if the removal was successful. When <FALSE/> is returned,
+ this will reported as assertion in a non-product build.
+ */
+ bool removeDialog( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rDialogName ) const;
+
+ /// determines whether a dialog with the given name exists in the given library
+ bool hasDialog( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rDialogName ) const;
+
+ /** retrieves a dialog
+ @param _rLibName
+ the library name where the module is located
+ @param _rDialogName
+ the dialog's name
+ @param _out_rDialogSource
+ takes the provider for the dialog's desription, upon successful return
+ @return
+ <TRUE/> if and only if the dialog could be successfully retrieved, <FALSE/> otherwise
+ */
+ bool getDialog(
+ const ::rtl::OUString& _rLibName,
+ const ::rtl::OUString& _rDialogName,
+ ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStreamProvider >& _out_rDialogProvider
+ ) const;
+
+ /** renames a dialog
+ @param _rLibName
+ the library where the dialog lives in. Must denote an existing library.
+ @param _rOldName
+ the old dialog name. Must denote an existing dialog.
+ @param _rNewName
+ the new dialog name
+ @param _rxExistingDialogModel
+ the existing model of the dialog, if already loaded in the IDE
+ @return
+ <TRUE/> if and only if renaming was successful.
+ */
+ bool renameDialog(
+ const ::rtl::OUString& _rLibName,
+ const ::rtl::OUString& _rOldName,
+ const ::rtl::OUString& _rNewName,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >& _rxExistingDialogModel
+ ) const;
+
+ /** create a dialog
+ @param _rLibName
+ the library name where the module is located
+ @param _rDialogName
+ the dialog's name
+ @param _out_rDialogSource
+ takes the provider for the dialog's desription, upon successful return
+ @return
+ <TRUE/> if and only if the dialog could be successfully retrieved, <FALSE/> otherwise
+ */
+ bool createDialog(
+ const ::rtl::OUString& _rLibName,
+ const ::rtl::OUString& _rDialogName,
+ ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStreamProvider >& _out_rDialogProvider
+ ) const;
+
+ /** inserts a given dialog into a given library
+
+ @param _rLibName
+ the name of the library to insert the dialog into. If a library with this name does
+ not yet exist, it will be created.
+ @param _rModName
+ the name of the dialog to insert. Must denote a name which is not yet
+ used in the dialog library.
+ @param _rDialogProvider
+ the provider of the dialog's description
+ @return
+ <TRUE/> if and only if the insertion was successful.
+ */
+ bool insertDialog(
+ const ::rtl::OUString& _rLibName,
+ const ::rtl::OUString& _rDialogName,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStreamProvider >& _rDialogProvider
+ ) const;
+
+ /** determines whether the document is read-only
+
+ cannot be called if the document operates on the application-wide scripts
+ */
+ bool isReadOnly() const;
+
+ /** determines whether the ScriptDocument instance operates on the whole application,
+ as opposed to a real document
+ */
+ bool isApplication() const;
+
+ /** determines whether the ScriptDocument instance operates on a real document,
+ as opposed to the whole application
+ */
+ bool isDocument() const { return isValid() && !isApplication(); }
+
+ /** marks the document as modified
+ @precond
+ the instance operates on a real document, not on the application
+ @see isDocument
+ */
+ void setDocumentModified() const;
+
+ /** determines whether the document is modified
+ @precond
+ the instance operates on a real document, not on the application
+ @see isDocument
+ */
+ bool isDocumentModified() const;
+
+ /** saves the document, if the instance refers to a real document
+ @precond
+ <code>isApplication</code> returns <FALSE/>
+ */
+ bool saveDocument(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::task::XStatusIndicator >& _rxStatusIndicator
+ ) const;
+
+ /// returns the location of a library given by name
+ LibraryLocation
+ getLibraryLocation( const ::rtl::OUString& _rLibName ) const;
+
+ /// returns the title for the document
+ ::rtl::OUString
+ getTitle( LibraryLocation _eLocation, LibraryType _eType = LIBRARY_TYPE_ALL ) const;
+
+ /** returns the title of the document
+
+ to be used for valid documents only
+ */
+ ::rtl::OUString
+ getTitle() const;
+
+ /** returns the URL of the document
+
+ to be used for valid documents only
+ */
+ ::rtl::OUString
+ getURL() const;
+
+ /** determines whether the document is currently the one-and-only application-wide active document
+ */
+ bool isActive() const;
+
+ /** determines whether macro execution for this document is allowed
+
+ only to be called for real documents (->isDocument)
+ */
+ bool allowMacros() const;
+ };
+
+//........................................................................
+} // namespace basctl
+//........................................................................
+
+// convenience ... better would be all classes in the project are in
+// the same namespace ...
+using ::basctl::ScriptDocument;
+using ::basctl::ScriptDocuments;
+using ::basctl::E_SCRIPTS;
+using ::basctl::E_DIALOGS;
+using ::basctl::LibraryLocation;
+using ::basctl::LIBRARY_LOCATION_UNKNOWN;
+using ::basctl::LIBRARY_LOCATION_USER;
+using ::basctl::LIBRARY_LOCATION_SHARE;
+using ::basctl::LIBRARY_LOCATION_DOCUMENT;
+using ::basctl::LibraryType;
+using ::basctl::LIBRARY_TYPE_UNKNOWN;
+using ::basctl::LIBRARY_TYPE_MODULE;
+using ::basctl::LIBRARY_TYPE_DIALOG;
+using ::basctl::LIBRARY_TYPE_ALL;
+
+#endif // SCRIPTDOCUMENT_HXX
diff --git a/basctl/source/inc/svheader.hxx b/basctl/source/inc/svheader.hxx
new file mode 100644
index 000000000000..96a65df1625f
--- /dev/null
+++ b/basctl/source/inc/svheader.hxx
@@ -0,0 +1,92 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: svheader.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVHEADER_HXX
+#define _SVHEADER_HXX
+
+
+// SV
+#define _COLDLG_HXX
+#define _CONFIG_HXX
+#define _CURSOR_HXX
+#define _FONTDLG_HXX
+#define _PRVWIN_HXX
+//#define _SELENG_HXX
+#define _VIRTDEV_HXX
+
+// Wenn Brkdlg ohne PCH:
+// #define _SPIN_HXX
+// #define _FIELD_HXX
+
+// SVTOOLS
+#define _CTRLBOX_HXX
+#define _EXTATTR_HXX
+#define _CTRLTOOL_HXX
+#define _CTRLBOX_HXX
+#define _STDMENU_HXX
+#define _VALUESET_HXX
+#define _RULER_HXX
+#define _SCRWIN_HXX
+
+// SFX
+#define _SFXAPPWIN_HXX
+#define _SFX_RESMGR_HXX
+#define _SFX_PRNMON_HXX
+#define _INTRO_HXX
+#define _SFXMSGDESCR_HXX
+#define _SFXMSGPOOL_HXX
+// #define _PASSWD_HXX
+#define _SFXMNUMGR_HXX
+
+// SFXDLG
+// #define _SFXTABDLG_HXX
+// #define _SFX_DINFDLG_HXX
+#define _SFX_MGETEMPL_HXX
+#define _SFX_STYLEDLG_HXX
+#define _SFX_TPLPITEM_HXX
+#define _NEWSTYLE_HXX
+#define _SFXDOCTEMPL_HXX
+#define _SFXDOCTDLG_HXX
+#define _SFX_TEMPLDLG_HXX
+#define _SFXNEW_HXX
+
+// SFXDOC
+// #define _SFXDOCINF_HXX
+//#define _SFX_DOCFILT_HXX
+#define _SFX_IPFRM_HXX
+#define _SFX_INTERNO_HXX
+
+// SVCONTNR
+#define _SVICNVW_HXX
+
+#define _SBSTDOBJ1_HXX
+#define _SBXMSTRM_HXX
+
+#endif
+