diff options
author | Mihaela Kedikova <misheto@openoffice.org> | 2010-03-22 15:15:28 +0100 |
---|---|---|
committer | Mihaela Kedikova <misheto@openoffice.org> | 2010-03-22 15:15:28 +0100 |
commit | b09453118d699ce2c7e00cda02ffb1247dd29ac2 (patch) | |
tree | a5161ddfa26e3a013e8aa012986753327efd1dda /svtools | |
parent | e6d22539df18d5b5f3d7c97c1c42f4673b0f9b1e (diff) |
fixed bugs for linux build
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/inc/svtools/table/tablemodel.hxx | 4 | ||||
-rw-r--r-- | svtools/source/table/tablecontrol.cxx | 5 | ||||
-rw-r--r-- | svtools/source/table/tablecontrol_impl.cxx | 21 | ||||
-rw-r--r-- | svtools/source/table/tablecontrol_impl.hxx | 2 | ||||
-rw-r--r-- | svtools/source/table/tabledatawindow.cxx | 2 | ||||
-rwxr-xr-x | svtools/source/uno/svtxgridcontrol.cxx | 6 | ||||
-rwxr-xr-x | svtools/source/uno/svtxgridcontrol.hxx | 2 | ||||
-rw-r--r-- | svtools/source/uno/unocontroltablemodel.cxx | 16 | ||||
-rw-r--r-- | svtools/source/uno/unocontroltablemodel.hxx | 4 |
9 files changed, 14 insertions, 48 deletions
diff --git a/svtools/inc/svtools/table/tablemodel.hxx b/svtools/inc/svtools/table/tablemodel.hxx index 18d4db16c123..786af87db12d 100644 --- a/svtools/inc/svtools/table/tablemodel.hxx +++ b/svtools/inc/svtools/table/tablemodel.hxx @@ -447,13 +447,13 @@ namespace svt { namespace table 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; diff --git a/svtools/source/table/tablecontrol.cxx b/svtools/source/table/tablecontrol.cxx index 635008d94f94..f4d328261cba 100644 --- a/svtools/source/table/tablecontrol.cxx +++ b/svtools/source/table/tablecontrol.cxx @@ -260,7 +260,6 @@ namespace svt { namespace table aRetText = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ColumnHeaderBar" ) ); break; case TCTYPE_TABLECELL: - //Window* pWin = GetCellContent(_nRow, _nCol); aRetText = GetRowName(_nRow); break; case TCTYPE_ROWHEADERCELL: @@ -387,10 +386,6 @@ void TableControl::FillAccessibleStateSet( 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) diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx index 7220f964a99e..39286903b11f 100644 --- a/svtools/source/table/tablecontrol_impl.cxx +++ b/svtools/source/table/tablecontrol_impl.cxx @@ -190,9 +190,8 @@ namespace svt { namespace table { 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() { @@ -248,9 +247,8 @@ namespace svt { namespace table { 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() { @@ -1169,7 +1167,6 @@ namespace svt { namespace table it!=m_nRowSelected.end();++it) { invalidateSelectedRegion(*it, *it, rCells); - //m_pDataWindow->Invalidate(rCells); } m_nRowSelected.clear(); } @@ -1203,7 +1200,6 @@ namespace svt { namespace table it!=m_nRowSelected.end();++it) { invalidateSelectedRegion(*it, *it, rCells); - //m_pDataWindow->Invalidate(rCells); } m_nRowSelected.clear(); } @@ -1327,7 +1323,6 @@ namespace svt { namespace table it!=m_nRowSelected.end();++it) { invalidateSelectedRegion(*it, *it, rCells); - //m_pDataWindow->Invalidate(rCells); } m_nRowSelected.clear(); m_nRowSelected.push_back(m_nCurRow); @@ -1415,7 +1410,6 @@ namespace svt { namespace table it!=m_nRowSelected.end();++it) { invalidateSelectedRegion(*it, *it, rCells); - //m_pDataWindow->Invalidate(rCells); } m_nRowSelected.clear(); m_nRowSelected.push_back(m_nCurRow); @@ -1547,7 +1541,6 @@ namespace svt { namespace table Rectangle aCellRect; impl_getCellRect( m_nCurColumn, m_nCurRow, aCellRect ); - // const StyleSettings& rStyle = m_rAntiImpl.GetSettings().GetStyleSettings(); if ( _bShow ) { pRenderer->ShowCellCursor( *m_pDataWindow, aCellRect); @@ -1673,7 +1666,6 @@ namespace svt { namespace table //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) @@ -1719,7 +1711,6 @@ namespace svt { namespace table //------------------------------------------------------------------------------- void TableControl_Impl::invalidateRows(RowPos _nRowStart, Rectangle& _rCellRect) { - //DBG_CHECK_ME(); (void)_nRowStart; (void)_rCellRect; impl_ni_updateScrollbars(); @@ -1728,7 +1719,6 @@ namespace svt { namespace table m_nTopRow--; else m_nTopRow = 0; - //m_pDataWindow->Invalidate(_rCellRect); m_pDataWindow->Invalidate(); } @@ -2063,9 +2053,6 @@ namespace svt { namespace table 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(); @@ -2082,7 +2069,6 @@ namespace svt { namespace table 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(); @@ -2260,9 +2246,6 @@ namespace svt { namespace table { //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) { diff --git a/svtools/source/table/tablecontrol_impl.hxx b/svtools/source/table/tablecontrol_impl.hxx index dffa69422599..8bc6b371d1d8 100644 --- a/svtools/source/table/tablecontrol_impl.hxx +++ b/svtools/source/table/tablecontrol_impl.hxx @@ -321,7 +321,7 @@ namespace svt { namespace table 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; diff --git a/svtools/source/table/tabledatawindow.cxx b/svtools/source/table/tabledatawindow.cxx index 6ae2a39443d1..8d7b08c4e255 100644 --- a/svtools/source/table/tabledatawindow.cxx +++ b/svtools/source/table/tabledatawindow.cxx @@ -44,8 +44,6 @@ namespace svt { namespace table :Window( &_rTableControl.getAntiImpl() ) ,m_rTableControl ( _rTableControl ) { - //Color backgroundColor = GetControlBackground(); - //SetBackground( backgroundColor ); } //-------------------------------------------------------------------- diff --git a/svtools/source/uno/svtxgridcontrol.cxx b/svtools/source/uno/svtxgridcontrol.cxx index 482d01224073..81ca6e2afd0f 100755 --- a/svtools/source/uno/svtxgridcontrol.cxx +++ b/svtools/source/uno/svtxgridcontrol.cxx @@ -111,8 +111,6 @@ sal_Int32 SAL_CALL SVTXGridControl::getItemIndexAtPoint(::sal_Int32 x, ::sal_Int 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); } @@ -268,9 +266,7 @@ void SVTXGridControl::setProperty( const ::rtl::OUString& PropertyName, const An { 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 ) diff --git a/svtools/source/uno/svtxgridcontrol.hxx b/svtools/source/uno/svtxgridcontrol.hxx index cd4dc698f8db..232eaea4349f 100755 --- a/svtools/source/uno/svtxgridcontrol.hxx +++ b/svtools/source/uno/svtxgridcontrol.hxx @@ -78,8 +78,6 @@ public: 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); diff --git a/svtools/source/uno/unocontroltablemodel.cxx b/svtools/source/uno/unocontroltablemodel.cxx index 2b53b65de471..6d04098e0f78 100644 --- a/svtools/source/uno/unocontroltablemodel.cxx +++ b/svtools/source/uno/unocontroltablemodel.cxx @@ -53,13 +53,11 @@ using namespace ::com::sun::star::uno; ,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(); } //-------------------------------------------------------------------- @@ -68,8 +66,8 @@ using namespace ::com::sun::star::uno; ,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)) { @@ -293,7 +291,6 @@ using namespace ::com::sun::star::uno; void UnoControlTableModel::addTableModelListener( const PTableModelListener& listener ) { (void) listener; - //listener->onTableModelChanged(PTableModel(this)); // TODO DBG_ERROR( "DefaultTableModel::addTableModelListener: not yet implemented!" ); } @@ -431,18 +428,17 @@ using namespace ::com::sun::star::uno; 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; } diff --git a/svtools/source/uno/unocontroltablemodel.hxx b/svtools/source/uno/unocontroltablemodel.hxx index ae0a5ce76a9e..c72db4e7ba87 100644 --- a/svtools/source/uno/unocontroltablemodel.hxx +++ b/svtools/source/uno/unocontroltablemodel.hxx @@ -148,9 +148,9 @@ class UnoControlTableColumn : public IColumnModel 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); |