diff options
author | Oliver-Rainer Wittmann <orw@apache.org> | 2013-04-10 08:20:16 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2013-05-20 11:33:10 +0100 |
commit | d02f75a8c36705924ddd6a5921fe3012fafce812 (patch) | |
tree | 40da9f25714a77f5e9e17ef7bee81c33a1a11b4b /svx/inc | |
parent | d8d55787b81cdc955b73c8befa4ab608f46e32aa (diff) |
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
Diffstat (limited to 'svx/inc')
-rw-r--r-- | svx/inc/GalleryControl.hxx | 75 | ||||
-rw-r--r-- | svx/inc/galbrws2.hxx | 5 | ||||
-rw-r--r-- | svx/inc/helpid.hrc | 122 | ||||
-rw-r--r-- | svx/inc/sidebar/PanelFactory.hxx | 70 | ||||
-rw-r--r-- | svx/inc/svx/AffineMatrixItem.hxx | 54 | ||||
-rw-r--r-- | svx/inc/svx/XPropertyEntry.hxx | 47 | ||||
-rw-r--r-- | svx/inc/svx/nbdtmg.hxx | 376 | ||||
-rw-r--r-- | svx/inc/svx/nbdtmgfact.hxx | 33 | ||||
-rw-r--r-- | svx/inc/svx/sdr/table/tablecontroller.hxx | 159 | ||||
-rw-r--r-- | svx/inc/svx/sidebar/ColorControl.hxx | 82 | ||||
-rw-r--r-- | svx/inc/svx/sidebar/ColorPopup.hxx | 51 | ||||
-rw-r--r-- | svx/inc/svx/sidebar/ContextChangeEventMultiplexer.hxx | 65 | ||||
-rw-r--r-- | svx/inc/svx/sidebar/Popup.hxx | 103 | ||||
-rw-r--r-- | svx/inc/svx/sidebar/PopupContainer.hxx | 44 | ||||
-rw-r--r-- | svx/inc/svx/sidebar/PopupControl.hxx | 47 | ||||
-rw-r--r-- | svx/inc/svx/sidebar/SelectionAnalyzer.hxx | 62 | ||||
-rw-r--r-- | svx/inc/svx/sidebar/SelectionChangeHandler.hxx | 85 | ||||
-rw-r--r-- | svx/inc/svx/sidebar/SidebarDialControl.hxx | 41 | ||||
-rw-r--r-- | svx/inc/svx/sidebar/ValueSetWithTextControl.hxx | 157 |
19 files changed, 1677 insertions, 1 deletions
diff --git a/svx/inc/GalleryControl.hxx b/svx/inc/GalleryControl.hxx new file mode 100644 index 000000000000..0617bf16546c --- /dev/null +++ b/svx/inc/GalleryControl.hxx @@ -0,0 +1,75 @@ +/* + * 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 . + */ +#ifndef SVX_SIDEBAR_GALLERY_CONTROL_HXX +#define SVX_SIDEBAR_GALLERY_CONTROL_HXX + +#include <vcl/window.hxx> +#include <vcl/graph.hxx> +#include <tools/urlobj.hxx> +#include "svx/svxdllapi.h" + +#include <boost/scoped_ptr.hpp> + +class SfxBindings; + +class Gallery; +class GallerySplitter; +class GalleryBrowser1; +class GalleryBrowser2; +class FmFormModel; + +namespace svx { namespace sidebar { + + +class SVX_DLLPUBLIC GalleryControl : public Window +{ +public: + GalleryControl ( + SfxBindings* pBindings, + Window* pParentWindow); + virtual ~GalleryControl (void); + + sal_Bool GalleryKeyInput( const KeyEvent& rKEvt, Window* pWindow); + +private: + Gallery* mpGallery; + ::boost::scoped_ptr<GallerySplitter> mpSplitter; + ::boost::scoped_ptr<GalleryBrowser1> mpBrowser1; + ::boost::scoped_ptr<GalleryBrowser2> mpBrowser2; + Size maLastSize; + bool mbIsInitialResize; + + void InitSettings (void); + + virtual void Resize (void); + virtual void GetFocus (void); + + DECL_LINK(SplitHdl, void*); + +protected: + void ThemeSelectionHasChanged (void); + + INetURLObject GetURL (void) const; + String GetFilterName (void) const; + Graphic GetGraphic (void) const; + sal_Bool IsLinkage (void) const; +}; + +} } // end of namespace svx::sidebar + +#endif diff --git a/svx/inc/galbrws2.hxx b/svx/inc/galbrws2.hxx index 63991173b076..a3be5977e389 100644 --- a/svx/inc/galbrws2.hxx +++ b/svx/inc/galbrws2.hxx @@ -91,9 +91,12 @@ class GalleryPreview; class Menu; class SgaObject; +namespace svx { namespace sidebar { class GalleryControl; } } + class GalleryBrowser2 : public Control, public SfxListener { friend class GalleryBrowser; + friend class svx::sidebar::GalleryControl; using Control::Notify; using Window::KeyInput; @@ -144,7 +147,7 @@ public: public: - GalleryBrowser2( GalleryBrowser* pParent, const ResId& rResId, Gallery* pGallery ); + GalleryBrowser2( Window* pParent, const ResId& rResId, Gallery* pGallery ); ~GalleryBrowser2(); void SelectTheme( const String& rThemeName ); diff --git a/svx/inc/helpid.hrc b/svx/inc/helpid.hrc index b2088f61c155..9db45b80de72 100644 --- a/svx/inc/helpid.hrc +++ b/svx/inc/helpid.hrc @@ -179,6 +179,128 @@ #define HID_XMLSEC_CALL "SVX_HID_XMLSEC_CALL" #define HID_CT_THES_ALTERNATIVES "SVX_HID_CT_THES_ALTERNATIVES" +#define HID_PROPERTYPANEL_SECTIONPAGE_BEGIN "SVX_HID_PROPERTYPANEL_SECTIONPAGE_BEGIN" +#define HID_PROPERTYPANEL_TEXT_SECTION "SVX_HID_PROPERTYPANEL_TEXT_SECTION" +#define HID_PROPERTYPANEL_PARA_SECTION "SVX_HID_PROPERTYPANEL_PARA_SECTION" +#define HID_PROPERTYPANEL_AREA_SECTION "SVX_HID_PROPERTYPANEL_AREA_SECTION" +#define HID_PROPERTYPANEL_LINE_SECTION "SVX_HID_PROPERTYPANEL_LINE_SECTION" +#define HID_PPROPERTYPANEL_AREA_LB_TRGR_TYPES "SVX_HID_PPROPERTYPANEL_AREA_LB_TRGR_TYPES" +#define HID_PPROPERTYPANEL_AREA_MTR_TRANSPARENT "SVX_HID_PPROPERTYPANEL_AREA_MTR_TRANSPARENT" +#define HID_PPROPERTYPANEL_AREA_LB_FILL_TYPES "SVX_HID_PPROPERTYPANEL_AREA_LB_FILL_TYPES" +#define HID_PPROPERTYPANEL_AREA_LB_FILL_ATTR "SVX_HID_PPROPERTYPANEL_AREA_LB_FILL_ATTR" +#define HID_PPROPERTYPANEL_AREA_MTR_TRGR_CENTER_X "SVX_HID_PPROPERTYPANEL_AREA_MTR_TRGR_CENTER_X" +#define HID_PPROPERTYPANEL_AREA_MTR_TRGR_CENTER_Y "SVX_HID_PPROPERTYPANEL_AREA_MTR_TRGR_CENTER_Y" +#define HID_PPROPERTYPANEL_AREA_MTR_TRGR_ANGLE "SVX_HID_PPROPERTYPANEL_AREA_MTR_TRGR_ANGLE" +#define HID_PPROPERTYPANEL_AREA_MTR_TRGR_SVALUE "SVX_HID_PPROPERTYPANEL_AREA_MTR_TRGR_SVALUE" +#define HID_PPROPERTYPANEL_AREA_MTR_TRGR_EVALUE "SVX_HID_PPROPERTYPANEL_AREA_MTR_TRGR_EVALUE" +#define HID_PPROPERTYPANEL_AREA_MTR_TRGR_BORDER "SVX_HID_PPROPERTYPANEL_AREA_MTR_TRGR_BORDER" +#define HID_PPROPERTYPANEL_AREA_BTN_LEFT_SECOND "SVX_HID_PPROPERTYPANEL_AREA_BTN_LEFT_SECOND" +#define HID_PPROPERTYPANEL_AREA_BTN_RIGHT_FIRST "SVX_HID_PPROPERTYPANEL_AREA_BTN_RIGHT_FIRST" +#define HID_PPROPERTYPANEL_TEXT_TBX_FONT "SVX_HID_PPROPERTYPANEL_TEXT_TBX_FONT" +#define HID_PPROPERTYPANEL_TEXT_TBI_BOLD "SVX_HID_PPROPERTYPANEL_TEXT_TBI_BOLD" +#define HID_PPROPERTYPANEL_TEXT_TBI_ITALIC "SVX_HID_PPROPERTYPANEL_TEXT_TBI_ITALIC" +#define HID_PPROPERTYPANEL_TEXT_TBI_UNDERLINE "SVX_HID_PPROPERTYPANEL_TEXT_TBI_UNDERLINE" +#define HID_PPROPERTYPANEL_TEXT_TBI_STRIKEOUT "SVX_HID_PPROPERTYPANEL_TEXT_TBI_STRIKEOUT" +#define HID_PPROPERTYPANEL_TEXT_TBI_SHADOWED "SVX_HID_PPROPERTYPANEL_TEXT_TBI_SHADOWED" +#define HID_PPROPERTYPANEL_TEXT_TBX_FONTSIZE_INDE "SVX_HID_PPROPERTYPANEL_TEXT_TBX_FONTSIZE_INDE" +#define HID_PPROPERTYPANEL_TEXT_TBI_INCREASE "SVX_HID_PPROPERTYPANEL_TEXT_TBI_INCREASE" +#define HID_PPROPERTYPANEL_TEXT_TBI_DECREASE "SVX_HID_PPROPERTYPANEL_TEXT_TBI_DECREASE" +#define HID_PPROPERTYPANEL_TEXT_TBX_FONT_COLOR "SVX_HID_PPROPERTYPANEL_TEXT_TBX_FONT_COLOR" +#define HID_PPROPERTYPANEL_TEXT_TBI_FONT_COLOR "SVX_HID_PPROPERTYPANEL_TEXT_TBI_FONT_COLOR" +#define HID_PPROPERTYPANEL_TEXT_TBX_HIGHLIGHT_COLOR "SVX_HID_PPROPERTYPANEL_TEXT_TBX_HIGHLIGHT_COLOR" +#define HID_PPROPERTYPANEL_TEXT_TBI_HIGHLIGHT_COLOR "SVX_HID_PPROPERTYPANEL_TEXT_TBI_HIGHLIGHT_COLOR" +#define HID_PPROPERTYPANEL_TEXT_TBX_SCRIPT_SW "SVX_HID_PPROPERTYPANEL_TEXT_TBX_SCRIPT_SW" +#define HID_PPROPERTYPANEL_TEXT_TBI_SUPER_SW "SVX_HID_PPROPERTYPANEL_TEXT_TBI_SUPER_SW" +#define HID_PPROPERTYPANEL_TEXT_TBI_SUB_SW "SVX_HID_PPROPERTYPANEL_TEXT_TBI_SUB_SW" +#define HID_PPROPERTYPANEL_TEXT_TBX_SCRIPT "SVX_HID_PPROPERTYPANEL_TEXT_TBX_SCRIPT" +#define HID_PPROPERTYPANEL_TEXT_TBI_SUPER "SVX_HID_PPROPERTYPANEL_TEXT_TBI_SUPER" +#define HID_PPROPERTYPANEL_TEXT_TBI_SUB "SVX_HID_PPROPERTYPANEL_TEXT_TBI_SUB" +#define HID_PPROPERTYPANEL_TEXT_UNDERLINE_VS "SVX_HID_PPROPERTYPANEL_TEXT_UNDERLINE_VS" +#define HID_PPROPERTYPANEL_TEXT_COLOR_VS "SVX_HID_PPROPERTYPANEL_TEXT_COLOR_VS" +#define HID_PPROPERTYPANEL_PARA_TBX_HALIGN "SVX_HID_PPROPERTYPANEL_PARA_TBX_HALIGN" +#define HID_PPROPERTYPANEL_PARA_TBI_HALIGN_LEFT "SVX_HID_PPROPERTYPANEL_PARA_TBI_HALIGN_LEFT" +#define HID_PPROPERTYPANEL_PARA_TBI_HALIGN_CENTER "SVX_HID_PPROPERTYPANEL_PARA_TBI_HALIGN_CENTER" +#define HID_PPROPERTYPANEL_PARA_TBI_HALIGN_RIGHT "SVX_HID_PPROPERTYPANEL_PARA_TBI_HALIGN_RIGHT" +#define HID_PPROPERTYPANEL_PARA_TBI_HALIGN_JUSTIFY "SVX_HID_PPROPERTYPANEL_PARA_TBI_HALIGN_JUSTIFY" +#define HID_PPROPERTYPANEL_PARA_TBX_VALIGN "SVX_HID_PPROPERTYPANEL_PARA_TBX_VALIGN" +#define HID_PPROPERTYPANEL_PARA_TBI_VALIGN_TOP "SVX_HID_PPROPERTYPANEL_PARA_TBI_VALIGN_TOP" +#define HID_PPROPERTYPANEL_PARA_TBI_VALIGN_CENTER "SVX_HID_PPROPERTYPANEL_PARA_TBI_VALIGN_CENTER" +#define HID_PPROPERTYPANEL_PARA_TBI_VALIGN_BOT "SVX_HID_PPROPERTYPANEL_PARA_TBI_VALIGN_BOT" +#define HID_PPROPERTYPANEL_PARA_TBX_BACK_COLOR "SVX_HID_PPROPERTYPANEL_PARA_TBX_BACK_COLOR" +#define HID_PPROPERTYPANEL_PARA_TBI_BACK_COLOR "SVX_HID_PPROPERTYPANEL_PARA_TBI_BACK_COLOR" +#define HID_PPROPERTYPANEL_PARA_BACK_COLOR_VS "SVX_HID_PPROPERTYPANEL_PARA_BACK_COLOR_VS" +#define HID_PPROPERTYPANEL_LINE_TBX_WIDTH "SVX_HID_PPROPERTYPANEL_LINE_TBX_WIDTH" +#define HID_PPROPERTYPANEL_LINE_TBI_WIDTH "SVX_HID_PPROPERTYPANEL_LINE_TBI_WIDTH" +#define HID_PPROPERTYPANEL_LINE_TBX_COLOR "SVX_HID_PPROPERTYPANEL_LINE_TBX_COLOR" +#define HID_PPROPERTYPANEL_LINE_TBI_COLOR "SVX_HID_PPROPERTYPANEL_LINE_TBI_COLOR" +#define HID_PPROPERTYPANEL_LINE_TBX_STYLE "SVX_HID_PPROPERTYPANEL_LINE_TBX_STYLE" +#define HID_PPROPERTYPANEL_LINE_TBI_STYLE "SVX_HID_PPROPERTYPANEL_LINE_TBI_STYLE" +#define HID_PPROPERTYPANEL_LINE_MTR_TRANCEPARENCE "SVX_HID_PPROPERTYPANEL_LINE_MTR_TRANCEPARENCE" +#define HID_PPROPERTYPANEL_LINE_LB_START "SVX_HID_PPROPERTYPANEL_LINE_LB_START" +#define HID_PPROPERTYPANEL_LINE_LB_END "SVX_HID_PPROPERTYPANEL_LINE_LB_END" +#define HID_PPROPERTYPANEL_LINE_VS_WIDTH "SVX_HID_PPROPERTYPANEL_LINE_VS_WIDTH" +#define HID_PPROPERTYPANEL_LINE_MTR_WIDTH "SVX_HID_PPROPERTYPANEL_LINE_MTR_WIDTH" +#define HID_PPROPERTYPANEL_LINE_VS_COLOR "SVX_HID_PPROPERTYPANEL_LINE_VS_COLOR" +#define HID_PPROPERTYPANEL_LINE_VS_STYLE "SVX_HID_PPROPERTYPANEL_LINE_VS_STYLE" +#define HID_PPROPERTYPANEL_LINE_BTN_STYLE "SVX_HID_PPROPERTYPANEL_LINE_BTN_STYLE" +#define HID_PPROPERTYPANEL_TEXT_SPACING_VS "SVX_HID_PPROPERTYPANEL_TEXT_SPACING_VS" +#define HID_PPROPERTYPANEL_LINE_LB_EDGESTYLE "SVX_HID_PPROPERTYPANEL_LINE_LB_EDGESTYLE" +#define HID_PPROPERTYPANEL_LINE_LB_CAPSTYLE "SVX_HID_PPROPERTYPANEL_LINE_LB_CAPSTYLE" +//add for position and size +#define HID_PROPERTY_PANEL_POSIZE_MTR_FLD_WIDTH "SVX_HID_PROPERTY_PANEL_POSIZE_MTR_FLD_WIDTH" +#define HID_PROPERTY_PANEL_POSIZE_MTR_FLD_HEIGHT "SVX_HID_PROPERTY_PANEL_POSIZE_MTR_FLD_HEIGHT" +#define HID_PROPERTY_PANEL_POSIZE_CBX_SCALE "SVX_HID_PROPERTY_PANEL_POSIZE_CBX_SCALE" +#define HID_PROPERTY_PANEL_POSIZE_MF_HORIZONTAL "SVX_HID_PROPERTY_PANEL_POSIZE_MF_HORIZONTAL" +#define HID_PROPERTY_PANEL_POSIZE_MF_VERTICAL "SVX_HID_PROPERTY_PANEL_POSIZE_MF_VERTICAL" +#define HID_PROPERTY_PANEL_POSIZE_MTR_FLD_ANGLE "SVX_HID_PROPERTY_PANEL_POSIZE_MTR_FLD_ANGLE" +#define HID_PROPERTY_PANEL_POSIZE_TBX_FLIP "SVX_HID_PROPERTY_PANEL_POSIZE_TBX_FLIP" +#define HID_PROPERTY_PANEL_POSIZE_FLIP_VERTICAL "SVX_HID_PROPERTY_PANEL_POSIZE_FLIP_VERTICAL" +#define HID_PROPERTY_PANEL_POSIZE_FLIP_HORIZONTAL "SVX_HID_PROPERTY_PANEL_POSIZE_FLIP_HORIZONTAL" +#define HID_PROPERTY_PANEL_POSIZE_DIAL_CONTROL "SVX_HID_PROPERTY_PANEL_POSIZE_DIAL_CONTROL" +//end +//add for graphic +#define HID_PROPERTY_PANEL_GRAPHIC_MTR_BRIGHT "SVX_HID_PROPERTY_PANEL_GRAPHIC_MTR_BRIGHT" +#define HID_PROPERTY_PANEL_GRAPHIC_MTR_CONTRAST "SVX_HID_PROPERTY_PANEL_GRAPHIC_MTR_CONTRAST" +#define HID_PROPERTY_PANEL_GRAPHIC_LB_COLORMODE "SVX_HID_PROPERTY_PANEL_GRAPHIC_LB_COLORMODE" +#define HID_PROPERTY_PANEL_GRAPHIC_MTR_TRANSP "SVX_HID_PROPERTY_PANEL_GRAPHIC_MTR_TRANSP" +#define HID_PROPERTY_PANEL_GRAPHIC_MTR_RED "SVX_HID_PROPERTY_PANEL_GRAPHIC_MTR_RED" +#define HID_PROPERTY_PANEL_GRAPHIC_MTR_GREEN "SVX_HID_PROPERTY_PANEL_GRAPHIC_MTR_GREEN" +#define HID_PROPERTY_PANEL_GRAPHIC_MTR_BLUE "SVX_HID_PROPERTY_PANEL_GRAPHIC_MTR_BLUE" +#define HID_PROPERTY_PANEL_GRAPHIC_MTR_GAMMA "SVX_HID_PROPERTY_PANEL_GRAPHIC_MTR_GAMMA" +//end + +#define HID_PROPERTYPANEL_POSIZE_SECTION "SVX_HID_PROPERTYPANEL_POSIZE_SECTION" +#define HID_PROPERTYPANEL_GRAPHIC_SECTION "SVX_HID_PROPERTYPANEL_GRAPHIC_SECTION" + + +#define HID_PPROPERTYPANEL_PARA_TBX_NUM_BULLET "SVX_HID_PPROPERTYPANEL_PARA_TBX_NUM_BULLET" +#define HID_PPROPERTYPANEL_PARA_TBI_NUM "SVX_HID_PPROPERTYPANEL_PARA_TBI_NUM" +#define HID_PPROPERTYPANEL_PARA_TBI_BULLET "SVX_HID_PPROPERTYPANEL_PARA_TBI_BULLET" +#define HID_PPROPERTYPANEL_PARA_TBX_INC_DEC "SVX_HID_PPROPERTYPANEL_PARA_TBX_INC_DEC" +#define HID_PPROPERTYPANEL_PARA_TBI_INC "SVX_HID_PPROPERTYPANEL_PARA_TBI_INC" +#define HID_PPROPERTYPANEL_PARA_TBI_DEC "SVX_HID_PPROPERTYPANEL_PARA_TBI_DEC" +#define HID_PPROPERTYPANEL_PARA_TBX_INDENT_INC_DEC "SVX_HID_PPROPERTYPANEL_PARA_TBX_INDENT_INC_DEC" +#define HID_PPROPERTYPANEL_PARA_TBI_INDENT_INC "SVX_HID_PPROPERTYPANEL_PARA_TBI_INDENT_INC" +#define HID_PPROPERTYPANEL_PARA_TBI_INDENT_DEC "SVX_HID_PPROPERTYPANEL_PARA_TBI_INDENT_DEC" +#define HID_PPROPERTYPANEL_PARA_TBI_INDENT_HANG "SVX_HID_PPROPERTYPANEL_PARA_TBI_INDENT_HANG" +#define HID_PPROPERTYPANEL_PARA_TBX_INDENTP_INC_DEC "SVX_HID_PPROPERTYPANEL_PARA_TBX_INDENTP_INC_DEC" +#define HID_PPROPERTYPANEL_PARA_TBI_INDENTP_INC "SVX_HID_PPROPERTYPANEL_PARA_TBI_INDENTP_INC" +#define HID_PPROPERTYPANEL_PARA_TBI_INDENTP_DEC "SVX_HID_PPROPERTYPANEL_PARA_TBI_INDENTP_DEC" +#define HID_PPROPERTYPANEL_PARA_TBI_INDENTP_HANG "SVX_HID_PPROPERTYPANEL_PARA_TBI_INDENTP_HANG" +#define HID_PPROPERTYPANEL_PARA_TBX_LINESP "SVX_HID_PPROPERTYPANEL_PARA_TBX_LINESP" +#define HID_PPROPERTYPANEL_PARA_TBI_LINESP "SVX_HID_PPROPERTYPANEL_PARA_TBI_LINESP" +#define HID_PPROPERTYPANEL_AREA_TBX_COLOR "SVX_HID_PPROPERTYPANEL_AREA_TBX_COLOR" +#define HID_PPROPERTYPANEL_AREA_TBI_COLOR "SVX_HID_PPROPERTYPANEL_AREA_TBI_COLOR" +#define HID_PPROPERTYPANEL_AREA_COLOR_VS "SVX_HID_PPROPERTYPANEL_AREA_COLOR_VS" +//add end + +#define HID_PPROPERTYPANEL_AREA_TBX_GRADIENT "SVX_HID_PPROPERTYPANEL_AREA_TBX_GRADIENT" +#define HID_PPROPERTYPANEL_AREA_TBI_GRADIENT "SVX_HID_PPROPERTYPANEL_AREA_TBI_GRADIENT" +#define HID_PROPERTYPANEL_SECTIONPAGE_END "SVX_HID_PROPERTYPANEL_SECTIONPAGE_END" + +#define HID_PPROPERTYPANEL_AREA_LB_FILL_TYPES "SVX_HID_PPROPERTYPANEL_AREA_LB_FILL_TYPES" +#define HID_PPROPERTYPANEL_AREA_LB_FILL_ATTR "SVX_HID_PPROPERTYPANEL_AREA_LB_FILL_ATTR" + #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sidebar/PanelFactory.hxx b/svx/inc/sidebar/PanelFactory.hxx new file mode 100644 index 000000000000..bfb626f08c20 --- /dev/null +++ b/svx/inc/sidebar/PanelFactory.hxx @@ -0,0 +1,70 @@ +/* + * 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 . + */ +#ifndef SVX_SIDEBAR_PANEL_FACTORY_HXX +#define SVX_SIDEBAR_PANEL_FACTORY_HXX + +#include <cppuhelper/compbase1.hxx> +#include <cppuhelper/basemutex.hxx> + +#include <com/sun/star/ui/XUIElementFactory.hpp> + +#include <boost/noncopyable.hpp> + + +namespace css = ::com::sun::star; +namespace cssu = ::com::sun::star::uno; + + +namespace svx { namespace sidebar { + +namespace +{ + typedef ::cppu::WeakComponentImplHelper1 < + css::ui::XUIElementFactory + > PanelFactoryInterfaceBase; +} + + +class PanelFactory + : private ::boost::noncopyable, + private ::cppu::BaseMutex, + public PanelFactoryInterfaceBase +{ +public: + static ::rtl::OUString SAL_CALL getImplementationName (void); + static cssu::Reference<cssu::XInterface> SAL_CALL createInstance ( + const cssu::Reference<css::lang::XMultiServiceFactory>& rxFactory); + static cssu::Sequence<rtl::OUString> SAL_CALL getSupportedServiceNames (void); + + PanelFactory (void); + virtual ~PanelFactory (void); + + // XUIElementFactory + cssu::Reference<css::ui::XUIElement> SAL_CALL createUIElement ( + const ::rtl::OUString& rsResourceURL, + const ::cssu::Sequence<css::beans::PropertyValue>& rArguments) + throw( + css::container::NoSuchElementException, + css::lang::IllegalArgumentException, + cssu::RuntimeException); +}; + + +} } // end of namespace svx::sidebar + +#endif diff --git a/svx/inc/svx/AffineMatrixItem.hxx b/svx/inc/svx/AffineMatrixItem.hxx new file mode 100644 index 000000000000..20fa4ae8f15b --- /dev/null +++ b/svx/inc/svx/AffineMatrixItem.hxx @@ -0,0 +1,54 @@ +/* + * 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 . + */ +#ifndef _SVX_AFFINEMATRIXITEM_HXX +#define _SVX_AFFINEMATRIXITEM_HXX + +#include <svx/svxdllapi.h> +#include <svl/poolitem.hxx> +#include <com/sun/star/geometry/AffineMatrix2D.hpp> + +//--------------------- +// class AffineMatrixItem +//--------------------- + +class SVX_DLLPUBLIC AffineMatrixItem : public SfxPoolItem +{ +private: + com::sun::star::geometry::AffineMatrix2D maMatrix; + +public: + TYPEINFO(); + AffineMatrixItem(const com::sun::star::geometry::AffineMatrix2D* pMatrix = 0); + AffineMatrixItem(SvStream& rIn); + AffineMatrixItem(const AffineMatrixItem&); + virtual ~AffineMatrixItem(); + + virtual int operator==(const SfxPoolItem&) const; + virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; + virtual SfxPoolItem* Create( SvStream& rIn, sal_uInt16 nVer ) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const; + + virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); + + const com::sun::star::geometry::AffineMatrix2D& GetAffineMatrix2D() const; +}; + +#endif // _SVX_AFFINEMATRIXITEM_HXX + +// eof diff --git a/svx/inc/svx/XPropertyEntry.hxx b/svx/inc/svx/XPropertyEntry.hxx new file mode 100644 index 000000000000..32b5b409c27b --- /dev/null +++ b/svx/inc/svx/XPropertyEntry.hxx @@ -0,0 +1,47 @@ +/* + * 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 . + */ +#ifndef _XPROPERTYENTRY_HXX +#define _XPROPERTYENTRY_HXX + +#include <svx/svxdllapi.h> +#include <tools/string.hxx> +#include <vcl/bitmap.hxx> + +// --------------------- +// class XPropertyEntry + +class SVX_DLLPUBLIC XPropertyEntry +{ +private: + String maName; + Bitmap maUiBitmap; + +protected: + XPropertyEntry(const String& rName); + XPropertyEntry(const XPropertyEntry& rOther); + +public: + virtual ~XPropertyEntry(); + + void SetName(const String& rName) { maName = rName; } + const String& GetName() const { return maName; } + void SetUiBitmap(const Bitmap& rUiBitmap) { maUiBitmap = rUiBitmap; } + const Bitmap& GetUiBitmap() const { return maUiBitmap; } +}; + +#endif // _XPROPERTYENTRY_HXX diff --git a/svx/inc/svx/nbdtmg.hxx b/svx/inc/svx/nbdtmg.hxx new file mode 100644 index 000000000000..eb75368a5274 --- /dev/null +++ b/svx/inc/svx/nbdtmg.hxx @@ -0,0 +1,376 @@ +/* + * 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 . + */ +#ifndef _NBDTMG_HXX +#define _NBDTMG_HXX +#include "svx/svxdllapi.h" +#include <boost/shared_ptr.hpp> +#include <vector> +#include <editeng/numitem.hxx> +#include <vcl/font.hxx> + +namespace svx { namespace sidebar { + +#define DEFAULT_BULLET_TYPES 8 +#define DEFAULT_NONE 10 +#define DEFAULT_NUM_TYPE_MEMBER 5 +#define DEFAULT_NUM_VALUSET_COUNT 8 +#define DEFAULT_NUMBERING_CACHE_FORMAT_VERSION 0x10 + +typedef sal_uInt16 NBOType; +namespace eNBOType +{ + const NBOType BULLETS = 0x01; + const NBOType GRAPHICBULLETS = 0x02; + const NBOType NUMBERING = 0x03; + const NBOType OUTLINE = 0x04; + const NBOType MIXBULLETS = 0x05; +} + +typedef sal_uInt16 NBType; +namespace eNBType +{ + const NBOType BULLETS = 0x01; + const NBOType GRAPHICBULLETS = 0x02; +} + +class SVX_DLLPUBLIC NumSettings_Impl +{ + public: + short nNumberType; + short nParentNumbering; + SvxNumberFormat::LabelFollowedBy eLabelFollowedBy; + long nTabValue; + SvxAdjust eNumAlign; + long nNumAlignAt; + long nNumIndentAt; + rtl::OUString sPrefix; + rtl::OUString sSuffix; + rtl::OUString sBulletChar; + rtl::OUString sBulletFont; + SvxBrushItem *pBrushItem; + Size aSize; + + public: + NumSettings_Impl() + : nNumberType(0) + , nParentNumbering(0) + , pBrushItem(0) + , aSize(0,0) + {} + ~NumSettings_Impl(){} +}; + +typedef NumSettings_Impl* NumSettings_ImplPtr; +typedef std::vector< boost::shared_ptr<NumSettings_Impl> > NumSettingsArr_Impl; + +class SVX_DLLPUBLIC BulletsSettings +{ + public: + sal_Bool bIsCustomized; + rtl::OUString sDescription; + NBType eType; + public: + BulletsSettings(NBType eTy) : + bIsCustomized(sal_False), + eType(eTy) + {} + virtual ~BulletsSettings(){} +}; + +class SVX_DLLPUBLIC BulletsSettings_Impl:public BulletsSettings +{ + public: + sal_Unicode cBulletChar; + //rtl::OUString sBulletFont; + Font aFont; + + public: + BulletsSettings_Impl(NBType eTy) : + BulletsSettings(eTy) + {} + virtual ~BulletsSettings_Impl(){} +}; + +class SVX_DLLPUBLIC GrfBulDataRelation: public BulletsSettings +{ + public: + String sGrfName; + sal_uInt16 nTabIndex; + sal_uInt16 nGallaryIndex; + const Graphic* pGrfObj; + Size aSize; + GrfBulDataRelation(NBType eTy): + BulletsSettings(eTy), + nTabIndex((sal_uInt16)0xFFFF), + nGallaryIndex((sal_uInt16)0xFFFF), + pGrfObj(0), + aSize(0,0) + {} + virtual ~GrfBulDataRelation(){} +}; + +class SVX_DLLPUBLIC MixBulletsSettings_Impl +{ + public: + NBType eType; + sal_uInt16 nIndex; //index in the tab page display + sal_uInt16 nIndexDefault; + BulletsSettings* pBullets; + public: + MixBulletsSettings_Impl(NBType eTy) : + eType(eTy), + nIndex((sal_uInt16)0xFFFF), + nIndexDefault((sal_uInt16)0xFFFF), + pBullets(0) + {} + ~MixBulletsSettings_Impl(){} +}; + +class SVX_DLLPUBLIC NumberSettings_Impl +{ + public: + sal_Bool bIsCustomized; + rtl::OUString sDescription; + sal_uInt16 nIndex; //index in the tab page display + sal_uInt16 nIndexDefault; + NumSettings_Impl *pNumSetting; + public: + NumberSettings_Impl() : + bIsCustomized(sal_False), + nIndex((sal_uInt16)0xFFFF), + nIndexDefault((sal_uInt16)0xFFFF), + pNumSetting(NULL) + {} + ~NumberSettings_Impl(){} +}; + +typedef NumberSettings_Impl* NumberSettings_ImplPtr; +typedef std::vector< boost::shared_ptr<NumberSettings_Impl> > NumberSettingsArr_Impl; + +class SVX_DLLPUBLIC OutlineSettings_Impl +{ + public: + sal_Bool bIsCustomized; + rtl::OUString sDescription; + NumSettingsArr_Impl *pNumSettingsArr; + public: + OutlineSettings_Impl() : + bIsCustomized(sal_False), + pNumSettingsArr(NULL) + {} + ~OutlineSettings_Impl(){ + } +}; + +class SVX_DLLPUBLIC NBOTypeMgrBase +{ + public: + NBOType eType; + private: + const SfxItemSet* pSet; + SfxMapUnit eCoreUnit; + //Sym3_2508 store the attributes passed from pSet + String aNumCharFmtName; + void StoreBulCharFmtName_impl(); + void StoreMapUnit_impl(); + + public: + NBOTypeMgrBase(const NBOType aType):eType(aType),pSet(0),eCoreUnit(SFX_MAPUNIT_TWIP),aNumCharFmtName(String()){} + NBOTypeMgrBase(const NBOType aType,const SfxItemSet* pArg):eType(aType),pSet(pArg),eCoreUnit(SFX_MAPUNIT_TWIP),aNumCharFmtName(String()){} + NBOTypeMgrBase(const NBOTypeMgrBase& aTypeMgr){eType = aTypeMgr.eType;pSet = aTypeMgr.pSet;eCoreUnit = aTypeMgr.eCoreUnit;aNumCharFmtName = aTypeMgr.aNumCharFmtName; } + virtual ~NBOTypeMgrBase() {} + virtual void Init()=0; + virtual sal_uInt16 GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 mLevel,sal_uInt16 nFromIndex=0)=0; + virtual sal_Bool RelplaceNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_uInt16 mLevel=(sal_uInt16)0xFFFF)=0; + virtual sal_Bool ApplyNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_uInt16 mLevel=(sal_uInt16)0xFFFF, sal_Bool isDefault=false,sal_Bool isResetSize=false)=0; + virtual String GetDescription(sal_uInt16 nIndex,sal_Bool isDefault=false)=0; + virtual sal_Bool IsCustomized(sal_uInt16 nIndex)=0; + sal_uInt16 IsSingleLevel(sal_uInt16 nCurLevel); + const SfxItemSet* GetItems() { return pSet;} + //Sym3_2508 store the attributes passed from pSet + void SetItems(const SfxItemSet* pArg) { pSet = pArg;StoreBulCharFmtName_impl();StoreMapUnit_impl();} + protected: + String GetBulCharFmtName(); + SfxMapUnit GetMapUnit(); + protected: + sal_Bool bIsLoading; + void ImplLoad(String filename); + void ImplStore(String filename); + +}; + + +class SVX_DLLPUBLIC BulletsTypeMgr: public NBOTypeMgrBase +{ + friend class OutlineTypeMgr; + friend class NumberingTypeMgr; + public: + static sal_Unicode aDynamicBulletTypes[DEFAULT_BULLET_TYPES]; + static sal_Unicode aDynamicRTLBulletTypes[DEFAULT_BULLET_TYPES]; + static BulletsSettings_Impl* pActualBullets[DEFAULT_BULLET_TYPES]; + static BulletsTypeMgr* _instance; + public: + BulletsTypeMgr(const NBOType aType); + BulletsTypeMgr(const NBOType aType,const SfxItemSet* pArg); + BulletsTypeMgr(const BulletsTypeMgr& aTypeMgr); + virtual ~BulletsTypeMgr() {} + virtual void Init(); + virtual sal_uInt16 GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 mLevel,sal_uInt16 nFromIndex=0); + virtual sal_Bool RelplaceNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_uInt16 mLevel=(sal_uInt16)0xFFFF); + virtual sal_Bool ApplyNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_uInt16 mLevel=(sal_uInt16)0xFFFF,sal_Bool isDefault=false,sal_Bool isResetSize=false); + virtual String GetDescription(sal_uInt16 nIndex,sal_Bool isDefault=false); + virtual sal_Bool IsCustomized(sal_uInt16 nIndex); + sal_Unicode GetBulChar(sal_uInt16 nIndex); + Font GetBulCharFont(sal_uInt16 nIndex); + static BulletsTypeMgr* GetInstance() + { + if ( _instance == 0 ) + { + _instance = new BulletsTypeMgr(eNBOType::BULLETS); + } + + return _instance; + } + +}; + +class SVX_DLLPUBLIC GraphyicBulletsTypeMgr: public NBOTypeMgrBase +{ + friend class OutlineTypeMgr; + friend class NumberingTypeMgr; + public: + typedef std::vector<GrfBulDataRelation*> ListType; + ListType aGrfDataLst; + static GraphyicBulletsTypeMgr* _instance; + public: + GraphyicBulletsTypeMgr(const NBOType aType); + GraphyicBulletsTypeMgr(const NBOType aType,const SfxItemSet* pArg); + GraphyicBulletsTypeMgr(const GraphyicBulletsTypeMgr& aTypeMgr); + virtual ~GraphyicBulletsTypeMgr(); + virtual void Init(); + virtual sal_uInt16 GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 mLevel,sal_uInt16 nFromIndex=0); + virtual sal_Bool RelplaceNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_uInt16 mLevel=(sal_uInt16)0xFFFF); + virtual sal_Bool ApplyNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_uInt16 mLevel=(sal_uInt16)0xFFFF,sal_Bool isDefault=false,sal_Bool isResetSize=false); + virtual String GetDescription(sal_uInt16 nIndex,sal_Bool isDefault=false); + virtual sal_Bool IsCustomized(sal_uInt16 nIndex); + String GetGrfName(sal_uInt16 nIndex); + static GraphyicBulletsTypeMgr* GetInstance() + { + if ( _instance == 0 ) + { + _instance = new GraphyicBulletsTypeMgr(eNBOType::BULLETS); + } + + return _instance; + } + +}; + +class SVX_DLLPUBLIC MixBulletsTypeMgr: public NBOTypeMgrBase +{ + friend class OutlineTypeMgr; + friend class NumberingTypeMgr; + public: + static MixBulletsSettings_Impl* pActualBullets[DEFAULT_BULLET_TYPES]; + static MixBulletsSettings_Impl* pDefaultActualBullets[DEFAULT_BULLET_TYPES]; + static MixBulletsTypeMgr* _instance; + public: + MixBulletsTypeMgr(const NBOType aType); + MixBulletsTypeMgr(const NBOType aType,const SfxItemSet* pArg); + MixBulletsTypeMgr(const MixBulletsTypeMgr& aTypeMgr); + virtual ~MixBulletsTypeMgr() {} + virtual void Init(); + virtual sal_uInt16 GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 mLevel,sal_uInt16 nFromIndex=0); + virtual sal_Bool RelplaceNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_uInt16 mLevel=(sal_uInt16)0xFFFF); + virtual sal_Bool ApplyNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_uInt16 mLevel=(sal_uInt16)0xFFFF,sal_Bool isDefault=false,sal_Bool isResetSize=false); + virtual String GetDescription(sal_uInt16 nIndex,sal_Bool isDefault=false); + virtual sal_Bool IsCustomized(sal_uInt16 nIndex); + static MixBulletsTypeMgr* GetInstance() + { + if ( _instance == 0 ) + { + _instance = new MixBulletsTypeMgr(eNBOType::MIXBULLETS); + } + + return _instance; + } + +}; + +class SVX_DLLPUBLIC NumberingTypeMgr: public NBOTypeMgrBase +{ + public: + //NumSettingsArr_Impl* pNumSettingsArr; + NumberSettingsArr_Impl* pNumberSettingsArr; + NumberSettingsArr_Impl* pDefaultNumberSettingsArr; + static NumberingTypeMgr* _instance; + public: + NumberingTypeMgr(const NBOType aType); + NumberingTypeMgr(const NBOType aType,const SfxItemSet* pArg); + NumberingTypeMgr(const NumberingTypeMgr& aTypeMgr); + virtual ~NumberingTypeMgr() {} + virtual void Init(); + virtual sal_uInt16 GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 mLevel,sal_uInt16 nFromIndex=0); + virtual sal_Bool RelplaceNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_uInt16 mLevel=(sal_uInt16)0xFFFF); + virtual sal_Bool ApplyNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_uInt16 mLevel=(sal_uInt16)0xFFFF,sal_Bool isDefault=false,sal_Bool isResetSize=false); + virtual String GetDescription(sal_uInt16 nIndex,sal_Bool isDefault=false); + virtual sal_Bool IsCustomized(sal_uInt16 nIndex); + sal_uInt16 GetNumCount() const; + NumberSettings_Impl* GetNumSettingByIndex(sal_uInt16 nIndex) const; + static NumberingTypeMgr* GetInstance() + { + if ( _instance == 0 ) + { + _instance = new NumberingTypeMgr(eNBOType::NUMBERING); + } + + return _instance; + } +}; + +class SVX_DLLPUBLIC OutlineTypeMgr: public NBOTypeMgrBase +{ + public: + //NumSettingsArr_Impl* pNumSettingsArrs[DEFAULT_NUM_VALUSET_COUNT]; + OutlineSettings_Impl* pOutlineSettingsArrs[DEFAULT_NUM_VALUSET_COUNT]; + OutlineSettings_Impl* pDefaultOutlineSettingsArrs[DEFAULT_NUM_VALUSET_COUNT]; + static OutlineTypeMgr* _instance; + public: + OutlineTypeMgr(const NBOType aType); + OutlineTypeMgr(const NBOType aType,const SfxItemSet* pArg); + OutlineTypeMgr(const OutlineTypeMgr& aTypeMgr); + virtual ~OutlineTypeMgr() {} + virtual void Init(); + virtual sal_uInt16 GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 mLevel,sal_uInt16 nFromIndex=0); + virtual sal_Bool RelplaceNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_uInt16 mLevel=(sal_uInt16)0xFFFF); + virtual sal_Bool ApplyNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_uInt16 mLevel=(sal_uInt16)0xFFFF,sal_Bool isDefault=false,sal_Bool isResetSize=false); + virtual String GetDescription(sal_uInt16 nIndex,sal_Bool isDefault=false); + virtual sal_Bool IsCustomized(sal_uInt16 nIndex); + static OutlineTypeMgr* GetInstance() + { + if ( _instance == 0 ) + { + _instance = new OutlineTypeMgr(eNBOType::OUTLINE); + } + + return _instance; + } +}; +}} +#endif + diff --git a/svx/inc/svx/nbdtmgfact.hxx b/svx/inc/svx/nbdtmgfact.hxx new file mode 100644 index 000000000000..76638d996a98 --- /dev/null +++ b/svx/inc/svx/nbdtmgfact.hxx @@ -0,0 +1,33 @@ +/* + * 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 . + */ +#ifndef _NBDTMGFACT_HXX +#define _NBDTMGFACT_HXX +#ifndef _NBDTMG_HXX +#include "nbdtmg.hxx" +#endif +namespace svx { namespace sidebar { +class SVX_DLLPUBLIC NBOutlineTypeMgrFact +{ +public: + static NBOTypeMgrBase* CreateInstance(const NBOType aType); + NBOutlineTypeMgrFact(); + virtual ~NBOutlineTypeMgrFact() {} +}; +}} +#endif + diff --git a/svx/inc/svx/sdr/table/tablecontroller.hxx b/svx/inc/svx/sdr/table/tablecontroller.hxx new file mode 100644 index 000000000000..5efdd875968e --- /dev/null +++ b/svx/inc/svx/sdr/table/tablecontroller.hxx @@ -0,0 +1,159 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * 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 . + */ + +#ifndef _SVX_TABLECONTROLLER_HXX_ +#define _SVX_TABLECONTROLLER_HXX_ + +#include <com/sun/star/util/XModifyListener.hpp> +#include <com/sun/star/table/XTable.hpp> +#include <rtl/ref.hxx> + +#include <svx/sdr/overlay/overlayobjectlist.hxx> +#include <svx/selectioncontroller.hxx> +#include <svx/svdotable.hxx> +#include <svx/svdview.hxx> +//#include <tablemodel.hxx> + +class SdrObjEditView; +class SdrObject; +class SfxItemSet; + +namespace sdr { namespace table { + +class TableModel; + +class SVX_DLLPUBLIC SvxTableController: public sdr::SelectionController +{ +public: + SVX_DLLPRIVATE SvxTableController( SdrObjEditView* pView, const SdrObject* pObj ); + SVX_DLLPRIVATE virtual ~SvxTableController(); + + // from sdr::SelectionController + SVX_DLLPRIVATE virtual bool onKeyInput(const KeyEvent& rKEvt, Window* pWin); + SVX_DLLPRIVATE virtual bool onMouseButtonDown(const MouseEvent& rMEvt, Window* pWin); + SVX_DLLPRIVATE virtual bool onMouseButtonUp(const MouseEvent& rMEvt, Window* pWin); + SVX_DLLPRIVATE virtual bool onMouseMove(const MouseEvent& rMEvt, Window* pWin); + + SVX_DLLPRIVATE virtual bool DeleteMarked(); + + SVX_DLLPRIVATE virtual void onSelectionHasChanged(); + + SVX_DLLPRIVATE virtual void GetState( SfxItemSet& rSet ); + SVX_DLLPRIVATE virtual void Execute( SfxRequest& rReq ); + + SVX_DLLPRIVATE virtual bool GetStyleSheet( SfxStyleSheet* &rpStyleSheet ) const; + SVX_DLLPRIVATE virtual bool SetStyleSheet( SfxStyleSheet* pStyleSheet, bool bDontRemoveHardAttr ); + + SVX_DLLPRIVATE virtual bool TakeFormatPaintBrush( boost::shared_ptr< SfxItemSet >& rFormatSet ); + SVX_DLLPRIVATE virtual bool ApplyFormatPaintBrush( SfxItemSet& rFormatSet, bool bNoCharacterFormats, bool bNoParagraphFormats ); + + // slots + SVX_DLLPRIVATE void onInsert( sal_uInt16 nSId, const SfxItemSet* pArgs = 0 ); + SVX_DLLPRIVATE void onDelete( sal_uInt16 nSId ); + SVX_DLLPRIVATE void onSelect( sal_uInt16 nSId ); + SVX_DLLPRIVATE void onFormatTable( SfxRequest& rReq ); + SVX_DLLPRIVATE void MergeMarkedCells(); + SVX_DLLPRIVATE void SplitMarkedCells(); + SVX_DLLPRIVATE void DistributeColumns(); + SVX_DLLPRIVATE void DistributeRows(); + SVX_DLLPRIVATE void SetVertical( sal_uInt16 nSId ); + + SVX_DLLPRIVATE static rtl::Reference< sdr::SelectionController > create( SdrObjEditView* pView, const SdrObject* pObj, const rtl::Reference< sdr::SelectionController >& xRefController ); + + SVX_DLLPRIVATE void MergeAttrFromSelectedCells(SfxItemSet& rAttr, bool bOnlyHardAttr) const; + SVX_DLLPRIVATE void SetAttrToSelectedCells(const SfxItemSet& rAttr, bool bReplaceAll); + + SVX_DLLPRIVATE virtual bool GetAttributes(SfxItemSet& rTargetSet, bool bOnlyHardAttr) const; + SVX_DLLPRIVATE virtual bool SetAttributes(const SfxItemSet& rSet, bool bReplaceAll); + + SVX_DLLPRIVATE virtual bool GetMarkedObjModel( SdrPage* pNewPage ); + SVX_DLLPRIVATE virtual bool PasteObjModel( const SdrModel& rModel ); + + SVX_DLLPRIVATE bool hasSelectedCells() const { return mbCellSelectionMode || mpView->IsTextEdit(); } + + void getSelectedCells( CellPos& rFirstPos, CellPos& rLastPos ); + void setSelectedCells( const CellPos& rFirstPos, const CellPos& rLastPos ); + void clearSelection(); + void selectAll(); + + SVX_DLLPRIVATE void onTableModified(); + +private: + SvxTableController(SvxTableController &); // not defined + void operator =(SvxTableController &); // not defined + + // internals + SVX_DLLPRIVATE void ApplyBorderAttr( const SfxItemSet& rAttr ); + SVX_DLLPRIVATE void UpdateTableShape(); + + SVX_DLLPRIVATE void SetTableStyle( const SfxItemSet* pArgs ); + SVX_DLLPRIVATE void SetTableStyleSettings( const SfxItemSet* pArgs ); + + SVX_DLLPRIVATE bool PasteObject( SdrTableObj* pPasteTableObj ); + + SVX_DLLPRIVATE bool checkTableObject(); + SVX_DLLPRIVATE bool updateTableObject(); + SVX_DLLPRIVATE const CellPos& getSelectionStart(); + SVX_DLLPRIVATE void setSelectionStart( const CellPos& rPos ); + SVX_DLLPRIVATE const CellPos& getSelectionEnd(); + SVX_DLLPRIVATE void checkCell( CellPos& rPos ); + + SVX_DLLPRIVATE void MergeRange( sal_Int32 nFirstCol, sal_Int32 nFirstRow, sal_Int32 nLastCol, sal_Int32 nLastRow ); + + SVX_DLLPRIVATE void EditCell( const CellPos& rPos, ::Window* pWindow, const ::com::sun::star::awt::MouseEvent* pMouseEvent = 0, sal_uInt16 nAction = 0 ); + SVX_DLLPRIVATE bool StopTextEdit(); + + SVX_DLLPRIVATE sal_uInt16 getKeyboardAction( const KeyEvent& rKEvt, Window* pWindow ); + SVX_DLLPRIVATE bool executeAction( sal_uInt16 nAction, bool bSelect, Window* pWindow ); + SVX_DLLPRIVATE void gotoCell( const CellPos& rCell, bool bSelect, Window* pWindow, sal_uInt16 nAction = 0 ); + + SVX_DLLPRIVATE void StartSelection( const CellPos& rPos ); + SVX_DLLPRIVATE void UpdateSelection( const CellPos& rPos ); + SVX_DLLPRIVATE void RemoveSelection(); + SVX_DLLPRIVATE void updateSelectionOverlay(); + SVX_DLLPRIVATE void destroySelectionOverlay(); + + SVX_DLLPRIVATE void findMergeOrigin( CellPos& rPos ); + + DECL_LINK( UpdateHdl, void * ); + + //TableModelRef mxTable; + rtl::Reference< TableModel > mxTable; + + CellPos maCursorFirstPos; + CellPos maCursorLastPos; + bool mbCellSelectionMode; + CellPos maMouseDownPos; + bool mbLeftButtonDown; + ::sdr::overlay::OverlayObjectList* mpSelectionOverlay; + + SdrView* mpView; + SdrObjectWeakRef mxTableObj; + SdrModel* mpModel; + + ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener > mxModifyListener; + + sal_uLong mnUpdateEvent; +}; + +} } + +#endif // _SVX_TABLECONTROLLER_HXX_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/svx/sidebar/ColorControl.hxx b/svx/inc/svx/sidebar/ColorControl.hxx new file mode 100644 index 000000000000..58ab534c1aa1 --- /dev/null +++ b/svx/inc/svx/sidebar/ColorControl.hxx @@ -0,0 +1,82 @@ +/* + * 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 . + */ +#include "svx/sidebar/PopupControl.hxx" + +#include <svtools/valueset.hxx> +#include <boost/function.hpp> + +class Window; +class SfxBindings; +class RedId; +class FloatingWindow; + + +namespace svx { namespace sidebar { + +/** The ColorControl uses a ValueSet control for displaying all named + colors in a matrix. +*/ +class SVX_DLLPUBLIC ColorControl + : public PopupControl +{ +public: + /** Create a new ColorControl object. + @param rControlResId + The resource id for the whole color control. + @param rNoColorGetter + A functor for getting the color which will be returned when the + WB_NONEFIELD is used and got selected + @param rColorSetter + A functor for setting the color that is selected by the + user. + @param pNoColorStringResId + Resource id of an optional string for the "no color" + string. When a value is given then a + field/button is created above the color matrix for + selecting "no color" ie. transparent. + When zero is given then no such field is created. + */ + ColorControl ( + Window* pParent, + SfxBindings* pBindings, + const ResId& rControlResId, + const ResId& rValueSetResId, + const ::boost::function<Color(void)>& rNoColorGetter, + const ::boost::function<void(String&,Color)>& rColorSetter, + FloatingWindow* pFloatingWindow, + const ResId* pNoColorStringResId); + virtual ~ColorControl (void); + + void GetFocus (void); + void SetCurColorSelect ( + const Color aCol, + const bool bAvl); + +private: + SfxBindings* mpBindings; + ValueSet maVSColor; + FloatingWindow* mpFloatingWindow; + const String msNoColorString; + ::boost::function<Color(void)> maNoColorGetter; + ::boost::function<void(String&,Color)> maColorSetter; + + void FillColors (void); + DECL_LINK(VSSelectHdl, void *); +}; + +} } // end of namespace svx::sidebar diff --git a/svx/inc/svx/sidebar/ColorPopup.hxx b/svx/inc/svx/sidebar/ColorPopup.hxx new file mode 100644 index 000000000000..cdac568c7fd5 --- /dev/null +++ b/svx/inc/svx/sidebar/ColorPopup.hxx @@ -0,0 +1,51 @@ +/* + * 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 . + */ +#ifndef _SVX_SIDEBAR_COLOR_POPUP_HXX_ +#define _SVX_SIDEBAR_COLOR_POPUP_HXX_ + +#include "svx/sidebar/Popup.hxx" + +#include <tools/color.hxx> + + +namespace svx { namespace sidebar { + +/** Popup control that displays all named colors in a matrix. + The number of rows and columns of the matrix are computed from + the number of named colors so that both have roughly the same + value. + + The ColorPopup uses ColorControl as control for its content. +*/ +class SVX_DLLPUBLIC ColorPopup + : public Popup +{ +public : + ColorPopup ( + Window* pParent, + const ::boost::function<PopupControl*(PopupContainer*)>& rControlCreator); + virtual ~ColorPopup (void); + + void SetCurrentColor ( + const Color aCurrentColor, + const bool bIsColorAvailable); +}; + +} } // end of namespace svx::sidebar + +#endif diff --git a/svx/inc/svx/sidebar/ContextChangeEventMultiplexer.hxx b/svx/inc/svx/sidebar/ContextChangeEventMultiplexer.hxx new file mode 100644 index 000000000000..5075cdac70be --- /dev/null +++ b/svx/inc/svx/sidebar/ContextChangeEventMultiplexer.hxx @@ -0,0 +1,65 @@ +/* + * 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 . + */ +#ifndef _SVX_SIDEBAR_CONTEXT_CHANGE_EVENT_MULTIPLEXER_HXX_ +#define _SVX_SIDEBAR_CONTEXT_CHANGE_EVENT_MULTIPLEXER_HXX_ + +#include "svx/svxdllapi.h" +#include <sfx2/sidebar/EnumContext.hxx> +#include <com/sun/star/frame/XController.hpp> +#include <com/sun/star/frame/XFrame.hpp> + +namespace css = ::com::sun::star; +namespace cssu = ::com::sun::star::uno; + +class SfxViewShell; + +/** Convenience frontend for com::sun::star::ui::ContextChangeEventMultiplexer +*/ +class SVX_DLLPUBLIC ContextChangeEventMultiplexer +{ +public: + /** Notify the activation of a context. + @param rxController + This controller is used to determine the module (ie + application like Writer or Calc). + @param eContext + The activated context. + */ + static void NotifyContextChange ( + const cssu::Reference<css::frame::XController>& rxController, + const ::sfx2::sidebar::EnumContext::Context eContext); + + /** Notify the activation of a context. + @param pViewShell + This view shell is used to determine the module (ie + application like Writer or Calc). When <NULL/> then no + notification is made. + @param eContext + The activated context. + */ + static void NotifyContextChange ( + SfxViewShell* pViewShell, + const ::sfx2::sidebar::EnumContext::Context eContext); + +private: + static ::rtl::OUString GetModuleName ( + const cssu::Reference<css::frame::XFrame>& rxFrame); +}; + +#endif + diff --git a/svx/inc/svx/sidebar/Popup.hxx b/svx/inc/svx/sidebar/Popup.hxx new file mode 100644 index 000000000000..25571f11a5a7 --- /dev/null +++ b/svx/inc/svx/sidebar/Popup.hxx @@ -0,0 +1,103 @@ +/* + * 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 . + */ +#ifndef _SVX_SIDEBAR_POPUP_HXX_ +#define _SVX_SIDEBAR_POPUP_HXX_ + +#include "svx/svxdllapi.h" +#include <rtl/ustring.hxx> +#include <tools/link.hxx> + +#include <boost/function.hpp> +#include <boost/scoped_ptr.hpp> + +class Window; +class ToolBox; + +namespace svx { namespace sidebar { + +class PopupContainer; +class PopupControl; + +/** A wrapper around a PopupContainer and a PopupControl object. + Usually used as drop down for a toolbox. Use Show() to start + drop down mode and Hide() to end it. +*/ +class SVX_DLLPUBLIC Popup +{ +public : + /** Create a Popup wrapper object. + @param pParent + Parent window of the PopupContainer, which in turn is the + parent of the PopupControl. + @param rControlCreator + A functor that is called to create the PopupControl object + (usually an instance of a class derived from + PopupControl). + */ + Popup ( + Window* pParent, + const ::boost::function<PopupControl*(PopupContainer*)>& rControlCreator, + const ::rtl::OUString& rsAccessibleName); + virtual ~Popup (void); + + /** Show the popup. + @rToolBox + The tool box is used to determine the position at which + the popup is displayed. + */ + void Show (ToolBox& rToolBox); + + /** Hide the popup. + This method is called automatically when eg. the user clicks + outside the popup or when the ESC-key is pressed. The + application can call Hide() when the popup should be closed + for other, non-standard reasons. + */ + void Hide (void); + + /** If you want to be informed when the popup closes then add a + callback that is called after that. + */ + void SetPopupModeEndHandler (const ::boost::function<void(void)>& rCallback); + +protected: + ::boost::scoped_ptr<PopupControl> mpControl; + + /** Make sure that both PopupContainer and PopupControl objects + exist. Calls the maControlCreator functor if necessary. + */ + void ProvideContainerAndControl (void); + + /** A derived specialisation class can override this method to do + additional work. + */ + virtual void CreateContainerAndControl (void); + +private: + Window* mpParent; + ::boost::function<PopupControl*(PopupContainer*)> maControlCreator; + ::boost::function<void(void)> maPopupModeEndCallback; + const ::rtl::OUString msAccessibleName; + ::boost::scoped_ptr<PopupContainer> mpContainer; + + DECL_LINK(PopupModeEndHandler, void*); +}; + +} } // end of namespace svx::sidebar + +#endif diff --git a/svx/inc/svx/sidebar/PopupContainer.hxx b/svx/inc/svx/sidebar/PopupContainer.hxx new file mode 100644 index 000000000000..1b33988c50fd --- /dev/null +++ b/svx/inc/svx/sidebar/PopupContainer.hxx @@ -0,0 +1,44 @@ +/* + * 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 . + */ +#ifndef _SVX_SIDEBAR_POPUP_CONTAINER_HXX_ +#define _SVX_SIDEBAR_POPUP_CONTAINER_HXX_ + +#include "svx/svxdllapi.h" +#include <vcl/floatwin.hxx> + +namespace svx { namespace sidebar { + +/** Simple base class for popup container windows used by sidebar + related drop downs. + It initializes the underlying floating window with the right + flags and closes the drop down when appropriate. +*/ +class SVX_DLLPUBLIC PopupContainer + : public FloatingWindow +{ +public: + PopupContainer (Window* pParent); + virtual ~PopupContainer (void); + + virtual long Notify (NotifyEvent& rNEvt); +}; + + +} } // end of namespace svx::sidebar + +#endif diff --git a/svx/inc/svx/sidebar/PopupControl.hxx b/svx/inc/svx/sidebar/PopupControl.hxx new file mode 100644 index 000000000000..de116750109f --- /dev/null +++ b/svx/inc/svx/sidebar/PopupControl.hxx @@ -0,0 +1,47 @@ +/* + * 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 . + */ +#ifndef _SVX_SIDEBAR_POPUP_CONTROL_HXX_ +#define _SVX_SIDEBAR_POPUP_CONTROL_HXX_ + +#include "svx/svxdllapi.h" +#include <vcl/ctrl.hxx> + +namespace svx { namespace sidebar { + +/** Base class for sidebar related popup controls. + A PopupControl is typically a child of a PopupContainer and + provides the actual content of a popup. + This base class takes care of painting the proper background and + border for sidebar popups. + Specialize by derivation. +*/ +class SVX_DLLPUBLIC PopupControl + : public Control +{ +public : + PopupControl ( + Window* pParent, + const ResId& rResId); + virtual ~PopupControl (void); + + virtual void Paint (const Rectangle& rect); +}; + +} } // end of namespace svx::sidebar + +#endif diff --git a/svx/inc/svx/sidebar/SelectionAnalyzer.hxx b/svx/inc/svx/sidebar/SelectionAnalyzer.hxx new file mode 100644 index 000000000000..05f8c0b4ee9d --- /dev/null +++ b/svx/inc/svx/sidebar/SelectionAnalyzer.hxx @@ -0,0 +1,62 @@ +/* + * 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 . + */ +#ifndef _SVX_SIDEBAR_SELECTION_ANALYZER_HXX_ +#define _SVX_SIDEBAR_SELECTION_ANALYZER_HXX_ + +#include <sfx2/sidebar/EnumContext.hxx> +#include "svx/svxdllapi.h" + +class SdrMarkList; +class SdrObject; + + +namespace svx { namespace sidebar { + +class SVX_DLLPUBLIC SelectionAnalyzer +{ +public : + static sfx2::sidebar::EnumContext::Context GetContextForSelection_SC ( + const SdrMarkList& rMarkList); + static sfx2::sidebar::EnumContext::Context GetContextForSelection_SD ( + const SdrMarkList& rMarkList, + const bool bIsMasterPage, + const bool bIsHandoutPage, + const bool bIsNotesPage); + +private: + static sfx2::sidebar::EnumContext::Context GetContextForObjectId_SC ( + const sal_uInt16 nObjectId); + static sfx2::sidebar::EnumContext::Context GetContextForObjectId_SD ( + const sal_uInt16 nObjectId, + const bool bIsHandoutPage, + const bool bIsNotesPage); + static sal_uInt32 GetInventorTypeFromMark ( + const SdrMarkList& rMarkList); + static sal_uInt16 GetObjectTypeFromMark ( + const SdrMarkList& rMarkList); + static sal_uInt16 GetObjectTypeFromGroup ( + const SdrObject* pObj); + static bool IsShapeType ( + const sal_uInt16 nType); + static bool IsTextObjType ( + const sal_uInt16 nType); +}; + +} } // end of namespace svx::sidebar + +#endif diff --git a/svx/inc/svx/sidebar/SelectionChangeHandler.hxx b/svx/inc/svx/sidebar/SelectionChangeHandler.hxx new file mode 100644 index 000000000000..29116e5249b8 --- /dev/null +++ b/svx/inc/svx/sidebar/SelectionChangeHandler.hxx @@ -0,0 +1,85 @@ +/* + * 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 . + */ +#ifndef _SVX_SIDEBAR_SELECTION_CHANGE_HANDLER_HXX_ +#define _SVX_SIDEBAR_SELECTION_CHANGE_HANDLER_HXX_ + +#include "svx/svxdllapi.h" +#include <sfx2/sidebar/EnumContext.hxx> +#include <com/sun/star/frame/XController.hpp> +#include <com/sun/star/view/XSelectionSupplier.hpp> +#include <com/sun/star/view/XSelectionChangeListener.hpp> + +#include <cppuhelper/compbase1.hxx> +#include <cppuhelper/basemutex.hxx> + +#include <boost/noncopyable.hpp> +#include <boost/function.hpp> + +namespace css = ::com::sun::star; +namespace cssu = ::com::sun::star::uno; + + +class SdrMarkView; + + +namespace svx { namespace sidebar { + +namespace { + typedef ::cppu::WeakComponentImplHelper1 < + css::view::XSelectionChangeListener + > SelectionChangeHandlerInterfaceBase; +} + + +class SVX_DLLPUBLIC SelectionChangeHandler + : private ::boost::noncopyable, + private ::cppu::BaseMutex, + public SelectionChangeHandlerInterfaceBase +{ +public: + SelectionChangeHandler ( + const boost::function<sfx2::sidebar::EnumContext::Context(void)>& rSelectionChangeCallback, + const cssu::Reference<css::frame::XController>& rxController, + const sfx2::sidebar::EnumContext::Context eDefaultContext); + virtual ~SelectionChangeHandler (void); + + virtual void SAL_CALL selectionChanged (const css::lang::EventObject& rEvent) + throw (cssu::RuntimeException); + + virtual void SAL_CALL disposing (const css::lang::EventObject& rEvent) + throw (cssu::RuntimeException); + + virtual void SAL_CALL disposing (void) + throw (cssu::RuntimeException); + + void Connect (void); + void Disconnect (void); + +private: + const boost::function<sfx2::sidebar::EnumContext::Context(void)> maSelectionChangeCallback; + cssu::Reference<css::frame::XController> mxController; + const sfx2::sidebar::EnumContext::Context meDefaultContext; + bool mbIsConnected; +}; + + +} } // end of namespace svx::sidebar + + +#endif + diff --git a/svx/inc/svx/sidebar/SidebarDialControl.hxx b/svx/inc/svx/sidebar/SidebarDialControl.hxx new file mode 100644 index 000000000000..f468784cb36f --- /dev/null +++ b/svx/inc/svx/sidebar/SidebarDialControl.hxx @@ -0,0 +1,41 @@ +/* + * 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 . + */ +#ifndef SVX_SIDEBAR_DIAL_CONTROL_HXX +#define SVX_SIDEBAR_DIAL_CONTROL_HXX + +#include <svx/dialcontrol.hxx> + +namespace svx { namespace sidebar { + +/** Provide some improvements over the standard DialControl. +*/ +class SVX_DLLPUBLIC SidebarDialControl : public svx::DialControl +{ +public: + SidebarDialControl (Window* pParent, const ResId& rResId); + virtual ~SidebarDialControl (void); + + virtual void MouseButtonDown (const MouseEvent& rMEvt); + +protected: + virtual void HandleMouseEvent (const Point& rPos, bool bInitial); +}; + +} } // end of namespace svx::sidebar + +#endif diff --git a/svx/inc/svx/sidebar/ValueSetWithTextControl.hxx b/svx/inc/svx/sidebar/ValueSetWithTextControl.hxx new file mode 100644 index 000000000000..d0e524ca4e70 --- /dev/null +++ b/svx/inc/svx/sidebar/ValueSetWithTextControl.hxx @@ -0,0 +1,157 @@ +/* + * 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 . + */ +#ifndef _SVX_SIDEBAR_VALUESETWITHTEXT_CONTROL_HXX_ +#define _SVX_SIDEBAR_VALUESETWITHTEXT_CONTROL_HXX_ + +#include "svx/svxdllapi.h" + +#include <svtools/valueset.hxx> +#include <limits.h> +#include <com/sun/star/uno/Reference.h> +#include <com/sun/star/uno/Sequence.h> +#include <com/sun/star/lang/Locale.hpp> + +#include <vcl/image.hxx> + +#include <vector> + +namespace com{namespace sun{ namespace star{ + namespace container{ + class XIndexAccess; + } + namespace beans{ + struct PropertyValue; + } + namespace text{ + class XNumberingFormatter; + } +}}} + +namespace svx { namespace sidebar { + +/** Specialization of class <ValueSet>. + This specialization allows is a one-columned ValueSet which allow + items containing an image and a text or a text and a second text. + + Especially, used for sidebar related controls. +*/ +class SVX_DLLPUBLIC ValueSetWithTextControl : public ValueSet +{ +public: + // control type of specialized <ValueSet>: + // - image + text + // - text + text + enum tControlType + { + IMAGE_TEXT, + TEXT_TEXT + }; + + ValueSetWithTextControl( + const tControlType eControlType, + Window* pParent, + const ResId& rResId); + + virtual ~ValueSetWithTextControl(void); + + // add item for control type IMAGE_TEXT + // if control type does not match IMAGE_TEXT no item is added. + // @param pSelectedItemImage + // selection item image is optional. if not provided, it is the same as the image item + // @param pItemHelpText + // help text is optional. if not provided, it is the same as the item text + void AddItem( + const Image& rItemImage, + const Image* pSelectedItemImage, + const XubString& rItemText, + const XubString* pItemHelpText ); + + // replace item images for control type IMAGE_TEXT + void ReplaceItemImages( + const sal_uInt16 nItemId, + const Image& rItemImage, + const Image* pSelectedItemImage ); + + // add item for control type TEXT_TEXT + // if control type does not match TEXT_TEXT no item is added. + // @param pItemHelpText + // help text is optional. if not provided, it is the same as the item text + void AddItem( + const XubString& rItemText, + const XubString& rItemText2, + const XubString* pItemHelpText ); + + virtual void UserDraw( const UserDrawEvent& rUDEvt ); + +private: + struct ValueSetWithTextItem + { + Image maItemImage; + Image maSelectedItemImage; + XubString maItemText; + XubString maItemText2; + }; + + typedef ::std::vector< ValueSetWithTextItem > tItemList; + + const tControlType meControlType; + tItemList maItems; +}; + +class SVX_DLLPUBLIC SvxNumValueSet2 : public ValueSet +{ + Color aLineColor; + Rectangle aOrgRect; + VirtualDevice* pVDev; + + com::sun::star::uno::Reference<com::sun::star::text::XNumberingFormatter> xFormatter; + com::sun::star::lang::Locale aLocale; + + com::sun::star::uno::Sequence< + com::sun::star::uno::Sequence< + com::sun::star::beans::PropertyValue> > aNumSettings; + + + public: + SvxNumValueSet2( Window* pParent, const ResId& rResId); + ~SvxNumValueSet2(); + + virtual void UserDraw( const UserDrawEvent& rUDEvt ); + + + void SetNumberingSettings( + const com::sun::star::uno::Sequence< + com::sun::star::uno::Sequence< + com::sun::star::beans::PropertyValue> >& aNum, + com::sun::star::uno::Reference<com::sun::star::text::XNumberingFormatter>& xFormatter, + const com::sun::star::lang::Locale& rLocale ); +}; + +class SVX_DLLPUBLIC SvxNumValueSet3 : public ValueSet +{ + public: + SvxNumValueSet3( Window* pParent, const ResId& rResId); + ~SvxNumValueSet3(); + + virtual void UserDraw( const UserDrawEvent& rUDEvt ); + +}; + +} } // end of namespace svx::sidebar + +#endif |