diff options
Diffstat (limited to 'include')
36 files changed, 1355 insertions, 132 deletions
diff --git a/include/editeng/outliner.hxx b/include/editeng/outliner.hxx index 378516911ede..9848b6af6cc1 100644 --- a/include/editeng/outliner.hxx +++ b/include/editeng/outliner.hxx @@ -25,6 +25,7 @@ #include <svl/brdcst.hxx> #include <editeng/editdata.hxx> +#include <editeng/numitem.hxx> #include <i18nlangtag/lang.h> #include <tools/color.hxx> #include <tools/contnr.hxx> @@ -332,7 +333,8 @@ public: or disables numbering for the selected paragraphs if the numbering of the first paragraph is on */ void ToggleBullets(); - + sal_Bool ToggleBullets(sal_Bool bBulletOnOff, sal_Bool bNormalBullet, sal_Bool bMasterView, SvxNumRule* pNumRule = NULL, sal_Bool bForceBulletOnOff = false); + sal_Bool ToggleAllParagraphsBullets(sal_Bool bBulletOnOffMode, sal_Bool bNormalBullet, sal_Bool bToggleOn, sal_Bool bMasterView, SvxNumRule* pNumRule = NULL); /** enables numbering for the selected paragraphs that are not enabled and ignore all selected paragraphs that already have numbering enabled. */ @@ -986,6 +988,8 @@ public: virtual sal_Bool IsParaIsNumberingRestart( sal_Int32 nPara ); virtual void SetParaIsNumberingRestart( sal_Int32 nPara, sal_Bool bParaIsNumberingRestart ); + + sal_Int32 GetBulletsNumberingStatus(); }; #endif diff --git a/include/sfx2/navigat.hxx b/include/sfx2/navigat.hxx index b1cada954d2b..7f0dc928818e 100644 --- a/include/sfx2/navigat.hxx +++ b/include/sfx2/navigat.hxx @@ -35,7 +35,7 @@ public: SFX_DECL_CHILDWINDOW(SfxNavigatorWrapper); }; -class SfxNavigator : public SfxDockingWindow +class SFX2_DLLPUBLIC SfxNavigator : public SfxDockingWindow { SfxChildWindow* pWrapper; diff --git a/include/sfx2/sfx.hrc b/include/sfx2/sfx.hrc index b018a73b212d..7d1fc0a4a286 100644 --- a/include/sfx2/sfx.hrc +++ b/include/sfx2/sfx.hrc @@ -98,6 +98,7 @@ #define RID_SFX_SFXLOCAL_START (RID_SFX_START + 3082) #define RID_SFX_VIEW_START (RID_SFX_START + 4096) +#define RID_SFX_SIDEBAR_START (RID_SFX_START + 4150) // RID_CNT_START2 (RID_SFX_START + 4500) // RID_SFX_CHAOSDOC_START (RID_SFX_START + 5120) // RID_SFX_TPLCOMPONENT_START (RID_SFX_START + 6800) diff --git a/include/sfx2/sfxsids.hrc b/include/sfx2/sfxsids.hrc index cd25c9ea05b7..c838c32b6f82 100644 --- a/include/sfx2/sfxsids.hrc +++ b/include/sfx2/sfxsids.hrc @@ -596,6 +596,7 @@ #define SID_SEARCH_OPTIONS (SID_SVX_START + 281) #define SID_ZOOM (SID_SVX_START + 289) #define SID_SEARCH_ITEM (SID_SVX_START + 291) +#define SID_SIDEBAR (SID_SVX_START + 336) #define SID_HYPERLINK_GETLINK (SID_SVX_START + 361) #define SID_HYPERLINK_SETLINK (SID_SVX_START + 362) #define SID_INFOBARCONTAINER (SID_SVX_START + 365) diff --git a/include/sfx2/shell.hxx b/include/sfx2/shell.hxx index cba6efaf8e36..cb5b149714df 100644 --- a/include/sfx2/shell.hxx +++ b/include/sfx2/shell.hxx @@ -238,6 +238,8 @@ public: virtual SfxItemSet* CreateItemSet( sal_uInt16 nId ); virtual void ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet ); + void SetContextName (const ::rtl::OUString& rsContextName); + #ifndef _SFXSH_HXX SAL_DLLPRIVATE bool CanExecuteSlot_Impl( const SfxSlot &rSlot ); SAL_DLLPRIVATE void DoActivate_Impl( SfxViewFrame *pFrame, sal_Bool bMDI); diff --git a/include/sfx2/sidebar/ContextChangeBroadcaster.hxx b/include/sfx2/sidebar/ContextChangeBroadcaster.hxx new file mode 100644 index 000000000000..08696316430d --- /dev/null +++ b/include/sfx2/sidebar/ContextChangeBroadcaster.hxx @@ -0,0 +1,58 @@ +/* + * 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 SFX_SIDEBAR_CONTEXT_CHANGE_BROADCASTER_HXX +#define SFX_SIDEBAR_CONTEXT_CHANGE_BROADCASTER_HXX + +#include <com/sun/star/frame/XFrame.hpp> + +namespace css = ::com::sun::star; +namespace cssu = ::com::sun::star::uno; + +namespace sfx2 { namespace sidebar { + + +/** This class is a helper for broadcasting context changes that are + tied to shells being activated or deactivated. +*/ +class ContextChangeBroadcaster +{ +public: + ContextChangeBroadcaster (void); + ~ContextChangeBroadcaster (void); + + void Initialize (const ::rtl::OUString& rsContextName); + + void Activate (const cssu::Reference<css::frame::XFrame>& rxFrame); + void Deactivate (const cssu::Reference<css::frame::XFrame>& rxFrame); + +private: + rtl::OUString msContextName; + bool mbIsContextActive; + + void BroadcastContextChange ( + const cssu::Reference<css::frame::XFrame>& rxFrame, + const ::rtl::OUString& rsModuleName, + const ::rtl::OUString& rsContextName); + ::rtl::OUString GetModuleName ( + const cssu::Reference<css::frame::XFrame>& rxFrame); +}; + + +} } // end of namespace ::sd::sidebar + +#endif diff --git a/include/sfx2/sidebar/ControlFactory.hxx b/include/sfx2/sidebar/ControlFactory.hxx new file mode 100644 index 000000000000..594c36c5fd91 --- /dev/null +++ b/include/sfx2/sidebar/ControlFactory.hxx @@ -0,0 +1,46 @@ +/* + * 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 SFX_SIDEBAR_CONTROL_FACTORY_HXX +#define SFX_SIDEBAR_CONTROL_FACTORY_HXX + +#include <sfx2/dllapi.h> +#include <vcl/button.hxx> + +class ToolBox; + +namespace sfx2 { namespace sidebar { + +class ToolBoxBackground; + + +class SFX2_DLLPUBLIC ControlFactory +{ +public: + static CheckBox* CreateMenuButton (Window* pParentWindow); + static ImageRadioButton* CreateTabItem (Window* pParentWindow); + static ToolBox* CreateToolBox (Window* pParentWindow, const ResId& rResId); + static Window* CreateToolBoxBackground (Window* pParentWindow); + static ImageRadioButton* CreateCustomImageRadionButton( + Window* pParentWindow, + const ResId& rResId ); +}; + + +} } // end of namespace sfx2::sidebar + +#endif diff --git a/include/sfx2/sidebar/ControllerItem.hxx b/include/sfx2/sidebar/ControllerItem.hxx new file mode 100644 index 000000000000..3e7cd83fb75a --- /dev/null +++ b/include/sfx2/sidebar/ControllerItem.hxx @@ -0,0 +1,55 @@ +/* + * 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_CONTROLLER_ITEM_HXX +#define SVX_SIDEBAR_CONTROLLER_ITEM_HXX + +#include <sfx2/ctrlitem.hxx> + +#include <boost/function.hpp> + + +namespace sfx2 { namespace sidebar { + +class SFX2_DLLPUBLIC ControllerItem + : public SfxControllerItem +{ +public: + class SFX2_DLLPUBLIC ItemUpdateReceiverInterface + { + public: + virtual void NotifyItemUpdate( + const sal_uInt16 nSId, + const SfxItemState eState, + const SfxPoolItem* pState) = 0; + virtual ~ItemUpdateReceiverInterface(); + }; + ControllerItem ( + const sal_uInt16 nId, + SfxBindings &rBindings, + ItemUpdateReceiverInterface& rItemUpdateReceiver); + virtual ~ControllerItem(); + + virtual void StateChanged (sal_uInt16 nSId, SfxItemState eState, const SfxPoolItem* pState); + +private: + ItemUpdateReceiverInterface& mrItemUpdateReceiver; +}; + +} } // end of namespace sfx2::sidebar + +#endif diff --git a/include/sfx2/sidebar/EnumContext.hxx b/include/sfx2/sidebar/EnumContext.hxx new file mode 100644 index 000000000000..54b07e016783 --- /dev/null +++ b/include/sfx2/sidebar/EnumContext.hxx @@ -0,0 +1,169 @@ +/* + * 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 SFX_SIDEBAR_ENUM_CONTEXT_HXX +#define SFX_SIDEBAR_ENUM_CONTEXT_HXX + +#include "sfx2/dllapi.h" + +#include <rtl/ustring.hxx> + +#include <vector> + + +namespace sfx2 { namespace sidebar { + +class SFX2_DLLPUBLIC EnumContext +{ +public: + enum Application + { + Application_Writer, + Application_WriterWeb, + Application_Calc, + Application_Draw, + Application_Impress, + + // For your convenience to avoid duplicate code in the common + // case that Draw and Impress use identical context configurations. + Application_DrawImpress, + + // Also for your convenience for either Writer or WriterWeb. + Application_WriterAndWeb, + + // Used only by deck or panel descriptors. Matches any + // application. + Application_Any, + + // Use this only in special circumstances. One might be the + // wish to disable a deck or panel during debugging. + Application_None, + + __LastApplicationEnum = Application_None + }; + enum Context + { + Context_3DObject, + Context_Annotation, + Context_Auditing, + Context_Cell, + Context_Chart, + Context_Draw, + Context_DrawPage, + Context_DrawText, + Context_EditCell, + Context_Form, + Context_Frame, + Context_Graphic, + Context_HandoutPage, + Context_MasterPage, + Context_Media, + Context_MultiObject, + Context_NotesPage, + Context_OLE, + Context_OutlineText, + Context_Pivot, + Context_SlidesorterPage, + Context_Table, + Context_Text, + Context_TextObject, + + // Default context of an application. Do we need this? + Context_Default, + + // Used only by deck or panel descriptors. Matches any context. + Context_Any, + + // Special context name that is only used when a deck would + // otherwise be empty. + Context_Empty, + + Context_Unknown, + + __LastContextEnum = Context_Unknown + }; + + EnumContext (void); + EnumContext ( + const Application eApplication, + const Context eContext); + EnumContext ( + const ::rtl::OUString& rsApplicationName, + const ::rtl::OUString& rsContextName); + + /** Return a number that encodes both the application and context + enums. + Use the CombinedEnumContext macro in switch() statements and comparisons. + */ + sal_Int32 GetCombinedContext(void) const; + + /** This variant of the GetCombinedContext() method treats some + application names as identical to each other. Replacements + made are: + Draw or Impress -> DrawImpress + Writer or WriterWeb -> WriterAndWeb + Use the Application_DrawImpress or Application_WriterAndWeb values in the CombinedEnumContext macro. + */ + sal_Int32 GetCombinedContext_DI(void) const; + + const ::rtl::OUString& GetApplicationName (void) const; + const ::rtl::OUString& GetContextName (void) const; + + bool operator == (const EnumContext aOther); + bool operator != (const EnumContext aOther); + + /** When two contexts are matched against each other then + application or context name may have the wildcard value 'any'. + In order to prefer matches without wildcards over matches with + wildcards we introduce a integer evaluation for matches. + */ + const static sal_Int32 NoMatch; + const static sal_Int32 OptimalMatch; + + /** Return the numeric value that describes how good the match + between two contexts is. + Smaller values represent better matches. + */ + sal_Int32 EvaluateMatch (const EnumContext& rOther) const; + + /** Return the best match against the given list of contexts. + */ + sal_Int32 EvaluateMatch (const ::std::vector<EnumContext>& rOthers) const; + + static Application GetApplicationEnum (const ::rtl::OUString& rsApplicationName); + static const ::rtl::OUString& GetApplicationName (const Application eApplication); + + static Context GetContextEnum (const ::rtl::OUString& rsContextName); + static const ::rtl::OUString& GetContextName (const Context eContext); + +private: + Application meApplication; + Context meContext; + + static void ProvideApplicationContainers (void); + static void ProvideContextContainers (void); + static void AddEntry (const ::rtl::OUString& rsName, const Application eApplication); + static void AddEntry (const ::rtl::OUString& rsName, const Context eContext); +}; + + +#define CombinedEnumContext(a,e) ((static_cast<sal_uInt16>(::sfx2::sidebar::EnumContext::a)<<16)\ + | static_cast<sal_uInt16>(::sfx2::sidebar::EnumContext::e)) + +} } // end of namespace sfx2::sidebar + +#endif diff --git a/include/sfx2/sidebar/IContextChangeReceiver.hxx b/include/sfx2/sidebar/IContextChangeReceiver.hxx new file mode 100644 index 000000000000..2b9d57cb1473 --- /dev/null +++ b/include/sfx2/sidebar/IContextChangeReceiver.hxx @@ -0,0 +1,37 @@ +/* + * 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 SFX_SIDEBAR_CONTEXT_CHANGE_RECEIVER_INTERFACE_HXX +#define SFX_SIDEBAR_CONTEXT_CHANGE_RECEIVER_INTERFACE_HXX + +#include "EnumContext.hxx" + + +namespace sfx2 { namespace sidebar { + + +class SFX2_DLLPUBLIC IContextChangeReceiver +{ +public: + virtual void HandleContextChange ( + const EnumContext aContext) = 0; + virtual ~IContextChangeReceiver(); +}; + +} } // end of namespace ::sd::sidebar + +#endif diff --git a/include/sfx2/sidebar/ILayoutableWindow.hxx b/include/sfx2/sidebar/ILayoutableWindow.hxx new file mode 100644 index 000000000000..8dc67457e966 --- /dev/null +++ b/include/sfx2/sidebar/ILayoutableWindow.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 SFX_SIDEBAR_LAYOUTABLE_WINDOW_INTERFACE_HXX +#define SFX_SIDEBAR_LAYOUTABLE_WINDOW_INTERFACE_HXX + +#include <tools/gen.hxx> +#include <sal/types.h> +#include <sfx2/dllapi.h> +#include <com/sun/star/ui/LayoutSize.hpp> + +class Window; + +namespace sfx2 { namespace sidebar { + + +class SFX2_DLLPUBLIC ILayoutableWindow +{ +public: + /** Return the preferred height with the constraint, that the + window will be set to the given width. + */ + virtual ::com::sun::star::ui::LayoutSize GetHeightForWidth (const sal_Int32 nWidth) = 0; + virtual ~ILayoutableWindow(); +}; + + +} } // end of namespace ::sd::sidebar + +#endif diff --git a/include/sfx2/sidebar/PopupContainer.hxx b/include/sfx2/sidebar/PopupContainer.hxx new file mode 100644 index 000000000000..f2b8cfaa048c --- /dev/null +++ b/include/sfx2/sidebar/PopupContainer.hxx @@ -0,0 +1,37 @@ +/* + * 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 SFX_SIDEBAR_POPUP_CONTAINER_HXX +#define SFX_SIDEBAR_POPUP_CONTAINER_HXX + +#include "sfx2/dllapi.h" +#include <vcl/floatwin.hxx> + +namespace sfx2 { namespace sidebar { + +class SFX2_DLLPUBLIC PopupContainer : public FloatingWindow +{ +public: + PopupContainer (Window* pParent); + virtual ~PopupContainer (void); + + virtual long Notify (NotifyEvent& rNEvt); +}; + +} } // end of namespace sfx2::sidebar + +#endif diff --git a/include/sfx2/sidebar/ResourceDefinitions.hrc b/include/sfx2/sidebar/ResourceDefinitions.hrc new file mode 100644 index 000000000000..b45e398dedf1 --- /dev/null +++ b/include/sfx2/sidebar/ResourceDefinitions.hrc @@ -0,0 +1,141 @@ +/************************************************************** +* +* 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 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +* +*************************************************************/ + +#ifndef _SFX_PROPERTYPANEL_HRC +#define _SFX_PROPERTYPANEL_HRC + +#include <sfx2/sfx.hrc> + +//section page RID +#define RC_PROPERTYPANEL_START RID_SFX_PROPERTYPANEL_START +#define DLG_PROPERTY_DOCKING_WINDOW ( RC_PROPERTYPANEL_START + 0 ) +#define BMP_PROPERTYPANEL_EXPAND ( RC_PROPERTYPANEL_START + 1 ) +#define BMP_PROPERTYPANEL_COLLAPSE ( RC_PROPERTYPANEL_START + 2 ) +#define BMP_PROPERTYPANEL_MOREPROPERTY ( RC_PROPERTYPANEL_START + 5 ) +#define FT_PROPERTYPANEL_NOTSUPPORT_DESC ( RC_PROPERTYPANEL_START + 7 ) + +#define RID_PROPERTYPANEL_TEXTPAGE_TITLEBAR ( RC_PROPERTYPANEL_START + 8 ) +#define RID_PROPERTYPANEL_PARAGRAPHPAGE_TITLEBAR ( RC_PROPERTYPANEL_START + 9 ) +#define RID_PROPERTYPANEL_AREAPAGE_TITLEBAR ( RC_PROPERTYPANEL_START + 10 ) +#define RID_PROPERTYPANEL_TBLDESIGNPAGE_TITLEBAR ( RC_PROPERTYPANEL_START + 11 ) +#define RID_PROPERTYPANEL_LINEPAGE_TITLEBAR ( RC_PROPERTYPANEL_START + 12 ) +#define RID_PROPERTYPANEL_POSIZEPAGE_TITLEBAR ( RC_PROPERTYPANEL_START + 13 ) +#define RID_PROPERTYPANEL_GRAPHICPAGE_TITLEBAR ( RC_PROPERTYPANEL_START + 14 ) +#define RID_PROPERTYPANEL_CELLAPPEARPAGE_TITLEBAR ( RC_PROPERTYPANEL_START + 15 ) +#define RID_PROPERTYPANEL_SWPAGE_PAGE_TITLEBAR (RC_PROPERTYPANEL_START + 16) +#define RID_PROPERTYPANEL_SWOBJWRAP_PAGE_TITLEBAR (RC_PROPERTYPANEL_START + 17) +#define RID_PROPERTYPANEL_SCCELL_PAGE_TITLEBAR (RC_PROPERTYPANEL_START + 18) +#define RID_PROPERTYPANEL_SCALIGNMENT_PAGE_TITLEBAR (RC_PROPERTYPANEL_START + 19) +#define RID_PROPERTYPANEL_SD_PAGELAYOUT_TITLEBAR (RC_PROPERTYPANEL_START+20) +#define RID_PROPERTYPANEL_SD_PAGEPROPERTY_TITLEBAR (RC_PROPERTYPANEL_START+21) +#define RID_PROPERTYPANEL_SD_TABLEDESIGN_TITLEBAR (RC_PROPERTYPANEL_START+22) +#define RID_PROPERTYPANEL_NUMFORMAT_PAGE_TITLEBAR (RC_PROPERTYPANEL_START+23) + +#define RID_PANELDOCK_WINDOW ( RC_PROPERTYPANEL_START + 24 ) +#define STR_TITLE_DISCRIPTION ( RC_PROPERTYPANEL_START + 25 ) // + +#ifndef STD_MASKCOLOR +#define STD_MASKCOLOR Color { Red = 0xFF00; Green = 0x0000; Blue = 0xFF00; } +#endif + +//unit pixel +//panel common +#define PROPERTYPAGE_WIDTH 109 + +//about titlebar + +#define FI_EXPANSION_INDICATOR 1 +#define FT_TITLE 2 +#define STR_MOREPROPERTY_QUICKHELP 3 + +#define TITLEBAR_WIDTH PROPERTYPAGE_WIDTH +#define TITLEBAR_HEIGHT 13 + +#define TITLEBAR_MARGIN_HORIZONTAL 3 +#define TITLEBAR_CONTROL_SPACING_HORIZONTAL 3 + +#define FI_EXPANSION_INDICATOR_WIDTH 6 +#define FI_EXPANSION_INDICATOR_HEIGTH 6 +#define FI_EXPANSION_INDICATOR_X TITLEBAR_MARGIN_HORIZONTAL +#define FI_EXPANSION_INDICATOR_Y (TITLEBAR_HEIGHT - FI_EXPANSION_INDICATOR_HEIGTH)/2 + +#define FT_TITLE_WIDTH 85 +#define FT_TITLE_HEIGHT 10 +#define FT_TITLE_X FI_EXPANSION_INDICATOR_X + FI_EXPANSION_INDICATOR_WIDTH + TITLEBAR_CONTROL_SPACING_HORIZONTAL +#define FT_TITLE_Y (TITLEBAR_HEIGHT - FT_TITLE_HEIGHT)/2 + 1 + + +//about section page +#define SECTIONPAGE_MARGIN_VERTICAL 12 +#define SECTIONPAGE_MARGIN_VERTICAL_TOP 1 +#define SECTIONPAGE_MARGIN_VERTICAL_BOT 5 +#define SECTIONPAGE_MARGIN_HORIZONTAL 3 +#define CONTROL_SPACING_VERTICAL 5 +#define CONTROL_SPACING_HORIZONTAL 3 +#define TEXT_CONTROL_SPACING_VERTICAL 2 + +#define TEXT_HEIGHT 8 +#define CBOX_HEIGHT 12 +#define MBOX_HEIGHT 12 + +#define TBX_OUT_BORDER_OFFSET_X 2 +#define TBX_OUT_BORDER_OFFSET_Y 1 + +//for 16*16 pixel bmp +#define TOOLBOX_ITEM_HEIGHT 15 +#define TOOLBOX_ITEM_WIDTH 13 +#define TOOLBOX_ITEM_DD_WIDTH 19 + +//for 24*16 pixel bmp +#define TOOLBOX_24_16_ITEM_HEIGHT 15 +#define TOOLBOX_24_16_ITEM_DD_WIDTH 23 + +//for 24*24 pixel bmp +#define TOOLBOX_24_24_ITEM_HEIGHT 18 +#define TOOLBOX_24_24_ITEM_DD_WIDTH 24 + +//about popup panel +#define POPUPPANEL_MARGIN_VERTICAL 7 +#define POPUPPANEL_MARGIN_HORIZONTAL 7 + +//for 42*42 pixel bmp +#define TOOLBOX_42_42_ITEM_HEIGHT 30 +#define TOOLBOX_42_42_ITEM_DD_WIDTH 27 +#define TB_BORDER 2 + +#define POPUPPANEL_SEP_VERTICAL_1 10 +#define POPUPPANEL_SEP_VERTICAL_2 6 +#define POPUPPANEL_SEP_HEIGHT 1 + +#define POPUP_BORDER_WIDTH 2 +#define POPUP_BORDER_HEIGHT 3 +#define OFFSET_X 1 +#define OFFSET_Y 1 + +#define POPUP_TOP_GRADIENT_HEIGHT 4 +#define POPUP_BOT_GRADIENT_HEIGHT 6 + +#define POPUP_COLOR_PICKER_WIDTH 97 +#define POPUP_COLOR_PICKER_HEIGHT 114 +//new +#define POPUPPANEL_MARGIN_SMALL 2 +#define POPUPPANEL_MARGIN_LARGE 5 +#endif diff --git a/include/sfx2/sidebar/SidebarChildWindow.hxx b/include/sfx2/sidebar/SidebarChildWindow.hxx new file mode 100644 index 000000000000..23f9194dba32 --- /dev/null +++ b/include/sfx2/sidebar/SidebarChildWindow.hxx @@ -0,0 +1,48 @@ +/* + * 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 SFX_SIDEBAR_CHILD_WINDOW_HXX +#define SFX_SIDEBAR_CHILD_WINDOW_HXX + +#include "sfx2/childwin.hxx" + + +namespace sfx2 { namespace sidebar { + +/** Outer container of the sidbar window. + + Has to be registered for every application via the + RegisterChildWindow() method from the RegisterControllers() method + of the applications DLL. +*/ +class SFX2_DLLPUBLIC SidebarChildWindow + : public SfxChildWindow +{ +public: + SidebarChildWindow( + Window* pParent, + sal_uInt16 nId, + SfxBindings* pBindings, + SfxChildWinInfo* pInfo); + + SFX_DECL_CHILDWINDOW_WITHID(SidebarChildWindow); +}; + + +} } // end of namespace sfx2::sidebar + +#endif diff --git a/include/sfx2/sidebar/SidebarPanelBase.hxx b/include/sfx2/sidebar/SidebarPanelBase.hxx new file mode 100644 index 000000000000..7117505ad710 --- /dev/null +++ b/include/sfx2/sidebar/SidebarPanelBase.hxx @@ -0,0 +1,124 @@ +/* + * 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 SFX_SIDEBAR_PANEL_BASE_HXX +#define SFX_SIDEBAR_PANEL_BASE_HXX + +#include "EnumContext.hxx" + +#include <cppuhelper/compbase4.hxx> +#include <cppuhelper/basemutex.hxx> + +#include <com/sun/star/frame/XController.hpp> +#include <com/sun/star/ui/XContextChangeEventListener.hpp> +#include <com/sun/star/ui/XUIElement.hpp> +#include <com/sun/star/ui/XToolPanel.hpp> +#include <com/sun/star/ui/XSidebarPanel.hpp> + +#include <boost/noncopyable.hpp> +#include <boost/function.hpp> + + +namespace css = ::com::sun::star; +namespace cssu = ::com::sun::star::uno; + + +class Window; + +namespace sfx2 { namespace sidebar { + +namespace +{ + typedef ::cppu::WeakComponentImplHelper4 < + css::ui::XContextChangeEventListener, + css::ui::XUIElement, + css::ui::XToolPanel, + css::ui::XSidebarPanel + > SidebarPanelBaseInterfaceBase; +} + +/** Base class for sidebar panels that provides some convenience + functionality. +*/ +class SFX2_DLLPUBLIC SidebarPanelBase + : private ::boost::noncopyable, + private ::cppu::BaseMutex, + public SidebarPanelBaseInterfaceBase +{ +public: + static cssu::Reference<css::ui::XUIElement> Create ( + const ::rtl::OUString& rsResourceURL, + const cssu::Reference<css::frame::XFrame>& rxFrame, + Window* mpWindow, + const css::ui::LayoutSize& rLayoutSize); + + // XContextChangeEventListener + virtual void SAL_CALL notifyContextChangeEvent ( + const css::ui::ContextChangeEventObject& rEvent) + throw (cssu::RuntimeException); + + // XEventListener + virtual void SAL_CALL disposing ( + const css::lang::EventObject& rEvent) + throw (cssu::RuntimeException); + + // XUIElement + virtual cssu::Reference<css::frame::XFrame> SAL_CALL getFrame (void) + throw(cssu::RuntimeException); + virtual ::rtl::OUString SAL_CALL getResourceURL (void) + throw(cssu::RuntimeException); + virtual sal_Int16 SAL_CALL getType (void) + throw(cssu::RuntimeException); + virtual cssu::Reference<cssu::XInterface> SAL_CALL getRealInterface (void) + throw(cssu::RuntimeException); + + // XToolPanel + virtual cssu::Reference<css::accessibility::XAccessible> SAL_CALL createAccessible ( + const cssu::Reference<css::accessibility::XAccessible>& rxParentAccessible) + throw(cssu::RuntimeException); + virtual cssu::Reference<css::awt::XWindow> SAL_CALL getWindow (void) + throw(cssu::RuntimeException); + + // XSidebarPanel + virtual css::ui::LayoutSize SAL_CALL getHeightForWidth (sal_Int32 nWidth) + throw(cssu::RuntimeException); + +protected: + cssu::Reference<css::frame::XFrame> mxFrame; + + SidebarPanelBase ( + const ::rtl::OUString& rsResourceURL, + const cssu::Reference<css::frame::XFrame>& rxFrame, + Window* pWindow, + const css::ui::LayoutSize& rLayoutSize); + virtual ~SidebarPanelBase (void); + + virtual void SAL_CALL disposing (void) + throw (cssu::RuntimeException); + + void SetControl (::Window* pControl); + ::Window* GetControl (void) const; + +private: + Window* mpControl; + const ::rtl::OUString msResourceURL; + const css::ui::LayoutSize maLayoutSize; +}; + +} } // end of namespace sfx2::sidebar + +#endif diff --git a/include/sfx2/sidebar/Theme.hxx b/include/sfx2/sidebar/Theme.hxx new file mode 100644 index 000000000000..d34866b7b179 --- /dev/null +++ b/include/sfx2/sidebar/Theme.hxx @@ -0,0 +1,278 @@ +/* + * 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 SFX_SIDEBAR_THEME_HXX +#define SFX_SIDEBAR_THEME_HXX + +#include "sfx2/dllapi.h" + +#include <tools/color.hxx> +#include <vcl/image.hxx> +#include <cppuhelper/compbase2.hxx> +#include <cppuhelper/basemutex.hxx> +#include <tools/gen.hxx> +#include <rtl/ref.hxx> +#include <vcl/wall.hxx> + +#include <com/sun/star/beans/XPropertySet.hpp> + +#include <boost/unordered_map.hpp> +#include <map> +#include <boost/optional.hpp> + + +class SvBorder; + +namespace css = ::com::sun::star; +namespace cssu = ::com::sun::star::uno; + + +namespace sfx2 { namespace sidebar { + + +namespace +{ + typedef ::cppu::WeakComponentImplHelper2 < + css::beans::XPropertySet, + css::beans::XPropertySetInfo + > ThemeInterfaceBase; +} + +class Paint; + +/** Simple collection of colors, gradients, fonts that define the + look of the sidebar and its controls. +*/ +class SFX2_DLLPUBLIC Theme + : private ::boost::noncopyable, + private ::cppu::BaseMutex, + public ThemeInterfaceBase +{ +public: + enum ThemeItem + { + __Begin, + __Pre_Image = __Begin, + + __AnyItem = __Pre_Image, + + Image_Grip, + Image_Expand, + Image_Collapse, + Image_TabBarMenu, + Image_PanelMenu, + Image_ToolBoxItemSeparator, + Image_Closer, + + __Image_Color, + + Color_DeckTitleFont, + Color_PanelTitleFont, + Color_TabMenuSeparator, + Color_TabItemBorder, + Color_DropDownBorder, + Color_Highlight, + Color_HighlightText, + + __Color_Paint, + + Paint_DeckBackground, + Paint_DeckTitleBarBackground, + Paint_PanelBackground, + Paint_PanelTitleBarBackground, + Paint_TabBarBackground, + Paint_TabItemBackgroundNormal, + Paint_TabItemBackgroundHighlight, + Paint_HorizontalBorder, + Paint_VerticalBorder, + Paint_ToolBoxBackground, + Paint_ToolBoxBorderTopLeft, + Paint_ToolBoxBorderCenterCorners, + Paint_ToolBoxBorderBottomRight, + Paint_DropDownBackground, + + __Paint_Int, + + Int_DeckTitleBarHeight, + Int_DeckBorderSize, + Int_DeckSeparatorHeight, + Int_PanelTitleBarHeight, + Int_TabMenuPadding, + Int_TabMenuSeparatorPadding, + Int_TabItemWidth, + Int_TabItemHeight, + Int_DeckLeftPadding, + Int_DeckTopPadding, + Int_DeckRightPadding, + Int_DeckBottomPadding, + Int_TabBarLeftPadding, + Int_TabBarTopPadding, + Int_TabBarRightPadding, + Int_TabBarBottomPadding, + Int_ButtonCornerRadius, + + __Int_Bool, + + Bool_UseSymphonyIcons, + Bool_UseSystemColors, + Bool_UseToolBoxItemSeparator, + Bool_IsHighContrastModeActive, + + __Bool_Rect, + + Rect_ToolBoxPadding, + Rect_ToolBoxBorder, + + __Post_Rect, + __End=__Post_Rect + }; + + static Image GetImage (const ThemeItem eItem); + static Color GetColor (const ThemeItem eItem); + static const Paint& GetPaint (const ThemeItem eItem); + static const Wallpaper GetWallpaper (const ThemeItem eItem); + static sal_Int32 GetInteger (const ThemeItem eItem); + static bool GetBoolean (const ThemeItem eItem); + static Rectangle GetRectangle (const ThemeItem eItem); + + static bool IsHighContrastMode (void); + + static void HandleDataChange (void); + + Theme (void); + virtual ~Theme (void); + + virtual void SAL_CALL disposing (void); + + static cssu::Reference<css::beans::XPropertySet> GetPropertySet (void); + + // beans::XPropertySet + virtual cssu::Reference<css::beans::XPropertySetInfo> SAL_CALL getPropertySetInfo (void) + throw(cssu::RuntimeException); + virtual void SAL_CALL setPropertyValue ( + const ::rtl::OUString& rsPropertyName, + const cssu::Any& rValue) + throw(cssu::RuntimeException); + virtual cssu::Any SAL_CALL getPropertyValue ( + const ::rtl::OUString& rsPropertyName) + throw(css::beans::UnknownPropertyException, + css::lang::WrappedTargetException, + cssu::RuntimeException); + virtual void SAL_CALL addPropertyChangeListener( + const ::rtl::OUString& rsPropertyName, + const cssu::Reference<css::beans::XPropertyChangeListener>& rxListener) + throw(css::beans::UnknownPropertyException, + css::lang::WrappedTargetException, + cssu::RuntimeException); + virtual void SAL_CALL removePropertyChangeListener( + const ::rtl::OUString& rsPropertyName, + const cssu::Reference<css::beans::XPropertyChangeListener>& rxListener) + throw(css::beans::UnknownPropertyException, + css::lang::WrappedTargetException, + cssu::RuntimeException); + virtual void SAL_CALL addVetoableChangeListener( + const ::rtl::OUString& rsPropertyName, + const cssu::Reference<css::beans::XVetoableChangeListener>& rxListener) + throw(css::beans::UnknownPropertyException, + css::lang::WrappedTargetException, + cssu::RuntimeException); + virtual void SAL_CALL removeVetoableChangeListener( + const ::rtl::OUString& rsPropertyName, + const cssu::Reference<css::beans::XVetoableChangeListener>& rxListener) + throw(css::beans::UnknownPropertyException, + css::lang::WrappedTargetException, + cssu::RuntimeException); + + // beans::XPropertySetInfo + virtual cssu::Sequence<css::beans::Property> SAL_CALL getProperties (void) + throw(cssu::RuntimeException); + virtual css::beans::Property SAL_CALL getPropertyByName (const ::rtl::OUString& rsName) + throw(css::beans::UnknownPropertyException, + cssu::RuntimeException); + virtual sal_Bool SAL_CALL hasPropertyByName (const ::rtl::OUString& rsName) + throw(cssu::RuntimeException); + +private: + static ::rtl::Reference<Theme> mpInstance; + static Theme& GetCurrentTheme (void); + + ::std::vector<Image> maImages; + ::std::vector<Color> maColors; + ::std::vector<Paint> maPaints; + ::std::vector<sal_Int32> maIntegers; + ::std::vector<bool> maBooleans; + ::std::vector<Rectangle> maRectangles; + bool mbIsHighContrastMode; + bool mbIsHighContrastModeSetManually; + + typedef ::boost::unordered_map<rtl::OUString,ThemeItem, rtl::OUStringHash> PropertyNameToIdMap; + PropertyNameToIdMap maPropertyNameToIdMap; + typedef ::std::vector<rtl::OUString> PropertyIdToNameMap; + PropertyIdToNameMap maPropertyIdToNameMap; + typedef ::std::vector<cssu::Any> RawValueContainer; + RawValueContainer maRawValues; + + typedef ::std::vector<cssu::Reference<css::beans::XPropertyChangeListener> > ChangeListenerContainer; + typedef ::std::map<ThemeItem,ChangeListenerContainer> ChangeListeners; + ChangeListeners maChangeListeners; + typedef ::std::vector<cssu::Reference<css::beans::XVetoableChangeListener> > VetoableListenerContainer; + typedef ::std::map<ThemeItem,VetoableListenerContainer> VetoableListeners; + VetoableListeners maVetoableListeners; + + enum PropertyType + { + PT_Image, + PT_Color, + PT_Paint, + PT_Integer, + PT_Boolean, + PT_Rectangle, + PT_Invalid + }; + + void SetupPropertyMaps (void); + void InitializeTheme (void); + void UpdateTheme (void); + static PropertyType GetPropertyType (const ThemeItem eItem); + static cssu::Type GetCppuType (const PropertyType eType); + static sal_Int32 GetIndex ( + const ThemeItem eItem, + const PropertyType eType); + + VetoableListenerContainer* GetVetoableListeners ( + const ThemeItem eItem, + const bool bCreate); + ChangeListenerContainer* GetChangeListeners ( + const ThemeItem eItem, + const bool bCreate); + bool DoVetoableListenersVeto ( + const VetoableListenerContainer* pListeners, + const css::beans::PropertyChangeEvent& rEvent) const; + void BroadcastPropertyChange ( + const ChangeListenerContainer* pListeners, + const css::beans::PropertyChangeEvent& rEvent) const; + void ProcessNewValue ( + const cssu::Any& rValue, + const ThemeItem eItem, + const PropertyType eType); +}; + + + +} } // end of namespace sfx2::sidebar + +#endif diff --git a/include/sfx2/styfitem.hxx b/include/sfx2/styfitem.hxx index b728be448a49..b4c88340b935 100644 --- a/include/sfx2/styfitem.hxx +++ b/include/sfx2/styfitem.hxx @@ -68,9 +68,6 @@ class SFX2_DLLPUBLIC SfxStyleFamilies: public Resource SfxStyleFamilyList aEntryList; public: - /** ctor - <p>Will automatically call updateImages with BMP_COLOR_NORMAL.</p> - */ SfxStyleFamilies( const ResId &); SfxStyleFamilies( ) {}; ~SfxStyleFamilies(); diff --git a/include/sfx2/templdlg.hxx b/include/sfx2/templdlg.hxx index e9fb3a5e4c51..9c57455bc57d 100644 --- a/include/sfx2/templdlg.hxx +++ b/include/sfx2/templdlg.hxx @@ -21,7 +21,7 @@ #include "sal/config.h" #include "sfx2/dllapi.h" - +#include <vcl/ctrl.hxx> #include <rsc/rscsfx.hxx> #include <sfx2/dockwin.hxx> @@ -79,6 +79,30 @@ public: void SetParagraphFamily(); }; +// class SfxTemplatePanelControl ----------------------------------------- + +class SFX2_DLLPUBLIC SfxTemplatePanelControl : public DockingWindow +{ +public: + SfxTemplatePanelControl (SfxBindings* pBindings, Window* pParentWindow); + ~SfxTemplatePanelControl (void); + + virtual void Update(); + virtual void DataChanged( const DataChangedEvent& _rDCEvt ); + virtual void Resize(); + virtual SfxChildAlignment CheckAlignment( SfxChildAlignment, SfxChildAlignment ); + virtual void StateChanged( StateChangedType nStateChange ); + virtual void FreeResource (void); + + ISfxTemplateCommon* GetISfxTemplateCommon(); + void SetParagraphFamily(); + +private: + SfxTemplateDialog_Impl* pImpl; + SfxBindings* mpBindings; +}; + + #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/svx/dialcontrol.hxx b/include/svx/dialcontrol.hxx index fbb4d271679d..342a38452ee8 100644 --- a/include/svx/dialcontrol.hxx +++ b/include/svx/dialcontrol.hxx @@ -25,13 +25,43 @@ #include <sfx2/itemconnect.hxx> #include "svx/svxdllapi.h" +#include <boost/scoped_ptr.hpp> + class NumericField; namespace svx { // ============================================================================ -struct DialControl_Impl; +class DialControlBmp : public VirtualDevice +{ +public: + explicit DialControlBmp( Window& rParent ); + + void InitBitmap(const Font& rFont); + void SetSize(const Size& rSize); + void CopyBackground( const DialControlBmp& rSrc ); + void DrawBackground( const Size& rSize, bool bEnabled ); + virtual void DrawBackground(); + virtual void DrawElements( const String& rText, sal_Int32 nAngle ); + +protected: + Rectangle maRect; + bool mbEnabled; + +private: + const Color& GetBackgroundColor() const; + const Color& GetTextColor() const; + const Color& GetScaleLineColor() const; + const Color& GetButtonLineColor() const; + const Color& GetButtonFillColor( bool bMain ) const; + + void Init(); + + Window& mrParent; + long mnCenterX; + long mnCenterY; +}; /** This control allows to input a rotation angle, visualized by a dial. @@ -95,20 +125,44 @@ public: /** Compare value with the saved value */ bool IsValueModified(); -private: +protected: + struct DialControl_Impl + { + ::boost::scoped_ptr<DialControlBmp> mpBmpEnabled; + ::boost::scoped_ptr<DialControlBmp> mpBmpDisabled; + ::boost::scoped_ptr<DialControlBmp> mpBmpBuffered; + Link maModifyHdl; + NumericField* mpLinkField; + Size maWinSize; + Font maWinFont; + sal_Int32 mnAngle; + sal_Int32 mnInitialAngle; + sal_Int32 mnOldAngle; + long mnCenterX; + long mnCenterY; + bool mbNoRot; + + explicit DialControl_Impl( Window& rParent ); + void Init( const Size& rWinSize, const Font& rWinFont ); + void SetSize( const Size& rWinSize ); + }; + std::auto_ptr< DialControl_Impl > mpImpl; + + virtual void HandleMouseEvent( const Point& rPos, bool bInitial ); + virtual void HandleEscapeEvent(); + + void SetRotation( sal_Int32 nAngle, bool bBroadcast ); + void Init( const Size& rWinSize, const Font& rWinFont ); void Init( const Size& rWinSize ); + +private: void InvalidateControl(); - void ImplSetRotation( sal_Int32 nAngle, bool bBroadcast ); void ImplSetFieldLink( const Link& rLink ); - void HandleMouseEvent( const Point& rPos, bool bInitial ); - void HandleEscapeEvent(); DECL_LINK( LinkedFieldModifyHdl, NumericField* ); - - std::auto_ptr< DialControl_Impl > mpImpl; }; // ============================================================================ diff --git a/include/svx/dialogs.hrc b/include/svx/dialogs.hrc index 339cba761e34..08ff470dc2f6 100644 --- a/include/svx/dialogs.hrc +++ b/include/svx/dialogs.hrc @@ -25,8 +25,8 @@ // Resource-Id's ------------------------------------------------------------ -// Please maintain FIRSTFREE (does not apply to strings) -#define RID_SVX_FIRSTFREE 314 +// !!! IMPORTANT: consider and update FIRSTFREE when introducing new RIDs !!! (not for RIDs for Strings - they have there own) +#define RID_SVX_FIRSTFREE 332 // some strings also used in CUI #define RID_SVXERRCTX (RID_SVX_START + 351) @@ -248,7 +248,30 @@ #define RID_SVXDLG_TEXTCONTROL_PARAATTR (RID_SVX_START + 287) #define RID_SVXDLG_LINK_WARNING (RID_SVX_START + 313) -// !!! please update RID_SVX_FIRSTFREE !!! see line 46 +#define RID_SIDEBAR_TEXT_PANEL (RID_SVX_START + 314) +#define RID_POPUPPANEL_TEXTPAGE_UNDERLINE (RID_SVX_START + 315) +#define RID_POPUPPANEL_TEXTPAGE_FONT_COLOR (RID_SVX_START + 316) +#define RID_POPUPPANEL_TEXTPAGE_SPACING (RID_SVX_START + 317) + +#define RID_SIDEBAR_AREA_PANEL (RID_SVX_START + 318) +#define RID_POPUPPANEL_AERAPAGE_COLOR (RID_SVX_START + 319) +#define RID_POPUPPANEL_AREAPAGE_TRGR (RID_SVX_START + 320) + +#define RID_SIDEBAR_LINE_PANEL (RID_SVX_START + 321) +#define RID_POPUPPANEL_LINEPAGE_COLOR (RID_SVX_START + 322) +#define RID_POPUPPANEL_LINEPAGE_STYLE (RID_SVX_START + 323) +#define RID_POPUPPANEL_LINEPAGE_WIDTH (RID_SVX_START + 324) + +#define RID_SIDEBAR_POSSIZE_PANEL (RID_SVX_START + 325) +#define RID_SIDEBAR_GRAPHIC_PANEL (RID_SVX_START + 326) +#define RID_SIDEBAR_EMPTY_PANEL (RID_SVX_START + 327) + +#define RID_SIDEBAR_PARA_PANEL (RID_SVX_START + 328) +#define RID_POPUPPANEL_PARAPAGE_LINESPACING (RID_SVX_START + 329) +#define RID_POPUPPANEL_PARAPAGE_BULLETS (RID_SVX_START + 330) +#define RID_POPUPPANEL_PARAPAGE_NUMBERING (RID_SVX_START + 331) + +// !!! IMPORTANT: consider and update RID_SVX_FIRSTFREE when introducing new RIDs !!! (see above) // Strings ------------------------------------------------------------------ @@ -460,7 +483,7 @@ #define RID_SVXSTR_LINECAP_ROUND (RID_SVX_START + 587 ) #define RID_SVXSTR_LINECAP_SQUARE (RID_SVX_START + 588 ) -// string resources for XLineJoint item +// string resources for com::sun::star::drawing::LineJoint item #define RID_SVXSTR_LINEJOINT_NONE RID_SVXSTR_NONE #define RID_SVXSTR_LINEJOINT_MIDDLE (RID_SVX_START + 589 ) #define RID_SVXSTR_LINEJOINT_BEVEL (RID_SVX_START + 590 ) @@ -926,12 +949,72 @@ #define RID_SVXSTR_OUTLINENUM_DESCRIPTION_5 (RID_SVXSTR_OUTLINENUM_DESCRIPTIONS + 5)//? #define RID_SVXSTR_OUTLINENUM_DESCRIPTION_6 (RID_SVXSTR_OUTLINENUM_DESCRIPTIONS + 6)//? #define RID_SVXSTR_OUTLINENUM_DESCRIPTION_7 (RID_SVXSTR_OUTLINENUM_DESCRIPTIONS + 7)//? +#define RID_SVXSTR_SIDEBAR_BULLET_DESCRIPTIONS (RID_SVX_START + 1172) +#define RID_SVXSTR_SIDEBAR_BULLET_DESCRIPTIONS_0 (RID_SVXSTR_SIDEBAR_BULLET_DESCRIPTIONS + 0) +#define RID_SVXSTR_SIDEBAR_BULLET_DESCRIPTIONS_1 (RID_SVXSTR_SIDEBAR_BULLET_DESCRIPTIONS + 1) +#define RID_SVXSTR_SIDEBAR_BULLET_DESCRIPTIONS_2 (RID_SVXSTR_SIDEBAR_BULLET_DESCRIPTIONS + 2) +#define RID_SVXSTR_SIDEBAR_BULLET_DESCRIPTIONS_3 (RID_SVXSTR_SIDEBAR_BULLET_DESCRIPTIONS + 3) +#define RID_SVXSTR_SIDEBAR_BULLET_DESCRIPTIONS_4 (RID_SVXSTR_SIDEBAR_BULLET_DESCRIPTIONS + 4) + +#define RID_SVXSTR_TEXTCOLOR (RID_SVX_START + 1178) #define RID_SVXSTR_FINDBAR_FIND (RID_SVX_START + 1190) -#define RID_SVXSTR_NEXTFREE (RID_SVX_START + 1191) +#define RID_SVXSTR_NUMBULLET_NONE (RID_SVX_START + 1191) +#define RID_SVXSTR_NUMBULLET_CURRENT_LIST_DESCRIPTION (RID_SVX_START + 1192) +#define RID_SVXSTR_NUMBULLET_CUSTOM_BULLET_DESCRIPTION (RID_SVX_START + 1193) +#define RID_SVXSTR_NUMBULLET_CUSTOM_NUMBERING_DESCRIPTION (RID_SVX_START + 1194) +#define RID_SVXSTR_NUMBULLET_CUSTOM_MULTILEVEL_DESCRIPTION (RID_SVX_START + 1195) +#define RID_SVXSTR_NUMBULLET_CUSTOMIZED_WATERMARK (RID_SVX_START + 1196) +#define RID_SVXSTR_BULLET_RTL_DESCRIPTION_4 (RID_SVX_START + 1197) +#define RID_SVXSTR_BULLET_RTL_DESCRIPTION_5 (RID_SVX_START + 1198) +#define RID_SVXSTR_OUTLINENUM_RTL_DESCRIPTION_7 (RID_SVX_START + 1199) + +#define RID_SVXSTR_GRAPHICS_DESCRIPTIONS (RID_SVX_START + 1200) +#define RID_SVXSTR_GRAPHICS_DESCRIPTION_0 (RID_SVXSTR_GRAPHICS_DESCRIPTIONS + 0) // 1200 +#define RID_SVXSTR_GRAPHICS_DESCRIPTION_1 (RID_SVXSTR_GRAPHICS_DESCRIPTIONS + 1) // 1201 +#define RID_SVXSTR_GRAPHICS_DESCRIPTION_2 (RID_SVXSTR_GRAPHICS_DESCRIPTIONS + 2) // 1202 +#define RID_SVXSTR_GRAPHICS_DESCRIPTION_3 (RID_SVXSTR_GRAPHICS_DESCRIPTIONS + 3) // 1203 +#define RID_SVXSTR_GRAPHICS_DESCRIPTION_4 (RID_SVXSTR_GRAPHICS_DESCRIPTIONS + 4) // 1204 +#define RID_SVXSTR_GRAPHICS_DESCRIPTION_5 (RID_SVXSTR_GRAPHICS_DESCRIPTIONS + 5) // 1205 +#define RID_SVXSTR_GRAPHICS_DESCRIPTION_6 (RID_SVXSTR_GRAPHICS_DESCRIPTIONS + 6) // 1206 +#define RID_SVXSTR_GRAPHICS_DESCRIPTION_7 (RID_SVXSTR_GRAPHICS_DESCRIPTIONS + 7) // 1207 +#define RID_SVXSTR_GRAPHICS_DESCRIPTION_8 (RID_SVXSTR_GRAPHICS_DESCRIPTIONS + 8) // 1208 +#define RID_SVXSTR_GRAPHICS_DESCRIPTION_9 (RID_SVXSTR_GRAPHICS_DESCRIPTIONS + 9) // 1209 +#define RID_SVXSTR_GRAPHICS_DESCRIPTION_10 (RID_SVXSTR_GRAPHICS_DESCRIPTIONS + 10) // 1210 +#define RID_SVXSTR_GRAPHICS_DESCRIPTION_11 (RID_SVXSTR_GRAPHICS_DESCRIPTIONS + 11) // 1211 +#define RID_SVXSTR_GRAPHICS_DESCRIPTION_12 (RID_SVXSTR_GRAPHICS_DESCRIPTIONS + 12) // 1212 +#define RID_SVXSTR_GRAPHICS_DESCRIPTION_13 (RID_SVXSTR_GRAPHICS_DESCRIPTIONS + 13) // 1213 +#define RID_SVXSTR_GRAPHICS_DESCRIPTION_14 (RID_SVXSTR_GRAPHICS_DESCRIPTIONS + 14) // 1214 +#define RID_SVXSTR_GRAPHICS_DESCRIPTION_15 (RID_SVXSTR_GRAPHICS_DESCRIPTIONS + 15) // 1215 +#define RID_SVXSTR_GRAPHICS_DESCRIPTION_16 (RID_SVXSTR_GRAPHICS_DESCRIPTIONS + 16) // 1216 +#define RID_SVXSTR_GRAPHICS_DESCRIPTION_17 (RID_SVXSTR_GRAPHICS_DESCRIPTIONS + 17) // 1217 +#define RID_SVXSTR_GRAPHICS_DESCRIPTION_18 (RID_SVXSTR_GRAPHICS_DESCRIPTIONS + 18) // 1218 +#define RID_SVXSTR_GRAPHICS_DESCRIPTION_19 (RID_SVXSTR_GRAPHICS_DESCRIPTIONS + 19) // 1219 +#define RID_SVXSTR_GRAPHICS_DESCRIPTION_20 (RID_SVXSTR_GRAPHICS_DESCRIPTIONS + 20) // 1220 +#define RID_SVXSTR_GRAPHICS_DESCRIPTION_21 (RID_SVXSTR_GRAPHICS_DESCRIPTIONS + 21) // 1221 +#define RID_SVXSTR_GRAPHICS_DESCRIPTION_22 (RID_SVXSTR_GRAPHICS_DESCRIPTIONS + 22) // 1222 +#define RID_SVXSTR_GRAPHICS_DESCRIPTION_23 (RID_SVXSTR_GRAPHICS_DESCRIPTIONS + 23) // 1223 +#define RID_SVXSTR_GRAPHICS_DESCRIPTION_24 (RID_SVXSTR_GRAPHICS_DESCRIPTIONS + 24) // 1224 +#define RID_SVXSTR_GRAPHICS_DESCRIPTION_25 (RID_SVXSTR_GRAPHICS_DESCRIPTIONS + 25) // 1225 +#define RID_SVXSTR_GRAPHICS_DESCRIPTION_26 (RID_SVXSTR_GRAPHICS_DESCRIPTIONS + 26) // 1226 +#define RID_SVXSTR_GRAPHICS_DESCRIPTION_27 (RID_SVXSTR_GRAPHICS_DESCRIPTIONS + 27) // 1227 +#define RID_SVXSTR_GRAPHICS_DESCRIPTION_28 (RID_SVXSTR_GRAPHICS_DESCRIPTIONS + 28) // 1228 +#define RID_SVXSTR_GRAPHICS_DESCRIPTION_29 (RID_SVXSTR_GRAPHICS_DESCRIPTIONS + 29) // 1229 + +// ooo-build specific resources + +#define SVX_OOO_BUILD_START (RID_SVX_START + 1230) +#define RID_SVXBMP_DOC_MODIFIED_YES (SVX_OOO_BUILD_START + 1) // 1231 +#define RID_SVXBMP_DOC_MODIFIED_NO (SVX_OOO_BUILD_START + 2) // 1232 +#define RID_SVXBMP_DOC_MODIFIED_FEEDBACK (SVX_OOO_BUILD_START + 3) // 1233 +#define RID_SVXSTR_DOC_MODIFIED_YES (SVX_OOO_BUILD_START + 4) // 1234 +#define RID_SVXSTR_DOC_MODIFIED_NO (SVX_OOO_BUILD_START + 5) // 1235 +#define RID_SVXSTR_DOC_LOAD (SVX_OOO_BUILD_START + 6) // 1236 + +// !!! IMPORTANT: consider and update RID_SVXSTR_NEXTFREE when introducing new RIDs for Strings !!! +#define RID_SVXSTR_NEXTFREE (RID_SVX_START + 1237) -#define RID_SVXSTR_TEXTCOLOR (RID_SVX_START + 1178) // ---------------------------------------------------------------------------- // if we have _a_lot_ time, we should group the resource ids by type, instead // of grouping them by semantics. The reason is that resource ids have to be @@ -1011,18 +1094,6 @@ #define SID_SC_TP_FORMULA (RID_OFA_START + 259) #define SID_SC_TP_COMPATIBILITY (RID_OFA_START + 260) -// ---------------------------------------------------------------------------- -// ooo-build specific resources - -#define SVX_OOO_BUILD_START (RID_SVX_START + 1200) - -#define RID_SVXBMP_DOC_MODIFIED_YES (SVX_OOO_BUILD_START + 1) -#define RID_SVXBMP_DOC_MODIFIED_NO (SVX_OOO_BUILD_START + 2) -#define RID_SVXBMP_DOC_MODIFIED_FEEDBACK (SVX_OOO_BUILD_START + 3) -#define RID_SVXSTR_DOC_MODIFIED_YES (SVX_OOO_BUILD_START + 4) -#define RID_SVXSTR_DOC_MODIFIED_NO (SVX_OOO_BUILD_START + 5) -#define RID_SVXSTR_DOC_LOAD (SVX_OOO_BUILD_START + 6) - #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/svx/dlgctrl.hxx b/include/svx/dlgctrl.hxx index 7297bd559bb5..d24c38f8f354 100644 --- a/include/svx/dlgctrl.hxx +++ b/include/svx/dlgctrl.hxx @@ -258,8 +258,9 @@ public: virtual void Fill(const XBitmapListRef &pList); virtual void UserDraw(const UserDrawEvent& rUDEvt); - void Append(XBitmapEntry* pEntry, BitmapEx* pBmpEx = NULL); - void Modify(XBitmapEntry* pEntry, sal_uInt16 nPos, BitmapEx* pBmpEx = NULL); + void Append(const Size& rSize, const XBitmapEntry& rEntry, BitmapEx* pBmpEx = 0); + void Modify(const Size& rSize, const XBitmapEntry& rEntry, sal_uInt16 nPos, BitmapEx* pBmpEx = 0); + void SelectEntryByList(const XBitmapList* pList, const String& rStr); private: VirtualDevice maVD; @@ -268,7 +269,7 @@ private: XBitmapListRef mpList; bool mbUserDraw; - SVX_DLLPRIVATE void SetVirtualDevice(); + SVX_DLLPRIVATE void SetVirtualDevice(const Size& rSize); }; /************************************************************************/ @@ -279,7 +280,7 @@ private: VirtualDevice maVD; BitmapEx maBitmapEx; - void SetVirtualDevice(); + void SetVirtualDevice(const Size& rSize); public: FillAttrLB( Window* pParent, WinBits aWB ); @@ -313,9 +314,8 @@ public: virtual void Fill( const XDashListRef &pList ); - void Append( XDashEntry* pEntry, Bitmap* pBmp = NULL ); - void Modify( XDashEntry* pEntry, sal_uInt16 nPos, Bitmap* pBmp = NULL ); - void FillStyles(); + void Append( XDashEntry* pEntry, const Bitmap* pBmp = NULL ); + void Modify( XDashEntry* pEntry, sal_uInt16 nPos, const Bitmap* pBmp = NULL ); }; /************************************************************************/ @@ -324,14 +324,15 @@ class SVX_DLLPUBLIC LineEndLB : public ListBox { public: - LineEndLB( Window* pParent, ResId Id ) : ListBox( pParent, Id ) {} - LineEndLB( Window* pParent, WinBits aWB ) : ListBox( pParent, aWB ) {} + LineEndLB( Window* pParent, ResId Id ); + LineEndLB( Window* pParent, WinBits aWB ); + virtual ~LineEndLB (void); virtual void Fill( const XLineEndListRef &pList, sal_Bool bStart = sal_True ); - void Append( XLineEndEntry* pEntry, Bitmap* pBmp = NULL, + void Append( XLineEndEntry* pEntry, const Bitmap* pBmp = NULL, sal_Bool bStart = sal_True ); - void Modify( XLineEndEntry* pEntry, sal_uInt16 nPos, Bitmap* pBmp = NULL, + void Modify( XLineEndEntry* pEntry, sal_uInt16 nPos, const Bitmap* pBmp = NULL, sal_Bool bStart = sal_True ); }; diff --git a/include/svx/dlgutil.hxx b/include/svx/dlgutil.hxx index 238a90dd121a..859d4c764c79 100644 --- a/include/svx/dlgutil.hxx +++ b/include/svx/dlgutil.hxx @@ -30,6 +30,7 @@ class SfxItemSet; SVX_DLLPUBLIC FieldUnit GetModuleFieldUnit( const SfxItemSet& ); +SVX_DLLPUBLIC FieldUnit GetModuleFieldUnit(); SVX_DLLPUBLIC bool GetApplyCharUnit( const SfxItemSet& ); static const int OUTPUT_DRAWMODE_COLOR = (DRAWMODE_DEFAULT); diff --git a/include/svx/galbrws.hxx b/include/svx/galbrws.hxx index 0269643c658b..3eebaf685f75 100644 --- a/include/svx/galbrws.hxx +++ b/include/svx/galbrws.hxx @@ -43,7 +43,7 @@ class GalleryBrowser2; class GallerySplitter; class Gallery; -class GalleryBrowser : public SfxDockingWindow +class SVX_DLLPUBLIC GalleryBrowser : public SfxDockingWindow { friend class GalleryBrowser1; friend class GalleryBrowser2; @@ -51,16 +51,16 @@ class GalleryBrowser : public SfxDockingWindow using Window::KeyInput; private: - Size maLastSize; GallerySplitter* mpSplitter; GalleryBrowser1* mpBrowser1; GalleryBrowser2* mpBrowser2; Gallery* mpGallery; + /// bitfield void InitSettings(); - virtual sal_Bool Close(); + virtual sal_Bool Close(); virtual void Resize(); virtual void GetFocus(); diff --git a/include/svx/svdedtv.hxx b/include/svx/svdedtv.hxx index 39e75ad18738..78340c74569c 100644 --- a/include/svx/svdedtv.hxx +++ b/include/svx/svdedtv.hxx @@ -235,6 +235,7 @@ public: void SetMarkedObjRect(const Rectangle& rRect, sal_Bool bCopy=sal_False); void MoveMarkedObj(const Size& rSiz, bool bCopy=false); void ResizeMarkedObj(const Point& rRef, const Fraction& xFact, const Fraction& yFact, bool bCopy=false); + void ResizeMultMarkedObj(const Point& rRef, const Fraction& xFact, const Fraction& yFact, const bool bCopy, const bool bWdh, const bool bHgt); long GetMarkedObjRotate() const; void RotateMarkedObj(const Point& rRef, long nWink, bool bCopy=false); void MirrorMarkedObj(const Point& rRef1, const Point& rRef2, bool bCopy=false); diff --git a/include/svx/svdedxv.hxx b/include/svx/svdedxv.hxx index 13cf6f05b5ef..f1ec6296b3f2 100644 --- a/include/svx/svdedxv.hxx +++ b/include/svx/svdedxv.hxx @@ -242,6 +242,9 @@ public: virtual void AddWindowToPaintView(OutputDevice* pNewWin); virtual void DeleteWindowFromPaintView(OutputDevice* pOldWin); + sal_uInt16 GetSelectionLevel() const; + + //************************************************************************ // Object-MacroModus (z.B. Rect als Button oder sowas): //************************************************************************ diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx index 5d4f76d0b804..d3047b897e2f 100644 --- a/include/svx/svdobj.hxx +++ b/include/svx/svdobj.hxx @@ -37,6 +37,7 @@ #include <svx/sdrobjectuser.hxx> #include "svx/svxdllapi.h" #include "svx/shapeproperty.hxx" +#include <svl/poolitem.hxx> #include <boost/optional.hpp> #include <boost/ptr_container/ptr_vector.hpp> @@ -800,6 +801,9 @@ protected: void SetObjectItemSet(const SfxItemSet& rSet); const SfxPoolItem& GetObjectItem(const sal_uInt16 nWhich) const; + // get SfxMapUnit the object is using + SfxMapUnit GetObjectMapUnit() const; + public: // syntactical sugar for ItemSet accesses void SetMergedItemSetAndBroadcast(const SfxItemSet& rSet, bool bClearAllItems = false); diff --git a/include/svx/svdogrp.hxx b/include/svx/svdogrp.hxx index 57842579b54e..d12f3809ae86 100644 --- a/include/svx/svdogrp.hxx +++ b/include/svx/svdogrp.hxx @@ -43,9 +43,6 @@ protected: virtual sdr::properties::BaseProperties* CreateObjectSpecificProperties(); SdrObjList* pSub; // Subliste (Kinder) - long nDrehWink; - long nShearWink; - Point aRefPoint; // Referenzpunkt innerhalb der Objektgruppe bool bRefPoint; // Ist ein RefPoint gesetzt? diff --git a/include/svx/svdstr.hrc b/include/svx/svdstr.hrc index a78d88dfdb2d..d7b19fe56c04 100644 --- a/include/svx/svdstr.hrc +++ b/include/svx/svdstr.hrc @@ -714,5 +714,6 @@ #define STR_TABLE_STYLE (SIP_Begin + 274) #define STR_TABLE_STYLE_SETTINGS (SIP_Begin + 275) #define SIP_SA_CROP_MARKERS (SIP_Begin + 276) +#define IMG_DIALCONTROL (SIP_Begin + 277) /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/svx/svxids.hrc b/include/svx/svxids.hrc index 9971dcc2eb2d..0820a3e1c9c5 100644 --- a/include/svx/svxids.hrc +++ b/include/svx/svxids.hrc @@ -239,6 +239,8 @@ #define FN_NUM_BULLET_OFF (FN_EDIT + 37) /* Numerierung aus */ #define FN_NUM_BULLET_ON (FN_EDIT + 38) /* Numerierung mit Bullets an */ #define FN_NUM_NUMBERING_ON (FN_EDIT + 44) /* Numerierung an */ +#define FN_BUL_NUM_RULE_INDEX (FN_EDIT + 120) /* Achieving num rule index */ +#define FN_NUM_NUM_RULE_INDEX (FN_EDIT + 121) #define FN_INSERT (SID_SW_START + 300) #define FN_DELETE_BOOKMARK (FN_INSERT + 1) @@ -476,6 +478,9 @@ #define SID_TWAIN_TRANSFER ( SID_SVX_START + 332 ) #define SID_CONTOUR_DLG ( SID_SVX_START + 334 ) #define SID_CONTOUR_EXEC ( SID_SVX_START + 335 ) + +//#define SID_SIDEBAR ( SID_SVX_START + 336 ) -> sfxsids.hrc + #define SID_BORDER_OBJECT ( SID_SVX_START + 340 ) #define SID_SB_CONNECTIONPOOLING ( SID_SVX_START + 348 ) #define SID_SB_DBREGISTEROPTIONS ( SID_SVX_START + 349 ) @@ -922,18 +927,37 @@ #define SID_INSERT_FORM_HSCROLL (SID_SVX_START+1112) #define SID_EXTERNAL_EDIT (SID_SVX_START+1113) #define SID_ATTR_PAGE_SHARED_FIRST (SID_SVX_START+1114) +#define SID_CHANGE_PICTURE (SID_SVX_START+1115) #define SID_SAVE_GRAPHIC (SID_SVX_START+1116) #define SID_COMPRESS_GRAPHIC (SID_SVX_START+1117) #define SID_FRAME_UP (SID_SVX_START+1118) #define SID_FRAME_DOWN (SID_SVX_START+1119) #define SID_ATTR_SPECIALCHAR (SID_SVX_START+1120) -#define SID_CHANGE_PICTURE (SID_SVX_START+1125) -#define SID_ROTATE_GRAPHIC_LEFT (SID_SVX_START+1126) -#define SID_ROTATE_GRAPHIC_RIGHT (SID_SVX_START+1127) -#define SID_MENU_MANAGE_GRAPHIC (SID_SVX_START+1128) +#define SID_ROTATE_GRAPHIC_LEFT (SID_SVX_START+1121) +#define SID_ROTATE_GRAPHIC_RIGHT (SID_SVX_START+1122) +#define SID_MENU_MANAGE_GRAPHIC (SID_SVX_START+1123) + +// new slots for panels +#define SID_ATTR_FILL_TRANSPARENCE (SID_SVX_START+1124) +#define SID_ATTR_FILL_FLOATTRANSPARENCE (SID_SVX_START+1125) +#define SID_ATTR_LINE_TRANSPARENCE (SID_SVX_START+1126) +#define SID_FLIP_HORIZONTAL (SID_SVX_START+1127) +#define SID_FLIP_VERTICAL (SID_SVX_START+1128) +#define SID_ATTR_LINE_JOINT (SID_SVX_START+1129) +#define SID_ATTR_LINE_CAP (SID_SVX_START+1130) +#define SID_ATTR_TRANSFORM_MATRIX (SID_SVX_START+1131) + +#define SID_CELL_FORMAT_BORDER (SID_SVX_START+1132) +#define SID_CHAR_DLG_EFFECT (SID_SVX_START+1133) +#define SID_ATTR_PARA_LEFT (SID_SVX_START+1134) +#define SID_ATTR_PARA_RIGHT (SID_SVX_START+1135) + +#define FN_SVX_SET_NUMBER (SID_SVX_START+1136) +#define FN_SVX_SET_BULLET (SID_SVX_START+1137) + // IMPORTANT NOTE: adjust SID_SVX_FIRSTFREE, when adding new slot id -#define SID_SVX_FIRSTFREE (SID_MENU_MANAGE_GRAPHIC + 1) +#define SID_SVX_FIRSTFREE (FN_SVX_SET_BULLET + 1) // -------------------------------------------------------------------------- // Overflow check for slot IDs diff --git a/include/svx/xenum.hxx b/include/svx/xenum.hxx index df0b629d5980..38f414c03fc8 100644 --- a/include/svx/xenum.hxx +++ b/include/svx/xenum.hxx @@ -21,14 +21,6 @@ #define _XENUM_HXX enum XLineStyle { XLINE_NONE, XLINE_SOLID, XLINE_DASH }; -enum XLineJoint -{ - XLINEJOINT_NONE, // no rounding - XLINEJOINT_MIDDLE, // calc middle value between joints - XLINEJOINT_BEVEL, // join edges with line - XLINEJOINT_MITER, // extend till cut - XLINEJOINT_ROUND // create arc -}; enum XDashStyle { XDASH_RECT, XDASH_ROUND, XDASH_RECTRELATIVE, XDASH_ROUNDRELATIVE }; enum XFillStyle { XFILL_NONE, XFILL_SOLID, XFILL_GRADIENT, XFILL_HATCH, diff --git a/include/svx/xlinjoit.hxx b/include/svx/xlinjoit.hxx index 321656d9ed72..40030551e3c9 100644 --- a/include/svx/xlinjoit.hxx +++ b/include/svx/xlinjoit.hxx @@ -23,16 +23,17 @@ #include <svl/eitem.hxx> #include <svx/xenum.hxx> #include "svx/svxdllapi.h" +#include <com/sun/star/drawing/LineJoint.hpp> //--------------------- -// class LineStyleItem +// class XLineJointItem //--------------------- class SVX_DLLPUBLIC XLineJointItem : public SfxEnumItem { public: TYPEINFO(); - XLineJointItem( XLineJoint eLineJoint = XLINEJOINT_ROUND ); + XLineJointItem( com::sun::star::drawing::LineJoint eLineJoint = com::sun::star::drawing::LineJoint_ROUND ); XLineJointItem( SvStream& rIn ); virtual sal_uInt16 GetVersion( sal_uInt16 nFileFormatVersion ) const; @@ -45,8 +46,8 @@ public: SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, OUString &rText, const IntlWrapper * = 0 ) const; - virtual sal_uInt16 GetValueCount() const; - XLineJoint GetValue() const { return (XLineJoint) SfxEnumItem::GetValue(); } + virtual sal_uInt16 GetValueCount() const; + com::sun::star::drawing::LineJoint GetValue() const { return (com::sun::star::drawing::LineJoint) SfxEnumItem::GetValue(); } }; #endif // _SVX_XLINJOIT_HXX diff --git a/include/svx/xlncapit.hxx b/include/svx/xlncapit.hxx index 620a7adfc4b3..16b011b53104 100644 --- a/include/svx/xlncapit.hxx +++ b/include/svx/xlncapit.hxx @@ -26,7 +26,7 @@ #include <com/sun/star/drawing/LineCap.hpp> //--------------------- -// class LineStyleItem +// class XLineCapItem //--------------------- class SVX_DLLPUBLIC XLineCapItem : public SfxEnumItem diff --git a/include/svx/xtable.hxx b/include/svx/xtable.hxx index 93ad230ea75f..32c4619dd2c2 100644 --- a/include/svx/xtable.hxx +++ b/include/svx/xtable.hxx @@ -33,21 +33,18 @@ #include <cppuhelper/weak.hxx> -#include "svx/svxdllapi.h" +#include <svx/svxdllapi.h> #include <com/sun/star/embed/XStorage.hpp> #include <basegfx/polygon/b2dpolypolygon.hxx> #include <com/sun/star/container/XNameContainer.hpp> #include <svtools/grfmgr.hxx> +#include <svx/XPropertyEntry.hxx> class Color; class Bitmap; class VirtualDevice; class XOutdevItemPool; -// Breite und Hoehe der LB-Bitmaps -#define BITMAP_WIDTH 32 -#define BITMAP_HEIGHT 12 - // Standard-Vergleichsstring extern sal_Unicode pszStandard[]; // "standard" @@ -55,24 +52,6 @@ extern sal_Unicode pszStandard[]; // "standard" // enum COL_NAME nicht verglichen werden kann. SVX_DLLPUBLIC Color RGB_Color( ColorData nColorName ); -// --------------------- -// class XPropertyEntry -// --------------------- - -class XPropertyEntry -{ -protected: - String aName; - - XPropertyEntry(const String& rName) : aName(rName) {} - XPropertyEntry(const XPropertyEntry& rOther): aName(rOther.aName) {} -public: - - virtual ~XPropertyEntry() {} - void SetName(const String& rName) { aName = rName; } - String& GetName() { return aName; } -}; - // ------------------ // class XColorEntry // ------------------ @@ -230,26 +209,25 @@ protected: typedef ::std::vector< XPropertyEntry* > XPropertyEntryList_impl; typedef ::std::vector< Bitmap* > BitmapList_impl; - XPropertyListType eType; - String aName; // not persistent - String aPath; - XOutdevItemPool* pXPool; + XPropertyListType meType; + String maName; // not persistent + String maPath; + XOutdevItemPool* mpXPool; - XPropertyEntryList_impl aList; - BitmapList_impl* pBmpList; + XPropertyEntryList_impl maList; - bool bListDirty; - bool bBitmapsDirty; - bool bOwnPool; - bool bEmbedInDocument; + bool mbListDirty; + bool mbEmbedInDocument; XPropertyList( XPropertyListType t, const String& rPath, XOutdevItemPool* pXPool = NULL ); + virtual Bitmap CreateBitmapForUI( long nIndex ) = 0; + public: virtual ~XPropertyList(); - XPropertyListType Type() const { return eType; } + XPropertyListType Type() const { return meType; } long Count() const; void Insert( XPropertyEntry* pEntry, long nIndex = CONTAINER_APPEND ); @@ -259,22 +237,21 @@ public: // Note: Get(long) & Get( String& ) are ambiguous XPropertyEntry* Get( long nIndex, sal_uInt16 nDummy ) const; long Get(const String& rName); + Bitmap GetUiBitmap( long nIndex ) const; - Bitmap* GetBitmap( long nIndex ) const; - - const String& GetName() const { return aName; } + const String& GetName() const { return maName; } void SetName( const String& rString ); - const String& GetPath() const { return aPath; } - void SetPath( const String& rString ) { aPath = rString; } - sal_Bool IsDirty() const { return bListDirty && bBitmapsDirty; } - void SetDirty( sal_Bool bDirty = sal_True ) - { bListDirty = bDirty; bBitmapsDirty = bDirty; } - bool IsEmbedInDocument() const { return bEmbedInDocument; } - void SetEmbedInDocument(bool b) { bEmbedInDocument = b; } + const String& GetPath() const { return maPath; } + void SetPath( const String& rString ) { maPath = rString; } + bool IsDirty() const { return mbListDirty; } + void SetDirty( bool bDirty = sal_True ) + { mbListDirty = bDirty; } + bool IsEmbedInDocument() const { return mbEmbedInDocument; } + void SetEmbedInDocument(bool b) { mbEmbedInDocument = b; } static OUString GetDefaultExt(XPropertyListType t); static OUString GetDefaultExtFilter(XPropertyListType t); - OUString GetDefaultExt() const { return GetDefaultExt( eType ); } + OUString GetDefaultExt() const { return GetDefaultExt( meType ); } virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > createInstance() = 0; @@ -288,8 +265,6 @@ public: const OUString &rURL, OUString *pOptName ); virtual sal_Bool Create() = 0; - virtual sal_Bool CreateBitmapsForUI() = 0; - virtual Bitmap* CreateBitmapForUI( long nIndex, sal_Bool bDelete = sal_True ) = 0; // Factory method for sub-classes static XPropertyListRef CreatePropertyList( XPropertyListType t, @@ -307,6 +282,10 @@ public: inline XBitmapListRef AsBitmapList(); inline XLineEndListRef AsLineEndList(); inline XGradientListRef AsGradientList(); + + sal_uInt32 getUiBitmapWidth() const; + sal_uInt32 getUiBitmapHeight() const; + sal_uInt32 getUiBitmapLineWidth() const; }; // ------------------ @@ -315,6 +294,9 @@ public: class SVX_DLLPUBLIC XColorList : public XPropertyList { +protected: + virtual Bitmap CreateBitmapForUI( long nIndex ); + public: explicit XColorList( const String& rPath, XOutdevItemPool* pXInPool = NULL ) : @@ -329,8 +311,6 @@ public: XColorEntry* GetColor(long nIndex) const; virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > createInstance(); virtual sal_Bool Create(); - virtual sal_Bool CreateBitmapsForUI(); - virtual Bitmap* CreateBitmapForUI( long nIndex, sal_Bool bDelete = sal_True ); static XColorListRef CreateStdColorList(); static XColorListRef GetStdColorList(); // returns a singleton @@ -349,6 +329,9 @@ private: void impCreate(); void impDestroy(); +protected: + virtual Bitmap CreateBitmapForUI(long nIndex); + public: explicit XLineEndList( const String& rPath, @@ -363,8 +346,6 @@ public: virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > createInstance(); virtual sal_Bool Create(); - virtual sal_Bool CreateBitmapsForUI(); - virtual Bitmap* CreateBitmapForUI(long nIndex, sal_Bool bDelete = sal_True); }; // ------------------- @@ -376,10 +357,17 @@ class SVX_DLLPUBLIC XDashList : public XPropertyList { private: impXDashList* mpData; + Bitmap maBitmapSolidLine; + String maStringSolidLine; + String maStringNoLine; void impCreate(); void impDestroy(); +protected: + Bitmap ImpCreateBitmapForXDash(const XDash* pDash); + virtual Bitmap CreateBitmapForUI(long nIndex); + public: explicit XDashList( const String& rPath, @@ -396,8 +384,16 @@ public: virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > createInstance(); virtual sal_Bool Create(); - virtual sal_Bool CreateBitmapsForUI(); - virtual Bitmap* CreateBitmapForUI(long nIndex, sal_Bool bDelete = sal_True); + + // Special call to get a bitmap for the solid line representation. It + // creates a bitmap fitting in size and style to the ones you get by + // using GetUiBitmap for existing entries. + Bitmap GetBitmapForUISolidLine() const; + + // Special calls to get the translated strings for the UI entry for no + // line style (XLINE_NONE) and solid line style (XLINE_SOLID) for dialogs + String GetStringForUiSolidLine() const; + String GetStringForUiNoLine() const; }; // ------------------- @@ -413,6 +409,9 @@ private: void impCreate(); void impDestroy(); +protected: + virtual Bitmap CreateBitmapForUI(long nIndex); + public: explicit XHatchList( const String& rPath, XOutdevItemPool* pXPool = 0 ); @@ -427,8 +426,6 @@ public: virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > createInstance(); virtual sal_Bool Create(); - virtual sal_Bool CreateBitmapsForUI(); - virtual Bitmap* CreateBitmapForUI(long nIndex, sal_Bool bDelete = sal_True); }; // ------------------- @@ -444,6 +441,9 @@ private: void impCreate(); void impDestroy(); +protected: + virtual Bitmap CreateBitmapForUI(long nIndex); + public: explicit XGradientList( const String& rPath, @@ -460,8 +460,6 @@ public: virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > createInstance(); virtual sal_Bool Create(); - virtual sal_Bool CreateBitmapsForUI(); - virtual Bitmap* CreateBitmapForUI(long nIndex, sal_Bool bDelete = sal_True); }; // ------------------- @@ -470,6 +468,9 @@ public: class SVX_DLLPUBLIC XBitmapList : public XPropertyList { +protected: + virtual Bitmap CreateBitmapForUI( long nIndex ); + public: explicit XBitmapList( const String& rPath, XOutdevItemPool* pXInPool = NULL ) @@ -483,8 +484,6 @@ public: virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > createInstance(); virtual sal_Bool Create(); - virtual sal_Bool CreateBitmapsForUI(); - virtual Bitmap* CreateBitmapForUI( long nIndex, sal_Bool bDelete = sal_True ); }; diff --git a/include/vcl/button.hxx b/include/vcl/button.hxx index e57ea3cbed26..3d330ba17f98 100644 --- a/include/vcl/button.hxx +++ b/include/vcl/button.hxx @@ -446,13 +446,11 @@ protected: using Window::ImplInit; SAL_DLLPRIVATE void ImplInit( Window* pParent, WinBits nStyle ); SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId ); - SAL_DLLPRIVATE virtual void FillLayoutData() const; - SAL_DLLPRIVATE virtual const Font& - GetCanonicalFont( const StyleSettings& _rStyle ) const; - SAL_DLLPRIVATE virtual const Color& - GetCanonicalTextColor( const StyleSettings& _rStyle ) const; + virtual void FillLayoutData() const; + virtual const Font& GetCanonicalFont( const StyleSettings& _rStyle ) const; + virtual const Color& GetCanonicalTextColor( const StyleSettings& _rStyle ) const; - SAL_DLLPRIVATE virtual void ImplDrawCheckBoxState(); + virtual void ImplDrawCheckBoxState(); SAL_DLLPRIVATE const Rectangle& GetStateRect() const { return maStateRect; } SAL_DLLPRIVATE const Rectangle& GetMouseRect() const { return maMouseRect; } diff --git a/include/vcl/split.hxx b/include/vcl/split.hxx index 937ef7d2ab38..a279fd24181f 100644 --- a/include/vcl/split.hxx +++ b/include/vcl/split.hxx @@ -56,6 +56,7 @@ private: SAL_DLLPRIVATE sal_Bool ImplSplitterActive(); SAL_DLLPRIVATE Splitter* ImplFindSibling(); SAL_DLLPRIVATE void ImplRestoreSplitter(); + SAL_DLLPRIVATE void ImplInitHorVer(bool bNew); // Copy assignment is forbidden and not implemented. SAL_DLLPRIVATE Splitter (const Splitter &); @@ -97,7 +98,8 @@ public: virtual void SetSplitPosPixel( long nPos ); long GetSplitPosPixel() const { return mnSplitPos; } - sal_Bool IsHorizontal() const { return mbHorzSplit; } + sal_Bool IsHorizontal() const { return mbHorzSplit; } + void SetHorizontal(bool bNew); // set the stepsize of the splitter for cursor movement // the default is 10% of the reference window's width/height diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx index d1c783bc0e69..381b3e61fda5 100644 --- a/include/vcl/window.hxx +++ b/include/vcl/window.hxx @@ -1273,6 +1273,14 @@ public: virtual OUString GetSurroundingText() const; virtual Selection GetSurroundingTextSelection() const; + + void EnableThemeSupport (void); + void DisableThemeSupport (void); + + virtual ImplBorderWindow* CreateBorderWindow ( + Window* pParent, + const WinBits nStyle, + const sal_uInt16 nTypeStyle); }; |