Gtk-WARNING gtktreestore.c:1047: Invalid column number 1 added to iter
[LibreOffice.git] / dbaccess / source / ui / querydesign / TableWindow.cxx
blobac48bab4bb343d590b6aea187486dcc6cb99e146
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include <TableWindow.hxx>
21 #include <TableWindowListBox.hxx>
22 #include <TableWindowData.hxx>
23 #include <imageprovider.hxx>
24 #include <JoinController.hxx>
25 #include <JoinTableView.hxx>
26 #include <JoinDesignView.hxx>
27 #include <osl/diagnose.h>
28 #include <utility>
29 #include <vcl/svapp.hxx>
30 #include <vcl/settings.hxx>
31 #include <vcl/commandevent.hxx>
32 #include <vcl/event.hxx>
33 #include <vcl/ptrstyle.hxx>
34 #include <vcl/wall.hxx>
35 #include <vcl/weldutils.hxx>
36 #include <comphelper/diagnose_ex.hxx>
38 #include <com/sun/star/container/XContainer.hpp>
39 #include <com/sun/star/container/XNameAccess.hpp>
40 #include <com/sun/star/beans/XPropertySet.hpp>
41 #include <com/sun/star/sdb/application/DatabaseObject.hpp>
42 #include <bitmaps.hlst>
43 #include <TableWindowAccess.hxx>
44 #include <connectivity/dbtools.hxx>
46 using namespace dbaui;
47 using namespace ::com::sun::star;
48 using namespace ::com::sun::star::sdb;
49 using namespace ::com::sun::star::uno;
50 using namespace ::com::sun::star::beans;
51 using namespace ::com::sun::star::container;
52 using namespace ::com::sun::star::accessibility;
54 namespace DatabaseObject = css::sdb::application::DatabaseObject;
56 #define TABWIN_SIZING_AREA 4
57 #define TABWIN_WIDTH_MIN 90
58 #define TABWIN_HEIGHT_MIN 80
60 namespace {
62 void Draw3DBorder(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect)
64 // Use the System Style-Settings for my colours
65 const StyleSettings& aSystemStyle = Application::GetSettings().GetStyleSettings();
67 // Black lines for bottom and right
68 rRenderContext.SetLineColor(aSystemStyle.GetDarkShadowColor());
69 rRenderContext.DrawLine(rRect.BottomLeft(), rRect.BottomRight());
70 rRenderContext.DrawLine(rRect.BottomRight(), rRect.TopRight());
72 // Dark grey lines over the black lines
73 rRenderContext.SetLineColor(aSystemStyle.GetShadowColor());
74 Point aEHvector(1, 1);
75 rRenderContext.DrawLine(rRect.BottomLeft() + Point(1, -1), rRect.BottomRight() - aEHvector);
76 rRenderContext.DrawLine(rRect.BottomRight() - aEHvector, rRect.TopRight() + Point(-1, 1));
78 // Light grey lines for top and left
79 rRenderContext.SetLineColor(aSystemStyle.GetLightColor());
80 rRenderContext.DrawLine(rRect.BottomLeft() + Point(1, -2), rRect.TopLeft() + aEHvector);
81 rRenderContext.DrawLine(rRect.TopLeft() + aEHvector, rRect.TopRight() + Point(-2, 1));
86 OTableWindow::OTableWindow( vcl::Window* pParent, TTableWindowData::value_type pTabWinData )
87 : ::comphelper::OContainerListener(m_aMutex)
88 , Window( pParent, WB_3DLOOK|WB_MOVEABLE )
89 , m_xTitle( VclPtr<OTableWindowTitle>::Create(this) )
90 , m_pData(std::move( pTabWinData ))
91 , m_nMoveCount(0)
92 , m_nMoveIncrement(1)
93 , m_nSizingFlags( SizingFlags::NONE )
95 // Set position and size
96 if( GetData()->HasPosition() )
97 SetPosPixel( GetData()->GetPosition() );
99 if( GetData()->HasSize() )
100 SetSizePixel( GetData()->GetSize() );
102 // Set background
103 const StyleSettings& aSystemStyle = Application::GetSettings().GetStyleSettings();
104 SetBackground(Wallpaper(aSystemStyle.GetFaceColor()));
105 // Set the text colour even though there is no text,
106 // because derived classes might need it
107 SetTextColor(aSystemStyle.GetButtonTextColor());
109 EnableClipSiblings();
112 OTableWindow::~OTableWindow()
114 disposeOnce();
117 void OTableWindow::dispose()
119 if (m_xListBox)
121 OSL_ENSURE(m_xListBox->get_widget().n_children()==0,"Forgot to call EmptyListbox()!");
123 m_xListBox.disposeAndClear();
124 if ( m_pContainerListener.is() )
125 m_pContainerListener->dispose();
127 m_xTitle.disposeAndClear();
128 vcl::Window::dispose();
131 const OJoinTableView* OTableWindow::getTableView() const
133 OSL_ENSURE(static_cast<OJoinTableView*>(GetParent()),"No OJoinTableView!");
134 return static_cast<OJoinTableView*>(GetParent());
137 OJoinTableView* OTableWindow::getTableView()
139 OSL_ENSURE(static_cast<OJoinTableView*>(GetParent()),"No OJoinTableView!");
140 return static_cast<OJoinTableView*>(GetParent());
143 OJoinDesignView* OTableWindow::getDesignView()
145 OSL_ENSURE(static_cast<OJoinDesignView*>(GetParent()->GetParent()->GetParent()),"No OJoinDesignView!");
146 return static_cast<OJoinDesignView*>(GetParent()->GetParent()->GetParent());
149 void OTableWindow::SetPosPixel( const Point& rNewPos )
151 Point aNewPosData = rNewPos + getTableView()->GetScrollOffset();
152 GetData()->SetPosition( aNewPosData );
153 Window::SetPosPixel( rNewPos );
156 void OTableWindow::SetSizePixel( const Size& rNewSize )
158 Size aOutSize(rNewSize);
159 if( aOutSize.Width() < TABWIN_WIDTH_MIN )
160 aOutSize.setWidth( TABWIN_WIDTH_MIN );
161 if( aOutSize.Height() < TABWIN_HEIGHT_MIN )
162 aOutSize.setHeight( TABWIN_HEIGHT_MIN );
164 GetData()->SetSize( aOutSize );
165 Window::SetSizePixel( aOutSize );
168 void OTableWindow::SetPosSizePixel( const Point& rNewPos, const Size& rNewSize )
170 SetPosPixel( rNewPos );
171 SetSizePixel( rNewSize );
174 void OTableWindow::FillListBox()
176 clearListBox();
177 weld::TreeView& rTreeView = m_xListBox->get_widget();
178 assert(!rTreeView.n_children());
180 if ( !m_pContainerListener.is() )
182 Reference< XContainer> xContainer(m_pData->getColumns(),UNO_QUERY);
183 if ( xContainer.is() )
184 m_pContainerListener = new ::comphelper::OContainerListenerAdapter(this,xContainer);
187 // mark all primary keys with special image
188 OUString aPrimKeyImage(BMP_PRIMARY_KEY);
190 if (GetData()->IsShowAll())
192 rTreeView.append(weld::toId(createUserData(nullptr,false)), u"*"_ustr);
195 Reference<XNameAccess> xPKeyColumns;
198 xPKeyColumns = dbtools::getPrimaryKeyColumns_throw(m_pData->getTable());
200 catch(Exception&)
202 TOOLS_WARN_EXCEPTION( "dbaccess", "");
206 Reference< XNameAccess > xColumns = m_pData->getColumns();
207 if( xColumns.is() )
209 for (auto& column : xColumns->getElementNames())
211 bool bPrimaryKeyColumn = xPKeyColumns.is() && xPKeyColumns->hasByName(column);
213 OUString sId;
214 Reference<XPropertySet> xColumn(xColumns->getByName(column), UNO_QUERY);
215 if (xColumn.is())
216 sId = weld::toId(createUserData(xColumn, bPrimaryKeyColumn));
218 rTreeView.append(sId, column);
220 // is this column in the primary key
221 if ( bPrimaryKeyColumn )
222 rTreeView.set_image(rTreeView.n_children() - 1, aPrimKeyImage);
227 catch(Exception&)
229 TOOLS_WARN_EXCEPTION( "dbaccess", "");
233 void* OTableWindow::createUserData(const Reference< XPropertySet>& /*_xColumn*/,bool /*_bPrimaryKey*/)
235 return nullptr;
238 void OTableWindow::deleteUserData(void*& _pUserData)
240 OSL_ENSURE(!_pUserData,"INVALID call. Need to delete the userclass!");
241 _pUserData = nullptr;
244 void OTableWindow::clearListBox()
246 if ( !m_xListBox )
247 return;
249 weld::TreeView& rTreeView = m_xListBox->get_widget();
250 rTreeView.all_foreach([this, &rTreeView](weld::TreeIter& rEntry){
251 void* pUserData = weld::fromId<void*>(rTreeView.get_id(rEntry));
252 deleteUserData(pUserData);
253 return false;
256 rTreeView.clear();
259 void OTableWindow::impl_updateImage()
261 weld::Image& rImage = m_xTitle->GetImage();
262 ImageProvider aImageProvider( getDesignView()->getController().getConnection() );
263 rImage.set_from_icon_name(aImageProvider.getImageId(GetComposedName(), m_pData->isQuery() ? DatabaseObject::QUERY : DatabaseObject::TABLE));
264 rImage.show();
267 bool OTableWindow::Init()
269 // create list box if necessary
270 if ( !m_xListBox )
272 m_xListBox = VclPtr<OTableWindowListBox>::Create(this);
273 assert(m_xListBox && "OTableWindow::Init() : CreateListBox returned NULL !");
274 m_xListBox->get_widget().set_selection_mode(SelectionMode::Multiple);
277 // Set the title
278 weld::Label& rLabel = m_xTitle->GetLabel();
279 rLabel.set_label(m_pData->GetWinName());
280 rLabel.set_tooltip_text(GetComposedName());
281 m_xTitle->Show();
283 m_xListBox->Show();
285 // add the fields to the ListBox
286 FillListBox();
287 m_xListBox->get_widget().unselect_all();
289 impl_updateImage();
291 return true;
294 void OTableWindow::DataChanged(const DataChangedEvent& rDCEvt)
296 if (rDCEvt.GetType() == DataChangedEventType::SETTINGS)
298 // In the worst-case the colours have changed so
299 // adapt myself to the new colours
300 const StyleSettings& aSystemStyle = Application::GetSettings().GetStyleSettings();
301 SetBackground(Wallpaper(aSystemStyle.GetFaceColor()));
302 SetTextColor(aSystemStyle.GetButtonTextColor());
306 void OTableWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect)
308 tools::Rectangle aRect(Point(0,0), GetOutputSizePixel());
309 Window::Paint(rRenderContext, rRect);
310 Draw3DBorder(rRenderContext, aRect);
313 tools::Rectangle OTableWindow::getSizingRect(const Point& _rPos,const Size& _rOutputSize) const
315 tools::Rectangle aSizingRect( GetPosPixel(), GetSizePixel() );
317 if( m_nSizingFlags & SizingFlags::Top )
319 if( _rPos.Y() < 0 )
320 aSizingRect.SetTop( 0 );
321 else
322 aSizingRect.SetTop( _rPos.Y() );
325 if( m_nSizingFlags & SizingFlags::Bottom )
327 if( _rPos.Y() > _rOutputSize.Height() )
328 aSizingRect.SetBottom( _rOutputSize.Height() );
329 else
330 aSizingRect.SetBottom( _rPos.Y() );
333 if( m_nSizingFlags & SizingFlags::Right )
335 if( _rPos.X() > _rOutputSize.Width() )
336 aSizingRect.SetRight( _rOutputSize.Width() );
337 else
338 aSizingRect.SetRight( _rPos.X() );
341 if( m_nSizingFlags & SizingFlags::Left )
343 if( _rPos.X() < 0 )
344 aSizingRect.SetLeft( 0 );
345 else
346 aSizingRect.SetLeft( _rPos.X() );
348 return aSizingRect;
351 void OTableWindow::setSizingFlag(const Point& _rPos)
353 Size aOutSize = GetOutputSizePixel();
354 // Set the flags when the mouse cursor is in the sizing area
355 m_nSizingFlags = SizingFlags::NONE;
357 if( _rPos.X() < TABWIN_SIZING_AREA )
358 m_nSizingFlags |= SizingFlags::Left;
360 if( _rPos.Y() < TABWIN_SIZING_AREA )
361 m_nSizingFlags |= SizingFlags::Top;
363 if( _rPos.X() > aOutSize.Width()-TABWIN_SIZING_AREA )
364 m_nSizingFlags |= SizingFlags::Right;
366 if( _rPos.Y() > aOutSize.Height()-TABWIN_SIZING_AREA )
367 m_nSizingFlags |= SizingFlags::Bottom;
370 void OTableWindow::MouseMove( const MouseEvent& rEvt )
372 Window::MouseMove(rEvt);
374 OJoinTableView* pCont = getTableView();
375 if (pCont->getDesignView()->getController().isReadOnly())
376 return;
378 Point aPos = rEvt.GetPosPixel();
379 setSizingFlag(aPos);
380 PointerStyle aPointer = PointerStyle::Arrow;
382 // Set the mouse cursor when it is in the sizing area
383 if ( m_nSizingFlags == SizingFlags::Top ||
384 m_nSizingFlags == SizingFlags::Bottom )
385 aPointer = PointerStyle::SSize;
386 else if ( m_nSizingFlags == SizingFlags::Left ||
387 m_nSizingFlags ==SizingFlags::Right )
388 aPointer = PointerStyle::ESize;
389 else if ( m_nSizingFlags == (SizingFlags::Left | SizingFlags::Top) ||
390 m_nSizingFlags == (SizingFlags::Right | SizingFlags::Bottom) )
391 aPointer = PointerStyle::SESize;
392 else if ( m_nSizingFlags == (SizingFlags::Right | SizingFlags::Top) ||
393 m_nSizingFlags == (SizingFlags::Left | SizingFlags::Bottom) )
394 aPointer = PointerStyle::NESize;
396 SetPointer( aPointer );
399 void OTableWindow::MouseButtonDown( const MouseEvent& rEvt )
401 // When resizing, the parent must be informed that
402 // the window size of its child has changed
403 if( m_nSizingFlags != SizingFlags::NONE )
404 getTableView()->BeginChildSizing( this, GetPointer() );
406 Window::MouseButtonDown( rEvt );
409 void OTableWindow::Resize()
411 // The window must not disappear so we enforce a minimum size
412 Size aOutSize = GetOutputSizePixel();
413 aOutSize = Size(CalcZoom(aOutSize.Width()),CalcZoom(aOutSize.Height()));
415 tools::Long nTitleHeight = CalcZoom( GetTextHeight() )+ CalcZoom( 4 );
417 // Set the title and ListBox
418 tools::Long n5Pos = CalcZoom(5);
419 tools::Long nPositionX = n5Pos;
420 tools::Long nPositionY = n5Pos;
422 Size aPreferredSize = m_xTitle->get_preferred_size();
423 if (nTitleHeight < aPreferredSize.Height())
424 nTitleHeight = aPreferredSize.Height();
426 m_xTitle->SetPosSizePixel( Point( nPositionX, nPositionY ), Size( aOutSize.Width() - nPositionX - n5Pos, nTitleHeight ) );
428 tools::Long nTitleToList = CalcZoom( 3 );
430 m_xListBox->SetPosSizePixel(
431 Point( n5Pos, nPositionY + nTitleHeight + nTitleToList ),
432 Size( aOutSize.Width() - 2 * n5Pos, aOutSize.Height() - ( nPositionY + nTitleHeight + nTitleToList ) - n5Pos )
435 Window::Invalidate();
438 void OTableWindow::SetBoldTitle( bool bBold )
440 weld::Label& rLabel = m_xTitle->GetLabel();
441 vcl::Font aFont = rLabel.get_font();
442 aFont.SetWeight(bBold ? WEIGHT_BOLD : WEIGHT_NORMAL);
443 rLabel.set_font(aFont);
446 void OTableWindow::GetFocus()
448 Window::GetFocus();
449 // we have to forward the focus to our listbox to enable keystrokes
450 if(m_xListBox)
451 m_xListBox->GrabFocus();
454 void OTableWindow::setActive(bool _bActive)
456 SetBoldTitle( _bActive );
457 if (_bActive || !m_xListBox)
458 return;
460 weld::TreeView& rTreeView = m_xListBox->get_widget();
461 if (rTreeView.get_selected_index() != -1)
462 rTreeView.unselect_all();
465 void OTableWindow::Remove()
467 // Delete the window
468 OJoinTableView* pTabWinCont = getTableView();
469 VclPtr<OTableWindow> aHoldSelf(this); // keep ourselves alive during the RemoveTabWin process
470 pTabWinCont->RemoveTabWin( this );
471 pTabWinCont->Invalidate();
474 bool OTableWindow::ExistsAConn() const
476 return getTableView()->ExistsAConn(this);
479 void OTableWindow::EnumValidFields(std::vector< OUString>& arrstrFields)
481 arrstrFields.clear();
482 weld::TreeView& rTreeView = m_xListBox->get_widget();
484 // This default implementation counts every item in the ListBox ... for any other behaviour it must be over-written
485 rTreeView.all_foreach([&rTreeView, &arrstrFields](weld::TreeIter& rEntry){
486 arrstrFields.push_back(rTreeView.get_text(rEntry));
487 return false;
491 void OTableWindow::StateChanged( StateChangedType nType )
493 Window::StateChanged( nType );
495 // FIXME RenderContext
497 if ( nType != StateChangedType::Zoom )
498 return;
500 const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
502 vcl::Font aFont = rStyleSettings.GetGroupFont();
503 if ( IsControlFont() )
504 aFont.Merge( GetControlFont() );
505 SetZoomedPointFont(*GetOutDev(), aFont);
507 m_xTitle->SetZoom(GetZoom());
508 m_xListBox->SetZoom(GetZoom());
509 Resize();
510 Invalidate();
513 Reference< XAccessible > OTableWindow::CreateAccessible()
515 return new OTableWindowAccess(this);
518 void OTableWindow::Command(const CommandEvent& rEvt)
520 switch (rEvt.GetCommand())
522 case CommandEventId::ContextMenu:
524 OJoinController& rController = getDesignView()->getController();
525 if(!rController.isReadOnly() && rController.isConnected())
527 Point ptWhere;
528 if ( rEvt.IsMouseEvent() )
529 ptWhere = rEvt.GetMousePosPixel();
530 else
532 weld::TreeView& rTreeView = m_xListBox->get_widget();
533 std::unique_ptr<weld::TreeIter> xCurrent = rTreeView.make_iterator();
534 if (rTreeView.get_cursor(xCurrent.get()))
535 ptWhere = rTreeView.get_row_area(*xCurrent).Center();
536 else
537 ptWhere = m_xTitle->GetPosPixel();
540 ::tools::Rectangle aRect(ptWhere, Size(1, 1));
541 weld::Window* pPopupParent = weld::GetPopupParent(*this, aRect);
542 std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(pPopupParent, u"dbaccess/ui/jointablemenu.ui"_ustr));
543 std::unique_ptr<weld::Menu> xContextMenu(xBuilder->weld_menu(u"menu"_ustr));
544 if (!xContextMenu->popup_at_rect(pPopupParent, aRect).isEmpty())
545 Remove();
547 break;
549 default:
550 Window::Command(rEvt);
554 bool OTableWindow::PreNotify(NotifyEvent& rNEvt)
556 bool bHandled = false;
557 switch (rNEvt.GetType())
559 case NotifyEventType::KEYINPUT:
561 if ( getDesignView()->getController().isReadOnly() )
562 break;
564 const KeyEvent* pKeyEvent = rNEvt.GetKeyEvent();
565 const vcl::KeyCode& rCode = pKeyEvent->GetKeyCode();
566 if ( rCode.IsMod1() )
568 Point aStartPoint = GetPosPixel();
569 if ( rCode.IsShift() )
571 aStartPoint.setX( GetSizePixel().Width() );
572 aStartPoint.setY( GetSizePixel().Height() );
575 switch( rCode.GetCode() )
577 case KEY_DOWN:
578 bHandled = true;
579 aStartPoint.AdjustY(m_nMoveIncrement );
580 break;
581 case KEY_UP:
582 bHandled = true;
583 aStartPoint.AdjustY(-m_nMoveIncrement );
584 break;
585 case KEY_LEFT:
586 bHandled = true;
587 aStartPoint.AdjustX(-m_nMoveIncrement );
588 break;
589 case KEY_RIGHT:
590 bHandled = true;
591 aStartPoint.AdjustX(m_nMoveIncrement );
592 break;
594 if ( bHandled )
596 if ( rCode.IsShift() )
598 OJoinTableView* pView = getTableView();
599 Point ptOld = GetPosPixel();
600 Size aSize = pView->getRealOutputSize();
601 Size aNewSize(aStartPoint.X(),aStartPoint.Y());
602 if ( ((ptOld.X() + aNewSize.Width()) <= aSize.Width())
603 && ((ptOld.Y() + aNewSize.Height()) <= aSize.Height()) )
605 if ( aNewSize.Width() < TABWIN_WIDTH_MIN )
606 aNewSize.setWidth( TABWIN_WIDTH_MIN );
607 if ( aNewSize.Height() < TABWIN_HEIGHT_MIN )
608 aNewSize.setHeight( TABWIN_HEIGHT_MIN );
610 Size szOld = GetSizePixel();
612 aNewSize = Size(pView->CalcZoom(aNewSize.Width()),pView->CalcZoom(aNewSize.Height()));
613 SetPosSizePixel( ptOld, aNewSize );
614 pView->TabWinSized(this, ptOld, szOld);
615 Invalidate( InvalidateFlags::NoChildren );
618 else
620 // remember how often the user moved our window
621 ++m_nMoveCount;
622 if( m_nMoveCount == 5 )
623 m_nMoveIncrement = 10;
624 else if( m_nMoveCount > 15 )
625 m_nMoveCount = m_nMoveIncrement = 20;
627 Point aOldDataPoint = GetData()->GetPosition();
628 Point aNewDataPoint = aStartPoint + getTableView()->GetScrollOffset();
629 if ( aNewDataPoint.X() > -1 && aNewDataPoint.Y() > -1 )
631 OJoinTableView* pView = getTableView();
632 if ( pView->isMovementAllowed(aNewDataPoint, GetData()->GetSize()) )
634 SetPosPixel(aStartPoint);
636 // aNewDataPoint can not be used here because SetPosPixel reset it
637 pView->EnsureVisible(GetData()->GetPosition(), GetData()->GetSize());
638 pView->TabWinMoved(this,aOldDataPoint);
639 Invalidate(InvalidateFlags::NoChildren);
640 getDesignView()->getController().setModified( true );
642 else
644 m_nMoveCount = 0; // reset our movement count
645 m_nMoveIncrement = 1;
648 else
650 m_nMoveCount = 0; // reset our movement count
651 m_nMoveIncrement = 1;
654 m_nSizingFlags = SizingFlags::NONE;
656 else
658 m_nMoveCount = 0; // reset our movement count
659 m_nMoveIncrement = 1;
662 else
664 m_nMoveCount = 0; // reset our movement count
665 m_nMoveIncrement = 1;
667 break;
669 case NotifyEventType::KEYUP:
671 const KeyEvent* pKeyEvent = rNEvt.GetKeyEvent();
672 const vcl::KeyCode& rCode = pKeyEvent->GetKeyCode();
673 sal_uInt16 nKeyCode = rCode.GetCode();
674 if ( rCode.IsMod2() && nKeyCode != KEY_UP && nKeyCode != KEY_DOWN && nKeyCode != KEY_LEFT && nKeyCode != KEY_RIGHT )
676 m_nMoveCount = 0; // reset our movement count
677 m_nMoveIncrement = 1;
679 break;
681 default:
682 break;
684 if (!bHandled)
685 return Window::PreNotify(rNEvt);
686 return true;
689 OUString OTableWindow::getTitle() const
691 return m_xTitle->GetLabel().get_label();
694 void OTableWindow::_elementInserted( const container::ContainerEvent& /*_rEvent*/ )
696 FillListBox();
699 void OTableWindow::_elementRemoved( const container::ContainerEvent& /*_rEvent*/ )
701 FillListBox();
704 void OTableWindow::_elementReplaced( const container::ContainerEvent& /*_rEvent*/ )
706 FillListBox();
709 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */