Anonymous avatar Anonymous committed fe1a260 Merge

merged DEV300

Comments (0)

Files changed (1129)

File contents unchanged.

 	comphelper \
         editeng \
 	framework \
+	padmin \
 	sfx2 \
     sot \
 	svl \
 	sspretty \
 ))
 
+$(eval $(call gb_Helper_register_executables,OOO, \
+    spadmin.bin \
+))
+
 $(eval $(call gb_Helper_register_libraries,OOOLIBS, \
 	avmedia \
 	basegfx \
 	sb \
 	sfx \
 	sot \
+	spa \
 	svl \
 	svt \
 	svx \
 	jpeglib \
 	ooopathutils \
 	salcpprt \
+	vclmain \
 	zlib \
     vclmain \
 ))

accessibility/inc/accessibility/standard/vclxaccessiblelistboxlist.hxx

-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ACCESSIBILITY_STANDARD_VCLXACCESSIBLELISTBOXLIST_HXX
-#define ACCESSIBILITY_STANDARD_VCLXACCESSIBLELISTBOXLIST_HXX
-
-#include <accessibility/standard/vclxaccessiblelist.hxx>
-#include <com/sun/star/accessibility/XAccessibleAction.hpp>
-#include <com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp>
-#ifndef _COMPHELPER_BROADCASTHELPER_HXX
-#include <comphelper/broadcasthelper.hxx>
-#endif
-#ifndef _COMPHELPER_UNO3_HXX
-#include <comphelper/uno3.hxx>
-#endif
-#ifndef _CPPUHELPER_IMPLBASE1_HXX
-#include <cppuhelper/implbase1.hxx>
-#endif
-
-typedef ::cppu::ImplHelper1	<	::com::sun::star::accessibility::XAccessibleSelection
-							>	VCLXAccessibleListBoxList_BASE;
-
-
-class ListBox;
-/** This class extends the list of the <type>VCLXAccessibleList</type> class
-    about selection.
-*/
-class VCLXAccessibleListBoxList :
-    public VCLXAccessibleList,
-    public VCLXAccessibleListBoxList_BASE
-{
-public:
-	VCLXAccessibleListBoxList (VCLXWindow* pVCLXindow, BoxType aBoxType,
-							   const ::com::sun::star::uno::Reference<
-							   	::com::sun::star::accessibility::XAccessible >& _xParent);
-
-	// XInterface
-	DECLARE_XINTERFACE( )
-
-	// XTypeProvider
-	DECLARE_XTYPEPROVIDER( )
-
-	// XServiceInfo
-	virtual ::rtl::OUString SAL_CALL getImplementationName (void)
-        throw (::com::sun::star::uno::RuntimeException);
-    // Return list box list specific services.
-	virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
-        getSupportedServiceNames (void)
-        throw (::com::sun::star::uno::RuntimeException);
-
-	// XAccessibleSelection
-	void        SAL_CALL selectAccessibleChild( sal_Int32 nChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
-	sal_Bool    SAL_CALL isAccessibleChildSelected( sal_Int32 nChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
-	void        SAL_CALL clearAccessibleSelection(  ) throw (::com::sun::star::uno::RuntimeException);
-	void        SAL_CALL selectAllAccessibleChildren(  ) throw (::com::sun::star::uno::RuntimeException);
-	sal_Int32   SAL_CALL getSelectedAccessibleChildCount(  ) throw (::com::sun::star::uno::RuntimeException);
-	::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);
-	void        SAL_CALL deselectAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
-
-    /** Create the specified child and insert it into the list of children.
-        Sets the child's states.
-    */
-    virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
-        CreateChild (sal_Int32 i);
-
-
-protected:
-	virtual ~VCLXAccessibleListBoxList (void);
-
-	virtual void ProcessWindowEvent (const VclWindowEvent& rVclWindowEvent);
-
-private:
-	sal_Int32	m_nLastTopEntry;
-	sal_uInt16		m_nLastSelectedPos;
-	bool		m_bDisableProcessEvent;
-
-	void UpdateEntryRange_Impl (void);
-    using VCLXAccessibleList::UpdateSelection_Impl;
-    void UpdateSelection_Impl (void);
-    using VCLXAccessibleList::checkEntrySelected;
-	sal_Bool checkEntrySelected(ListBox* _pListBox,
-							sal_uInt16 _nPos,
-							::com::sun::star::uno::Any& _rNewValue,
-							::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _rxNewAcc);
-};
-
-#endif // ACCESSIBILITY_STANDARD_VCLXACCESSIBLELISTBOX_HXX
-

accessibility/source/extended/AccessibleGridControlTable.cxx

     ensureIsValidIndex( nChildIndex );
     sal_Int32 nColumns = m_aTable.GetColumnCount();
     sal_Int32 nRow = (nChildIndex / nColumns);
-    std::vector< sal_Int32 > selectedRows = m_aTable.GetSelectedRows();
-    selectedRows.push_back(nRow);
+    m_aTable.SelectRow( nRow, sal_True );
 }
 sal_Bool SAL_CALL AccessibleGridControlTable::isAccessibleChildSelected( sal_Int32 nChildIndex )
     throw ( lang::IndexOutOfBoundsException, uno::RuntimeException )
     TCSolarGuard aSolarGuard;
     ::osl::MutexGuard aGuard( getOslMutex() );
     ensureIsAlive();
-    for(unsigned int i=0;i<m_aTable.GetSelectedRows().size();i++)
-	    m_aTable.RemoveSelectedRow((sal_Int32)i);
+    m_aTable.SelectAllRows( false );
 }
 void SAL_CALL AccessibleGridControlTable::selectAllAccessibleChildren()
     throw ( uno::RuntimeException )

accessibility/source/extended/AccessibleGridControlTableBase.cxx

 
 void AccessibleGridControlTableBase::implGetSelectedRows( Sequence< sal_Int32 >& rSeq )
 {
-	rSeq = comphelper::containerToSequence(m_aTable.GetSelectedRows());
+    sal_Int32 const selectionCount( m_aTable.GetSelectedRowCount() );
+    rSeq.realloc( selectionCount );
+    for ( sal_Int32 i=0; i<selectionCount; ++i )
+        rSeq[i] = m_aTable.GetSelectedRowIndex(i);
 }
 
 void AccessibleGridControlTableBase::ensureIsValidRow( sal_Int32 nRow )

accessibility/source/standard/vclxaccessiblebox.cxx

 #include <accessibility/standard/vclxaccessibletextfield.hxx>
 #include <accessibility/standard/vclxaccessibleedit.hxx>
 #include <accessibility/standard/vclxaccessiblelist.hxx>
-#include <accessibility/standard/vclxaccessiblelistboxlist.hxx>
 #include <accessibility/helper/listboxhelper.hxx>
 
 #include <unotools/accessiblestatesethelper.hxx>

File contents unchanged.

automation/source/server/statemnt.cxx

 #include <svtools/valueset.hxx>
 #include <svtools/roadmap.hxx>
 #include <svtools/table/tablecontrol.hxx>
+#include <svtools/table/tablecontrolinterface.hxx>
 #include <svl/poolitem.hxx>
 #include <svtools/extensionlistbox.hxx>
 // Hat keinen Includeschutz
                                                          ValueOK( aUId, MethodString( nMethodId ), nNr2, pTC->GetRowCount() ))
                                                     {
                                                         ::svt::table::PTableModel pModel = pTC->GetModel();
-                                                        Any aCell = pModel->getCellContent()[nNr2-1][nNr1-1];
+                                                        Any aCell;
+                                                        pModel->getCellContent( nNr1-1, nNr2-1, aCell );
                                                         pRet->GenReturn ( RET_Value, aUId, String( aCell.getValueTypeName() ));
                                                     }
 											    }
                                                          ValueOK( aUId, MethodString( nMethodId ), nNr2, pTC->GetRowCount() ))
                                                     {
                                                         ::svt::table::PTableModel pModel = pTC->GetModel();
-                                                        Any aCell = pModel->getCellContent()[nNr2-1][nNr1-1];
+                                                        Any aCell;
+                                                        pModel->getCellContent( nNr1-1, nNr2-1, aCell );
                                                         /* doesn't work ATM since it gets casted to SbxDATE in VCLTestTool unfortunately
 						                                SbxVariableRef xRes = new SbxVariable( SbxVARIANT );
 						                                unoToSbxValue( xRes, aCell );
                                                             Point aPos( aSize.Width() / 2, aSize.Height() / 2 );
                                                             long nStep = aSize.Height() / 4;
                                                             ::svt::table::RowPos nLastPos;
-                                                            while ( ( nLastPos = pTC->GetCurrentRow( aPos ) ) != nNr1-1 && nStep > 0 )
+                                                            while ( ( nLastPos = pTC->getTableControlInterface().hitTest( aPos ).nRow ) != nNr1-1 && nStep > 0 )
                                                             {
                                                                 if ( nLastPos > nNr1-1 || nLastPos == ROW_INVALID )
                                                                     aPos.Y() -= nStep;
                                                                     aPos.Y() += nStep;
                                                                 nStep /= 2;
                                                             }
-                                                            if ( pTC->GetCurrentRow( aPos ) == nNr1-1 )
+                                                            if ( pTC->getTableControlInterface().hitTest( aPos ).nRow == nNr1-1 )
                                                             {
                                                                 MouseEvent aMEvnt(aPos,1,MOUSE_SIMPLECLICK|MOUSE_SELECT,MOUSE_LEFT,KEY_MOD1);
                                                                 pTC->getSelEngine()->SelMouseButtonDown( aMEvnt );
 											    }
 											    break;
 										    case M_GetSelCount :
-											    pRet->GenReturn ( RET_Value, aUId, comm_USHORT( pTC->GetSelectedRows().size() ));
+											    pRet->GenReturn ( RET_Value, aUId, comm_USHORT( pTC->GetSelectedRowCount() ));
 											    break;
 										    case M_GetSelIndex :
 											    if ( ! (nParams & PARAM_USHORT_1) )
 												    nNr1 = 1;
-											    if ( ValueOK( aUId, CUniString("GetSelIndex"), nNr1, pTC->GetSelectedRows().size() ) )
-												    pRet->GenReturn ( RET_Value, aUId, comm_USHORT( pTC->GetSelectedRows()[nNr1-1] +1 ) );
+											    if ( ValueOK( aUId, CUniString("GetSelIndex"), nNr1, pTC->GetSelectedRowCount() ) )
+												    pRet->GenReturn ( RET_Value, aUId, comm_USHORT( pTC->GetSelectedRowIndex( nNr1-1 ) +1 ) );
 											    break;
 /*										    case M_GetSelText :
 											    if ( ! (nParams & PARAM_USHORT_1) )

basctl/source/basicide/baside2b.cxx

 								  | WB_HASLINESATROOT | WB_HASBUTTONSATROOT ),
 	aHeaderBar( this, WB_BUTTONSTYLE | WB_BORDER )
 {
+	aXEdit.SetAccessibleName(String(IDEResId( RID_STR_WATCHNAME)));
+	aTreeListBox.SetAccessibleName(String(IDEResId(RID_STR_WATCHNAME)));		
+	
 	nVirtToolBoxHeight = aXEdit.GetSizePixel().Height() + 7;
 	nHeaderBarHeight = 16;
 
 	aGotoCallButton( this, IDEResId( RID_IMGBTN_GOTOCALL ) ),
 	aStackStr( IDEResId( RID_STR_STACK ) )
 {
-    aTreeListBox.SetHelpId(HID_BASICIDE_STACKWINDOW_LIST);
+   	aTreeListBox.SetHelpId(HID_BASICIDE_STACKWINDOW_LIST);
+	aTreeListBox.SetAccessibleName(String( IDEResId(RID_STR_STACKNAME)));		
 	aTreeListBox.SetPosPixel( Point( DWBORDER, nVirtToolBoxHeight ) );
 	aTreeListBox.SetHighlightRange();
     aTreeListBox.SetSelectionMode( NO_SELECTION );

basctl/source/basicide/moduldl2.cxx

     ,aEditButton( this, IDEResId( RID_PB_EDIT ) )
     ,aCloseButton( this, IDEResId( RID_PB_CLOSE ) )
     ,aPasswordButton( this, IDEResId( RID_PB_PASSWORD ) )
-    ,aExportButton( this, IDEResId( RID_PB_EXPORT ) )
     ,aNewLibButton( this, IDEResId( RID_PB_NEWLIB ) )
     ,aInsertLibButton( this, IDEResId( RID_PB_APPEND ) )
+    ,aExportButton( this, IDEResId( RID_PB_EXPORT ) )
     ,aDelButton( this, IDEResId( RID_PB_DELETE ) )
     ,m_aCurDocument( ScriptDocument::getApplicationScriptDocument() )
     ,m_eCurLocation( LIBRARY_LOCATION_UNKNOWN )

basctl/source/basicide/moduldlg.hxx

 	PushButton			aEditButton;
 	CancelButton		aCloseButton;
 	PushButton			aPasswordButton;
-	PushButton			aExportButton;
 	PushButton			aNewLibButton;
 	PushButton			aInsertLibButton;
+	PushButton			aExportButton;
 	PushButton			aDelButton;
 
     ScriptDocument      m_aCurDocument;

basctl/source/basicide/objdlg.cxx

                              WB_HSCROLL );
 
 	aMacroTreeList.SetSelectHdl( LINK( this, ObjectCatalog, TreeListHighlightHdl ) );
+	aMacroTreeList.SetAccessibleName(String(IDEResId(RID_STR_TLB_MACROS)));
+	aMacroTreeList.ScanAllEntries();
+	aMacroTreeList.GrabFocus();
 
-	aMacroTreeList.ScanAllEntries();
 	CheckButtons();
 
 	Point aPos = IDE_DLL()->GetExtraData()->GetObjectCatalogPos();

basctl/source/basicide/objdlg.hrc

 
 #define TBITEM_SHOW		1
 
+#define RID_STR_TLB_MACROS 		( RID_BASICIDE_START + 71 )
+
 #endif // _OBJDLG_HXX

basctl/source/basicide/objdlg.src

 		Size = MAP_APPFONT ( 185 , 18 ) ;
 	};
 };
+
+String RID_STR_TLB_MACROS
+{
+	Text [ en-US ] = "Objects Tree";
+}; 
+

basic/inc/basic/sbstar.hxx

 class SbTextPortions;
 class SbMethod;
 class BasicManager;
+class DocBasicItem;
 
 class StarBASICImpl;
 
 	friend class SbiExpression; // Access to RTL
 	friend class SbiInstance;
 	friend class SbiRuntime;
+	friend class DocBasicItem;
 
 	StarBASICImpl*	mpStarBASICImpl;
 

basic/source/basmgr/makefile.mk

 
 SLOFILES= \
         $(SLO)$/basmgr.obj \
-        $(SLO)$/basicmanagerrepository.obj
+        $(SLO)$/basicmanagerrepository.obj \
+        $(SLO)$/vbahelper.obj
 
 # --- Targets -------------------------------------------------------------
 

basic/source/classes/sb.cxx

 #include "sb.hrc"
 #include <basrid.hxx>
 #include <vos/mutex.hxx>
+#include <cppuhelper/implbase1.hxx>
 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/util/XCloseBroadcaster.hpp>
+#include <com/sun/star/util/XCloseListener.hpp>
 #include "errobject.hxx"
+#include <map>
 #include <hash_map>
 
 #include <com/sun/star/script/ModuleType.hpp>
 const static String aThisComponent( RTL_CONSTASCII_USTRINGPARAM("ThisComponent") );
 const static String aVBAHook( RTL_CONSTASCII_USTRINGPARAM( "VBAGlobals" ) );
 
+// ============================================================================
+
+class DocBasicItem : public ::cppu::WeakImplHelper1< util::XCloseListener >
+{
+public:
+    explicit DocBasicItem( StarBASIC& rDocBasic );
+    virtual ~DocBasicItem();
+
+    inline const SbxObjectRef& getClassModules() const { return mxClassModules; }
+    inline bool isDocClosed() const { return mbDocClosed; }
+
+	void clearDependingVarsOnDelete( StarBASIC& rDeletedBasic );
+
+    void startListening();
+    void stopListening();
+
+    virtual void SAL_CALL queryClosing( const lang::EventObject& rSource, sal_Bool bGetsOwnership ) throw (util::CloseVetoException, uno::RuntimeException);
+    virtual void SAL_CALL notifyClosing( const lang::EventObject& rSource ) throw (uno::RuntimeException);
+    virtual void SAL_CALL disposing( const lang::EventObject& rSource ) throw (uno::RuntimeException);
+
+private:
+    StarBASIC&      mrDocBasic;
+    SbxObjectRef    mxClassModules;
+    bool            mbDocClosed;
+    bool            mbDisposed;
+};
+
+// ----------------------------------------------------------------------------
+
+DocBasicItem::DocBasicItem( StarBASIC& rDocBasic ) :
+    mrDocBasic( rDocBasic ),
+    mxClassModules( new SbxObject( String() ) ),
+    mbDocClosed( false ),
+    mbDisposed( false )
+{
+}
+
+DocBasicItem::~DocBasicItem()
+{
+    stopListening();
+}
+
+void DocBasicItem::clearDependingVarsOnDelete( StarBASIC& rDeletedBasic )
+{
+    mrDocBasic.implClearDependingVarsOnDelete( &rDeletedBasic );
+}
+
+void DocBasicItem::startListening()
+{
+    Any aThisComp;
+    mrDocBasic.GetUNOConstant( "ThisComponent", aThisComp );
+    Reference< util::XCloseBroadcaster > xCloseBC( aThisComp, UNO_QUERY );
+    if( xCloseBC.is() )
+        try { xCloseBC->addCloseListener( this ); } catch( uno::Exception& ) {}
+}
+
+void DocBasicItem::stopListening()
+{
+    if( mbDisposed ) return;
+    mbDisposed = true;
+    Any aThisComp;
+    mrDocBasic.GetUNOConstant( "ThisComponent", aThisComp );
+    Reference< util::XCloseBroadcaster > xCloseBC( aThisComp, UNO_QUERY );
+    if( xCloseBC.is() )
+        try { xCloseBC->removeCloseListener( this ); } catch( uno::Exception& ) {}
+}
+
+void SAL_CALL DocBasicItem::queryClosing( const lang::EventObject& /*rSource*/, sal_Bool /*bGetsOwnership*/ ) throw (util::CloseVetoException, uno::RuntimeException)
+{
+}
+
+void SAL_CALL DocBasicItem::notifyClosing( const lang::EventObject& /*rEvent*/ ) throw (uno::RuntimeException)
+{
+    stopListening();
+    mbDocClosed = true;
+}