Anonymous avatar Anonymous committed 2e7c354

fixed bugs for linux build

Comments (0)

Files changed (12)

svtools/inc/svtools/table/tablemodel.hxx

 		virtual bool hasHorizontalScrollbar() = 0;
 		/** fills cells with content
 		*/
-		virtual void setCellContent(std::vector< std::vector< ::com::sun::star::uno::Any > > cellContent)=0;
+		virtual void setCellContent(const std::vector< std::vector< ::com::sun::star::uno::Any > >& cellContent)=0;
 		/** gets the content of the cells
 		*/
 		virtual std::vector< std::vector< ::com::sun::star::uno::Any > >&	getCellContent() = 0;
 		/**sets title of header rows
 		*/
-		virtual void setRowHeaderName(std::vector<rtl::OUString> cellColumnContent)=0;
+		virtual void setRowHeaderName(const std::vector<rtl::OUString>& cellColumnContent)=0;
 		/** gets title of header rows
 		*/
 		virtual std::vector<rtl::OUString>&   getRowHeaderName() = 0;

svtools/source/table/tablecontrol.cxx

 				aRetText = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ColumnHeaderBar" ) );
 				break;
 			case TCTYPE_TABLECELL:
-				//Window* pWin = GetCellContent(_nRow, _nCol);	
 				aRetText = GetRowName(_nRow);
 				break;
 			case TCTYPE_ROWHEADERCELL:
 			break;
         case TCTYPE_TABLECELL:
 			{
-				//sal_Int32 nRow = GetCurRow();
-				//sal_uInt16 nColumn = GetCurColumnId();
-				//if ( IsFieldVisible(nRow,nColumn) )
-				//	rStateSet.AddState( AccessibleStateType::VISIBLE );
 				rStateSet.AddState( AccessibleStateType::TRANSIENT );
 				rStateSet.AddState( AccessibleStateType::SELECTABLE);
 				if( GetSelectedRowCount()>0)

svtools/source/table/tablecontrol_impl.cxx

 		{
 			return false;
 		}
-		virtual void setCellContent(std::vector<std::vector< ::com::sun::star::uno::Any > > pCellEntryType)
+		virtual void setCellContent(const std::vector<std::vector< ::com::sun::star::uno::Any > >& )
 		{
-			(void)pCellEntryType;
 		}
 		virtual ::com::sun::star::util::Color getLineColor()
 		{
 		{
 			return *( new std::vector<std::vector< ::com::sun::star::uno::Any > >);
 		}
-		virtual void setRowHeaderName(std::vector<rtl::OUString> pCellEntryType)
+		virtual void setRowHeaderName(const std::vector<rtl::OUString>& )
 		{
-			(void)pCellEntryType;
 		}
 		virtual std::vector<rtl::OUString>& getRowHeaderName() 
 		{
 					it!=m_nRowSelected.end();++it)
 					{
 						invalidateSelectedRegion(*it, *it, rCells);
-						//m_pDataWindow->Invalidate(rCells);
 					}
 					m_nRowSelected.clear();
 				}
 					it!=m_nRowSelected.end();++it)
 					{
 						invalidateSelectedRegion(*it, *it, rCells);
-						//m_pDataWindow->Invalidate(rCells);
 					}
 					m_nRowSelected.clear();
 				}
 						it!=m_nRowSelected.end();++it)
 						{
 							invalidateSelectedRegion(*it, *it, rCells);
-							//m_pDataWindow->Invalidate(rCells);
 						}
 						m_nRowSelected.clear();
 						m_nRowSelected.push_back(m_nCurRow);
 						it!=m_nRowSelected.end();++it)
 						{
 							invalidateSelectedRegion(*it, *it, rCells);
-							//m_pDataWindow->Invalidate(rCells);
 						}
 						m_nRowSelected.clear();
 						m_nRowSelected.push_back(m_nCurRow);
             Rectangle aCellRect;
             impl_getCellRect( m_nCurColumn, m_nCurRow, aCellRect );
 
-			// const StyleSettings& rStyle = m_rAntiImpl.GetSettings().GetStyleSettings();
 			if ( _bShow )
 			{
                 pRenderer->ShowCellCursor( *m_pDataWindow, aCellRect);
 	//this method is to be called, when a new row is added
 	void TableControl_Impl::invalidateRow(RowPos _nRowPos, Rectangle& _rCellRect)
 	{
-		//DBG_CHECK_ME();
 		if(m_nCurRow < 0)
 			m_nCurRow = 0;
 		if(m_nCursorHidden == 2)
 	//-------------------------------------------------------------------------------
 	void TableControl_Impl::invalidateRows(RowPos _nRowStart, Rectangle& _rCellRect)
 	{
-		//DBG_CHECK_ME();
 		(void)_nRowStart;
 		(void)_rCellRect;
 		impl_ni_updateScrollbars();
 			m_nTopRow--;
 		else
 			m_nTopRow = 0;
-		//m_pDataWindow->Invalidate(_rCellRect);
 		m_pDataWindow->Invalidate();
 	}
 
 		m_bResizingGrid = false;
 		m_nResizingColumn = m_nCurColumn;
 		PColumnModel pColumn = m_pModel->getColumnModel(m_nResizingColumn);
-		//sal_Int32 colWidth = pColumn->getWidth();
-		////impl_ni_getAccVisibleColWidths();
-		//int newColWidth = m_rAntiImpl.LogicToPixel( Size( colWidth, 0 ), MAP_APPFONT ).Width();
 		if(m_aVisibleColumnWidthsPixel[m_nResizingColumn-m_nLeftColumn]-1 == rPoint.X() && pColumn->isResizable())
 		{
 			m_pDataWindow->CaptureMouse();
 			PColumnModel pColumn = m_pModel->getColumnModel(m_nResizingColumn);
 			int maxWidth = pColumn->getMaxWidth();
 			int minWidth = pColumn->getMinWidth();
-			//int colWidth = pColumn->getWidth();
 			int resizeCol = m_nResizingColumn-m_nLeftColumn;
 			//new position of mouse 
 			int actX = rPoint.X();
 		{
 			//selecting region, 
 			int diff = m_pTableControl->m_nCurRow - curRow;	
-			//bool isAlreadySelected = m_pTableControl->isRowSelected(m_pTableControl->m_nRowSelected, m_pTableControl->m_nAnchor);
-		/*	if(!isAlreadySelected && m_nCurrentRow != m_pTableControl->m_nCurRow)
-				m_pTableControl->m_nRowSelected.push_back(m_nAnchor);*/
 			//selected region lies above the last selection
 			if( diff >= 0)
 			{

svtools/source/table/tablecontrol_impl.hxx

 
         DECL_LINK( OnScroll, ScrollBar* );		
     };
-	//see seleng.hxx, seleng.cxx, FunctionSet overwritables, part of selection engine
+	//see seleng.hxx, seleng.cxx, FunctionSet overridables, part of selection engine
 	class TableFunctionSet : public FunctionSet
 	{
 		friend class TableDataWindow;

svtools/source/table/tabledatawindow.cxx

         :Window( &_rTableControl.getAntiImpl() )
         ,m_rTableControl		( _rTableControl )
 	{
-		//Color backgroundColor = GetControlBackground();
-		//SetBackground( backgroundColor );
     }
 
     //--------------------------------------------------------------------

svtools/source/uno/svtxgridcontrol.cxx

 void SAL_CALL SVTXGridControl::setToolTip(const ::com::sun::star::uno::Sequence< ::rtl::OUString >& text, const com::sun::star::uno::Sequence< sal_Int32 >& columns) throw (::com::sun::star::uno::RuntimeException)
 {
 	TableControl* pTable = (TableControl*)GetWindow();
-	/*std::vector< sal_Int32 > newCols(
-			comphelper::sequenceToContainer< std::vector< sal_Int32 > >(columns));*/
 	pTable->setTooltip(text, columns);
 }
 
 						{
 							std::vector< Any > newRow;
 							Sequence< Any > rawRowData = cellData[i];
-							//check whether the data row vector length matches with the column count,
-							//all cells must have some content even if it is empty string
-							//preventing errors 
+							//check whether the data row vector length matches with the column count
 							if(m_xColumnModel->getColumnCount() == 0)
 							{
 								for ( ::svt::table::ColPos col = 0; col < rawRowData.getLength(); ++col )

svtools/source/uno/svtxgridcontrol.hxx

 	virtual void SAL_CALL dataChanged(const ::com::sun::star::awt::grid::GridDataEvent & Event) throw (::com::sun::star::uno::RuntimeException);
 
 	//XGridColumnListener overridables
-	//virtual void SAL_CALL columnAdded(const ::com::sun::star::awt::grid::GridColumnEvent& Event) throw (::com::sun::star::uno::RuntimeException);
-	//virtual void SAL_CALL columnRemoved(const ::com::sun::star::awt::grid::GridColumnEvent & Event) throw (::com::sun::star::uno::RuntimeException);
 	virtual void SAL_CALL columnChanged(const ::com::sun::star::awt::grid::GridColumnEvent & Event) throw (::com::sun::star::uno::RuntimeException);
 	
 	virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException);

svtools/source/uno/unocontroltablemodel.cxx

         ,m_sName()
         ,m_bIsResizable( true )
         ,m_nWidth( 4  )    
-        ,m_nMinWidth( 0 )   // no min width
-        ,m_nMaxWidth( 0 )   // no max width
+        ,m_nMinWidth( 0 ) 
+        ,m_nMaxWidth( 0 )
 		,m_nPrefWidth ( 0 )
 		,m_xHorizontalAlign(com::sun::star::style::HorizontalAlignment(0))
     {
-		//m_nID = m_xGridColumn->getIdentifier();
-		//m_nWidth = m_xGridColumn->getColumnWidth();
 		m_sName = m_xGridColumn->getTitle();
     }
 	//--------------------------------------------------------------------
         ,m_sName()
         ,m_bIsResizable( true )
         ,m_nWidth( 4  )    
-        ,m_nMinWidth( 0 )   // no min width
-        ,m_nMaxWidth( 0 )   // no max width
+        ,m_nMinWidth( 0 )
+        ,m_nMaxWidth( 0 )  
 		,m_nPrefWidth ( 0 )
 		,m_xHorizontalAlign(com::sun::star::style::HorizontalAlignment(0))
     {
     void UnoControlTableModel::addTableModelListener( const PTableModelListener& listener )
     {
 		(void) listener;
-        //listener->onTableModelChanged(PTableModel(this));
         // TODO
         DBG_ERROR( "DefaultTableModel::addTableModelListener: not yet implemented!" );
     }
 		return m_pImpl->bHScroll;
     }
 	//--------------------------------------------------------------------
-    void UnoControlTableModel::setCellContent(std::vector<std::vector< Any > > cellContent)
+    void UnoControlTableModel::setCellContent(const std::vector<std::vector< Any > >& cellContent)
     {
 		m_pImpl->aCellContent = cellContent;
     }
 
 	std::vector<std::vector< Any > >& UnoControlTableModel::getCellContent()
     {
-		//::vos::OGuard aGuard( GetMutex() );
 		return m_pImpl->aCellContent;
     }
 	//--------------------------------------------------------------------
-    void UnoControlTableModel::setRowHeaderName(std::vector<rtl::OUString> cellColumnContent)
+    void UnoControlTableModel::setRowHeaderName(const std::vector<rtl::OUString>& cellColumnContent)
     {
 		m_pImpl->aRowHeadersTitle = cellColumnContent;
     }

svtools/source/uno/unocontroltablemodel.hxx

         virtual ScrollbarVisibility getHorizontalScrollbarVisibility(int overAllWidth, int actWidth) const;
 		virtual void				setVerticalScrollbarVisibility(bool _bVScroll) const;
         virtual void				setHorizontalScrollbarVisibility(bool _bHScroll) const;
-		virtual void				setCellContent(std::vector<std::vector< Any > > cellContent);
+		virtual void				setCellContent(const std::vector<std::vector< Any > >& cellContent);
 		virtual std::vector<std::vector< Any > >&	getCellContent();
-		virtual void				setRowHeaderName(std::vector<rtl::OUString> cellColumnContent);
+		virtual void				setRowHeaderName(const std::vector<rtl::OUString>& cellColumnContent);
 		virtual std::vector<rtl::OUString>&	getRowHeaderName();
 		virtual ::com::sun::star::util::Color getLineColor();
 		virtual void				setLineColor(::com::sun::star::util::Color _rColor);

toolkit/source/controls/grid/defaultgridcolumnmodel.cxx

 using namespace ::com::sun::star::awt::grid;
 using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::style;
-//#define COLUMNSELECTIONALLOWED ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ColumnSelectionAllowed" ))
-//#define COLUMNRESIZED ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ColumnResized" ))
 
 namespace toolkit
 {
 
 //---------------------------------------------------------------------
 
-//void DefaultGridColumnModel::broadcast( broadcast_type eType, const GridColumnEvent& aEvent )
-//{
-//	::cppu::OInterfaceContainerHelper* pIter = BrdcstHelper.getContainer( XGridColumnListener::static_type() );
-//	if( pIter )
-//	{
-//		::cppu::OInterfaceIteratorHelper aListIter(*pIter);
-//		while(aListIter.hasMoreElements())
-//		{
-//			XGridColumnListener* pListener = static_cast<XGridColumnListener*>(aListIter.next());
-//			switch( eType )
-//			{
-//			case column_added:		pListener->columnAdded(aEvent); break;
-//			case column_removed:	pListener->columnRemoved(aEvent); break;
-//			case column_changed:	pListener->columnChanged(aEvent); break;
-//			}
-//		}
-//	}
-//}
-//
-////---------------------------------------------------------------------
-//
-//void DefaultGridColumnModel::broadcast_changed( ::rtl::OUString name, Any oldValue, Any newValue)
-//{
-//	Reference< XInterface > xSource( static_cast< ::cppu::OWeakObject* >( this ) );
-//	GridColumnEvent aEvent( xSource, name, oldValue, newValue, 0, NULL );
-//	broadcast( column_changed, aEvent);
-//}
-//
-////---------------------------------------------------------------------
-//
-//void DefaultGridColumnModel::broadcast_add( sal_Int32 index, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > & rColumn )
-//{
-//	Reference< XInterface > xSource( static_cast< ::cppu::OWeakObject* >( this ) );
-//	GridColumnEvent aEvent( xSource, ::rtl::OUString(), Any(), Any(), index, rColumn );
-//	broadcast( column_added, aEvent);
-//}
-//
-////---------------------------------------------------------------------
-//
-//void DefaultGridColumnModel::broadcast_remove( sal_Int32 index, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > & rColumn )
-//{
-//	Reference< XInterface > xSource( static_cast< ::cppu::OWeakObject* >( this ) );
-//	GridColumnEvent aEvent( xSource, ::rtl::OUString(), Any(), Any(), index, rColumn );
-//	broadcast( column_removed, aEvent);
-//}
-
-//---------------------------------------------------------------------
-// XDefaultGridColumnModel
-//---------------------------------------------------------------------
-//::sal_Bool SAL_CALL DefaultGridColumnModel::getColumnSelectionAllowed() throw (::com::sun::star::uno::RuntimeException)
-//{
-//	return selectionAllowed;
-//}
-//
-////---------------------------------------------------------------------
-//
-//void SAL_CALL DefaultGridColumnModel::setColumnSelectionAllowed(::sal_Bool value) throw (::com::sun::star::uno::RuntimeException)
-//{
-//	sal_Bool oldValue = selectionAllowed;
-//	selectionAllowed = value;
-//	broadcast_changed( COLUMNSELECTIONALLOWED, Any(oldValue) , Any(selectionAllowed));
-//}
-
-//---------------------------------------------------------------------
-
 ::sal_Int32 SAL_CALL DefaultGridColumnModel::getColumnCount() throw (::com::sun::star::uno::RuntimeException)
 {
 	return columns.size();
 		return Reference< XGridColumn >();
 }
 //---------------------------------------------------------------------
-//void SAL_CALL DefaultGridColumnModel::addColumnListener( const Reference< XGridColumnListener >& xListener ) throw (RuntimeException)
-//{
-//	BrdcstHelper.addListener( XGridColumnListener::static_type(), xListener );
-//}
-//
-////---------------------------------------------------------------------
-//
-//void SAL_CALL DefaultGridColumnModel::removeColumnListener( const Reference< XGridColumnListener >& xListener ) throw (RuntimeException)
-//{
-//	BrdcstHelper.removeListener( XGridColumnListener::static_type(), xListener );
-//}
-
-//---------------------------------------------------------------------
 void SAL_CALL DefaultGridColumnModel::setColumnHeaderHeight(sal_Int32 _value) throw (::com::sun::star::uno::RuntimeException)
 {
 	m_nColumnHeaderHeight = _value;

toolkit/source/controls/grid/defaultgriddatamodel.cxx

 using namespace ::com::sun::star::awt;
 using namespace ::com::sun::star::awt::grid;
 using namespace ::com::sun::star::lang;
-//using namespace ::com::sun::star::style;
 
 #define ROWHEIGHT ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "RowHeight" ))
 #define ROWHEADERS ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "RowHeaders" ))
 	// store row data
 	std::vector< Any > newRow;
 	for ( int i = 0; i < rRowdata.getLength();i++)
-	{
-		//OUString title(rRowdata[i]);
-
-		// create and use interal a UnoControlFixedText for text content
-		//Reference< XFixedText > xFixedText( m_xFactory->createInstance ( OUString::createFromAscii( "com.sun.star.awt.UnoControlFixedText"	) ), UNO_QUERY_THROW );
-		//Reference< XControl > xFixedTextControl( xFixedText , UNO_QUERY );
-		//
-		//Reference< XControlModel > xFixedTextModel( m_xFactory->createInstance ( OUString::createFromAscii( "com.sun.star.awt.UnoControlFixedTextModel"	) ), UNO_QUERY );
-		//Reference< ::com::sun::star::beans::XPropertySet > xFixedTextModelPropSet( xFixedTextModel, UNO_QUERY );
-		//xFixedTextModelPropSet->setPropertyValue( OUString::createFromAscii( "Label"), makeAny( title ) );
-
-		//xFixedTextControl->setModel( xFixedTextModel );
-		
+	{		
 		newRow.push_back(rRowdata[i]);
 	}
 
 {
 	if ( index >= 0 && index <= getRowCount()-1)
 	{
-	/*	if(Reference< XGridControl >( getPeer(), UNO_QUERY_THROW )->isSelectedIndex( index ))
-		{
-			::com::sun::star::uno::Sequence<::sal_Int32> selectedRows = Reference< XGridControl >( getPeer(), UNO_QUERY_THROW )->getSelection();
-			selectedRow.erase(selectedRows.begin()+index);
-		}*/
-
 		::rtl::OUString headerName( (::rtl::OUString) rowHeaders[index] );
 		rowHeaders.erase(rowHeaders.begin() + index);
 

toolkit/source/controls/grid/gridcontrol.cxx

 {
 	Reference< XGridControl >( getPeer(), UNO_QUERY_THROW )->setToolTip( text, columns );
 }
-/*
-void SAL_CALL UnoGridControl::addMouseListener(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseListener > & listener) throw (::com::sun::star::uno::RuntimeException)
-{
-	 Reference< XGridControl >( getPeer(), UNO_QUERY_THROW )->addMouseListener( listener );
-}
-
-void SAL_CALL UnoGridControl::removeMouseListener(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseListener > & listener) throw (::com::sun::star::uno::RuntimeException)
-{
-	Reference< XGridControl >( getPeer(), UNO_QUERY_THROW )->removeMouseListener( listener );
-}
-*/
 // -------------------------------------------------------------------
 // XGridSelection
 // -------------------------------------------------------------------
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.