Files
libreoffice/svx/source/table/tablecontroller.cxx

2587 lines
84 KiB
C++
Raw Normal View History

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
re-base on ALv2 code. Includes: Patch contributed by Christian Lippka impress212: #i113063# patch: dubios self assign in svx/source/dialog/framelink.cxx http://svn.apache.org/viewvc?view=revision&revision=1167619 Patches contributed by Mathias Bauer gnumake4 work variously http://svn.apache.org/viewvc?view=revision&revision=1394707 http://svn.apache.org/viewvc?view=revision&revision=1394326 cws mba34issues01: #i117712#: fix several resource errors introduced by IAccessible2 implementation http://svn.apache.org/viewvc?view=revision&revision=1172343 cws mba34issues01: #i117719#: use correct resource ID http://svn.apache.org/viewvc?view=revision&revision=1172351 Patch contributed by Andre Fischer Do not add targets for junit tests when junit is disabled. http://svn.apache.org/viewvc?view=revision&revision=1241508 Patches contributed by Armin Le-Grand #118804# corrected GraphicExporter behaviour on shortcut when pixel graphic is requested http://svn.apache.org/viewvc?view=revision&revision=1240195 fix for #118525#: Using primitives for chart sub-geometry visualisation http://svn.apache.org/viewvc?view=revision&revision=1226879 #118485# - Styles for OLEs are not saved. http://svn.apache.org/viewvc?view=revision&revision=1182166 #118524: apply patch, followup fixes to 118485 http://svn.apache.org/viewvc?view=revision&revision=1186077 13f79535-47bb-0310-9956-ffa450edef68 Patch contributed by Regina Henschel linecap: Reintegrating finished LineCap feature http://svn.apache.org/viewvc?view=revision&revision=1232507 Patch contributed by Wang Lei (leiw) #i118760# split the first table cell vertically, then undo&redo, the Presentation app will crash http://svn.apache.org/viewvc?view=revision&revision=1301361 cleanup globlmn hacks, undo dependent fixmes.
2012-11-21 22:06:52 +00:00
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
Resolves: #i121420# merge sidebar feature (cherry picked from commit 0a0a9b32aa5bf1ce2554ad37cbba3c7a105db2b5) Conflicts: chart2/source/controller/dialogs/dlg_View3D.cxx chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx chart2/source/controller/dialogs/tp_3D_SceneIllumination.hxx chart2/source/controller/drawinglayer/ViewElementListProvider.cxx chart2/source/controller/inc/ViewElementListProvider.hxx chart2/source/controller/inc/dlg_View3D.hxx chart2/source/controller/main/ShapeController.cxx chart2/source/inc/chartview/DrawModelWrapper.hxx chart2/source/view/main/DrawModelWrapper.cxx cui/source/inc/border.hxx cui/source/inc/cuitabarea.hxx cui/source/inc/cuitabline.hxx cui/source/inc/sdrcelldlg.hxx cui/source/inc/treeopt.hxx cui/source/options/optchart.cxx cui/source/options/optchart.hxx cui/source/options/optcolor.cxx cui/source/options/treeopt.cxx cui/source/tabpages/backgrnd.cxx cui/source/tabpages/border.cxx cui/source/tabpages/chardlg.cxx cui/source/tabpages/numpages.cxx cui/source/tabpages/tpcolor.cxx cui/source/tabpages/tplneend.cxx editeng/inc/editeng/outliner.hxx extensions/source/propctrlr/standardcontrol.cxx framework/source/register/registerservices.cxx offapi/com/sun/star/ui/makefile.mk officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu officecfg/registry/data/org/openoffice/Office/UI/makefile.mk officecfg/registry/schema/org/openoffice/Office/UI/makefile.mk postprocess/packregistry/makefile.mk reportdesign/source/ui/dlg/Condition.cxx reportdesign/source/ui/misc/UITools.cxx sc/inc/document.hxx sc/inc/helpids.h sc/inc/sc.hrc sc/prj/build.lst sc/sdi/scalc.sdi sc/source/core/data/documen9.cxx sc/source/core/data/drwlayer.cxx sc/source/ui/app/scdll.cxx sc/source/ui/app/typemap.cxx sc/source/ui/dbgui/scendlg.cxx sc/source/ui/docshell/docsh2.cxx sc/source/ui/docshell/docsh4.cxx sc/source/ui/drawfunc/chartsh.cxx sc/source/ui/drawfunc/drawsh.cxx sc/source/ui/drawfunc/drawsh2.cxx sc/source/ui/drawfunc/drawsh4.cxx sc/source/ui/drawfunc/drformsh.cxx sc/source/ui/drawfunc/drtxtob.cxx sc/source/ui/drawfunc/drtxtob1.cxx sc/source/ui/drawfunc/drtxtob2.cxx sc/source/ui/drawfunc/graphsh.cxx sc/source/ui/drawfunc/oleobjsh.cxx sc/source/ui/inc/chartsh.hxx sc/source/ui/inc/formatsh.hxx sc/source/ui/miscdlgs/tabbgcolordlg.cxx sc/source/ui/navipi/navipi.cxx sc/source/ui/optdlg/opredlin.cxx sc/source/ui/optdlg/tpview.cxx sc/source/ui/sidebar/makefile.mk sc/source/ui/view/auditsh.cxx sc/source/ui/view/cellsh.cxx sc/source/ui/view/editsh.cxx sc/source/ui/view/formatsh.cxx sc/source/ui/view/pivotsh.cxx sc/source/ui/view/tabvwsh.cxx sc/util/makefile.mk sd/inc/sdabstdlg.hxx sd/prj/build.lst sd/sdi/ToolPanelViewShell.sdi sd/sdi/makefile.mk sd/source/ui/accessibility/makefile.mk sd/source/ui/animations/CustomAnimationDialog.cxx sd/source/ui/dlg/PaneChildWindows.cxx sd/source/ui/dlg/PaneShells.cxx sd/source/ui/dlg/copydlg.cxx sd/source/ui/dlg/navigatr.cxx sd/source/ui/dlg/sddlgfact.cxx sd/source/ui/dlg/sddlgfact.hxx sd/source/ui/docshell/docshel3.cxx sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.cxx sd/source/ui/framework/factories/TaskPanelFactory.cxx sd/source/ui/framework/factories/TaskPanelFactory.hxx sd/source/ui/framework/factories/ViewShellWrapper.cxx sd/source/ui/framework/factories/makefile.mk sd/source/ui/framework/module/ImpressModule.cxx sd/source/ui/framework/module/ToolPanelModule.cxx sd/source/ui/framework/tools/FrameworkHelper.cxx sd/source/ui/func/fuolbull.cxx sd/source/ui/inc/DrawViewShell.hxx sd/source/ui/inc/PaneChildWindows.hxx sd/source/ui/inc/celltempl.hxx sd/source/ui/inc/copydlg.hxx sd/source/ui/inc/dlgpage.hxx sd/source/ui/inc/framework/FrameworkHelper.hxx sd/source/ui/inc/prltempl.hxx sd/source/ui/inc/tabtempl.hxx sd/source/ui/inc/taskpane/ILayoutableWindow.hxx sd/source/ui/inc/taskpane/PanelId.hxx sd/source/ui/inc/tpaction.hxx sd/source/ui/sidebar/AllMasterPagesSelector.cxx sd/source/ui/sidebar/AllMasterPagesSelector.hxx sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx sd/source/ui/sidebar/CurrentMasterPagesSelector.hxx sd/source/ui/sidebar/DocumentHelper.cxx sd/source/ui/sidebar/DocumentHelper.hxx sd/source/ui/sidebar/LayoutMenu.cxx sd/source/ui/sidebar/LayoutMenu.hxx sd/source/ui/sidebar/MasterPageContainer.cxx sd/source/ui/sidebar/MasterPageContainer.hxx sd/source/ui/sidebar/MasterPageContainerFiller.cxx sd/source/ui/sidebar/MasterPageContainerFiller.hxx sd/source/ui/sidebar/MasterPageContainerProviders.cxx sd/source/ui/sidebar/MasterPageContainerProviders.hxx sd/source/ui/sidebar/MasterPageContainerQueue.cxx sd/source/ui/sidebar/MasterPageContainerQueue.hxx sd/source/ui/sidebar/MasterPageDescriptor.cxx sd/source/ui/sidebar/MasterPageDescriptor.hxx sd/source/ui/sidebar/MasterPageObserver.cxx sd/source/ui/sidebar/MasterPagesSelector.cxx sd/source/ui/sidebar/MasterPagesSelector.hxx sd/source/ui/sidebar/PreviewValueSet.cxx sd/source/ui/sidebar/PreviewValueSet.hxx sd/source/ui/sidebar/RecentMasterPagesSelector.cxx sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx sd/source/ui/sidebar/SidebarShellManager.cxx sd/source/ui/sidebar/SlideTransitionPanel.hxx sd/source/ui/sidebar/makefile.mk sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx sd/source/ui/table/TableDesignPane.hxx sd/source/ui/toolpanel/ControlContainer.cxx sd/source/ui/toolpanel/ControlContainerDescriptor.hxx sd/source/ui/toolpanel/MethodGuard.hxx sd/source/ui/toolpanel/ScrollPanel.cxx sd/source/ui/toolpanel/SlideSorterCacheDisplay.cxx sd/source/ui/toolpanel/SubToolPanel.cxx sd/source/ui/toolpanel/TaskPaneFocusManager.cxx sd/source/ui/toolpanel/TaskPaneTreeNode.cxx sd/source/ui/toolpanel/TitleBar.cxx sd/source/ui/toolpanel/TitledControl.cxx sd/source/ui/toolpanel/ToolPanel.cxx sd/source/ui/toolpanel/ToolPanel.hxx sd/source/ui/toolpanel/ToolPanelFactory.cxx sd/source/ui/toolpanel/ToolPanelUIElement.cxx sd/source/ui/toolpanel/ToolPanelUIElement.hxx sd/source/ui/toolpanel/ToolPanelViewShell.cxx sd/source/ui/toolpanel/controls/CustomAnimationPanel.cxx sd/source/ui/toolpanel/controls/CustomAnimationPanel.hxx sd/source/ui/toolpanel/controls/MasterPagesPanel.cxx sd/source/ui/toolpanel/controls/MasterPagesPanel.hxx sd/source/ui/toolpanel/controls/SlideTransitionPanel.cxx sd/source/ui/toolpanel/controls/SlideTransitionPanel.hxx sd/source/ui/toolpanel/controls/TableDesignPanel.cxx sd/source/ui/toolpanel/controls/TableDesignPanel.hxx sd/source/ui/unoidl/UnoDocumentSettings.cxx sd/source/ui/view/ViewShellBase.cxx sd/source/ui/view/drtxtob.cxx sd/source/ui/view/drviews3.cxx sd/source/ui/view/drviews7.cxx sd/source/ui/view/drviewsa.cxx sd/source/ui/view/drviewsf.cxx sd/source/ui/view/outlnvsh.cxx sd/source/ui/view/sdview.cxx sd/source/ui/view/viewshel.cxx sd/uiconfig/sdraw/menubar/menubar.xml sd/util/makefile.mk sfx2/Package_inc.mk sfx2/inc/sfx2/sfx.hrc sfx2/inc/sfx2/sfxsids.hrc sfx2/source/control/bindings.cxx sfx2/source/dialog/templdlg.cxx sfx2/source/inc/templdgi.hxx svx/AllLangResTarget_svx.mk svx/Package_inc.mk svx/inc/svx/XPropertyTable.hxx svx/inc/svx/bmpmask.hxx svx/inc/svx/colrctrl.hxx svx/inc/svx/dialogs.hrc svx/inc/svx/dlgctrl.hxx svx/inc/svx/dlgutil.hxx svx/inc/svx/drawitem.hxx svx/inc/svx/fontwork.hxx svx/inc/svx/galbrws.hxx svx/inc/svx/sdr/table/tablecontroller.hxx svx/inc/svx/svdmodel.hxx svx/inc/svx/svdstr.hrc svx/inc/svx/svxids.hrc svx/inc/svx/svxitems.hrc svx/inc/svx/xattr.hxx svx/inc/svx/xflgrit.hxx svx/inc/svx/xflhtit.hxx svx/inc/svx/xit.hxx svx/inc/svx/xlineit.hxx svx/inc/svx/xlndsit.hxx svx/inc/svx/xlnedit.hxx svx/inc/svx/xlnstit.hxx svx/inc/svx/xtable.hxx svx/sdi/svx.sdi svx/source/dialog/_bmpmask.cxx svx/source/dialog/dialcontrol.cxx svx/source/dialog/dlgctrl.cxx svx/source/dialog/dlgutil.cxx svx/source/dialog/fontwork.cxx svx/source/gallery2/galbrws.cxx svx/source/gallery2/galbrws1.cxx svx/source/gallery2/gallery1.cxx svx/source/items/drawitem.cxx svx/source/items/svxitems.src svx/source/sdr/attribute/sdrformtextattribute.cxx svx/source/sidebar/ColorPanel.hxx svx/source/sidebar/EmptyPanel.hrc svx/source/sidebar/EmptyPanel.hxx svx/source/sidebar/gallery/GalleryPanel.hxx svx/source/svdraw/svdedtv1.cxx svx/source/svdraw/svdmodel.cxx svx/source/svdraw/svdogrp.cxx svx/source/svdraw/svdstr.src svx/source/tbxctrls/tbcontrl.cxx svx/source/unodraw/XPropertyTable.cxx svx/source/unodraw/unoctabl.cxx svx/source/xoutdev/XPropertyEntry.cxx svx/source/xoutdev/xattr.cxx svx/source/xoutdev/xattr2.cxx svx/source/xoutdev/xtabbtmp.cxx svx/source/xoutdev/xtabcolr.cxx svx/source/xoutdev/xtabdash.cxx svx/source/xoutdev/xtabgrdt.cxx svx/source/xoutdev/xtabhtch.cxx svx/source/xoutdev/xtable.cxx svx/source/xoutdev/xtablend.cxx svx/util/svx.component sw/inc/cmdid.h sw/inc/docsh.hxx sw/inc/editsh.hxx sw/inc/helpid.h sw/inc/rcid.hrc sw/inc/swabstdlg.hxx sw/inc/swcommands.h sw/sdi/swriter.sdi sw/source/core/doc/docdesc.cxx sw/source/core/draw/drawdoc.cxx sw/source/ui/app/docsh2.cxx sw/source/ui/app/docshdrw.cxx sw/source/ui/app/docshini.cxx sw/source/ui/app/docst.cxx sw/source/ui/config/optpage.cxx sw/source/ui/dialog/swdlgfact.cxx sw/source/ui/dialog/swdlgfact.hxx sw/source/ui/fmtui/tmpdlg.cxx sw/source/ui/inc/tmpdlg.hxx sw/source/ui/misc/pggrid.cxx sw/source/ui/shells/annotsh.cxx sw/source/ui/shells/basesh.cxx sw/source/ui/shells/beziersh.cxx sw/source/ui/shells/drawdlg.cxx sw/source/ui/shells/drawsh.cxx sw/source/ui/shells/drformsh.cxx sw/source/ui/shells/drwbassh.cxx sw/source/ui/shells/drwtxtex.cxx sw/source/ui/shells/drwtxtsh.cxx sw/source/ui/shells/frmsh.cxx sw/source/ui/shells/grfsh.cxx sw/source/ui/shells/olesh.cxx sw/source/ui/shells/tabsh.cxx sw/source/ui/shells/textsh.cxx sw/source/ui/shells/textsh1.cxx sw/source/ui/shells/txtnum.cxx sw/source/ui/uiview/viewtab.cxx sw/source/ui/uno/unofreg.cxx sw/source/ui/utlui/navipi.cxx sw/util/sw.component vcl/inc/vcl/split.hxx vcl/inc/vcl/window.hxx vcl/inc/window.h vcl/source/window/split.cxx vcl/source/window/window.cxx vcl/source/window/window4.cxx Change-Id: Idebaff59f9d60e4e93290cefefdda4c5a1e9215e Resolves: #i122194# Adapted license text in propertypanel.hrc then renamed it to ResourceDefinitions.hrc (cherry picked from commit e952d1401c1adc41934118ba7f542611ef9da11b) Conflicts: sfx2/Package_inc.mk sfx2/source/sidebar/SidebarChildWindow.cxx svx/source/sidebar/graphic/GraphicPropertyPanel.cxx svx/source/sidebar/line/LinePropertyPanel.cxx svx/source/sidebar/possize/PosSizePropertyPanel.cxx sw/source/ui/sidebar/PagePropertyPanel.src sw/source/ui/sidebar/WrapPropertyPanel.src Change-Id: Ie009056a78ab108556717a501399c83b477b3548 Resolves: #i122194# finally I got the correct file name Change-Id: If7a075af8c9a829f6f0a69f883c5c6d4ac97ba2a More merge changes for optional sidebar: revert toolpanel removal, restore and re-enable task pane remove apparently un-used SidebarFactory module add extra visibility annotation to ItemReceiverUpdate
2013-04-10 08:20:16 +00:00
#include <svx/sdr/table/tablecontroller.hxx>
#include <tablemodel.hxx>
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
#include <com/sun/star/container/XIndexAccess.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/table/XMergeableCellRange.hpp>
#include <com/sun/star/table/XMergeableCell.hpp>
#include <sal/config.h>
#include <vcl/svapp.hxx>
#include <svl/whiter.hxx>
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
#include <sfx2/request.hxx>
#include <editeng/scripttypeitem.hxx>
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
#include <svx/svdotable.hxx>
#include <svx/sdr/overlay/overlayobjectcell.hxx>
#include <svx/sdr/overlay/overlaymanager.hxx>
#include <svx/svxids.hrc>
#include <editeng/outlobj.hxx>
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
#include <svx/svdoutl.hxx>
#include <svx/svdpagv.hxx>
#include <svx/svdetc.hxx>
#include <editeng/editobj.hxx>
#include "editeng/editstat.hxx"
#include "editeng/unolingu.hxx"
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
#include "svx/sdrpagewindow.hxx"
#include <svx/selectioncontroller.hxx>
#include <svx/svdmodel.hxx>
#include "svx/sdrpaintwindow.hxx"
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
#include <svx/svxdlg.hxx>
#include <editeng/boxitem.hxx>
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
#include "cell.hxx"
#include <editeng/borderline.hxx>
#include <editeng/colritem.hxx>
#include "editeng/lineitem.hxx"
#include "svx/svdstr.hrc"
#include "svx/svdglob.hxx"
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
#include "svx/svdpage.hxx"
#include "tableundo.hxx"
#include "tablelayouter.hxx"
#include <vcl/msgbox.hxx>
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
using ::editeng::SvxBorderLine;
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
using namespace ::sdr::table;
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::table;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::text;
using namespace ::com::sun::star::style;
namespace sdr { namespace table {
// --------------------------------------------------------------------
// class SvxTableControllerModifyListener
// --------------------------------------------------------------------
class SvxTableControllerModifyListener : public ::cppu::WeakImplHelper1< ::com::sun::star::util::XModifyListener >
{
public:
SvxTableControllerModifyListener( SvxTableController* pController )
: mpController( pController ) {}
// XModifyListener
virtual void SAL_CALL modified( const ::com::sun::star::lang::EventObject& aEvent ) throw (::com::sun::star::uno::RuntimeException);
// XEventListener
virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException);
SvxTableController* mpController;
};
// --------------------------------------------------------------------
// XModifyListener
// --------------------------------------------------------------------
void SAL_CALL SvxTableControllerModifyListener::modified( const ::com::sun::star::lang::EventObject& ) throw (::com::sun::star::uno::RuntimeException)
{
if( mpController )
mpController->onTableModified();
}
// --------------------------------------------------------------------
// XEventListener
// --------------------------------------------------------------------
void SAL_CALL SvxTableControllerModifyListener::disposing( const ::com::sun::star::lang::EventObject& ) throw (::com::sun::star::uno::RuntimeException)
{
mpController = 0;
}
// --------------------------------------------------------------------
// class SvxTableController
// --------------------------------------------------------------------
rtl::Reference< sdr::SelectionController > CreateTableController( SdrObjEditView* pView, const SdrObject* pObj, const rtl::Reference< sdr::SelectionController >& xRefController )
{
return SvxTableController::create( pView, pObj, xRefController );
}
// --------------------------------------------------------------------
rtl::Reference< sdr::SelectionController > SvxTableController::create( SdrObjEditView* pView, const SdrObject* pObj, const rtl::Reference< sdr::SelectionController >& xRefController )
{
if( xRefController.is() )
{
SvxTableController* pController = dynamic_cast< SvxTableController* >( xRefController.get() );
if( pController && (pController->mxTableObj.get() == pObj) && (pController->mpView == pView) )
return xRefController;
}
return new SvxTableController( pView, pObj );
}
// --------------------------------------------------------------------
SvxTableController::SvxTableController( SdrObjEditView* pView, const SdrObject* pObj )
: mbCellSelectionMode(false)
, mbLeftButtonDown(false)
, mpSelectionOverlay(0)
, mpView( dynamic_cast< SdrView* >( pView ) )
, mxTableObj( dynamic_cast< SdrTableObj* >( const_cast< SdrObject* >( pObj ) ) )
, mpModel( 0 )
, mnUpdateEvent( 0 )
{
if( pObj )
mpModel = pObj->GetModel();
if( mxTableObj.is() )
{
static_cast< const SdrTableObj* >( pObj )->getActiveCellPos( maCursorFirstPos );
maCursorLastPos = maCursorFirstPos;
Reference< XTable > xTable( static_cast< const SdrTableObj* >( pObj )->getTable() );
if( xTable.is() )
{
mxModifyListener = new SvxTableControllerModifyListener( this );
xTable->addModifyListener( mxModifyListener );
mxTable.set( dynamic_cast< TableModel* >( xTable.get() ) );
}
}
}
// --------------------------------------------------------------------
SvxTableController::~SvxTableController()
{
if( mnUpdateEvent )
{
Application::RemoveUserEvent( mnUpdateEvent );
}
if( mxModifyListener.is() && mxTableObj.get() )
{
Reference< XTable > xTable( static_cast< SdrTableObj* >( mxTableObj.get() )->getTable() );
if( xTable.is() )
{
xTable->removeModifyListener( mxModifyListener );
mxModifyListener.clear();
}
}
}
// --------------------------------------------------------------------
const sal_uInt16 ACTION_NONE = 0;
const sal_uInt16 ACTION_GOTO_FIRST_CELL = 1;
const sal_uInt16 ACTION_GOTO_FIRST_COLUMN = 2;
const sal_uInt16 ACTION_GOTO_FIRST_ROW = 3;
const sal_uInt16 ACTION_GOTO_LEFT_CELL = 4;
const sal_uInt16 ACTION_GOTO_UP_CELL = 5;
const sal_uInt16 ACTION_GOTO_RIGHT_CELL = 6;
const sal_uInt16 ACTION_GOTO_DOWN_CELL = 7;
const sal_uInt16 ACTION_GOTO_LAST_CELL = 8;
const sal_uInt16 ACTION_GOTO_LAST_COLUMN = 9;
const sal_uInt16 ACTION_GOTO_LAST_ROW = 10;
const sal_uInt16 ACTION_EDIT_CELL = 11;
const sal_uInt16 ACTION_STOP_TEXT_EDIT = 12;
const sal_uInt16 ACTION_REMOVE_SELECTION = 13;
const sal_uInt16 ACTION_START_SELECTION = 14;
const sal_uInt16 ACTION_HANDLED_BY_VIEW = 15;
const sal_uInt16 ACTION_TAB = 18;
bool SvxTableController::onKeyInput(const KeyEvent& rKEvt, Window* pWindow )
{
if( !checkTableObject() )
return false;
// check if we are read only
if( mpModel && mpModel->IsReadOnly())
{
switch( rKEvt.GetKeyCode().GetCode() )
{
case awt::Key::DOWN:
case awt::Key::UP:
case awt::Key::LEFT:
case awt::Key::RIGHT:
case awt::Key::TAB:
case awt::Key::HOME:
case awt::Key::END:
case awt::Key::NUM2:
case awt::Key::NUM4:
case awt::Key::NUM6:
case awt::Key::NUM8:
case awt::Key::ESCAPE:
case awt::Key::F2:
break;
default:
// tell the view we eat the event, no further processing needed
return true;
}
}
sal_uInt16 nAction = getKeyboardAction( rKEvt, pWindow );
return executeAction( nAction, ( rKEvt.GetKeyCode().IsShift() ) ? sal_True : sal_False, pWindow );
}
// --------------------------------------------------------------------
// ::com::sun::star::awt::XMouseClickHandler:
// --------------------------------------------------------------------
bool SvxTableController::onMouseButtonDown(const MouseEvent& rMEvt, Window* pWindow )
{
if( !pWindow || !checkTableObject() )
return false;
SdrViewEvent aVEvt;
if( !rMEvt.IsRight() && mpView->PickAnything(rMEvt,SDRMOUSEBUTTONDOWN, aVEvt) == SDRHIT_HANDLE )
return false;
TableHitKind eHit = static_cast< SdrTableObj* >(mxTableObj.get())->CheckTableHit( pWindow->PixelToLogic(rMEvt.GetPosPixel()), maMouseDownPos.mnCol, maMouseDownPos.mnRow, 0 );
mbLeftButtonDown = (rMEvt.GetClicks() == 1) && rMEvt.IsLeft();
if( eHit == SDRTABLEHIT_CELL )
{
StartSelection( maMouseDownPos );
return true;
}
if( rMEvt.IsRight() && eHit != SDRTABLEHIT_NONE )
return true; // right click will become context menu
// for cell selektion with the mouse remember our first hit
if( mbLeftButtonDown )
{
RemoveSelection();
Point aPnt(rMEvt.GetPosPixel());
if (pWindow!=NULL)
aPnt=pWindow->PixelToLogic(aPnt);
SdrHdl* pHdl = mpView->PickHandle(aPnt);
if( pHdl )
{
mbLeftButtonDown = false;
}
else
{
::sdr::table::SdrTableObj* pTableObj = dynamic_cast< ::sdr::table::SdrTableObj* >( mxTableObj.get() );
if( !pWindow || !pTableObj || eHit == SDRTABLEHIT_NONE)
{
mbLeftButtonDown = false;
}
}
}
return false;
}
// --------------------------------------------------------------------
bool SvxTableController::onMouseButtonUp(const MouseEvent& rMEvt, Window* /*pWin*/)
{
if( !checkTableObject() )
return false;
mbLeftButtonDown = false;
if( rMEvt.GetClicks() == 2 )
return true;
return false;
}
// --------------------------------------------------------------------
bool SvxTableController::onMouseMove(const MouseEvent& rMEvt, Window* pWindow )
{
if( !checkTableObject() )
return false;
if( rMEvt.IsLeft() )
{
int i = 0;
i++;
}
SdrTableObj* pTableObj = dynamic_cast< SdrTableObj* >( mxTableObj.get() );
CellPos aPos;
if( mbLeftButtonDown && pTableObj && pTableObj->CheckTableHit( pWindow->PixelToLogic(rMEvt.GetPosPixel()), aPos.mnCol, aPos.mnRow, 0 ) != SDRTABLEHIT_NONE )
{
if(aPos != maMouseDownPos)
{
if( mbCellSelectionMode )
{
setSelectedCells( maMouseDownPos, aPos );
return true;
}
else
{
StartSelection( maMouseDownPos );
}
}
else if( mbCellSelectionMode )
{
UpdateSelection( aPos );
return true;
}
}
return false;
}
// --------------------------------------------------------------------
void SvxTableController::onSelectionHasChanged()
{
bool bSelected = false;
SdrTableObj* pTableObj = dynamic_cast< SdrTableObj* >( mxTableObj.get() );
if( pTableObj && pTableObj->IsTextEditActive() )
{
pTableObj->getActiveCellPos( maCursorFirstPos );
maCursorLastPos = maCursorFirstPos;
mbCellSelectionMode = false;
}
else
{
const SdrMarkList& rMarkList= mpView->GetMarkedObjectList();
if( rMarkList.GetMarkCount() == 1 )
bSelected = mxTableObj.get() == rMarkList.GetMark(0)->GetMarkedSdrObj();
/* fdo#46186 Selecting the table means selecting the entire cells */
if(!hasSelectedCells())
{
maCursorFirstPos = pTableObj->getFirstCell();
maCursorLastPos = pTableObj->getLastCell();
mbCellSelectionMode=true;
}
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
}
if( bSelected )
{
updateSelectionOverlay();
}
else
{
destroySelectionOverlay();
}
}
// --------------------------------------------------------------------
void SvxTableController::GetState( SfxItemSet& rSet )
{
if( !mxTable.is() || !mxTableObj.is() || !mxTableObj->GetModel() )
return;
SfxItemSet* pSet = 0;
bool bVertDone = false;
// Iterate over all requested items in the set.
SfxWhichIter aIter( rSet );
sal_uInt16 nWhich = aIter.FirstWhich();
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
while (nWhich)
{
switch (nWhich)
{
case SID_TABLE_VERT_BOTTOM:
case SID_TABLE_VERT_CENTER:
case SID_TABLE_VERT_NONE:
{
if( !mxTable.is() || !mxTableObj->GetModel() )
{
rSet.DisableItem(nWhich);
}
else if(!bVertDone)
{
if( !pSet )
{
pSet = new SfxItemSet( mxTableObj->GetModel()->GetItemPool() );
MergeAttrFromSelectedCells(*pSet, sal_False);
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
}
SdrTextVertAdjust eAdj = SDRTEXTVERTADJUST_BLOCK;
if( pSet->GetItemState( SDRATTR_TEXT_VERTADJUST ) != SFX_ITEM_DONTCARE )
eAdj = ((SdrTextVertAdjustItem&)(pSet->Get(SDRATTR_TEXT_VERTADJUST))).GetValue();
rSet.Put(SfxBoolItem(SID_TABLE_VERT_BOTTOM, eAdj == SDRTEXTVERTADJUST_BOTTOM));
rSet.Put(SfxBoolItem(SID_TABLE_VERT_CENTER, eAdj == SDRTEXTVERTADJUST_CENTER));
rSet.Put(SfxBoolItem(SID_TABLE_VERT_NONE, eAdj == SDRTEXTVERTADJUST_TOP));
bVertDone = true;
}
break;
}
case SID_TABLE_DELETE_ROW:
if( !mxTable.is() || !hasSelectedCells() || (mxTable->getRowCount() <= 1) )
rSet.DisableItem(SID_TABLE_DELETE_ROW);
break;
case SID_TABLE_DELETE_COL:
if( !mxTable.is() || !hasSelectedCells() || (mxTable->getColumnCount() <= 1) )
rSet.DisableItem(SID_TABLE_DELETE_COL);
break;
case SID_TABLE_MERGE_CELLS:
if( !mxTable.is() || !hasSelectedCells() )
rSet.DisableItem(SID_TABLE_MERGE_CELLS);
break;
case SID_TABLE_SPLIT_CELLS:
if( !hasSelectedCells() || !mxTable.is() )
rSet.DisableItem(SID_TABLE_SPLIT_CELLS);
break;
case SID_OPTIMIZE_TABLE:
case SID_TABLE_DISTRIBUTE_COLUMNS:
case SID_TABLE_DISTRIBUTE_ROWS:
{
bool bDistributeColumns = false;
bool bDistributeRows = false;
if( mxTable.is() )
{
CellPos aStart, aEnd;
getSelectedCells( aStart, aEnd );
bDistributeColumns = aStart.mnCol != aEnd.mnCol;
bDistributeRows = aStart.mnRow != aEnd.mnRow;
}
if( !bDistributeColumns && !bDistributeRows )
rSet.DisableItem(SID_OPTIMIZE_TABLE);
if( !bDistributeColumns )
rSet.DisableItem(SID_TABLE_DISTRIBUTE_COLUMNS);
if( !bDistributeRows )
rSet.DisableItem(SID_TABLE_DISTRIBUTE_ROWS);
break;
}
case SID_AUTOFORMAT:
case SID_TABLE_SORT_DIALOG:
case SID_TABLE_AUTOSUM:
// if( !mxTable.is() )
// rSet.DisableItem( nWhich );
break;
default:
break;
}
nWhich = aIter.NextWhich();
}
delete pSet;
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
}
// --------------------------------------------------------------------
CWS-TOOLING: integrate CWS impress172 2009-07-30 15:29:39 +0200 cl r274492 : #i102921# remove reference to inssrc.obj which was moved to svx 2009-07-29 11:40:35 +0200 wg r274445 : i103869 2009-07-22 14:39:13 +0200 sj r274241 : #i102713# fixed cloud shape 2009-07-07 15:28:04 +0200 sj r273800 : fixed build problem 2009-07-07 13:27:13 +0200 cl r273792 : #i102921# moved insert col/rows dialog to svx 2009-07-07 10:36:05 +0200 cl r273782 : fixed compiler warnings 2009-07-02 10:40:21 +0200 sj r273626 : fixed build problem 2009-07-02 10:27:56 +0200 cl r273624 : fixed merge problem 2009-07-02 10:27:19 +0200 cl r273623 : fixed compiler warning 2009-07-01 10:04:58 +0200 cl r273550 : CWS-TOOLING: rebase CWS impress172 to trunk@273468 (milestone: DEV300:m51) 2009-06-30 16:22:02 +0200 cl r273518 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 16:20:46 +0200 cl r273517 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 16:20:28 +0200 cl r273516 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 16:19:49 +0200 cl r273515 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 16:19:28 +0200 cl r273514 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 16:17:38 +0200 cl r273513 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 15:45:44 +0200 cl r273511 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 15:37:16 +0200 cl r273510 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 15:33:47 +0200 cl r273509 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 15:32:10 +0200 cl r273508 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 15:30:05 +0200 cl r273507 : #i102921# added insert table row/col dialog for impress tables 2009-06-29 12:32:42 +0200 sj r273465 : #158632# fixed textrange hyperlinks to specific pages, added slide names 2009-06-24 15:17:59 +0200 sj r273349 : #158636# fixed text range hyperlink to first/last slide 2009-06-22 13:18:30 +0200 sj r273224 : #158651# fixed header footer import 2009-06-19 15:18:24 +0200 sj r273160 : #158614# default text of presentation objects now cleared 2009-06-16 15:54:19 +0200 sj r273023 : #i101545# fixed crash - bracketing of graphic links has been done twice leading to a broken graphic state stack 2009-06-15 16:26:26 +0200 sj r272998 : #158635# importing bookmark interactions: firstslide, lastslide, nextslide, previousslide 2009-06-15 16:25:26 +0200 sj r272997 : #158635# added bookmark interactions: firstslide, lastslide, nextslide, previousslide 2009-06-12 13:17:32 +0200 sj r272915 : #i102713# fixed cloud shape 2009-06-10 18:36:58 +0200 sj r272833 : #158674# fixed curvedleftarrow, curvedrightarrow, curveddownarrow, curveduparrow 2009-06-08 19:52:28 +0200 sj r272746 : #158674# fixed curvedleftarrow, curvedrightarrow, curveddownarrow, curveduparrow 2009-06-04 15:28:32 +0200 cl r272640 : #i102358# applied patch to remove warnings 2009-06-04 14:39:45 +0200 cl r272630 : #i99423# applied path to change impress wizard create button to open when opening exisitng documents 2009-06-03 18:21:26 +0200 sj r272601 : #158635# now using the correct paragraph bottom spacing. using font independent linespacing for impress text objects 2009-06-03 15:47:27 +0200 cl r272583 : #i101817# added color collection based on scribus 2009-06-03 14:43:59 +0200 cl r272580 : #i102163# use weak ref to SdrObject instead of listening to the model 2009-06-03 12:39:29 +0200 cl r272556 : #i93308# correct namespace for com.sun.star.text.textfields 2009-06-03 12:27:00 +0200 cl r272555 : #i93308# correct namespace for com.sun.star.text.textfields 2009-06-03 11:33:44 +0200 cl r272553 : #i23221# allow all settings (that make sense) for presentation styles 2009-06-03 11:30:59 +0200 cl r272552 : #i23221# allow all settings (that make sense) for presentation styles 2009-06-03 11:30:22 +0200 cl r272551 : #i23221# allow all settings (that make sense) for presentation styles 2009-06-02 18:41:07 +0200 sj r272527 : #i28358# applied patch (better conversion of dotted lines) 2009-06-02 11:52:13 +0200 cl r272491 : #i98668# applied patch to fix possible endless loop if exception occours 2009-05-28 17:02:55 +0200 sj r272416 : #i102336# retaining graphic file names unchanged 2009-05-28 17:00:25 +0200 sj r272415 : #i102336# retaining graphic file names unchanged 2009-05-28 17:00:10 +0200 sj r272414 : #i102336# retaining graphic file names unchanged 2009-05-25 12:43:58 +0200 sj r272232 : #i102069# added patch from thb (fixed rotated group objects)
2009-08-05 17:01:07 +00:00
void SvxTableController::onInsert( sal_uInt16 nSId, const SfxItemSet* pArgs )
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
{
::sdr::table::SdrTableObj* pTableObj = dynamic_cast< ::sdr::table::SdrTableObj* >( mxTableObj.get() );
if( !pTableObj )
return;
if( mxTable.is() ) try
{
CWS-TOOLING: integrate CWS impress172 2009-07-30 15:29:39 +0200 cl r274492 : #i102921# remove reference to inssrc.obj which was moved to svx 2009-07-29 11:40:35 +0200 wg r274445 : i103869 2009-07-22 14:39:13 +0200 sj r274241 : #i102713# fixed cloud shape 2009-07-07 15:28:04 +0200 sj r273800 : fixed build problem 2009-07-07 13:27:13 +0200 cl r273792 : #i102921# moved insert col/rows dialog to svx 2009-07-07 10:36:05 +0200 cl r273782 : fixed compiler warnings 2009-07-02 10:40:21 +0200 sj r273626 : fixed build problem 2009-07-02 10:27:56 +0200 cl r273624 : fixed merge problem 2009-07-02 10:27:19 +0200 cl r273623 : fixed compiler warning 2009-07-01 10:04:58 +0200 cl r273550 : CWS-TOOLING: rebase CWS impress172 to trunk@273468 (milestone: DEV300:m51) 2009-06-30 16:22:02 +0200 cl r273518 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 16:20:46 +0200 cl r273517 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 16:20:28 +0200 cl r273516 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 16:19:49 +0200 cl r273515 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 16:19:28 +0200 cl r273514 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 16:17:38 +0200 cl r273513 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 15:45:44 +0200 cl r273511 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 15:37:16 +0200 cl r273510 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 15:33:47 +0200 cl r273509 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 15:32:10 +0200 cl r273508 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 15:30:05 +0200 cl r273507 : #i102921# added insert table row/col dialog for impress tables 2009-06-29 12:32:42 +0200 sj r273465 : #158632# fixed textrange hyperlinks to specific pages, added slide names 2009-06-24 15:17:59 +0200 sj r273349 : #158636# fixed text range hyperlink to first/last slide 2009-06-22 13:18:30 +0200 sj r273224 : #158651# fixed header footer import 2009-06-19 15:18:24 +0200 sj r273160 : #158614# default text of presentation objects now cleared 2009-06-16 15:54:19 +0200 sj r273023 : #i101545# fixed crash - bracketing of graphic links has been done twice leading to a broken graphic state stack 2009-06-15 16:26:26 +0200 sj r272998 : #158635# importing bookmark interactions: firstslide, lastslide, nextslide, previousslide 2009-06-15 16:25:26 +0200 sj r272997 : #158635# added bookmark interactions: firstslide, lastslide, nextslide, previousslide 2009-06-12 13:17:32 +0200 sj r272915 : #i102713# fixed cloud shape 2009-06-10 18:36:58 +0200 sj r272833 : #158674# fixed curvedleftarrow, curvedrightarrow, curveddownarrow, curveduparrow 2009-06-08 19:52:28 +0200 sj r272746 : #158674# fixed curvedleftarrow, curvedrightarrow, curveddownarrow, curveduparrow 2009-06-04 15:28:32 +0200 cl r272640 : #i102358# applied patch to remove warnings 2009-06-04 14:39:45 +0200 cl r272630 : #i99423# applied path to change impress wizard create button to open when opening exisitng documents 2009-06-03 18:21:26 +0200 sj r272601 : #158635# now using the correct paragraph bottom spacing. using font independent linespacing for impress text objects 2009-06-03 15:47:27 +0200 cl r272583 : #i101817# added color collection based on scribus 2009-06-03 14:43:59 +0200 cl r272580 : #i102163# use weak ref to SdrObject instead of listening to the model 2009-06-03 12:39:29 +0200 cl r272556 : #i93308# correct namespace for com.sun.star.text.textfields 2009-06-03 12:27:00 +0200 cl r272555 : #i93308# correct namespace for com.sun.star.text.textfields 2009-06-03 11:33:44 +0200 cl r272553 : #i23221# allow all settings (that make sense) for presentation styles 2009-06-03 11:30:59 +0200 cl r272552 : #i23221# allow all settings (that make sense) for presentation styles 2009-06-03 11:30:22 +0200 cl r272551 : #i23221# allow all settings (that make sense) for presentation styles 2009-06-02 18:41:07 +0200 sj r272527 : #i28358# applied patch (better conversion of dotted lines) 2009-06-02 11:52:13 +0200 cl r272491 : #i98668# applied patch to fix possible endless loop if exception occours 2009-05-28 17:02:55 +0200 sj r272416 : #i102336# retaining graphic file names unchanged 2009-05-28 17:00:25 +0200 sj r272415 : #i102336# retaining graphic file names unchanged 2009-05-28 17:00:10 +0200 sj r272414 : #i102336# retaining graphic file names unchanged 2009-05-25 12:43:58 +0200 sj r272232 : #i102069# added patch from thb (fixed rotated group objects)
2009-08-05 17:01:07 +00:00
//
bool bInsertAfter = true;
sal_uInt16 nCount = 0;
if( pArgs )
{
const SfxPoolItem* pItem = 0;
pArgs->GetItemState(nSId, sal_False, &pItem);
CWS-TOOLING: integrate CWS impress172 2009-07-30 15:29:39 +0200 cl r274492 : #i102921# remove reference to inssrc.obj which was moved to svx 2009-07-29 11:40:35 +0200 wg r274445 : i103869 2009-07-22 14:39:13 +0200 sj r274241 : #i102713# fixed cloud shape 2009-07-07 15:28:04 +0200 sj r273800 : fixed build problem 2009-07-07 13:27:13 +0200 cl r273792 : #i102921# moved insert col/rows dialog to svx 2009-07-07 10:36:05 +0200 cl r273782 : fixed compiler warnings 2009-07-02 10:40:21 +0200 sj r273626 : fixed build problem 2009-07-02 10:27:56 +0200 cl r273624 : fixed merge problem 2009-07-02 10:27:19 +0200 cl r273623 : fixed compiler warning 2009-07-01 10:04:58 +0200 cl r273550 : CWS-TOOLING: rebase CWS impress172 to trunk@273468 (milestone: DEV300:m51) 2009-06-30 16:22:02 +0200 cl r273518 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 16:20:46 +0200 cl r273517 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 16:20:28 +0200 cl r273516 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 16:19:49 +0200 cl r273515 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 16:19:28 +0200 cl r273514 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 16:17:38 +0200 cl r273513 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 15:45:44 +0200 cl r273511 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 15:37:16 +0200 cl r273510 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 15:33:47 +0200 cl r273509 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 15:32:10 +0200 cl r273508 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 15:30:05 +0200 cl r273507 : #i102921# added insert table row/col dialog for impress tables 2009-06-29 12:32:42 +0200 sj r273465 : #158632# fixed textrange hyperlinks to specific pages, added slide names 2009-06-24 15:17:59 +0200 sj r273349 : #158636# fixed text range hyperlink to first/last slide 2009-06-22 13:18:30 +0200 sj r273224 : #158651# fixed header footer import 2009-06-19 15:18:24 +0200 sj r273160 : #158614# default text of presentation objects now cleared 2009-06-16 15:54:19 +0200 sj r273023 : #i101545# fixed crash - bracketing of graphic links has been done twice leading to a broken graphic state stack 2009-06-15 16:26:26 +0200 sj r272998 : #158635# importing bookmark interactions: firstslide, lastslide, nextslide, previousslide 2009-06-15 16:25:26 +0200 sj r272997 : #158635# added bookmark interactions: firstslide, lastslide, nextslide, previousslide 2009-06-12 13:17:32 +0200 sj r272915 : #i102713# fixed cloud shape 2009-06-10 18:36:58 +0200 sj r272833 : #158674# fixed curvedleftarrow, curvedrightarrow, curveddownarrow, curveduparrow 2009-06-08 19:52:28 +0200 sj r272746 : #158674# fixed curvedleftarrow, curvedrightarrow, curveddownarrow, curveduparrow 2009-06-04 15:28:32 +0200 cl r272640 : #i102358# applied patch to remove warnings 2009-06-04 14:39:45 +0200 cl r272630 : #i99423# applied path to change impress wizard create button to open when opening exisitng documents 2009-06-03 18:21:26 +0200 sj r272601 : #158635# now using the correct paragraph bottom spacing. using font independent linespacing for impress text objects 2009-06-03 15:47:27 +0200 cl r272583 : #i101817# added color collection based on scribus 2009-06-03 14:43:59 +0200 cl r272580 : #i102163# use weak ref to SdrObject instead of listening to the model 2009-06-03 12:39:29 +0200 cl r272556 : #i93308# correct namespace for com.sun.star.text.textfields 2009-06-03 12:27:00 +0200 cl r272555 : #i93308# correct namespace for com.sun.star.text.textfields 2009-06-03 11:33:44 +0200 cl r272553 : #i23221# allow all settings (that make sense) for presentation styles 2009-06-03 11:30:59 +0200 cl r272552 : #i23221# allow all settings (that make sense) for presentation styles 2009-06-03 11:30:22 +0200 cl r272551 : #i23221# allow all settings (that make sense) for presentation styles 2009-06-02 18:41:07 +0200 sj r272527 : #i28358# applied patch (better conversion of dotted lines) 2009-06-02 11:52:13 +0200 cl r272491 : #i98668# applied patch to fix possible endless loop if exception occours 2009-05-28 17:02:55 +0200 sj r272416 : #i102336# retaining graphic file names unchanged 2009-05-28 17:00:25 +0200 sj r272415 : #i102336# retaining graphic file names unchanged 2009-05-28 17:00:10 +0200 sj r272414 : #i102336# retaining graphic file names unchanged 2009-05-25 12:43:58 +0200 sj r272232 : #i102069# added patch from thb (fixed rotated group objects)
2009-08-05 17:01:07 +00:00
if (pItem)
{
nCount = ((const SfxInt16Item* )pItem)->GetValue();
if(SFX_ITEM_SET == pArgs->GetItemState(SID_TABLE_PARAM_INSERT_AFTER, sal_True, &pItem))
CWS-TOOLING: integrate CWS impress172 2009-07-30 15:29:39 +0200 cl r274492 : #i102921# remove reference to inssrc.obj which was moved to svx 2009-07-29 11:40:35 +0200 wg r274445 : i103869 2009-07-22 14:39:13 +0200 sj r274241 : #i102713# fixed cloud shape 2009-07-07 15:28:04 +0200 sj r273800 : fixed build problem 2009-07-07 13:27:13 +0200 cl r273792 : #i102921# moved insert col/rows dialog to svx 2009-07-07 10:36:05 +0200 cl r273782 : fixed compiler warnings 2009-07-02 10:40:21 +0200 sj r273626 : fixed build problem 2009-07-02 10:27:56 +0200 cl r273624 : fixed merge problem 2009-07-02 10:27:19 +0200 cl r273623 : fixed compiler warning 2009-07-01 10:04:58 +0200 cl r273550 : CWS-TOOLING: rebase CWS impress172 to trunk@273468 (milestone: DEV300:m51) 2009-06-30 16:22:02 +0200 cl r273518 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 16:20:46 +0200 cl r273517 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 16:20:28 +0200 cl r273516 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 16:19:49 +0200 cl r273515 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 16:19:28 +0200 cl r273514 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 16:17:38 +0200 cl r273513 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 15:45:44 +0200 cl r273511 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 15:37:16 +0200 cl r273510 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 15:33:47 +0200 cl r273509 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 15:32:10 +0200 cl r273508 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 15:30:05 +0200 cl r273507 : #i102921# added insert table row/col dialog for impress tables 2009-06-29 12:32:42 +0200 sj r273465 : #158632# fixed textrange hyperlinks to specific pages, added slide names 2009-06-24 15:17:59 +0200 sj r273349 : #158636# fixed text range hyperlink to first/last slide 2009-06-22 13:18:30 +0200 sj r273224 : #158651# fixed header footer import 2009-06-19 15:18:24 +0200 sj r273160 : #158614# default text of presentation objects now cleared 2009-06-16 15:54:19 +0200 sj r273023 : #i101545# fixed crash - bracketing of graphic links has been done twice leading to a broken graphic state stack 2009-06-15 16:26:26 +0200 sj r272998 : #158635# importing bookmark interactions: firstslide, lastslide, nextslide, previousslide 2009-06-15 16:25:26 +0200 sj r272997 : #158635# added bookmark interactions: firstslide, lastslide, nextslide, previousslide 2009-06-12 13:17:32 +0200 sj r272915 : #i102713# fixed cloud shape 2009-06-10 18:36:58 +0200 sj r272833 : #158674# fixed curvedleftarrow, curvedrightarrow, curveddownarrow, curveduparrow 2009-06-08 19:52:28 +0200 sj r272746 : #158674# fixed curvedleftarrow, curvedrightarrow, curveddownarrow, curveduparrow 2009-06-04 15:28:32 +0200 cl r272640 : #i102358# applied patch to remove warnings 2009-06-04 14:39:45 +0200 cl r272630 : #i99423# applied path to change impress wizard create button to open when opening exisitng documents 2009-06-03 18:21:26 +0200 sj r272601 : #158635# now using the correct paragraph bottom spacing. using font independent linespacing for impress text objects 2009-06-03 15:47:27 +0200 cl r272583 : #i101817# added color collection based on scribus 2009-06-03 14:43:59 +0200 cl r272580 : #i102163# use weak ref to SdrObject instead of listening to the model 2009-06-03 12:39:29 +0200 cl r272556 : #i93308# correct namespace for com.sun.star.text.textfields 2009-06-03 12:27:00 +0200 cl r272555 : #i93308# correct namespace for com.sun.star.text.textfields 2009-06-03 11:33:44 +0200 cl r272553 : #i23221# allow all settings (that make sense) for presentation styles 2009-06-03 11:30:59 +0200 cl r272552 : #i23221# allow all settings (that make sense) for presentation styles 2009-06-03 11:30:22 +0200 cl r272551 : #i23221# allow all settings (that make sense) for presentation styles 2009-06-02 18:41:07 +0200 sj r272527 : #i28358# applied patch (better conversion of dotted lines) 2009-06-02 11:52:13 +0200 cl r272491 : #i98668# applied patch to fix possible endless loop if exception occours 2009-05-28 17:02:55 +0200 sj r272416 : #i102336# retaining graphic file names unchanged 2009-05-28 17:00:25 +0200 sj r272415 : #i102336# retaining graphic file names unchanged 2009-05-28 17:00:10 +0200 sj r272414 : #i102336# retaining graphic file names unchanged 2009-05-25 12:43:58 +0200 sj r272232 : #i102069# added patch from thb (fixed rotated group objects)
2009-08-05 17:01:07 +00:00
bInsertAfter = ((const SfxBoolItem* )pItem)->GetValue();
}
}
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
CellPos aStart, aEnd;
if( hasSelectedCells() )
{
getSelectedCells( aStart, aEnd );
}
else
{
CWS-TOOLING: integrate CWS impress172 2009-07-30 15:29:39 +0200 cl r274492 : #i102921# remove reference to inssrc.obj which was moved to svx 2009-07-29 11:40:35 +0200 wg r274445 : i103869 2009-07-22 14:39:13 +0200 sj r274241 : #i102713# fixed cloud shape 2009-07-07 15:28:04 +0200 sj r273800 : fixed build problem 2009-07-07 13:27:13 +0200 cl r273792 : #i102921# moved insert col/rows dialog to svx 2009-07-07 10:36:05 +0200 cl r273782 : fixed compiler warnings 2009-07-02 10:40:21 +0200 sj r273626 : fixed build problem 2009-07-02 10:27:56 +0200 cl r273624 : fixed merge problem 2009-07-02 10:27:19 +0200 cl r273623 : fixed compiler warning 2009-07-01 10:04:58 +0200 cl r273550 : CWS-TOOLING: rebase CWS impress172 to trunk@273468 (milestone: DEV300:m51) 2009-06-30 16:22:02 +0200 cl r273518 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 16:20:46 +0200 cl r273517 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 16:20:28 +0200 cl r273516 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 16:19:49 +0200 cl r273515 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 16:19:28 +0200 cl r273514 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 16:17:38 +0200 cl r273513 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 15:45:44 +0200 cl r273511 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 15:37:16 +0200 cl r273510 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 15:33:47 +0200 cl r273509 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 15:32:10 +0200 cl r273508 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 15:30:05 +0200 cl r273507 : #i102921# added insert table row/col dialog for impress tables 2009-06-29 12:32:42 +0200 sj r273465 : #158632# fixed textrange hyperlinks to specific pages, added slide names 2009-06-24 15:17:59 +0200 sj r273349 : #158636# fixed text range hyperlink to first/last slide 2009-06-22 13:18:30 +0200 sj r273224 : #158651# fixed header footer import 2009-06-19 15:18:24 +0200 sj r273160 : #158614# default text of presentation objects now cleared 2009-06-16 15:54:19 +0200 sj r273023 : #i101545# fixed crash - bracketing of graphic links has been done twice leading to a broken graphic state stack 2009-06-15 16:26:26 +0200 sj r272998 : #158635# importing bookmark interactions: firstslide, lastslide, nextslide, previousslide 2009-06-15 16:25:26 +0200 sj r272997 : #158635# added bookmark interactions: firstslide, lastslide, nextslide, previousslide 2009-06-12 13:17:32 +0200 sj r272915 : #i102713# fixed cloud shape 2009-06-10 18:36:58 +0200 sj r272833 : #158674# fixed curvedleftarrow, curvedrightarrow, curveddownarrow, curveduparrow 2009-06-08 19:52:28 +0200 sj r272746 : #158674# fixed curvedleftarrow, curvedrightarrow, curveddownarrow, curveduparrow 2009-06-04 15:28:32 +0200 cl r272640 : #i102358# applied patch to remove warnings 2009-06-04 14:39:45 +0200 cl r272630 : #i99423# applied path to change impress wizard create button to open when opening exisitng documents 2009-06-03 18:21:26 +0200 sj r272601 : #158635# now using the correct paragraph bottom spacing. using font independent linespacing for impress text objects 2009-06-03 15:47:27 +0200 cl r272583 : #i101817# added color collection based on scribus 2009-06-03 14:43:59 +0200 cl r272580 : #i102163# use weak ref to SdrObject instead of listening to the model 2009-06-03 12:39:29 +0200 cl r272556 : #i93308# correct namespace for com.sun.star.text.textfields 2009-06-03 12:27:00 +0200 cl r272555 : #i93308# correct namespace for com.sun.star.text.textfields 2009-06-03 11:33:44 +0200 cl r272553 : #i23221# allow all settings (that make sense) for presentation styles 2009-06-03 11:30:59 +0200 cl r272552 : #i23221# allow all settings (that make sense) for presentation styles 2009-06-03 11:30:22 +0200 cl r272551 : #i23221# allow all settings (that make sense) for presentation styles 2009-06-02 18:41:07 +0200 sj r272527 : #i28358# applied patch (better conversion of dotted lines) 2009-06-02 11:52:13 +0200 cl r272491 : #i98668# applied patch to fix possible endless loop if exception occours 2009-05-28 17:02:55 +0200 sj r272416 : #i102336# retaining graphic file names unchanged 2009-05-28 17:00:25 +0200 sj r272415 : #i102336# retaining graphic file names unchanged 2009-05-28 17:00:10 +0200 sj r272414 : #i102336# retaining graphic file names unchanged 2009-05-25 12:43:58 +0200 sj r272232 : #i102069# added patch from thb (fixed rotated group objects)
2009-08-05 17:01:07 +00:00
if( bInsertAfter )
{
aStart.mnCol = mxTable->getColumnCount() - 1;
aStart.mnRow = mxTable->getRowCount() - 1;
aEnd = aStart;
}
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
}
if( pTableObj->IsTextEditActive() )
mpView->SdrEndTextEdit(sal_True);
RemoveSelection();
const OUString sSize( "Size" );
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
const bool bUndo = mpModel && mpModel->IsUndoEnabled();
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
switch( nSId )
{
case SID_TABLE_INSERT_COL:
{
TableModelNotifyGuard aGuard( mxTable.get() );
if( bUndo )
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
{
mpModel->BegUndo( ImpGetResStr(STR_TABLE_INSCOL) );
mpModel->AddUndo( mpModel->GetSdrUndoFactory().CreateUndoGeoObject(*pTableObj) );
}
Reference< XTableColumns > xCols( mxTable->getColumns() );
CWS-TOOLING: integrate CWS impress172 2009-07-30 15:29:39 +0200 cl r274492 : #i102921# remove reference to inssrc.obj which was moved to svx 2009-07-29 11:40:35 +0200 wg r274445 : i103869 2009-07-22 14:39:13 +0200 sj r274241 : #i102713# fixed cloud shape 2009-07-07 15:28:04 +0200 sj r273800 : fixed build problem 2009-07-07 13:27:13 +0200 cl r273792 : #i102921# moved insert col/rows dialog to svx 2009-07-07 10:36:05 +0200 cl r273782 : fixed compiler warnings 2009-07-02 10:40:21 +0200 sj r273626 : fixed build problem 2009-07-02 10:27:56 +0200 cl r273624 : fixed merge problem 2009-07-02 10:27:19 +0200 cl r273623 : fixed compiler warning 2009-07-01 10:04:58 +0200 cl r273550 : CWS-TOOLING: rebase CWS impress172 to trunk@273468 (milestone: DEV300:m51) 2009-06-30 16:22:02 +0200 cl r273518 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 16:20:46 +0200 cl r273517 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 16:20:28 +0200 cl r273516 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 16:19:49 +0200 cl r273515 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 16:19:28 +0200 cl r273514 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 16:17:38 +0200 cl r273513 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 15:45:44 +0200 cl r273511 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 15:37:16 +0200 cl r273510 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 15:33:47 +0200 cl r273509 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 15:32:10 +0200 cl r273508 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 15:30:05 +0200 cl r273507 : #i102921# added insert table row/col dialog for impress tables 2009-06-29 12:32:42 +0200 sj r273465 : #158632# fixed textrange hyperlinks to specific pages, added slide names 2009-06-24 15:17:59 +0200 sj r273349 : #158636# fixed text range hyperlink to first/last slide 2009-06-22 13:18:30 +0200 sj r273224 : #158651# fixed header footer import 2009-06-19 15:18:24 +0200 sj r273160 : #158614# default text of presentation objects now cleared 2009-06-16 15:54:19 +0200 sj r273023 : #i101545# fixed crash - bracketing of graphic links has been done twice leading to a broken graphic state stack 2009-06-15 16:26:26 +0200 sj r272998 : #158635# importing bookmark interactions: firstslide, lastslide, nextslide, previousslide 2009-06-15 16:25:26 +0200 sj r272997 : #158635# added bookmark interactions: firstslide, lastslide, nextslide, previousslide 2009-06-12 13:17:32 +0200 sj r272915 : #i102713# fixed cloud shape 2009-06-10 18:36:58 +0200 sj r272833 : #158674# fixed curvedleftarrow, curvedrightarrow, curveddownarrow, curveduparrow 2009-06-08 19:52:28 +0200 sj r272746 : #158674# fixed curvedleftarrow, curvedrightarrow, curveddownarrow, curveduparrow 2009-06-04 15:28:32 +0200 cl r272640 : #i102358# applied patch to remove warnings 2009-06-04 14:39:45 +0200 cl r272630 : #i99423# applied path to change impress wizard create button to open when opening exisitng documents 2009-06-03 18:21:26 +0200 sj r272601 : #158635# now using the correct paragraph bottom spacing. using font independent linespacing for impress text objects 2009-06-03 15:47:27 +0200 cl r272583 : #i101817# added color collection based on scribus 2009-06-03 14:43:59 +0200 cl r272580 : #i102163# use weak ref to SdrObject instead of listening to the model 2009-06-03 12:39:29 +0200 cl r272556 : #i93308# correct namespace for com.sun.star.text.textfields 2009-06-03 12:27:00 +0200 cl r272555 : #i93308# correct namespace for com.sun.star.text.textfields 2009-06-03 11:33:44 +0200 cl r272553 : #i23221# allow all settings (that make sense) for presentation styles 2009-06-03 11:30:59 +0200 cl r272552 : #i23221# allow all settings (that make sense) for presentation styles 2009-06-03 11:30:22 +0200 cl r272551 : #i23221# allow all settings (that make sense) for presentation styles 2009-06-02 18:41:07 +0200 sj r272527 : #i28358# applied patch (better conversion of dotted lines) 2009-06-02 11:52:13 +0200 cl r272491 : #i98668# applied patch to fix possible endless loop if exception occours 2009-05-28 17:02:55 +0200 sj r272416 : #i102336# retaining graphic file names unchanged 2009-05-28 17:00:25 +0200 sj r272415 : #i102336# retaining graphic file names unchanged 2009-05-28 17:00:10 +0200 sj r272414 : #i102336# retaining graphic file names unchanged 2009-05-25 12:43:58 +0200 sj r272232 : #i102069# added patch from thb (fixed rotated group objects)
2009-08-05 17:01:07 +00:00
const sal_Int32 nNewColumns = (nCount == 0) ? (aEnd.mnCol - aStart.mnCol + 1) : nCount;
const sal_Int32 nNewStartColumn = aEnd.mnCol + (bInsertAfter ? 1 : 0);
xCols->insertByIndex( nNewStartColumn, nNewColumns );
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
for( sal_Int32 nOffset = 0; nOffset < nNewColumns; nOffset++ )
{
// Resolves fdo#61540
// On Insert before, the reference column whose size is going to be
// used for newly created column(s) is wrong. As the new columns are
// inserted before the reference column, the reference column moved
// to the new position by no., of new columns i.e (earlier+newcolumns).
Reference< XPropertySet >(xCols->getByIndex(nNewStartColumn+nOffset), UNO_QUERY_THROW )->
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
setPropertyValue( sSize,
Reference< XPropertySet >(xCols->getByIndex( bInsertAfter?nNewStartColumn-1:nNewStartColumn+nNewColumns ), UNO_QUERY_THROW )->
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
getPropertyValue( sSize ) );
}
if( bUndo )
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
mpModel->EndUndo();
CWS-TOOLING: integrate CWS impress172 2009-07-30 15:29:39 +0200 cl r274492 : #i102921# remove reference to inssrc.obj which was moved to svx 2009-07-29 11:40:35 +0200 wg r274445 : i103869 2009-07-22 14:39:13 +0200 sj r274241 : #i102713# fixed cloud shape 2009-07-07 15:28:04 +0200 sj r273800 : fixed build problem 2009-07-07 13:27:13 +0200 cl r273792 : #i102921# moved insert col/rows dialog to svx 2009-07-07 10:36:05 +0200 cl r273782 : fixed compiler warnings 2009-07-02 10:40:21 +0200 sj r273626 : fixed build problem 2009-07-02 10:27:56 +0200 cl r273624 : fixed merge problem 2009-07-02 10:27:19 +0200 cl r273623 : fixed compiler warning 2009-07-01 10:04:58 +0200 cl r273550 : CWS-TOOLING: rebase CWS impress172 to trunk@273468 (milestone: DEV300:m51) 2009-06-30 16:22:02 +0200 cl r273518 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 16:20:46 +0200 cl r273517 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 16:20:28 +0200 cl r273516 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 16:19:49 +0200 cl r273515 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 16:19:28 +0200 cl r273514 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 16:17:38 +0200 cl r273513 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 15:45:44 +0200 cl r273511 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 15:37:16 +0200 cl r273510 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 15:33:47 +0200 cl r273509 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 15:32:10 +0200 cl r273508 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 15:30:05 +0200 cl r273507 : #i102921# added insert table row/col dialog for impress tables 2009-06-29 12:32:42 +0200 sj r273465 : #158632# fixed textrange hyperlinks to specific pages, added slide names 2009-06-24 15:17:59 +0200 sj r273349 : #158636# fixed text range hyperlink to first/last slide 2009-06-22 13:18:30 +0200 sj r273224 : #158651# fixed header footer import 2009-06-19 15:18:24 +0200 sj r273160 : #158614# default text of presentation objects now cleared 2009-06-16 15:54:19 +0200 sj r273023 : #i101545# fixed crash - bracketing of graphic links has been done twice leading to a broken graphic state stack 2009-06-15 16:26:26 +0200 sj r272998 : #158635# importing bookmark interactions: firstslide, lastslide, nextslide, previousslide 2009-06-15 16:25:26 +0200 sj r272997 : #158635# added bookmark interactions: firstslide, lastslide, nextslide, previousslide 2009-06-12 13:17:32 +0200 sj r272915 : #i102713# fixed cloud shape 2009-06-10 18:36:58 +0200 sj r272833 : #158674# fixed curvedleftarrow, curvedrightarrow, curveddownarrow, curveduparrow 2009-06-08 19:52:28 +0200 sj r272746 : #158674# fixed curvedleftarrow, curvedrightarrow, curveddownarrow, curveduparrow 2009-06-04 15:28:32 +0200 cl r272640 : #i102358# applied patch to remove warnings 2009-06-04 14:39:45 +0200 cl r272630 : #i99423# applied path to change impress wizard create button to open when opening exisitng documents 2009-06-03 18:21:26 +0200 sj r272601 : #158635# now using the correct paragraph bottom spacing. using font independent linespacing for impress text objects 2009-06-03 15:47:27 +0200 cl r272583 : #i101817# added color collection based on scribus 2009-06-03 14:43:59 +0200 cl r272580 : #i102163# use weak ref to SdrObject instead of listening to the model 2009-06-03 12:39:29 +0200 cl r272556 : #i93308# correct namespace for com.sun.star.text.textfields 2009-06-03 12:27:00 +0200 cl r272555 : #i93308# correct namespace for com.sun.star.text.textfields 2009-06-03 11:33:44 +0200 cl r272553 : #i23221# allow all settings (that make sense) for presentation styles 2009-06-03 11:30:59 +0200 cl r272552 : #i23221# allow all settings (that make sense) for presentation styles 2009-06-03 11:30:22 +0200 cl r272551 : #i23221# allow all settings (that make sense) for presentation styles 2009-06-02 18:41:07 +0200 sj r272527 : #i28358# applied patch (better conversion of dotted lines) 2009-06-02 11:52:13 +0200 cl r272491 : #i98668# applied patch to fix possible endless loop if exception occours 2009-05-28 17:02:55 +0200 sj r272416 : #i102336# retaining graphic file names unchanged 2009-05-28 17:00:25 +0200 sj r272415 : #i102336# retaining graphic file names unchanged 2009-05-28 17:00:10 +0200 sj r272414 : #i102336# retaining graphic file names unchanged 2009-05-25 12:43:58 +0200 sj r272232 : #i102069# added patch from thb (fixed rotated group objects)
2009-08-05 17:01:07 +00:00
aStart.mnCol = nNewStartColumn;
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
aStart.mnRow = 0;
aEnd.mnCol = aStart.mnCol + nNewColumns - 1;
aEnd.mnRow = mxTable->getRowCount() - 1;
break;
}
case SID_TABLE_INSERT_ROW:
{
TableModelNotifyGuard aGuard( mxTable.get() );
if( bUndo )
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
{
mpModel->BegUndo( ImpGetResStr(STR_TABLE_INSROW ) );
mpModel->AddUndo( mpModel->GetSdrUndoFactory().CreateUndoGeoObject(*pTableObj) );
}
Reference< XTableRows > xRows( mxTable->getRows() );
CWS-TOOLING: integrate CWS impress172 2009-07-30 15:29:39 +0200 cl r274492 : #i102921# remove reference to inssrc.obj which was moved to svx 2009-07-29 11:40:35 +0200 wg r274445 : i103869 2009-07-22 14:39:13 +0200 sj r274241 : #i102713# fixed cloud shape 2009-07-07 15:28:04 +0200 sj r273800 : fixed build problem 2009-07-07 13:27:13 +0200 cl r273792 : #i102921# moved insert col/rows dialog to svx 2009-07-07 10:36:05 +0200 cl r273782 : fixed compiler warnings 2009-07-02 10:40:21 +0200 sj r273626 : fixed build problem 2009-07-02 10:27:56 +0200 cl r273624 : fixed merge problem 2009-07-02 10:27:19 +0200 cl r273623 : fixed compiler warning 2009-07-01 10:04:58 +0200 cl r273550 : CWS-TOOLING: rebase CWS impress172 to trunk@273468 (milestone: DEV300:m51) 2009-06-30 16:22:02 +0200 cl r273518 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 16:20:46 +0200 cl r273517 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 16:20:28 +0200 cl r273516 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 16:19:49 +0200 cl r273515 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 16:19:28 +0200 cl r273514 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 16:17:38 +0200 cl r273513 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 15:45:44 +0200 cl r273511 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 15:37:16 +0200 cl r273510 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 15:33:47 +0200 cl r273509 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 15:32:10 +0200 cl r273508 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 15:30:05 +0200 cl r273507 : #i102921# added insert table row/col dialog for impress tables 2009-06-29 12:32:42 +0200 sj r273465 : #158632# fixed textrange hyperlinks to specific pages, added slide names 2009-06-24 15:17:59 +0200 sj r273349 : #158636# fixed text range hyperlink to first/last slide 2009-06-22 13:18:30 +0200 sj r273224 : #158651# fixed header footer import 2009-06-19 15:18:24 +0200 sj r273160 : #158614# default text of presentation objects now cleared 2009-06-16 15:54:19 +0200 sj r273023 : #i101545# fixed crash - bracketing of graphic links has been done twice leading to a broken graphic state stack 2009-06-15 16:26:26 +0200 sj r272998 : #158635# importing bookmark interactions: firstslide, lastslide, nextslide, previousslide 2009-06-15 16:25:26 +0200 sj r272997 : #158635# added bookmark interactions: firstslide, lastslide, nextslide, previousslide 2009-06-12 13:17:32 +0200 sj r272915 : #i102713# fixed cloud shape 2009-06-10 18:36:58 +0200 sj r272833 : #158674# fixed curvedleftarrow, curvedrightarrow, curveddownarrow, curveduparrow 2009-06-08 19:52:28 +0200 sj r272746 : #158674# fixed curvedleftarrow, curvedrightarrow, curveddownarrow, curveduparrow 2009-06-04 15:28:32 +0200 cl r272640 : #i102358# applied patch to remove warnings 2009-06-04 14:39:45 +0200 cl r272630 : #i99423# applied path to change impress wizard create button to open when opening exisitng documents 2009-06-03 18:21:26 +0200 sj r272601 : #158635# now using the correct paragraph bottom spacing. using font independent linespacing for impress text objects 2009-06-03 15:47:27 +0200 cl r272583 : #i101817# added color collection based on scribus 2009-06-03 14:43:59 +0200 cl r272580 : #i102163# use weak ref to SdrObject instead of listening to the model 2009-06-03 12:39:29 +0200 cl r272556 : #i93308# correct namespace for com.sun.star.text.textfields 2009-06-03 12:27:00 +0200 cl r272555 : #i93308# correct namespace for com.sun.star.text.textfields 2009-06-03 11:33:44 +0200 cl r272553 : #i23221# allow all settings (that make sense) for presentation styles 2009-06-03 11:30:59 +0200 cl r272552 : #i23221# allow all settings (that make sense) for presentation styles 2009-06-03 11:30:22 +0200 cl r272551 : #i23221# allow all settings (that make sense) for presentation styles 2009-06-02 18:41:07 +0200 sj r272527 : #i28358# applied patch (better conversion of dotted lines) 2009-06-02 11:52:13 +0200 cl r272491 : #i98668# applied patch to fix possible endless loop if exception occours 2009-05-28 17:02:55 +0200 sj r272416 : #i102336# retaining graphic file names unchanged 2009-05-28 17:00:25 +0200 sj r272415 : #i102336# retaining graphic file names unchanged 2009-05-28 17:00:10 +0200 sj r272414 : #i102336# retaining graphic file names unchanged 2009-05-25 12:43:58 +0200 sj r272232 : #i102069# added patch from thb (fixed rotated group objects)
2009-08-05 17:01:07 +00:00
const sal_Int32 nNewRows = (nCount == 0) ? (aEnd.mnRow - aStart.mnRow + 1) : nCount;
const sal_Int32 nNewRowStart = aEnd.mnRow + (bInsertAfter ? 1 : 0);
xRows->insertByIndex( nNewRowStart, nNewRows );
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
for( sal_Int32 nOffset = 0; nOffset < nNewRows; nOffset++ )
{
Reference< XPropertySet >( xRows->getByIndex( aEnd.mnRow + nOffset + 1 ), UNO_QUERY_THROW )->
setPropertyValue( sSize,
Reference< XPropertySet >( xRows->getByIndex( aStart.mnRow + nOffset ), UNO_QUERY_THROW )->
getPropertyValue( sSize ) );
}
if( bUndo )
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
mpModel->EndUndo();
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
aStart.mnCol = 0;
CWS-TOOLING: integrate CWS impress172 2009-07-30 15:29:39 +0200 cl r274492 : #i102921# remove reference to inssrc.obj which was moved to svx 2009-07-29 11:40:35 +0200 wg r274445 : i103869 2009-07-22 14:39:13 +0200 sj r274241 : #i102713# fixed cloud shape 2009-07-07 15:28:04 +0200 sj r273800 : fixed build problem 2009-07-07 13:27:13 +0200 cl r273792 : #i102921# moved insert col/rows dialog to svx 2009-07-07 10:36:05 +0200 cl r273782 : fixed compiler warnings 2009-07-02 10:40:21 +0200 sj r273626 : fixed build problem 2009-07-02 10:27:56 +0200 cl r273624 : fixed merge problem 2009-07-02 10:27:19 +0200 cl r273623 : fixed compiler warning 2009-07-01 10:04:58 +0200 cl r273550 : CWS-TOOLING: rebase CWS impress172 to trunk@273468 (milestone: DEV300:m51) 2009-06-30 16:22:02 +0200 cl r273518 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 16:20:46 +0200 cl r273517 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 16:20:28 +0200 cl r273516 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 16:19:49 +0200 cl r273515 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 16:19:28 +0200 cl r273514 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 16:17:38 +0200 cl r273513 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 15:45:44 +0200 cl r273511 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 15:37:16 +0200 cl r273510 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 15:33:47 +0200 cl r273509 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 15:32:10 +0200 cl r273508 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 15:30:05 +0200 cl r273507 : #i102921# added insert table row/col dialog for impress tables 2009-06-29 12:32:42 +0200 sj r273465 : #158632# fixed textrange hyperlinks to specific pages, added slide names 2009-06-24 15:17:59 +0200 sj r273349 : #158636# fixed text range hyperlink to first/last slide 2009-06-22 13:18:30 +0200 sj r273224 : #158651# fixed header footer import 2009-06-19 15:18:24 +0200 sj r273160 : #158614# default text of presentation objects now cleared 2009-06-16 15:54:19 +0200 sj r273023 : #i101545# fixed crash - bracketing of graphic links has been done twice leading to a broken graphic state stack 2009-06-15 16:26:26 +0200 sj r272998 : #158635# importing bookmark interactions: firstslide, lastslide, nextslide, previousslide 2009-06-15 16:25:26 +0200 sj r272997 : #158635# added bookmark interactions: firstslide, lastslide, nextslide, previousslide 2009-06-12 13:17:32 +0200 sj r272915 : #i102713# fixed cloud shape 2009-06-10 18:36:58 +0200 sj r272833 : #158674# fixed curvedleftarrow, curvedrightarrow, curveddownarrow, curveduparrow 2009-06-08 19:52:28 +0200 sj r272746 : #158674# fixed curvedleftarrow, curvedrightarrow, curveddownarrow, curveduparrow 2009-06-04 15:28:32 +0200 cl r272640 : #i102358# applied patch to remove warnings 2009-06-04 14:39:45 +0200 cl r272630 : #i99423# applied path to change impress wizard create button to open when opening exisitng documents 2009-06-03 18:21:26 +0200 sj r272601 : #158635# now using the correct paragraph bottom spacing. using font independent linespacing for impress text objects 2009-06-03 15:47:27 +0200 cl r272583 : #i101817# added color collection based on scribus 2009-06-03 14:43:59 +0200 cl r272580 : #i102163# use weak ref to SdrObject instead of listening to the model 2009-06-03 12:39:29 +0200 cl r272556 : #i93308# correct namespace for com.sun.star.text.textfields 2009-06-03 12:27:00 +0200 cl r272555 : #i93308# correct namespace for com.sun.star.text.textfields 2009-06-03 11:33:44 +0200 cl r272553 : #i23221# allow all settings (that make sense) for presentation styles 2009-06-03 11:30:59 +0200 cl r272552 : #i23221# allow all settings (that make sense) for presentation styles 2009-06-03 11:30:22 +0200 cl r272551 : #i23221# allow all settings (that make sense) for presentation styles 2009-06-02 18:41:07 +0200 sj r272527 : #i28358# applied patch (better conversion of dotted lines) 2009-06-02 11:52:13 +0200 cl r272491 : #i98668# applied patch to fix possible endless loop if exception occours 2009-05-28 17:02:55 +0200 sj r272416 : #i102336# retaining graphic file names unchanged 2009-05-28 17:00:25 +0200 sj r272415 : #i102336# retaining graphic file names unchanged 2009-05-28 17:00:10 +0200 sj r272414 : #i102336# retaining graphic file names unchanged 2009-05-25 12:43:58 +0200 sj r272232 : #i102069# added patch from thb (fixed rotated group objects)
2009-08-05 17:01:07 +00:00
aStart.mnRow = nNewRowStart;
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
aEnd.mnCol = mxTable->getColumnCount() - 1;
aEnd.mnRow = aStart.mnRow + nNewRows - 1;
break;
}
}
StartSelection( aStart );
UpdateSelection( aEnd );
}
2012-01-06 00:03:58 +09:00
catch( Exception& )
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
{
2011-03-01 19:07:44 +01:00
OSL_FAIL("svx::SvxTableController::onInsert(), exception caught!");
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
}
}
// --------------------------------------------------------------------
void SvxTableController::onDelete( sal_uInt16 nSId )
{
::sdr::table::SdrTableObj* pTableObj = dynamic_cast< ::sdr::table::SdrTableObj* >( mxTableObj.get() );
if( !pTableObj )
return;
if( mxTable.is() && hasSelectedCells() )
{
CellPos aStart, aEnd;
getSelectedCells( aStart, aEnd );
if( pTableObj->IsTextEditActive() )
mpView->SdrEndTextEdit(sal_True);
RemoveSelection();
bool bDeleteTable = false;
switch( nSId )
{
case SID_TABLE_DELETE_COL:
{
const sal_Int32 nRemovedColumns = aEnd.mnCol - aStart.mnCol + 1;
if( nRemovedColumns == mxTable->getColumnCount() )
{
bDeleteTable = true;
}
else
{
Reference< XTableColumns > xCols( mxTable->getColumns() );
xCols->removeByIndex( aStart.mnCol, nRemovedColumns );
}
break;
}
case SID_TABLE_DELETE_ROW:
{
const sal_Int32 nRemovedRows = aEnd.mnRow - aStart.mnRow + 1;
if( nRemovedRows == mxTable->getRowCount() )
{
bDeleteTable = true;
}
else
{
Reference< XTableRows > xRows( mxTable->getRows() );
xRows->removeByIndex( aStart.mnRow, nRemovedRows );
}
break;
}
}
if( bDeleteTable )
mpView->DeleteMarkedObj();
else
UpdateTableShape();
}
}
// --------------------------------------------------------------------
void SvxTableController::onSelect( sal_uInt16 nSId )
{
if( mxTable.is() )
{
const sal_Int32 nRowCount = mxTable->getRowCount();
const sal_Int32 nColCount = mxTable->getColumnCount();
if( nRowCount && nColCount )
{
CellPos aStart, aEnd;
getSelectedCells( aStart, aEnd );
switch( nSId )
{
case SID_TABLE_SELECT_ALL:
aEnd.mnCol = 0; aEnd.mnRow = 0;
aStart.mnCol = nColCount - 1; aStart.mnRow = nRowCount - 1;
break;
case SID_TABLE_SELECT_COL:
aEnd.mnRow = nRowCount - 1;
aStart.mnRow = 0;
break;
case SID_TABLE_SELECT_ROW:
aEnd.mnCol = nColCount - 1;
aStart.mnCol = 0;
break;
}
StartSelection( aEnd );
gotoCell( aStart, true, 0 );
}
}
}
// --------------------------------------------------------------------
void SvxTableController::onFormatTable( SfxRequest& rReq )
{
::sdr::table::SdrTableObj* pTableObj = dynamic_cast< ::sdr::table::SdrTableObj* >( mxTableObj.get() );
if( !pTableObj )
return;
const SfxItemSet* pArgs = rReq.GetArgs();
if( !pArgs && pTableObj->GetModel() )
{
SfxItemSet aNewAttr( pTableObj->GetModel()->GetItemPool() );
MergeAttrFromSelectedCells(aNewAttr, sal_False);
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
// merge drawing layer text distance items into SvxBoxItem used by the dialog
SvxBoxItem aBoxItem( static_cast< const SvxBoxItem& >( aNewAttr.Get( SDRATTR_TABLE_BORDER ) ) );
aBoxItem.SetDistance( sal::static_int_cast< sal_uInt16 >( ((SdrTextLeftDistItem&)(aNewAttr.Get(SDRATTR_TEXT_LEFTDIST))).GetValue()), BOX_LINE_LEFT );
aBoxItem.SetDistance( sal::static_int_cast< sal_uInt16 >( ((SdrTextRightDistItem&)(aNewAttr.Get(SDRATTR_TEXT_RIGHTDIST))).GetValue()), BOX_LINE_RIGHT );
aBoxItem.SetDistance( sal::static_int_cast< sal_uInt16 >( ((SdrTextUpperDistItem&)(aNewAttr.Get(SDRATTR_TEXT_UPPERDIST))).GetValue()), BOX_LINE_TOP );
aBoxItem.SetDistance( sal::static_int_cast< sal_uInt16 >( ((SdrTextLowerDistItem&)(aNewAttr.Get(SDRATTR_TEXT_LOWERDIST))).GetValue()), BOX_LINE_BOTTOM );
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
aNewAttr.Put( aBoxItem );
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
std::auto_ptr< SfxAbstractTabDialog > pDlg( pFact ? pFact->CreateSvxFormatCellsDialog( NULL, &aNewAttr, pTableObj->GetModel(), pTableObj) : 0 );
// Even Cancel Button is returning positive(101) value,
if( pDlg.get() && ( pDlg->Execute() == RET_OK ) )
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
{
SfxItemSet aNewSet( *(pDlg->GetOutputItemSet ()) );
SvxBoxItem aNewBoxItem( static_cast< const SvxBoxItem& >( aNewSet.Get( SDRATTR_TABLE_BORDER ) ) );
if( aNewBoxItem.GetDistance( BOX_LINE_LEFT ) != aBoxItem.GetDistance( BOX_LINE_LEFT ) )
aNewSet.Put(SdrTextLeftDistItem( aNewBoxItem.GetDistance( BOX_LINE_LEFT ) ) );
if( aNewBoxItem.GetDistance( BOX_LINE_RIGHT ) != aBoxItem.GetDistance( BOX_LINE_RIGHT ) )
aNewSet.Put(SdrTextRightDistItem( aNewBoxItem.GetDistance( BOX_LINE_RIGHT ) ) );
if( aNewBoxItem.GetDistance( BOX_LINE_TOP ) != aBoxItem.GetDistance( BOX_LINE_TOP ) )
aNewSet.Put(SdrTextUpperDistItem( aNewBoxItem.GetDistance( BOX_LINE_TOP ) ) );
if( aNewBoxItem.GetDistance( BOX_LINE_BOTTOM ) != aBoxItem.GetDistance( BOX_LINE_BOTTOM ) )
aNewSet.Put(SdrTextLowerDistItem( aNewBoxItem.GetDistance( BOX_LINE_BOTTOM ) ) );
SetAttrToSelectedCells(aNewSet, sal_False);
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
}
}
}
// --------------------------------------------------------------------
void SvxTableController::Execute( SfxRequest& rReq )
{
const sal_uInt16 nSId = rReq.GetSlot();
switch( nSId )
{
case SID_TABLE_INSERT_ROW:
case SID_TABLE_INSERT_COL:
CWS-TOOLING: integrate CWS impress172 2009-07-30 15:29:39 +0200 cl r274492 : #i102921# remove reference to inssrc.obj which was moved to svx 2009-07-29 11:40:35 +0200 wg r274445 : i103869 2009-07-22 14:39:13 +0200 sj r274241 : #i102713# fixed cloud shape 2009-07-07 15:28:04 +0200 sj r273800 : fixed build problem 2009-07-07 13:27:13 +0200 cl r273792 : #i102921# moved insert col/rows dialog to svx 2009-07-07 10:36:05 +0200 cl r273782 : fixed compiler warnings 2009-07-02 10:40:21 +0200 sj r273626 : fixed build problem 2009-07-02 10:27:56 +0200 cl r273624 : fixed merge problem 2009-07-02 10:27:19 +0200 cl r273623 : fixed compiler warning 2009-07-01 10:04:58 +0200 cl r273550 : CWS-TOOLING: rebase CWS impress172 to trunk@273468 (milestone: DEV300:m51) 2009-06-30 16:22:02 +0200 cl r273518 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 16:20:46 +0200 cl r273517 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 16:20:28 +0200 cl r273516 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 16:19:49 +0200 cl r273515 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 16:19:28 +0200 cl r273514 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 16:17:38 +0200 cl r273513 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 15:45:44 +0200 cl r273511 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 15:37:16 +0200 cl r273510 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 15:33:47 +0200 cl r273509 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 15:32:10 +0200 cl r273508 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 15:30:05 +0200 cl r273507 : #i102921# added insert table row/col dialog for impress tables 2009-06-29 12:32:42 +0200 sj r273465 : #158632# fixed textrange hyperlinks to specific pages, added slide names 2009-06-24 15:17:59 +0200 sj r273349 : #158636# fixed text range hyperlink to first/last slide 2009-06-22 13:18:30 +0200 sj r273224 : #158651# fixed header footer import 2009-06-19 15:18:24 +0200 sj r273160 : #158614# default text of presentation objects now cleared 2009-06-16 15:54:19 +0200 sj r273023 : #i101545# fixed crash - bracketing of graphic links has been done twice leading to a broken graphic state stack 2009-06-15 16:26:26 +0200 sj r272998 : #158635# importing bookmark interactions: firstslide, lastslide, nextslide, previousslide 2009-06-15 16:25:26 +0200 sj r272997 : #158635# added bookmark interactions: firstslide, lastslide, nextslide, previousslide 2009-06-12 13:17:32 +0200 sj r272915 : #i102713# fixed cloud shape 2009-06-10 18:36:58 +0200 sj r272833 : #158674# fixed curvedleftarrow, curvedrightarrow, curveddownarrow, curveduparrow 2009-06-08 19:52:28 +0200 sj r272746 : #158674# fixed curvedleftarrow, curvedrightarrow, curveddownarrow, curveduparrow 2009-06-04 15:28:32 +0200 cl r272640 : #i102358# applied patch to remove warnings 2009-06-04 14:39:45 +0200 cl r272630 : #i99423# applied path to change impress wizard create button to open when opening exisitng documents 2009-06-03 18:21:26 +0200 sj r272601 : #158635# now using the correct paragraph bottom spacing. using font independent linespacing for impress text objects 2009-06-03 15:47:27 +0200 cl r272583 : #i101817# added color collection based on scribus 2009-06-03 14:43:59 +0200 cl r272580 : #i102163# use weak ref to SdrObject instead of listening to the model 2009-06-03 12:39:29 +0200 cl r272556 : #i93308# correct namespace for com.sun.star.text.textfields 2009-06-03 12:27:00 +0200 cl r272555 : #i93308# correct namespace for com.sun.star.text.textfields 2009-06-03 11:33:44 +0200 cl r272553 : #i23221# allow all settings (that make sense) for presentation styles 2009-06-03 11:30:59 +0200 cl r272552 : #i23221# allow all settings (that make sense) for presentation styles 2009-06-03 11:30:22 +0200 cl r272551 : #i23221# allow all settings (that make sense) for presentation styles 2009-06-02 18:41:07 +0200 sj r272527 : #i28358# applied patch (better conversion of dotted lines) 2009-06-02 11:52:13 +0200 cl r272491 : #i98668# applied patch to fix possible endless loop if exception occours 2009-05-28 17:02:55 +0200 sj r272416 : #i102336# retaining graphic file names unchanged 2009-05-28 17:00:25 +0200 sj r272415 : #i102336# retaining graphic file names unchanged 2009-05-28 17:00:10 +0200 sj r272414 : #i102336# retaining graphic file names unchanged 2009-05-25 12:43:58 +0200 sj r272232 : #i102069# added patch from thb (fixed rotated group objects)
2009-08-05 17:01:07 +00:00
onInsert( nSId, rReq.GetArgs() );
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
break;
case SID_TABLE_DELETE_ROW:
case SID_TABLE_DELETE_COL:
onDelete( nSId );
break;
case SID_TABLE_SELECT_ALL:
case SID_TABLE_SELECT_COL:
case SID_TABLE_SELECT_ROW:
onSelect( nSId );
break;
case SID_FORMAT_TABLE_DLG:
onFormatTable( rReq );
break;
case SID_FRAME_LINESTYLE:
case SID_FRAME_LINECOLOR:
case SID_ATTR_BORDER:
{
const SfxItemSet* pArgs = rReq.GetArgs();
if( pArgs )
ApplyBorderAttr( *pArgs );
}
break;
case SID_ATTR_FILL_STYLE:
{
const SfxItemSet* pArgs = rReq.GetArgs();
if( pArgs )
SetAttributes( *pArgs, false );
}
break;
case SID_TABLE_MERGE_CELLS:
MergeMarkedCells();
break;
case SID_TABLE_SPLIT_CELLS:
SplitMarkedCells();
break;
case SID_TABLE_DISTRIBUTE_COLUMNS:
DistributeColumns();
break;
case SID_TABLE_DISTRIBUTE_ROWS:
DistributeRows();
break;
case SID_TABLE_VERT_BOTTOM:
case SID_TABLE_VERT_CENTER:
case SID_TABLE_VERT_NONE:
SetVertical( nSId );
break;
case SID_AUTOFORMAT:
case SID_TABLE_SORT_DIALOG:
case SID_TABLE_AUTOSUM:
default:
break;
case SID_TABLE_STYLE:
SetTableStyle( rReq.GetArgs() );
break;
case SID_TABLE_STYLE_SETTINGS:
SetTableStyleSettings( rReq.GetArgs() );
break;
}
}
void SvxTableController::SetTableStyle( const SfxItemSet* pArgs )
{
SdrTableObj* pTableObj = dynamic_cast< ::sdr::table::SdrTableObj* >( mxTableObj.get() );
SdrModel* pModel = pTableObj ? pTableObj->GetModel() : 0;
if( !pTableObj || !pModel || !pArgs || (SFX_ITEM_SET != pArgs->GetItemState(SID_TABLE_STYLE, sal_False)) )
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
return;
const SfxStringItem* pArg = dynamic_cast< const SfxStringItem* >( &pArgs->Get( SID_TABLE_STYLE ) );
if( pArg && mxTable.is() ) try
{
Reference< XStyleFamiliesSupplier > xSFS( pModel->getUnoModel(), UNO_QUERY_THROW );
Reference< XNameAccess > xFamilyNameAccess( xSFS->getStyleFamilies(), UNO_QUERY_THROW );
const OUString sFamilyName( "table" );
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
Reference< XNameAccess > xTableFamilyAccess( xFamilyNameAccess->getByName( sFamilyName ), UNO_QUERY_THROW );
if( xTableFamilyAccess->hasByName( pArg->GetValue() ) )
{
// found table style with the same name
Reference< XIndexAccess > xNewTableStyle( xTableFamilyAccess->getByName( pArg->GetValue() ), UNO_QUERY_THROW );
const bool bUndo = pModel->IsUndoEnabled();
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
if( bUndo )
{
pModel->BegUndo( ImpGetResStr(STR_TABLE_STYLE) );
pModel->AddUndo( new TableStyleUndo( *pTableObj ) );
}
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
CWS-TOOLING: integrate CWS impress174 2009-08-27 18:21:38 +0200 af r275502 : #i73289# Fixed detection of the cases when the layout menu is be disabled. 2009-08-24 17:45:50 +0200 sj r275326 : #i103360# only setting filltype if there is also a correct fill element 2009-08-24 16:11:06 +0200 cl r275322 : #i73871# only remove replaced objects from mark list if replaced by SdrEditView::ReplaceObjectAtView(). see issue for reason 2009-08-24 15:03:33 +0200 cl r275319 : fixed merge error 2009-08-20 12:45:29 +0200 sj r275174 : CWS-TOOLING: rebase CWS impress174 to trunk@275001 (milestone: DEV300:m55) 2009-08-19 15:54:47 +0200 sj r275153 : #158486# text of flipped shapes is not flipped in word 2009-08-17 17:30:16 +0200 sj r275063 : #158486# also correcting text bound for additional text rotation 2009-08-05 11:09:32 +0200 sj r274643 : #i102797# adapted customshape coloring (fixed fontwork) 2009-08-04 14:17:36 +0200 sj r274620 : #i99501# pdf export: fixed export of rotated graphics 2009-07-30 16:15:44 +0200 sj r274494 : #158653# binary ppt import: fixed table border lines 2009-07-27 18:28:02 +0200 sj r274376 : added shape text clipping for customshapes 2009-07-20 18:09:14 +0200 sj r274154 : #i101918# fixed gallery preview (now taking the correct mapmode) 2009-07-13 18:00:58 +0200 cl r273948 : #i103238# clear hard set attributes only if new style set is manually applied 2009-07-13 17:58:07 +0200 cl r273947 : #i73289# do not expand a toolpanel when it gets enabled 2009-07-08 12:39:49 +0200 sj r273827 : #i101566# applied patch from cmc to solve font width inconsistencies 2009-07-08 12:11:13 +0200 sj r273826 : #i87727# added PDFDialog service 2009-07-06 17:22:40 +0200 sj r273755 : #i103360# fixed a merge problem, no more looping when loading transparence gradients on background page 2009-07-03 14:42:07 +0200 sj r273701 : #102797# added patch from thb (Adapted customshape coloring) 2009-07-03 14:09:44 +0200 sj r273696 : #102797# removed warning 2009-07-03 14:01:47 +0200 sj r273695 : #102797# added patch from thb (Adapted customshape coloring) 2009-07-03 13:13:39 +0200 sj r273688 : #102797# added patch from thb (Adapted customshape coloring) 2009-07-03 11:25:30 +0200 sj r273684 : #i103278# fixed import of lines 2009-07-01 16:23:47 +0200 cl r273599 : #i96820# correctly call setChanged on model if table is modified 2009-07-01 14:43:09 +0200 cl r273588 : #i8770# Patch: fix missing type provider for pdf export dialog 2009-07-01 14:40:28 +0200 cl r273586 : #i73871# activate picture bar after converting shape to bitmap 2009-07-01 14:39:05 +0200 cl r273584 : #i73871# activate picture bar after converting shape to bitmap 2009-07-01 14:04:53 +0200 cl r273578 : #i73289# PATCH: Disable layout pane on the masterslide
2009-09-09 09:19:53 +00:00
pTableObj->setTableStyle( xNewTableStyle );
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
const sal_Int32 nRowCount = mxTable->getRowCount();
const sal_Int32 nColCount = mxTable->getColumnCount();
for( sal_Int32 nRow = 0; nRow < nRowCount; nRow++ )
{
for( sal_Int32 nCol = 0; nCol < nColCount; nCol++ ) try
{
CellRef xCell( dynamic_cast< Cell* >( mxTable->getCellByPosition( nCol, nRow ).get() ) );
if( xCell.is() )
{
CWS-TOOLING: integrate CWS impress174 2009-08-27 18:21:38 +0200 af r275502 : #i73289# Fixed detection of the cases when the layout menu is be disabled. 2009-08-24 17:45:50 +0200 sj r275326 : #i103360# only setting filltype if there is also a correct fill element 2009-08-24 16:11:06 +0200 cl r275322 : #i73871# only remove replaced objects from mark list if replaced by SdrEditView::ReplaceObjectAtView(). see issue for reason 2009-08-24 15:03:33 +0200 cl r275319 : fixed merge error 2009-08-20 12:45:29 +0200 sj r275174 : CWS-TOOLING: rebase CWS impress174 to trunk@275001 (milestone: DEV300:m55) 2009-08-19 15:54:47 +0200 sj r275153 : #158486# text of flipped shapes is not flipped in word 2009-08-17 17:30:16 +0200 sj r275063 : #158486# also correcting text bound for additional text rotation 2009-08-05 11:09:32 +0200 sj r274643 : #i102797# adapted customshape coloring (fixed fontwork) 2009-08-04 14:17:36 +0200 sj r274620 : #i99501# pdf export: fixed export of rotated graphics 2009-07-30 16:15:44 +0200 sj r274494 : #158653# binary ppt import: fixed table border lines 2009-07-27 18:28:02 +0200 sj r274376 : added shape text clipping for customshapes 2009-07-20 18:09:14 +0200 sj r274154 : #i101918# fixed gallery preview (now taking the correct mapmode) 2009-07-13 18:00:58 +0200 cl r273948 : #i103238# clear hard set attributes only if new style set is manually applied 2009-07-13 17:58:07 +0200 cl r273947 : #i73289# do not expand a toolpanel when it gets enabled 2009-07-08 12:39:49 +0200 sj r273827 : #i101566# applied patch from cmc to solve font width inconsistencies 2009-07-08 12:11:13 +0200 sj r273826 : #i87727# added PDFDialog service 2009-07-06 17:22:40 +0200 sj r273755 : #i103360# fixed a merge problem, no more looping when loading transparence gradients on background page 2009-07-03 14:42:07 +0200 sj r273701 : #102797# added patch from thb (Adapted customshape coloring) 2009-07-03 14:09:44 +0200 sj r273696 : #102797# removed warning 2009-07-03 14:01:47 +0200 sj r273695 : #102797# added patch from thb (Adapted customshape coloring) 2009-07-03 13:13:39 +0200 sj r273688 : #102797# added patch from thb (Adapted customshape coloring) 2009-07-03 11:25:30 +0200 sj r273684 : #i103278# fixed import of lines 2009-07-01 16:23:47 +0200 cl r273599 : #i96820# correctly call setChanged on model if table is modified 2009-07-01 14:43:09 +0200 cl r273588 : #i8770# Patch: fix missing type provider for pdf export dialog 2009-07-01 14:40:28 +0200 cl r273586 : #i73871# activate picture bar after converting shape to bitmap 2009-07-01 14:39:05 +0200 cl r273584 : #i73871# activate picture bar after converting shape to bitmap 2009-07-01 14:04:53 +0200 cl r273578 : #i73289# PATCH: Disable layout pane on the masterslide
2009-09-09 09:19:53 +00:00
SfxItemSet aSet( xCell->GetItemSet() );
bool bChanges = false;
const SfxItemSet& rStyleAttribs = xCell->GetStyleSheet()->GetItemSet();
for ( sal_uInt16 nWhich = SDRATTR_START; nWhich <= SDRATTR_TABLE_LAST; nWhich++ )
CWS-TOOLING: integrate CWS impress174 2009-08-27 18:21:38 +0200 af r275502 : #i73289# Fixed detection of the cases when the layout menu is be disabled. 2009-08-24 17:45:50 +0200 sj r275326 : #i103360# only setting filltype if there is also a correct fill element 2009-08-24 16:11:06 +0200 cl r275322 : #i73871# only remove replaced objects from mark list if replaced by SdrEditView::ReplaceObjectAtView(). see issue for reason 2009-08-24 15:03:33 +0200 cl r275319 : fixed merge error 2009-08-20 12:45:29 +0200 sj r275174 : CWS-TOOLING: rebase CWS impress174 to trunk@275001 (milestone: DEV300:m55) 2009-08-19 15:54:47 +0200 sj r275153 : #158486# text of flipped shapes is not flipped in word 2009-08-17 17:30:16 +0200 sj r275063 : #158486# also correcting text bound for additional text rotation 2009-08-05 11:09:32 +0200 sj r274643 : #i102797# adapted customshape coloring (fixed fontwork) 2009-08-04 14:17:36 +0200 sj r274620 : #i99501# pdf export: fixed export of rotated graphics 2009-07-30 16:15:44 +0200 sj r274494 : #158653# binary ppt import: fixed table border lines 2009-07-27 18:28:02 +0200 sj r274376 : added shape text clipping for customshapes 2009-07-20 18:09:14 +0200 sj r274154 : #i101918# fixed gallery preview (now taking the correct mapmode) 2009-07-13 18:00:58 +0200 cl r273948 : #i103238# clear hard set attributes only if new style set is manually applied 2009-07-13 17:58:07 +0200 cl r273947 : #i73289# do not expand a toolpanel when it gets enabled 2009-07-08 12:39:49 +0200 sj r273827 : #i101566# applied patch from cmc to solve font width inconsistencies 2009-07-08 12:11:13 +0200 sj r273826 : #i87727# added PDFDialog service 2009-07-06 17:22:40 +0200 sj r273755 : #i103360# fixed a merge problem, no more looping when loading transparence gradients on background page 2009-07-03 14:42:07 +0200 sj r273701 : #102797# added patch from thb (Adapted customshape coloring) 2009-07-03 14:09:44 +0200 sj r273696 : #102797# removed warning 2009-07-03 14:01:47 +0200 sj r273695 : #102797# added patch from thb (Adapted customshape coloring) 2009-07-03 13:13:39 +0200 sj r273688 : #102797# added patch from thb (Adapted customshape coloring) 2009-07-03 11:25:30 +0200 sj r273684 : #i103278# fixed import of lines 2009-07-01 16:23:47 +0200 cl r273599 : #i96820# correctly call setChanged on model if table is modified 2009-07-01 14:43:09 +0200 cl r273588 : #i8770# Patch: fix missing type provider for pdf export dialog 2009-07-01 14:40:28 +0200 cl r273586 : #i73871# activate picture bar after converting shape to bitmap 2009-07-01 14:39:05 +0200 cl r273584 : #i73871# activate picture bar after converting shape to bitmap 2009-07-01 14:04:53 +0200 cl r273578 : #i73289# PATCH: Disable layout pane on the masterslide
2009-09-09 09:19:53 +00:00
{
if( (rStyleAttribs.GetItemState( nWhich ) == SFX_ITEM_ON) && (aSet.GetItemState( nWhich ) == SFX_ITEM_ON) )
{
aSet.ClearItem( nWhich );
bChanges = true;
}
}
if( bChanges )
{
if( bUndo )
xCell->AddUndo();
xCell->SetMergedItemSetAndBroadcast( aSet, sal_True );
}
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
}
}
2012-01-06 00:03:58 +09:00
catch( Exception& )
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
{
2011-03-01 19:07:44 +01:00
OSL_FAIL( "svx::SvxTableController::SetTableStyle(), exception caught!" );
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
}
}
if( bUndo )
pModel->EndUndo();
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
}
}
2012-01-06 00:03:58 +09:00
catch( Exception& )
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
{
2011-03-01 19:07:44 +01:00
OSL_FAIL( "svx::SvxTableController::SetTableStyle(), exception caught!" );
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
}
}
void SvxTableController::SetTableStyleSettings( const SfxItemSet* pArgs )
{
SdrTableObj* pTableObj = dynamic_cast< ::sdr::table::SdrTableObj* >( mxTableObj.get() );
SdrModel* pModel = pTableObj ? pTableObj->GetModel() : 0;
if( !pTableObj || !pModel )
return;
TableStyleSettings aSettings( pTableObj->getTableStyleSettings() );
const SfxPoolItem *pPoolItem=NULL;
if( (SFX_ITEM_SET == pArgs->GetItemState(ID_VAL_USEFIRSTROWSTYLE, sal_False,&pPoolItem)) )
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
aSettings.mbUseFirstRow = static_cast< const SfxBoolItem* >(pPoolItem)->GetValue();
if( (SFX_ITEM_SET == pArgs->GetItemState(ID_VAL_USELASTROWSTYLE, sal_False,&pPoolItem)) )
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
aSettings.mbUseLastRow = static_cast< const SfxBoolItem* >(pPoolItem)->GetValue();
if( (SFX_ITEM_SET == pArgs->GetItemState(ID_VAL_USEBANDINGROWSTYLE, sal_False,&pPoolItem)) )
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
aSettings.mbUseRowBanding = static_cast< const SfxBoolItem* >(pPoolItem)->GetValue();
if( (SFX_ITEM_SET == pArgs->GetItemState(ID_VAL_USEFIRSTCOLUMNSTYLE, sal_False,&pPoolItem)) )
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
aSettings.mbUseFirstColumn = static_cast< const SfxBoolItem* >(pPoolItem)->GetValue();
if( (SFX_ITEM_SET == pArgs->GetItemState(ID_VAL_USELASTCOLUMNSTYLE, sal_False,&pPoolItem)) )
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
aSettings.mbUseLastColumn = static_cast< const SfxBoolItem* >(pPoolItem)->GetValue();
if( (SFX_ITEM_SET == pArgs->GetItemState(ID_VAL_USEBANDINGCOLUMNSTYLE, sal_False,&pPoolItem)) )
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
aSettings.mbUseColumnBanding = static_cast< const SfxBoolItem* >(pPoolItem)->GetValue();
if( aSettings == pTableObj->getTableStyleSettings() )
return;
const bool bUndo = pModel->IsUndoEnabled();
if( bUndo )
{
pModel->BegUndo( ImpGetResStr(STR_TABLE_STYLE_SETTINGS) );
pModel->AddUndo( new TableStyleUndo( *pTableObj ) );
}
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
pTableObj->setTableStyleSettings( aSettings );
if( bUndo )
pModel->EndUndo();
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
}
void SvxTableController::SetVertical( sal_uInt16 nSId )
{
SdrTableObj* pTableObj = dynamic_cast< ::sdr::table::SdrTableObj* >( mxTableObj.get() );
if( mxTable.is() && pTableObj )
{
TableModelNotifyGuard aGuard( mxTable.get() );
CellPos aStart, aEnd;
getSelectedCells( aStart, aEnd );
SdrTextVertAdjust eAdj = SDRTEXTVERTADJUST_TOP;
switch( nSId )
{
case SID_TABLE_VERT_BOTTOM:
eAdj = SDRTEXTVERTADJUST_BOTTOM;
break;
case SID_TABLE_VERT_CENTER:
eAdj = SDRTEXTVERTADJUST_CENTER;
break;
//case SID_TABLE_VERT_NONE:
default:
break;
}
SdrTextVertAdjustItem aItem( eAdj );
for( sal_Int32 nRow = aStart.mnRow; nRow <= aEnd.mnRow; nRow++ )
{
for( sal_Int32 nCol = aStart.mnCol; nCol <= aEnd.mnCol; nCol++ )
{
CellRef xCell( dynamic_cast< Cell* >( mxTable->getCellByPosition( nCol, nRow ).get() ) );
if( xCell.is() )
xCell->SetMergedItem(aItem);
}
}
UpdateTableShape();
}
}
void SvxTableController::MergeMarkedCells()
{
CellPos aStart, aEnd;
getSelectedCells( aStart, aEnd );
SdrTableObj* pTableObj = dynamic_cast< ::sdr::table::SdrTableObj* >( mxTableObj.get() );
if( pTableObj )
{
2009-06-17 12:31:00 +00:00
if( pTableObj->IsTextEditActive() )
mpView->SdrEndTextEdit(sal_True);
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
TableModelNotifyGuard aGuard( mxTable.get() );
MergeRange( aStart.mnCol, aStart.mnRow, aEnd.mnCol, aEnd.mnRow );
}
}
void SvxTableController::SplitMarkedCells()
{
if( mxTable.is() )
{
CellPos aStart, aEnd;
getSelectedCells( aStart, aEnd );
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
std::auto_ptr< SvxAbstractSplittTableDialog > xDlg( pFact ? pFact->CreateSvxSplittTableDialog( NULL, false, 99, 99 ) : 0 );
if( xDlg.get() && xDlg->Execute() )
{
const sal_Int32 nCount = xDlg->GetCount() - 1;
if( nCount < 1 )
return;
getSelectedCells( aStart, aEnd );
Reference< XMergeableCellRange > xRange( mxTable->createCursorByRange( mxTable->getCellRangeByPosition( aStart.mnCol, aStart.mnRow, aEnd.mnCol, aEnd.mnRow ) ), UNO_QUERY_THROW );
const sal_Int32 nRowCount = mxTable->getRowCount();
const sal_Int32 nColCount = mxTable->getColumnCount();
SdrTableObj* pTableObj = dynamic_cast< SdrTableObj* >( mxTableObj.get() );
if( pTableObj )
{
2009-06-17 12:31:00 +00:00
if( pTableObj->IsTextEditActive() )
mpView->SdrEndTextEdit(sal_True);
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
TableModelNotifyGuard aGuard( mxTable.get() );
const bool bUndo = mpModel && mpModel->IsUndoEnabled();
if( bUndo )
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
{
mpModel->BegUndo( ImpGetResStr(STR_TABLE_SPLIT) );
mpModel->AddUndo( mpModel->GetSdrUndoFactory().CreateUndoGeoObject(*pTableObj) );
}
if( xDlg->IsHorizontal() )
{
xRange->split( 0, nCount );
}
else
{
xRange->split( nCount, 0 );
}
if( bUndo )
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
mpModel->EndUndo();
}
aEnd.mnRow += mxTable->getRowCount() - nRowCount;
aEnd.mnCol += mxTable->getColumnCount() - nColCount;
setSelectedCells( aStart, aEnd );
}
}
}
void SvxTableController::DistributeColumns()
{
SdrTableObj* pTableObj = dynamic_cast< SdrTableObj* >( mxTableObj.get() );
if( pTableObj )
{
const bool bUndo = mpModel && mpModel->IsUndoEnabled();
if( bUndo )
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
{
mpModel->BegUndo( ImpGetResStr(STR_TABLE_DISTRIBUTE_COLUMNS) );
mpModel->AddUndo( mpModel->GetSdrUndoFactory().CreateUndoGeoObject(*pTableObj) );
}
CellPos aStart, aEnd;
getSelectedCells( aStart, aEnd );
pTableObj->DistributeColumns( aStart.mnCol, aEnd.mnCol );
if( bUndo )
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
mpModel->EndUndo();
}
}
void SvxTableController::DistributeRows()
{
SdrTableObj* pTableObj = dynamic_cast< SdrTableObj* >( mxTableObj.get() );
if( pTableObj )
{
const bool bUndo = mpModel && mpModel->IsUndoEnabled();
if( bUndo )
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
{
mpModel->BegUndo( ImpGetResStr(STR_TABLE_DISTRIBUTE_ROWS) );
mpModel->AddUndo( mpModel->GetSdrUndoFactory().CreateUndoGeoObject(*pTableObj) );
}
CellPos aStart, aEnd;
getSelectedCells( aStart, aEnd );
pTableObj->DistributeRows( aStart.mnRow, aEnd.mnRow );
if( bUndo )
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
mpModel->EndUndo();
}
}
bool SvxTableController::DeleteMarked()
{
if( mbCellSelectionMode )
{
if( mxTable.is() )
{
CellPos aStart, aEnd;
getSelectedCells( aStart, aEnd );
for( sal_Int32 nRow = aStart.mnRow; nRow <= aEnd.mnRow; nRow++ )
{
for( sal_Int32 nCol = aStart.mnCol; nCol <= aEnd.mnCol; nCol++ )
{
CellRef xCell( dynamic_cast< Cell* >( mxTable->getCellByPosition( nCol, nRow ).get() ) );
if( xCell.is() )
xCell->SetOutlinerParaObject( 0 );
}
}
UpdateTableShape();
return true;
}
}
return false;
}
bool SvxTableController::GetStyleSheet( SfxStyleSheet*& rpStyleSheet ) const
{
if( hasSelectedCells() )
{
rpStyleSheet = 0;
if( mxTable.is() )
{
SfxStyleSheet* pRet=0;
bool b1st=true;
CellPos aStart, aEnd;
const_cast<SvxTableController&>(*this).getSelectedCells( aStart, aEnd );
for( sal_Int32 nRow = aStart.mnRow; nRow <= aEnd.mnRow; nRow++ )
{
for( sal_Int32 nCol = aStart.mnCol; nCol <= aEnd.mnCol; nCol++ )
{
CellRef xCell( dynamic_cast< Cell* >( mxTable->getCellByPosition( nCol, nRow ).get() ) );
if( xCell.is() )
{
SfxStyleSheet* pSS=xCell->GetStyleSheet();
if(b1st)
{
pRet=pSS;
}
else if(pRet != pSS)
{
return true;
}
b1st=false;
}
}
}
rpStyleSheet = pRet;
return true;
}
}
return false;
}
bool SvxTableController::SetStyleSheet( SfxStyleSheet* pStyleSheet, bool bDontRemoveHardAttr )
{
if( hasSelectedCells() && (!pStyleSheet || pStyleSheet->GetFamily() == SFX_STYLE_FAMILY_FRAME) )
{
if( mxTable.is() )
{
CellPos aStart, aEnd;
getSelectedCells( aStart, aEnd );
for( sal_Int32 nRow = aStart.mnRow; nRow <= aEnd.mnRow; nRow++ )
{
for( sal_Int32 nCol = aStart.mnCol; nCol <= aEnd.mnCol; nCol++ )
{
CellRef xCell( dynamic_cast< Cell* >( mxTable->getCellByPosition( nCol, nRow ).get() ) );
if( xCell.is() )
xCell->SetStyleSheet(pStyleSheet,bDontRemoveHardAttr);
}
}
UpdateTableShape();
return true;
}
}
return false;
}
// --------------------------------------------------------------------
// internals
// --------------------------------------------------------------------
bool SvxTableController::checkTableObject()
{
return mxTableObj.is();
}
// --------------------------------------------------------------------
sal_uInt16 SvxTableController::getKeyboardAction( const KeyEvent& rKEvt, Window* /*pWindow*/ )
{
const bool bMod1 = rKEvt.GetKeyCode().IsMod1(); // ctrl
const bool bMod2 = rKEvt.GetKeyCode().IsMod2() != 0; // Alt
const bool bTextEdit = mpView->IsTextEdit();
sal_uInt16 nAction = ACTION_HANDLED_BY_VIEW;
::sdr::table::SdrTableObj* pTableObj = dynamic_cast< ::sdr::table::SdrTableObj* >( mxTableObj.get() );
if( !pTableObj )
return nAction;
// handle special keys
const sal_Int16 nCode = rKEvt.GetKeyCode().GetCode();
switch( nCode )
{
case awt::Key::ESCAPE: // handle escape
{
if( bTextEdit )
{
// escape during text edit ends text edit
nAction = ACTION_STOP_TEXT_EDIT;
}
if( mbCellSelectionMode )
{
// escape with selected cells removes selection
nAction = ACTION_REMOVE_SELECTION;
}
break;
}
case awt::Key::RETURN: // handle return
{
if( !bMod1 && !bMod2 && !bTextEdit )
{
// when not already editing, return starts text edit
setSelectionStart( pTableObj->getFirstCell() );
nAction = ACTION_EDIT_CELL;
}
break;
}
case awt::Key::F2: // f2 toggles text edit
{
if( bMod1 || bMod2 ) // f2 with modifiers is handled by the view
{
}
else if( bTextEdit )
{
// f2 during text edit stops text edit
nAction = ACTION_STOP_TEXT_EDIT;
}
else if( mbCellSelectionMode )
{
// f2 with selected cells removes selection
nAction = ACTION_REMOVE_SELECTION;
}
else
{
// f2 with no selection and no text edit starts text edit
setSelectionStart( pTableObj->getFirstCell() );
nAction = ACTION_EDIT_CELL;
}
break;
}
case awt::Key::HOME:
case awt::Key::NUM7:
{
if( (bMod1 || bMod2) && (bTextEdit || mbCellSelectionMode) )
{
if( bMod1 && !bMod2 )
{
// ctrl + home jumps to first cell
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
nAction = ACTION_GOTO_FIRST_CELL;
}
else if( !bMod1 && bMod2 )
{
// alt + home jumps to first column
nAction = ACTION_GOTO_FIRST_COLUMN;
}
}
break;
}
case awt::Key::END:
case awt::Key::NUM1:
{
if( (bMod1 || bMod2) && (bTextEdit || mbCellSelectionMode) )
{
if( bMod1 && !bMod2 )
{
// ctrl + end jumps to last cell
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
nAction = ACTION_GOTO_LAST_CELL;
}
else if( !bMod1 && bMod2 )
{
// alt + home jumps to last column
nAction = ACTION_GOTO_LAST_COLUMN;
}
}
break;
}
case awt::Key::TAB:
{
if( bTextEdit || mbCellSelectionMode )
nAction = ACTION_TAB;
break;
}
case awt::Key::UP:
case awt::Key::NUM8:
case awt::Key::DOWN:
case awt::Key::NUM2:
case awt::Key::LEFT:
case awt::Key::NUM4:
case awt::Key::RIGHT:
case awt::Key::NUM6:
{
bool bTextMove = false;
if( !bMod1 && bMod2 )
{
if( (nCode == awt::Key::UP) || (nCode == awt::Key::NUM8) )
{
nAction = ACTION_GOTO_LEFT_CELL;
}
else if( (nCode == awt::Key::DOWN) || (nCode == awt::Key::NUM2) )
{
nAction = ACTION_GOTO_RIGHT_CELL;
}
break;
}
if( !bTextMove )
{
OutlinerView* pOLV = mpView->GetTextEditOutlinerView();
if( pOLV )
{
RemoveSelection();
// during text edit, check if we navigate out of the cell
ESelection aOldSelection = pOLV->GetSelection();
pOLV->PostKeyEvent(rKEvt);
bTextMove = pOLV && ( aOldSelection.IsEqual(pOLV->GetSelection()) );
if( !bTextMove )
{
nAction = ACTION_NONE;
}
}
}
if( mbCellSelectionMode || bTextMove )
{
// no text edit, navigate in cells if selection active
switch( nCode )
{
case awt::Key::LEFT:
case awt::Key::NUM4:
nAction = ACTION_GOTO_LEFT_CELL;
break;
case awt::Key::RIGHT:
case awt::Key::NUM6:
nAction = ACTION_GOTO_RIGHT_CELL;
break;
case awt::Key::DOWN:
case awt::Key::NUM2:
nAction = ACTION_GOTO_DOWN_CELL;
break;
case awt::Key::UP:
case awt::Key::NUM8:
nAction = ACTION_GOTO_UP_CELL;
break;
}
}
break;
}
case awt::Key::PAGEUP:
if( bMod2 )
nAction = ACTION_GOTO_FIRST_ROW;
break;
case awt::Key::PAGEDOWN:
if( bMod2 )
nAction = ACTION_GOTO_LAST_ROW;
break;
}
return nAction;
}
bool SvxTableController::executeAction( sal_uInt16 nAction, bool bSelect, Window* pWindow )
{
::sdr::table::SdrTableObj* pTableObj = dynamic_cast< ::sdr::table::SdrTableObj* >( mxTableObj.get() );
if( !pTableObj )
return false;
switch( nAction )
{
case ACTION_GOTO_FIRST_CELL:
{
gotoCell( pTableObj->getFirstCell(), bSelect, pWindow, nAction );
break;
}
case ACTION_GOTO_LEFT_CELL:
{
gotoCell( pTableObj->getLeftCell( getSelectionEnd(), !bSelect ), bSelect, pWindow, nAction );
break;
}
case ACTION_GOTO_RIGHT_CELL:
{
gotoCell( pTableObj->getRightCell( getSelectionEnd(), !bSelect ), bSelect, pWindow, nAction);
break;
}
case ACTION_GOTO_LAST_CELL:
{
gotoCell( pTableObj->getLastCell(), bSelect, pWindow, nAction );
break;
}
case ACTION_GOTO_FIRST_COLUMN:
{
CellPos aPos( pTableObj->getFirstCell().mnCol, getSelectionEnd().mnRow );
gotoCell( aPos, bSelect, pWindow, nAction );
break;
}
case ACTION_GOTO_LAST_COLUMN:
{
CellPos aPos( pTableObj->getLastCell().mnCol, getSelectionEnd().mnRow );
gotoCell( aPos, bSelect, pWindow, nAction );
break;
}
case ACTION_GOTO_FIRST_ROW:
{
CellPos aPos( getSelectionEnd().mnCol, pTableObj->getFirstCell().mnRow );
gotoCell( aPos, bSelect, pWindow, nAction );
break;
}
case ACTION_GOTO_UP_CELL:
{
gotoCell( pTableObj->getUpCell(getSelectionEnd(), !bSelect), bSelect, pWindow, nAction );
break;
}
case ACTION_GOTO_DOWN_CELL:
{
gotoCell( pTableObj->getDownCell(getSelectionEnd(), !bSelect), bSelect, pWindow, nAction );
break;
}
case ACTION_GOTO_LAST_ROW:
{
CellPos aPos( getSelectionEnd().mnCol, pTableObj->getLastCell().mnRow );
gotoCell( aPos, bSelect, pWindow, nAction );
break;
}
case ACTION_EDIT_CELL:
EditCell( getSelectionStart(), pWindow, 0, nAction );
break;
case ACTION_STOP_TEXT_EDIT:
StopTextEdit();
break;
case ACTION_REMOVE_SELECTION:
RemoveSelection();
break;
case ACTION_START_SELECTION:
StartSelection( getSelectionStart() );
break;
case ACTION_TAB:
{
if( bSelect )
gotoCell( pTableObj->getPreviousCell( getSelectionEnd(), true ), false, pWindow, nAction );
else
2009-06-17 12:31:00 +00:00
{
CellPos aSelectionEnd( getSelectionEnd() );
CellPos aNextCell( pTableObj->getNextCell( aSelectionEnd, true ) );
if( aSelectionEnd == aNextCell )
{
CWS-TOOLING: integrate CWS impress172 2009-07-30 15:29:39 +0200 cl r274492 : #i102921# remove reference to inssrc.obj which was moved to svx 2009-07-29 11:40:35 +0200 wg r274445 : i103869 2009-07-22 14:39:13 +0200 sj r274241 : #i102713# fixed cloud shape 2009-07-07 15:28:04 +0200 sj r273800 : fixed build problem 2009-07-07 13:27:13 +0200 cl r273792 : #i102921# moved insert col/rows dialog to svx 2009-07-07 10:36:05 +0200 cl r273782 : fixed compiler warnings 2009-07-02 10:40:21 +0200 sj r273626 : fixed build problem 2009-07-02 10:27:56 +0200 cl r273624 : fixed merge problem 2009-07-02 10:27:19 +0200 cl r273623 : fixed compiler warning 2009-07-01 10:04:58 +0200 cl r273550 : CWS-TOOLING: rebase CWS impress172 to trunk@273468 (milestone: DEV300:m51) 2009-06-30 16:22:02 +0200 cl r273518 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 16:20:46 +0200 cl r273517 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 16:20:28 +0200 cl r273516 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 16:19:49 +0200 cl r273515 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 16:19:28 +0200 cl r273514 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 16:17:38 +0200 cl r273513 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 15:45:44 +0200 cl r273511 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 15:37:16 +0200 cl r273510 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 15:33:47 +0200 cl r273509 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 15:32:10 +0200 cl r273508 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 15:30:05 +0200 cl r273507 : #i102921# added insert table row/col dialog for impress tables 2009-06-29 12:32:42 +0200 sj r273465 : #158632# fixed textrange hyperlinks to specific pages, added slide names 2009-06-24 15:17:59 +0200 sj r273349 : #158636# fixed text range hyperlink to first/last slide 2009-06-22 13:18:30 +0200 sj r273224 : #158651# fixed header footer import 2009-06-19 15:18:24 +0200 sj r273160 : #158614# default text of presentation objects now cleared 2009-06-16 15:54:19 +0200 sj r273023 : #i101545# fixed crash - bracketing of graphic links has been done twice leading to a broken graphic state stack 2009-06-15 16:26:26 +0200 sj r272998 : #158635# importing bookmark interactions: firstslide, lastslide, nextslide, previousslide 2009-06-15 16:25:26 +0200 sj r272997 : #158635# added bookmark interactions: firstslide, lastslide, nextslide, previousslide 2009-06-12 13:17:32 +0200 sj r272915 : #i102713# fixed cloud shape 2009-06-10 18:36:58 +0200 sj r272833 : #158674# fixed curvedleftarrow, curvedrightarrow, curveddownarrow, curveduparrow 2009-06-08 19:52:28 +0200 sj r272746 : #158674# fixed curvedleftarrow, curvedrightarrow, curveddownarrow, curveduparrow 2009-06-04 15:28:32 +0200 cl r272640 : #i102358# applied patch to remove warnings 2009-06-04 14:39:45 +0200 cl r272630 : #i99423# applied path to change impress wizard create button to open when opening exisitng documents 2009-06-03 18:21:26 +0200 sj r272601 : #158635# now using the correct paragraph bottom spacing. using font independent linespacing for impress text objects 2009-06-03 15:47:27 +0200 cl r272583 : #i101817# added color collection based on scribus 2009-06-03 14:43:59 +0200 cl r272580 : #i102163# use weak ref to SdrObject instead of listening to the model 2009-06-03 12:39:29 +0200 cl r272556 : #i93308# correct namespace for com.sun.star.text.textfields 2009-06-03 12:27:00 +0200 cl r272555 : #i93308# correct namespace for com.sun.star.text.textfields 2009-06-03 11:33:44 +0200 cl r272553 : #i23221# allow all settings (that make sense) for presentation styles 2009-06-03 11:30:59 +0200 cl r272552 : #i23221# allow all settings (that make sense) for presentation styles 2009-06-03 11:30:22 +0200 cl r272551 : #i23221# allow all settings (that make sense) for presentation styles 2009-06-02 18:41:07 +0200 sj r272527 : #i28358# applied patch (better conversion of dotted lines) 2009-06-02 11:52:13 +0200 cl r272491 : #i98668# applied patch to fix possible endless loop if exception occours 2009-05-28 17:02:55 +0200 sj r272416 : #i102336# retaining graphic file names unchanged 2009-05-28 17:00:25 +0200 sj r272415 : #i102336# retaining graphic file names unchanged 2009-05-28 17:00:10 +0200 sj r272414 : #i102336# retaining graphic file names unchanged 2009-05-25 12:43:58 +0200 sj r272232 : #i102069# added patch from thb (fixed rotated group objects)
2009-08-05 17:01:07 +00:00
onInsert( SID_TABLE_INSERT_ROW, 0 );
2009-06-17 12:31:00 +00:00
aNextCell = pTableObj->getNextCell( aSelectionEnd, true );
}
gotoCell( aNextCell, false, pWindow, nAction );
}
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
break;
}
}
return nAction != ACTION_HANDLED_BY_VIEW;
}
// --------------------------------------------------------------------
void SvxTableController::gotoCell( const CellPos& rPos, bool bSelect, Window* pWindow, sal_uInt16 nAction )
{
if( mxTableObj.is() && static_cast<SdrTableObj*>(mxTableObj.get())->IsTextEditActive() )
mpView->SdrEndTextEdit(sal_True);
if( bSelect )
{
maCursorLastPos = rPos;
if( mxTableObj.is() )
static_cast< SdrTableObj* >( mxTableObj.get() )->setActiveCell( rPos );
if( !mbCellSelectionMode )
{
setSelectedCells( maCursorFirstPos, rPos );
}
else
{
UpdateSelection( rPos );
}
}
else
{
RemoveSelection();
EditCell( rPos, pWindow, 0, nAction );
}
}
// --------------------------------------------------------------------
const CellPos& SvxTableController::getSelectionStart()
{
checkCell( maCursorFirstPos );
return maCursorFirstPos;
}
// --------------------------------------------------------------------
void SvxTableController::setSelectionStart( const CellPos& rPos )
{
maCursorFirstPos = rPos;
}
// --------------------------------------------------------------------
const CellPos& SvxTableController::getSelectionEnd()
{
checkCell( maCursorLastPos );
return maCursorLastPos;
}
// --------------------------------------------------------------------
void SvxTableController::MergeRange( sal_Int32 nFirstCol, sal_Int32 nFirstRow, sal_Int32 nLastCol, sal_Int32 nLastRow )
{
if( mxTable.is() ) try
{
Reference< XMergeableCellRange > xRange( mxTable->createCursorByRange( mxTable->getCellRangeByPosition( nFirstCol, nFirstRow,nLastCol, nLastRow ) ), UNO_QUERY_THROW );
if( xRange->isMergeable() )
{
const bool bUndo = mpModel && mpModel->IsUndoEnabled();
if( bUndo )
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
{
mpModel->BegUndo( ImpGetResStr(STR_TABLE_MERGE) );
mpModel->AddUndo( mpModel->GetSdrUndoFactory().CreateUndoGeoObject(*mxTableObj.get()) );
}
xRange->merge();
if( bUndo )
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
mpModel->EndUndo();
}
}
catch( Exception& )
{
DBG_ASSERT( false, "sdr::table::SvxTableController::MergeRange(), exception caught!" );
}
}
// --------------------------------------------------------------------
void SvxTableController::checkCell( CellPos& rPos )
{
if( mxTable.is() ) try
{
if( rPos.mnCol >= mxTable->getColumnCount() )
rPos.mnCol = mxTable->getColumnCount()-1;
if( rPos.mnRow >= mxTable->getRowCount() )
rPos.mnRow = mxTable->getRowCount()-1;
}
2012-01-06 00:03:58 +09:00
catch( Exception& )
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
{
2011-03-01 19:07:44 +01:00
OSL_FAIL("sdr::table::SvxTableController::checkCell(), exception caught!" );
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
}
}
// --------------------------------------------------------------------
void SvxTableController::findMergeOrigin( CellPos& rPos )
{
if( mxTable.is() ) try
{
Reference< XMergeableCell > xCell( mxTable->getCellByPosition( rPos.mnCol, rPos.mnRow ), UNO_QUERY_THROW );
if( xCell.is() && xCell->isMerged() )
{
::findMergeOrigin( mxTable, rPos.mnCol, rPos.mnRow, rPos.mnCol, rPos.mnRow );
}
}
2012-01-06 00:03:58 +09:00
catch( Exception& )
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
{
2011-03-01 19:07:44 +01:00
OSL_FAIL("sdr::table::SvxTableController::findMergeOrigin(), exception caught!" );
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
}
}
// --------------------------------------------------------------------
void SvxTableController::EditCell( const CellPos& rPos, ::Window* pWindow, const awt::MouseEvent* pMouseEvent /*= 0*/, sal_uInt16 nAction /*= ACTION_NONE */ )
{
SdrPageView* pPV = mpView->GetSdrPageView();
::sdr::table::SdrTableObj* pTableObj = dynamic_cast< ::sdr::table::SdrTableObj* >( mxTableObj.get() );
if( pTableObj && pTableObj->GetPage() == pPV->GetPage() )
{
bool bEmptyOutliner = false;
if(!pTableObj->GetOutlinerParaObject() && mpView->GetTextEditOutliner())
{
::Outliner* pOutl = mpView->GetTextEditOutliner();
sal_Int32 nParaAnz = pOutl->GetParagraphCount();
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
Paragraph* p1stPara = pOutl->GetParagraph( 0 );
if(nParaAnz==1 && p1stPara)
{
// Bei nur einem Pararaph
if (pOutl->GetText(p1stPara).Len() == 0)
{
bEmptyOutliner = true;
}
}
}
CellPos aPos( rPos );
findMergeOrigin( aPos );
if( pTableObj != mpView->GetTextEditObject() || bEmptyOutliner || !pTableObj->IsTextEditActive( aPos ) )
{
if( pTableObj->IsTextEditActive() )
mpView->SdrEndTextEdit(sal_True);
pTableObj->setActiveCell( aPos );
// create new outliner, owner will be the SdrObjEditView
SdrOutliner* pOutl = SdrMakeOutliner( OUTLINERMODE_OUTLINEOBJECT, mpModel );
if( pTableObj->IsVerticalWriting() )
pOutl->SetVertical( sal_True );
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
if(mpView->SdrBeginTextEdit(pTableObj, pPV, pWindow, sal_True, pOutl))
{
maCursorLastPos = maCursorFirstPos = rPos;
OutlinerView* pOLV = mpView->GetTextEditOutlinerView();
bool bNoSel = true;
if( pMouseEvent )
{
::MouseEvent aMEvt( *pMouseEvent );
SdrViewEvent aVEvt;
SdrHitKind eHit = mpView->PickAnything(aMEvt, SDRMOUSEBUTTONDOWN, aVEvt);
if (eHit == SDRHIT_TEXTEDIT)
{
// Text getroffen
pOLV->MouseButtonDown(aMEvt);
pOLV->MouseMove(aMEvt);
pOLV->MouseButtonUp(aMEvt);
// pOLV->MouseButtonDown(aMEvt);
bNoSel = false;
}
else
{
nAction = ACTION_GOTO_LEFT_CELL;
}
}
if( bNoSel )
{
// Move cursor to end of text
ESelection aNewSelection;
const WritingMode eMode = pTableObj->GetWritingMode();
if( ((nAction == ACTION_GOTO_LEFT_CELL) || (nAction == ACTION_GOTO_RIGHT_CELL)) && (eMode != WritingMode_TB_RL) )
{
const bool bLast = ((nAction == ACTION_GOTO_LEFT_CELL) && (eMode == WritingMode_LR_TB)) ||
((nAction == ACTION_GOTO_RIGHT_CELL) && (eMode == WritingMode_RL_TB));
if( bLast )
aNewSelection = ESelection(EE_PARA_NOT_FOUND, EE_INDEX_NOT_FOUND, EE_PARA_NOT_FOUND, EE_INDEX_NOT_FOUND);
}
pOLV->SetSelection(aNewSelection);
}
}
}
}
}
// --------------------------------------------------------------------
bool SvxTableController::StopTextEdit()
{
if(mpView->IsTextEdit())
{
mpView->SdrEndTextEdit();
mpView->SetCurrentObj(OBJ_TABLE);
mpView->SetEditMode(SDREDITMODE_EDIT);
return true;
}
else
{
return false;
}
}
// --------------------------------------------------------------------
void SvxTableController::getSelectedCells( CellPos& rFirst, CellPos& rLast )
{
if( mbCellSelectionMode )
{
checkCell( maCursorFirstPos );
checkCell( maCursorLastPos );
rFirst.mnCol = std::min( maCursorFirstPos.mnCol, maCursorLastPos.mnCol );
rFirst.mnRow = std::min( maCursorFirstPos.mnRow, maCursorLastPos.mnRow );
rLast.mnCol = std::max( maCursorFirstPos.mnCol, maCursorLastPos.mnCol );
rLast.mnRow = std::max( maCursorFirstPos.mnRow, maCursorLastPos.mnRow );
bool bExt = false;
if( mxTable.is() ) do
{
bExt = false;
for( sal_Int32 nRow = rFirst.mnRow; nRow <= rLast.mnRow && !bExt; nRow++ )
{
for( sal_Int32 nCol = rFirst.mnCol; nCol <= rLast.mnCol && !bExt; nCol++ )
{
Reference< XMergeableCell > xCell( mxTable->getCellByPosition( nCol, nRow ), UNO_QUERY );
if( !xCell.is() )
continue;
if( xCell->isMerged() )
{
CellPos aPos( nCol, nRow );
findMergeOrigin( aPos );
if( (aPos.mnCol < rFirst.mnCol) || (aPos.mnRow < rFirst.mnRow) )
{
rFirst.mnCol = std::min( rFirst.mnCol, aPos.mnCol );
rFirst.mnRow = std::min( rFirst.mnRow, aPos.mnRow );
bExt = true;
}
}
else
{
if( ((nCol + xCell->getColumnSpan() - 1) > rLast.mnCol) || (nRow + xCell->getRowSpan() - 1 ) > rLast.mnRow )
{
rLast.mnCol = std::max( rLast.mnCol, nCol + xCell->getColumnSpan() - 1 );
rLast.mnRow = std::max( rLast.mnRow, nRow + xCell->getRowSpan() - 1 );
bExt = true;
}
}
}
}
}
while(bExt);
}
else if( mpView && mpView->IsTextEdit() )
{
rFirst = getSelectionStart();
findMergeOrigin( rFirst );
rLast = rFirst;
if( mxTable.is() )
{
Reference< XMergeableCell > xCell( mxTable->getCellByPosition( rLast.mnCol, rLast.mnRow ), UNO_QUERY );
if( xCell.is() )
{
rLast.mnCol += xCell->getColumnSpan() - 1;
rLast.mnRow += xCell->getRowSpan() - 1;
}
}
}
else
{
rFirst.mnCol = 0;
rFirst.mnRow = 0;
if( mxTable.is() )
{
rLast.mnRow = mxTable->getRowCount()-1;
rLast.mnCol = mxTable->getColumnCount()-1;
}
else
{
rLast.mnRow = 0;
rLast.mnCol = 0;
}
}
}
// --------------------------------------------------------------------
void SvxTableController::StartSelection( const CellPos& rPos )
{
StopTextEdit();
mbCellSelectionMode = true;
maCursorLastPos = maCursorFirstPos = rPos;
mpView->MarkListHasChanged();
}
// --------------------------------------------------------------------
void SvxTableController::setSelectedCells( const CellPos& rStart, const CellPos& rEnd )
{
StopTextEdit();
mbCellSelectionMode = true;
maCursorFirstPos = rStart;
UpdateSelection( rEnd );
}
// --------------------------------------------------------------------
void SvxTableController::UpdateSelection( const CellPos& rPos )
{
maCursorLastPos = rPos;
mpView->MarkListHasChanged();
}
// --------------------------------------------------------------------
void SvxTableController::clearSelection()
{
RemoveSelection();
}
// --------------------------------------------------------------------
void SvxTableController::selectAll()
{
if( mxTable.is() )
{
CellPos aPos1, aPos2( mxTable->getColumnCount()-1, mxTable->getRowCount()-1 );
if( (aPos2.mnCol >= 0) && (aPos2.mnRow >= 0) )
{
setSelectedCells( aPos1, aPos2 );
}
}
}
// --------------------------------------------------------------------
void SvxTableController::RemoveSelection()
{
if( mbCellSelectionMode )
{
mbCellSelectionMode = false;
mpView->MarkListHasChanged();
}
}
// --------------------------------------------------------------------
void SvxTableController::onTableModified()
{
if( mnUpdateEvent == 0 )
mnUpdateEvent = Application::PostUserEvent( LINK( this, SvxTableController, UpdateHdl ) );
}
// --------------------------------------------------------------------
void SvxTableController::updateSelectionOverlay()
{
destroySelectionOverlay();
if( mbCellSelectionMode )
{
::sdr::table::SdrTableObj* pTableObj = dynamic_cast< ::sdr::table::SdrTableObj* >( mxTableObj.get() );
if( pTableObj )
{
sdr::overlay::OverlayObjectCell::RangeVector aRanges;
Rectangle aRect;
CellPos aStart,aEnd;
getSelectedCells( aStart, aEnd );
pTableObj->getCellBounds( aStart, aRect );
basegfx::B2DRange a2DRange( basegfx::B2DPoint(aRect.Left(), aRect.Top()) );
a2DRange.expand( basegfx::B2DPoint(aRect.Right(), aRect.Bottom()) );
findMergeOrigin( aEnd );
pTableObj->getCellBounds( aEnd, aRect );
a2DRange.expand( basegfx::B2DPoint(aRect.Left(), aRect.Top()) );
a2DRange.expand( basegfx::B2DPoint(aRect.Right(), aRect.Bottom()) );
aRanges.push_back( a2DRange );
::Color aHighlight( COL_BLUE );
OutputDevice* pOutDev = mpView->GetFirstOutputDevice();
if( pOutDev )
aHighlight = pOutDev->GetSettings().GetStyleSettings().GetHighlightColor();
const sal_uInt32 nCount = mpView->PaintWindowCount();
for( sal_uInt32 nIndex = 0; nIndex < nCount; nIndex++ )
{
SdrPaintWindow* pPaintWindow = mpView->GetPaintWindow(nIndex);
if( pPaintWindow )
{
rtl::Reference < ::sdr::overlay::OverlayManager > xOverlayManager = pPaintWindow->GetOverlayManager();
if( xOverlayManager.is() )
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
{
// sdr::overlay::CellOverlayType eType = sdr::overlay::CELL_OVERLAY_INVERT;
sdr::overlay::CellOverlayType eType = sdr::overlay::CELL_OVERLAY_TRANSPARENT;
sdr::overlay::OverlayObjectCell* pOverlay = new sdr::overlay::OverlayObjectCell( eType, aHighlight, aRanges );
xOverlayManager->add(*pOverlay);
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
mpSelectionOverlay = new ::sdr::overlay::OverlayObjectList;
mpSelectionOverlay->append(*pOverlay);
}
}
}
}
}
}
// --------------------------------------------------------------------
void SvxTableController::destroySelectionOverlay()
{
if( mpSelectionOverlay )
{
delete mpSelectionOverlay;
mpSelectionOverlay = 0;
}
}
// --------------------------------------------------------------------
void SvxTableController::MergeAttrFromSelectedCells(SfxItemSet& rAttr, bool bOnlyHardAttr) const
{
if( mxTable.is() )
{
CellPos aStart, aEnd;
const_cast<SvxTableController&>(*this).getSelectedCells( aStart, aEnd );
for( sal_Int32 nRow = aStart.mnRow; nRow <= aEnd.mnRow; nRow++ )
{
for( sal_Int32 nCol = aStart.mnCol; nCol <= aEnd.mnCol; nCol++ )
{
CellRef xCell( dynamic_cast< Cell* >( mxTable->getCellByPosition( nCol, nRow ).get() ) );
2009-06-17 12:31:00 +00:00
if( xCell.is() && !xCell->isMerged() )
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
{
const SfxItemSet& rSet = xCell->GetItemSet();
SfxWhichIter aIter(rSet);
sal_uInt16 nWhich(aIter.FirstWhich());
while(nWhich)
{
if(!bOnlyHardAttr)
{
if(SFX_ITEM_DONTCARE == rSet.GetItemState(nWhich, sal_False))
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
rAttr.InvalidateItem(nWhich);
else
rAttr.MergeValue(rSet.Get(nWhich), sal_True);
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
}
else if(SFX_ITEM_SET == rSet.GetItemState(nWhich, sal_False))
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
{
const SfxPoolItem& rItem = rSet.Get(nWhich);
rAttr.MergeValue(rItem, sal_True);
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
}
nWhich = aIter.NextWhich();
}
}
}
}
}
}
// --------------------------------------------------------------------
const sal_uInt16 CELL_BEFORE = 0x0001;
const sal_uInt16 CELL_LEFT = 0x0002;
const sal_uInt16 CELL_RIGHT = 0x0004;
const sal_uInt16 CELL_AFTER = 0x0008;
const sal_uInt16 CELL_UPPER = 0x0010;
const sal_uInt16 CELL_TOP = 0x0020;
const sal_uInt16 CELL_BOTTOM = 0x0040;
const sal_uInt16 CELL_LOWER = 0x0080;
// --------------------------------------------------------------------
static void ImplSetLinePreserveColor( SvxBoxItem& rNewFrame, const SvxBorderLine* pNew, sal_uInt16 nLine )
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
{
if( pNew )
{
const SvxBorderLine* pOld = rNewFrame.GetLine(nLine);
if( pOld )
{
SvxBorderLine aNewLine( *pNew );
aNewLine.SetColor( pOld->GetColor() );
rNewFrame.SetLine( &aNewLine, nLine );
return;
}
}
rNewFrame.SetLine( pNew, nLine );
}
// --------------------------------------------------------------------
static void ImplApplyBoxItem( sal_uInt16 nCellFlags, const SvxBoxItem* pBoxItem, const SvxBoxInfoItem* pBoxInfoItem, SvxBoxItem& rNewFrame )
{
if( (nCellFlags & (CELL_BEFORE|CELL_AFTER|CELL_UPPER|CELL_LOWER)) != 0 )
{
// current cell is outside the selection
if( (nCellFlags & ( CELL_BEFORE|CELL_AFTER)) == 0 ) // check if its not nw or ne corner
{
if( nCellFlags & CELL_UPPER )
{
if( pBoxInfoItem->IsValid(VALID_TOP) )
rNewFrame.SetLine(0, BOX_LINE_BOTTOM );
}
else if( nCellFlags & CELL_LOWER )
{
if( pBoxInfoItem->IsValid(VALID_BOTTOM) )
rNewFrame.SetLine( 0, BOX_LINE_TOP );
}
}
else if( (nCellFlags & ( CELL_UPPER|CELL_LOWER)) == 0 ) // check if its not sw or se corner
{
if( nCellFlags & CELL_BEFORE )
{
if( pBoxInfoItem->IsValid(VALID_LEFT) )
rNewFrame.SetLine( 0, BOX_LINE_RIGHT );
}
else if( nCellFlags & CELL_AFTER )
{
if( pBoxInfoItem->IsValid(VALID_RIGHT) )
rNewFrame.SetLine( 0, BOX_LINE_LEFT );
}
}
}
else
{
// current cell is inside the selection
if( (nCellFlags & CELL_LEFT) ? pBoxInfoItem->IsValid(VALID_LEFT) : pBoxInfoItem->IsValid(VALID_VERT) )
rNewFrame.SetLine( (nCellFlags & CELL_LEFT) ? pBoxItem->GetLeft() : pBoxInfoItem->GetVert(), BOX_LINE_LEFT );
if( (nCellFlags & CELL_RIGHT) ? pBoxInfoItem->IsValid(VALID_RIGHT) : pBoxInfoItem->IsValid(VALID_VERT) )
rNewFrame.SetLine( (nCellFlags & CELL_RIGHT) ? pBoxItem->GetRight() : pBoxInfoItem->GetVert(), BOX_LINE_RIGHT );
if( (nCellFlags & CELL_TOP) ? pBoxInfoItem->IsValid(VALID_TOP) : pBoxInfoItem->IsValid(VALID_HORI) )
rNewFrame.SetLine( (nCellFlags & CELL_TOP) ? pBoxItem->GetTop() : pBoxInfoItem->GetHori(), BOX_LINE_TOP );
if( (nCellFlags & CELL_BOTTOM) ? pBoxInfoItem->IsValid(VALID_BOTTOM) : pBoxInfoItem->IsValid(VALID_HORI) )
rNewFrame.SetLine( (nCellFlags & CELL_BOTTOM) ? pBoxItem->GetBottom() : pBoxInfoItem->GetHori(), BOX_LINE_BOTTOM );
// apply distance to borders
if( pBoxInfoItem->IsValid( VALID_DISTANCE ) )
for( sal_uInt16 nLine = 0; nLine < 4; ++nLine )
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
rNewFrame.SetDistance( pBoxItem->GetDistance( nLine ), nLine );
}
}
// --------------------------------------------------------------------
static void ImplSetLineColor( SvxBoxItem& rNewFrame, sal_uInt16 nLine, const Color& rColor )
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
{
const SvxBorderLine* pSourceLine = rNewFrame.GetLine( nLine );
if( pSourceLine )
{
SvxBorderLine aLine( *pSourceLine );
aLine.SetColor( rColor );
rNewFrame.SetLine( &aLine, nLine );
}
}
// --------------------------------------------------------------------
static void ImplApplyLineColorItem( sal_uInt16 nCellFlags, const SvxColorItem* pLineColorItem, SvxBoxItem& rNewFrame )
{
const Color aColor( pLineColorItem->GetValue() );
if( (nCellFlags & (CELL_LOWER|CELL_BEFORE|CELL_AFTER)) == 0 )
ImplSetLineColor( rNewFrame, BOX_LINE_BOTTOM, aColor );
if( (nCellFlags & (CELL_UPPER|CELL_BEFORE|CELL_AFTER)) == 0 )
ImplSetLineColor( rNewFrame, BOX_LINE_TOP, aColor );
if( (nCellFlags & (CELL_UPPER|CELL_LOWER|CELL_AFTER)) == 0 )
ImplSetLineColor( rNewFrame, BOX_LINE_RIGHT, aColor );
if( (nCellFlags & (CELL_UPPER|CELL_LOWER|CELL_BEFORE)) == 0 )
ImplSetLineColor( rNewFrame, BOX_LINE_LEFT, aColor );
}
// --------------------------------------------------------------------
static void ImplApplyBorderLineItem( sal_uInt16 nCellFlags, const SvxBorderLine* pBorderLineItem, SvxBoxItem& rNewFrame )
{
if( (nCellFlags & ( CELL_BEFORE|CELL_AFTER|CELL_UPPER|CELL_LOWER)) != 0 )
{
if( (nCellFlags & ( CELL_BEFORE|CELL_AFTER)) == 0 ) // check if its not nw or ne corner
{
if( nCellFlags & CELL_UPPER )
{
if( rNewFrame.GetBottom() )
ImplSetLinePreserveColor( rNewFrame, pBorderLineItem, BOX_LINE_BOTTOM );
}
else if( nCellFlags & CELL_LOWER )
{
if( rNewFrame.GetTop() )
ImplSetLinePreserveColor( rNewFrame, pBorderLineItem, BOX_LINE_TOP );
}
}
else if( (nCellFlags & ( CELL_UPPER|CELL_LOWER)) == 0 ) // check if its not sw or se corner
{
if( nCellFlags & CELL_BEFORE )
{
if( rNewFrame.GetRight() )
ImplSetLinePreserveColor( rNewFrame, pBorderLineItem, BOX_LINE_RIGHT );
}
else if( nCellFlags & CELL_AFTER )
{
if( rNewFrame.GetLeft() )
ImplSetLinePreserveColor( rNewFrame, pBorderLineItem, BOX_LINE_LEFT );
}
}
}
else
{
if( rNewFrame.GetBottom() )
ImplSetLinePreserveColor( rNewFrame, pBorderLineItem, BOX_LINE_BOTTOM );
if( rNewFrame.GetTop() )
ImplSetLinePreserveColor( rNewFrame, pBorderLineItem, BOX_LINE_TOP );
if( rNewFrame.GetRight() )
ImplSetLinePreserveColor( rNewFrame, pBorderLineItem, BOX_LINE_RIGHT );
if( rNewFrame.GetLeft() )
ImplSetLinePreserveColor( rNewFrame, pBorderLineItem, BOX_LINE_LEFT );
}
}
// --------------------------------------------------------------------
void SvxTableController::ApplyBorderAttr( const SfxItemSet& rAttr )
{
if( mxTable.is() )
{
const sal_Int32 nRowCount = mxTable->getRowCount();
const sal_Int32 nColCount = mxTable->getColumnCount();
if( nRowCount && nColCount )
{
const SvxBoxItem* pBoxItem = 0;
if(SFX_ITEM_SET == rAttr.GetItemState(SDRATTR_TABLE_BORDER, sal_False) )
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
pBoxItem = dynamic_cast< const SvxBoxItem* >( &rAttr.Get( SDRATTR_TABLE_BORDER ) );
const SvxBoxInfoItem* pBoxInfoItem = 0;
if(SFX_ITEM_SET == rAttr.GetItemState(SDRATTR_TABLE_BORDER_INNER, sal_False) )
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
pBoxInfoItem = dynamic_cast< const SvxBoxInfoItem* >( &rAttr.Get( SDRATTR_TABLE_BORDER_INNER ) );
const SvxColorItem* pLineColorItem = 0;
if(SFX_ITEM_SET == rAttr.GetItemState(SID_FRAME_LINECOLOR, sal_False) )
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
pLineColorItem = dynamic_cast< const SvxColorItem* >( &rAttr.Get( SID_FRAME_LINECOLOR ) );
const SvxBorderLine* pBorderLineItem = 0;
if(SFX_ITEM_SET == rAttr.GetItemState(SID_FRAME_LINESTYLE, sal_False) )
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
pBorderLineItem = ((const SvxLineItem&)rAttr.Get( SID_FRAME_LINESTYLE )).GetLine();
if( pBoxInfoItem && !pBoxItem )
{
const static SvxBoxItem gaEmptyBoxItem( SDRATTR_TABLE_BORDER );
pBoxItem = &gaEmptyBoxItem;
}
else if( pBoxItem && !pBoxInfoItem )
{
const static SvxBoxInfoItem gaEmptyBoxInfoItem( SDRATTR_TABLE_BORDER_INNER );
pBoxInfoItem = &gaEmptyBoxInfoItem;
}
CellPos aStart, aEnd;
getSelectedCells( aStart, aEnd );
const sal_Int32 nLastRow = std::min( aEnd.mnRow + 2, nRowCount );
const sal_Int32 nLastCol = std::min( aEnd.mnCol + 2, nColCount );
for( sal_Int32 nRow = std::max( aStart.mnRow - 1, (sal_Int32)0 ); nRow < nLastRow; nRow++ )
{
sal_uInt16 nRowFlags = 0;
nRowFlags |= (nRow == aStart.mnRow) ? CELL_TOP : 0;
nRowFlags |= (nRow == aEnd.mnRow) ? CELL_BOTTOM : 0;
nRowFlags |= (nRow < aStart.mnRow) ? CELL_UPPER : 0;
nRowFlags |= (nRow > aEnd.mnRow) ? CELL_LOWER : 0;
for( sal_Int32 nCol = std::max( aStart.mnCol - 1, (sal_Int32)0 ); nCol < nLastCol; nCol++ )
{
CellRef xCell( dynamic_cast< Cell* >( mxTable->getCellByPosition( nCol, nRow ).get() ) );
if( !xCell.is() )
continue;
const SfxItemSet& rSet = xCell->GetItemSet();
const SvxBoxItem* pOldOuter = (const SvxBoxItem*) &rSet.Get( SDRATTR_TABLE_BORDER );
SvxBoxItem aNewFrame( *pOldOuter );
sal_uInt16 nCellFlags = nRowFlags;
nCellFlags |= (nCol == aStart.mnCol) ? CELL_LEFT : 0;
nCellFlags |= (nCol == aEnd.mnCol) ? CELL_RIGHT : 0;
nCellFlags |= (nCol < aStart.mnCol) ? CELL_BEFORE : 0;
nCellFlags |= (nCol > aEnd.mnCol) ? CELL_AFTER : 0;
if( pBoxItem && pBoxInfoItem )
ImplApplyBoxItem( nCellFlags, pBoxItem, pBoxInfoItem, aNewFrame );
if( pLineColorItem )
ImplApplyLineColorItem( nCellFlags, pLineColorItem, aNewFrame );
if( pBorderLineItem )
ImplApplyBorderLineItem( nCellFlags, pBorderLineItem, aNewFrame );
if (aNewFrame != *pOldOuter)
{
SfxItemSet aAttr(*rSet.GetPool(), rSet.GetRanges());
aAttr.Put(aNewFrame);
xCell->SetMergedItemSetAndBroadcast( aAttr, false );
}
}
}
}
}
}
// --------------------------------------------------------------------
void SvxTableController::UpdateTableShape()
{
SdrObject* pTableObj = mxTableObj.get();
if( pTableObj )
{
pTableObj->ActionChanged();
pTableObj->BroadcastObjectChange();
}
updateSelectionOverlay();
}
// --------------------------------------------------------------------
void SvxTableController::SetAttrToSelectedCells(const SfxItemSet& rAttr, bool bReplaceAll)
{
if( mxTable.is() )
{
const bool bUndo = mpModel && mpModel->IsUndoEnabled();
if( bUndo )
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
mpModel->BegUndo( ImpGetResStr(STR_TABLE_NUMFORMAT) );
CellPos aStart, aEnd;
getSelectedCells( aStart, aEnd );
SfxItemSet aAttr(*rAttr.GetPool(), rAttr.GetRanges());
aAttr.Put(rAttr, sal_True);
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
const bool bFrame = (rAttr.GetItemState( SDRATTR_TABLE_BORDER ) == SFX_ITEM_SET) || (rAttr.GetItemState( SDRATTR_TABLE_BORDER_INNER ) == SFX_ITEM_SET);
if( bFrame )
{
aAttr.ClearItem( SDRATTR_TABLE_BORDER );
aAttr.ClearItem( SDRATTR_TABLE_BORDER_INNER );
}
for( sal_Int32 nRow = aStart.mnRow; nRow <= aEnd.mnRow; nRow++ )
{
for( sal_Int32 nCol = aStart.mnCol; nCol <= aEnd.mnCol; nCol++ )
{
CellRef xCell( dynamic_cast< Cell* >( mxTable->getCellByPosition( nCol, nRow ).get() ) );
if( xCell.is() )
{
if( bUndo )
xCell->AddUndo();
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
xCell->SetMergedItemSetAndBroadcast(aAttr, bReplaceAll);
}
}
}
if( bFrame )
{
ApplyBorderAttr( rAttr );
}
UpdateTableShape();
if( bUndo )
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
mpModel->EndUndo();
}
}
// --------------------------------------------------------------------
bool SvxTableController::GetAttributes(SfxItemSet& rTargetSet, bool bOnlyHardAttr) const
{
if( mxTableObj.is() && hasSelectedCells() )
{
MergeAttrFromSelectedCells( rTargetSet, bOnlyHardAttr );
if( mpView->IsTextEdit() )
{
if( mxTableObj->GetOutlinerParaObject() )
rTargetSet.Put( SvxScriptTypeItem( mxTableObj->GetOutlinerParaObject()->GetTextObject().GetScriptType() ) );
OutlinerView* pTextEditOutlinerView = mpView->GetTextEditOutlinerView();
if(pTextEditOutlinerView)
{
// FALSE= InvalidItems nicht al Default, sondern als "Loecher" betrachten
rTargetSet.Put(pTextEditOutlinerView->GetAttribs(), sal_False);
rTargetSet.Put( SvxScriptTypeItem( pTextEditOutlinerView->GetSelectedScriptType() ) );
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
}
}
return true;
}
else
{
return false;
}
}
// --------------------------------------------------------------------
bool SvxTableController::SetAttributes(const SfxItemSet& rSet, bool bReplaceAll)
{
if( mbCellSelectionMode || mpView->IsTextEdit() )
{
SetAttrToSelectedCells( rSet, bReplaceAll );
return true;
}
return false;
}
// --------------------------------------------------------------------
bool SvxTableController::GetMarkedObjModel( SdrPage* pNewPage )
{
if( mxTableObj.is() && mbCellSelectionMode && pNewPage ) try
{
::sdr::table::SdrTableObj& rTableObj = *static_cast< ::sdr::table::SdrTableObj* >( mxTableObj.get() );
CellPos aStart, aEnd;
getSelectedCells( aStart, aEnd );
SdrTableObj* pNewTableObj = rTableObj.CloneRange( aStart, aEnd );
pNewTableObj->SetPage( pNewPage );
pNewTableObj->SetModel( pNewPage->GetModel() );
SdrInsertReason aReason(SDRREASON_VIEWCALL);
pNewPage->InsertObject(pNewTableObj,CONTAINER_APPEND,&aReason);
return true;
}
catch( Exception& )
{
2011-03-01 19:07:44 +01:00
OSL_FAIL( "svx::SvxTableController::GetMarkedObjModel(), exception caught!" );
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
}
return false;
}
// --------------------------------------------------------------------
bool SvxTableController::PasteObjModel( const SdrModel& rModel )
{
if( mxTableObj.is() && mpView && (rModel.GetPageCount() >= 1) )
{
const SdrPage* pPastePage = rModel.GetPage(0);
if( pPastePage && pPastePage->GetObjCount() == 1 )
{
SdrTableObj* pPasteTableObj = dynamic_cast< SdrTableObj* >( pPastePage->GetObj(0) );
if( pPasteTableObj )
{
return PasteObject( pPasteTableObj );
}
}
}
return false;
}
// --------------------------------------------------------------------
bool SvxTableController::PasteObject( SdrTableObj* pPasteTableObj )
{
if( !pPasteTableObj )
return false;
Reference< XTable > xPasteTable( pPasteTableObj->getTable() );
if( !xPasteTable.is() )
return false;
if( !mxTable.is() )
return false;
sal_Int32 nPasteColumns = xPasteTable->getColumnCount();
sal_Int32 nPasteRows = xPasteTable->getRowCount();
CellPos aStart, aEnd;
getSelectedCells( aStart, aEnd );
if( mpView->IsTextEdit() )
mpView->SdrEndTextEdit(sal_True);
sal_Int32 nColumns = mxTable->getColumnCount();
sal_Int32 nRows = mxTable->getRowCount();
const sal_Int32 nMissing = nPasteRows - ( nRows - aStart.mnRow );
if( nMissing > 0 )
{
Reference< XTableRows > xRows( mxTable->getRows() );
xRows->insertByIndex( nRows, nMissing );
nRows = mxTable->getRowCount();
}
nPasteRows = std::min( nPasteRows, nRows - aStart.mnRow );
nPasteColumns = std::min( nPasteColumns, nColumns - aStart.mnCol );
// copy cell contents
for( sal_Int32 nRow = 0; nRow < nPasteRows; ++nRow )
{
for( sal_Int32 nCol = 0; nCol < nPasteColumns; ++nCol )
{
CellRef xTargetCell( dynamic_cast< Cell* >( mxTable->getCellByPosition( aStart.mnCol + nCol, aStart.mnRow + nRow ).get() ) );
if( xTargetCell.is() && !xTargetCell->isMerged() )
{
xTargetCell->AddUndo();
xTargetCell->cloneFrom( dynamic_cast< Cell* >( xPasteTable->getCellByPosition( nCol, nRow ).get() ) );
nCol += xTargetCell->getColumnSpan() - 1;
}
}
}
UpdateTableShape();
return true;
}
bool SvxTableController::TakeFormatPaintBrush( boost::shared_ptr< SfxItemSet >& /*rFormatSet*/ )
{
// SdrView::TakeFormatPaintBrush() is enough
return false;
}
bool SvxTableController::ApplyFormatPaintBrush( SfxItemSet& rFormatSet, bool bNoCharacterFormats, bool bNoParagraphFormats )
{
if( mbCellSelectionMode )
{
SdrTextObj* pTableObj = dynamic_cast<SdrTextObj*>( mxTableObj.get() );
if( !pTableObj )
return false;
const bool bUndo = mpModel && mpModel->IsUndoEnabled();
if( bUndo )
mpModel->BegUndo( ImpGetResStr(STR_TABLE_NUMFORMAT) );
CellPos aStart, aEnd;
getSelectedCells( aStart, aEnd );
SfxItemSet aAttr(*rFormatSet.GetPool(), rFormatSet.GetRanges());
aAttr.Put(rFormatSet, sal_True);
const bool bFrame = (rFormatSet.GetItemState( SDRATTR_TABLE_BORDER ) == SFX_ITEM_SET) || (rFormatSet.GetItemState( SDRATTR_TABLE_BORDER_INNER ) == SFX_ITEM_SET);
if( bFrame )
{
aAttr.ClearItem( SDRATTR_TABLE_BORDER );
aAttr.ClearItem( SDRATTR_TABLE_BORDER_INNER );
}
const sal_uInt16* pRanges = rFormatSet.GetRanges();
bool bTextOnly = true;
while( *pRanges )
{
if( (*pRanges != EE_PARA_START) && (*pRanges != EE_CHAR_START) )
{
bTextOnly = false;
break;
}
pRanges += 2;
}
const bool bReplaceAll = false;
for( sal_Int32 nRow = aStart.mnRow; nRow <= aEnd.mnRow; nRow++ )
{
for( sal_Int32 nCol = aStart.mnCol; nCol <= aEnd.mnCol; nCol++ )
{
CellRef xCell( dynamic_cast< Cell* >( mxTable->getCellByPosition( nCol, nRow ).get() ) );
if( xCell.is() )
{
if( bUndo )
xCell->AddUndo();
if( !bTextOnly )
xCell->SetMergedItemSetAndBroadcast(aAttr, bReplaceAll);
SdrText* pText = static_cast< SdrText* >( xCell.get() );
mpView->ApplyFormatPaintBrushToText( rFormatSet, *pTableObj, pText, bNoCharacterFormats, bNoParagraphFormats );
}
}
}
if( bFrame )
{
ApplyBorderAttr( rFormatSet );
}
UpdateTableShape();
if( bUndo )
mpModel->EndUndo();
return true;
}
return false;
}
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
// --------------------------------------------------------------------
IMPL_LINK_NOARG(SvxTableController, UpdateHdl)
INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED 2008/03/03 17:47:19 cl 1.1.2.34: #i68103# right click on table always opens context menu 2008/02/28 15:55:05 cl 1.1.2.33: #i68103# fixes in mousebutton handling 2008/02/27 10:42:48 cl 1.1.2.32: #i68103# fixed context menu handling for tables 2008/02/20 16:52:05 cl 1.1.2.31: #i68103# some work on notifications 2008/02/15 14:22:23 cl 1.1.2.30: #i68103# 2008/02/07 20:05:01 cl 1.1.2.29: #i68103# fixed selection and cell moving with merged cells 2008/02/06 18:18:48 cl 1.1.2.28: #i68103# fixing some split/merge issues 2008/02/06 13:54:39 cl 1.1.2.27: #i68103# preserve colors when changing border size 2008/02/06 12:42:11 cl 1.1.2.26: #i68103# end text editing before moving to another cell 2008/02/01 17:58:26 cl 1.1.2.25: #i68103# reworked bidi support 2008/01/31 18:08:34 cl 1.1.2.24: #i68103# listen for table model changes and correct selection if needed 2008/01/28 18:08:41 cl 1.1.2.23: #i68103# working on i18n 2008/01/28 08:13:06 cl 1.1.2.22: #i68103# only delete cells or rows if tables are selected 2008/01/24 17:07:52 cl 1.1.2.21: #i68103# reworked table layouter 2008/01/23 14:54:39 cl 1.1.2.20: #i68103# implementing border properties for tables 2008/01/23 10:50:30 cl 1.1.2.19: #i68103# added undo for changing table style settings 2008/01/14 16:21:56 cl 1.1.2.18: #i68103# insert column and row should insert only one if no cell is selected 2008/01/13 19:57:16 cl 1.1.2.17: #i68103# working on i18n 2008/01/01 18:37:42 cl 1.1.2.16: #i68103# working on tables 2007/12/16 17:52:44 cl 1.1.2.15: #i72702# working on table clipboard 2007/12/14 14:18:26 cl 1.1.2.14: #i68103# working on tables 2007/12/12 11:08:54 cl 1.1.2.13: #i68103# added accessible api to tables 2007/11/29 19:03:16 cl 1.1.2.12: #i68103# working on table templates 2007/10/15 09:00:34 cl 1.1.2.11: fixed merge errors 2007/10/11 15:18:51 cl 1.1.2.10: #i68103# added undo for tables 2007/08/07 12:00:12 cl 1.1.2.9: fixed merge conflicts 2007/08/06 19:38:03 cl 1.1.2.8: #i68103# worked on cell merging for tables in impress&draw 2007/07/27 11:52:43 cl 1.1.2.7: fixed linux build problems 2007/07/26 21:24:07 cl 1.1.2.6: #i68103# working on tables in draw 2007/05/31 11:45:04 cl 1.1.2.5: #i68103# added TableControler 2007/05/07 09:22:42 cl 1.1.2.4: #i68103# added format cells dialog for drawing layer tables 2007/05/03 09:05:13 cl 1.1.2.3: #i68103# more table work 2007/04/18 16:12:18 cl 1.1.2.2: #i72702# added a controller for tables 2007/04/18 15:05:50 cl 1.1.2.1: #i72702 added a controller for tables
2008-03-12 09:03:39 +00:00
{
mnUpdateEvent = 0;
if( mbCellSelectionMode )
{
CellPos aStart( maCursorFirstPos );
CellPos aEnd( maCursorLastPos );
checkCell(aStart);
checkCell(aEnd);
if( aStart != maCursorFirstPos || aEnd != maCursorLastPos )
{
setSelectedCells( aStart, aEnd );
}
}
updateSelectionOverlay();
return 0;
}
} }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */