chart2/source/view/main/GL3DRenderer.cxx | 6 include/svx/dialogs.hrc | 9 include/svx/sdr/contact/objectcontactofobjlistpainter.hxx | 165 +- include/svx/sdr/contact/viewcontactofe3d.hxx | 117 - include/svx/sdr/contact/viewcontactofe3dscene.hxx | 131 - include/svx/sdr/contact/viewcontactofpageobj.hxx | 53 include/svx/sdr/contact/viewcontactofsdrmediaobj.hxx | 65 include/svx/sdr/contact/viewcontactofsdrrectobj.hxx | 41 include/svx/sdr/contact/viewcontactoftextobj.hxx | 33 include/svx/sdr/contact/viewcontactofvirtobj.hxx | 52 include/svx/sdr/contact/viewobjectcontactofpageobj.hxx | 45 include/svx/sdr/contact/viewobjectcontactredirector.hxx | 49 include/svx/sidebar/ValueSetWithTextControl.hxx | 55 officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu | 22 officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu | 4 sd/source/ui/func/fuolbull.cxx | 2 sd/source/ui/view/drviewsf.cxx | 2 svx/Library_svx.mk | 5 svx/sdi/svx.sdi | 16 svx/source/dialog/svxbmpnumvalueset.cxx | 1 svx/source/sdr/contact/objectcontactofobjlistpainter.cxx | 281 +--- svx/source/sdr/contact/viewcontactofe3d.cxx | 270 +-- svx/source/sdr/contact/viewcontactofe3dscene.cxx | 699 ++++------ svx/source/sdr/contact/viewcontactofpageobj.cxx | 83 - svx/source/sdr/contact/viewcontactofsdrmediaobj.cxx | 90 - svx/source/sdr/contact/viewcontactofsdrrectobj.cxx | 109 - svx/source/sdr/contact/viewcontactoftextobj.cxx | 25 svx/source/sdr/contact/viewcontactofvirtobj.cxx | 141 -- svx/source/sdr/contact/viewobjectcontactofpageobj.cxx | 544 +++---- svx/source/sdr/contact/viewobjectcontactredirector.cxx | 34 svx/source/sidebar/paragraph/ParaBulletsControl.cxx | 131 - svx/source/sidebar/paragraph/ParaBulletsControl.hxx | 58 svx/source/sidebar/paragraph/ParaBulletsPopup.cxx | 61 svx/source/sidebar/paragraph/ParaBulletsPopup.hxx | 51 svx/source/sidebar/paragraph/ParaNumberingControl.cxx | 147 -- svx/source/sidebar/paragraph/ParaNumberingControl.hxx | 63 svx/source/sidebar/paragraph/ParaNumberingPopup.cxx | 62 svx/source/sidebar/paragraph/ParaNumberingPopup.hxx | 52 svx/source/sidebar/paragraph/ParaPropertyPanel.cxx | 167 -- svx/source/sidebar/paragraph/ParaPropertyPanel.hrc | 106 - svx/source/sidebar/paragraph/ParaPropertyPanel.hxx | 38 svx/source/sidebar/paragraph/ParaPropertyPanel.src | 249 --- svx/source/sidebar/tools/ValueSetWithTextControl.cxx | 304 ---- svx/source/tbxctrls/bulletsnumbering.cxx | 236 +++ svx/source/tbxctrls/tbcontrl.src | 10 svx/uiconfig/ui/sidebarparagraph.ui | 6 svx/util/svx.component | 4 sw/source/uibase/shells/textsh1.cxx | 2 sw/source/uibase/shells/txtnum.cxx | 2 xmloff/source/style/xmlnumi.cxx | 1 50 files changed, 1717 insertions(+), 3182 deletions(-)
New commits: commit 393ef5c8800835fdefb81bc0062ab30cd1bba140 Author: Julien Nabet <[email protected]> Date: Sun Nov 9 08:57:30 2014 +0100 Resolves fdo#86040 Renaming 'Gallery' to 'Clip Art Gallery' Change-Id: I78108d596d0fb12641e4c7fd2c80b1120839e549 diff --git a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu index 0b3cf4d..b66ab22 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu @@ -43,7 +43,7 @@ <node oor:name="GalleryDeck" oor:op="replace"> <prop oor:name="Title" oor:type="xs:string"> - <value xml:lang="en-US">Gallery</value> + <value xml:lang="en-US">Clip Art Gallery</value> </prop> <prop oor:name="Id" oor:type="xs:string"> <value>GalleryDeck</value> @@ -373,7 +373,7 @@ <node oor:name="GalleryPanel" oor:op="replace"> <prop oor:name="Title" oor:type="xs:string"> - <value xml:lang="en-US">Gallery</value> + <value xml:lang="en-US">Clip Art Gallery</value> </prop> <prop oor:name="TitleBarIsOptional" oor:type="xs:boolean"> <value>true</value> commit 8ce87efec53d72f675330b0512e61ad5077674a8 Author: Markus Mohrhard <[email protected]> Date: Sat Nov 1 23:56:07 2014 +0100 OpenGL ES does not support double and glPolygonMode Change-Id: I623babba561dc0a126c6884a70a33ad4a78ef63f Reviewed-on: https://gerrit.libreoffice.org/12187 Reviewed-by: Markus Mohrhard <[email protected]> Tested-by: Markus Mohrhard <[email protected]> diff --git a/chart2/source/view/main/GL3DRenderer.cxx b/chart2/source/view/main/GL3DRenderer.cxx index 6b0004f..8277d08 100755 --- a/chart2/source/view/main/GL3DRenderer.cxx +++ b/chart2/source/view/main/GL3DRenderer.cxx @@ -356,7 +356,9 @@ void OpenGL3DRenderer::init() CHECK_GL_ERROR(); glCullFace(GL_BACK); CHECK_GL_ERROR(); +#if !defined(ANDROID) && !defined(IOS) glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); +#endif // Enable depth test CHECK_GL_ERROR(); glEnable(GL_DEPTH_TEST); @@ -2158,7 +2160,11 @@ void OpenGL3DRenderer::ClearBuffer() glDisable(GL_DEPTH_TEST); CHECK_GL_ERROR(); +#if defined(IOS) || defined(ANDROID) + glClearDepthf(1.0f); +#else glClearDepth(1.0f); +#endif CHECK_GL_ERROR(); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); CHECK_GL_ERROR(); commit 5ee376a42fcd5a38cb6952e69b5d770e3a59d2e8 Author: Maxim Monastirsky <[email protected]> Date: Sun Nov 9 08:04:20 2014 +0200 Try to make MSVC happy Change-Id: I064c58608914f3f179695bf6ec5f7e311162a2fa diff --git a/svx/source/tbxctrls/bulletsnumbering.cxx b/svx/source/tbxctrls/bulletsnumbering.cxx index 3b72ad9..3f848c2 100644 --- a/svx/source/tbxctrls/bulletsnumbering.cxx +++ b/svx/source/tbxctrls/bulletsnumbering.cxx @@ -59,8 +59,8 @@ public: virtual vcl::Window* createPopupWindow( vcl::Window* pParent ) SAL_OVERRIDE; // XStatusListener - virtual void statusChanged( const css::frame::FeatureStateEvent& rEvent ) - throw ( css::uno::RuntimeException ) SAL_OVERRIDE; + virtual void SAL_CALL statusChanged( const css::frame::FeatureStateEvent& rEvent ) + throw ( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE; // XInitialization virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) @@ -184,8 +184,8 @@ vcl::Window* NumberingToolBoxControl::createPopupWindow( vcl::Window* pParent ) return new NumberingPopup( *this, m_xFrame, pParent, mbBulletItem ); } -void NumberingToolBoxControl::statusChanged( const css::frame::FeatureStateEvent& rEvent ) - throw ( css::uno::RuntimeException ) +void SAL_CALL NumberingToolBoxControl::statusChanged( const css::frame::FeatureStateEvent& rEvent ) + throw ( css::uno::RuntimeException, std::exception ) { ToolBox* pToolBox = 0; sal_uInt16 nId = 0; commit fb4619e78ec7400c3d29a651fd8589f2e404a13f Author: Maxim Monastirsky <[email protected]> Date: Sun Nov 9 00:56:15 2014 +0200 More cleanup Change-Id: I1f900029cb6a0fb389617c153dd187cf63ed2c7b diff --git a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx index 404a04e..2867a5c 100644 --- a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx +++ b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx @@ -17,8 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ #include "ParaPropertyPanel.hxx" -#include "ParaPropertyPanel.hrc" - +#include <svx/dialogs.hrc> #include <sfx2/sidebar/ResourceDefinitions.hrc> #include <sfx2/sidebar/Tools.hxx> #include <sfx2/dispatch.hxx> @@ -191,10 +190,6 @@ void ParaPropertyPanel::HandleContextChange ( } } - - - - void ParaPropertyPanel::DataChanged (const DataChangedEvent& rEvent) { (void)rEvent; @@ -512,9 +507,6 @@ void ParaPropertyPanel::NotifyItemUpdate( } } - - - void ParaPropertyPanel::StateChangedIndentImpl( sal_uInt16 /*nSID*/, SfxItemState eState, const SfxPoolItem* pState ) { switch (maContext.GetCombinedContext_DI()) @@ -766,7 +758,6 @@ void ParaPropertyPanel::StateChangeIncDecImpl( sal_uInt16 nSID, SfxItemState eSt } } - FieldUnit ParaPropertyPanel::GetCurrentUnit( SfxItemState eState, const SfxPoolItem* pState ) { FieldUnit eUnit = FUNIT_NONE; diff --git a/svx/source/sidebar/paragraph/ParaPropertyPanel.hrc b/svx/source/sidebar/paragraph/ParaPropertyPanel.hrc deleted file mode 100644 index 35f59f9..0000000 --- a/svx/source/sidebar/paragraph/ParaPropertyPanel.hrc +++ /dev/null @@ -1,60 +0,0 @@ -/* -*- 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 . - */ - -#include "svx/dialogs.hrc" - -//============================== line space popup page ============================== - -#define LB_LINE_SPACING 1 -#define ED_SBINDE_LINEDISTPERCENT 2 -#define ED_SBINDE_LINEDISTPOINT 3 - -//============================== Help ID ============================== - -#define HID_POPUP_LS_LB_LINE_SPACING "HID_POPUP_LS_LB_LINE_SPACING" -#define HID_POPUP_LS_ED_SBINDE_LINEDISTPERCENT "HID_POPUP_LS_ED_SBINDE_LINEDISTPERCENT" -#define HID_POPUP_LS_ED_SBINDE_LINEDISTPOINT "HID_POPUP_LS_ED_SBINDE_LINEDISTPOINT" - -//============================== Property ============================== -#define _FIXED_TEXT_HEIGHT 9 -#define _FIXED_TEXT_WIDTH 40 -#define CONTROL_HEIGHT 15 -#define LISTBOX_HEIGHT 80 -#define VS_SPACING_WIDTH 78 - -//==============================Line Spacing popup page======================= - -#define POPUP_PAGE_HEIGHT POP_BORDER_Y + BD_HEIGHT + POPUPPANEL_MARGIN_NB + OFFSET_Y -#define POP_FT_CUSTOM_X POPUPPANEL_MARGIN_NB + OFFSET_X -#define POP_FT_CUSTOM_Y POPUPPANEL_MARGIN_SMALL * 2 + 17 * 5 -#define POP_BORDER_X POPUPPANEL_MARGIN_NB + OFFSET_X + 1 -#define POP_BORDER_Y POPUPPANEL_MARGIN_SMALL * 3 + 17 * 5 + TEXT_HEIGHT -#define BD_WIDTH VS_SPACING_WIDTH - 6 -#define BD_HEIGHT TEXT_HEIGHT*2 + CONTROL_HEIGHT*2 + CONTROL_SPACING_VERTICAL*3 + TEXT_CONTROL_SPACING_VERTICAL*2 - 4 - -#define FT_1_X POP_BORDER_X + POPUPPANEL_MARGIN_LARGE -#define FT_1_Y POP_BORDER_Y + CONTROL_SPACING_VERTICAL -#define EDIT_1_X FT_1_X -#define EDIT_1_Y FT_1_Y + TEXT_HEIGHT + TEXT_CONTROL_SPACING_VERTICAL -#define FT_2_X FT_1_X -#define FT_2_Y EDIT_1_Y + CONTROL_HEIGHT + CONTROL_SPACING_VERTICAL - 3 -#define EDIT_2_X FT_1_X -#define EDIT_2_Y FT_2_Y + TEXT_HEIGHT + TEXT_CONTROL_SPACING_VERTICAL - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sidebar/paragraph/ParaPropertyPanel.hxx b/svx/source/sidebar/paragraph/ParaPropertyPanel.hxx index ac5a70a..6017b9d 100644 --- a/svx/source/sidebar/paragraph/ParaPropertyPanel.hxx +++ b/svx/source/sidebar/paragraph/ParaPropertyPanel.hxx @@ -117,7 +117,6 @@ private: SfxBindings* mpBindings; css::uno::Reference<css::ui::XSidebar> mxSidebar; - ParaPropertyPanel ( vcl::Window* pParent, const css::uno::Reference<css::frame::XFrame>& rxFrame, @@ -139,9 +138,6 @@ private: void initial(); void ReSize(bool bSize); - - DECL_LINK(ClickLineSPDropDownHdl_Impl, ToolBox*); - void InitToolBoxIndent(); void InitToolBoxSpacing(); }; diff --git a/svx/source/sidebar/paragraph/ParaPropertyPanel.src b/svx/source/sidebar/paragraph/ParaPropertyPanel.src index 93cf18c..324a166 100644 --- a/svx/source/sidebar/paragraph/ParaPropertyPanel.src +++ b/svx/source/sidebar/paragraph/ParaPropertyPanel.src @@ -16,11 +16,9 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include "ParaPropertyPanel.hrc" #include <sfx2/sidebar/ResourceDefinitions.hrc> #include "helpid.hrc" - -#define MASKCOLOR MaskColor = Color { Red = 0xFFFF ; Green = 0x0000 ; Blue = 0xFFFF ; }; +#include <svx/dialogs.hrc> Image IMG_SPACE3 { commit 853e9c00a359b93c546e2e8a5fcee9e8aebf49b8 Author: Maxim Monastirsky <[email protected]> Date: Sun Nov 9 00:38:08 2014 +0200 fdo#85804 Use the new popups in the sidebar too Change-Id: Ib4767eeef1dc6c404bb36068f806c42ccc1086b6 diff --git a/include/svx/dialogs.hrc b/include/svx/dialogs.hrc index b8755e6..067298f 100644 --- a/include/svx/dialogs.hrc +++ b/include/svx/dialogs.hrc @@ -26,7 +26,7 @@ // Resource-Id's ------------------------------------------------------------ // !!! IMPORTANT: consider and update FIRSTFREE when introducing new RIDs !!! (not for RIDs for Strings - they have there own) -#define RID_SVX_FIRSTFREE 333 +#define RID_SVX_FIRSTFREE 330 // some strings also used in CUI #define RID_SVXERRCTX (RID_SVX_START + 351) @@ -216,10 +216,7 @@ #define RID_SIDEBAR_EMPTY_PANEL (RID_SVX_START + 327) #define RID_SIDEBAR_PARA_PANEL (RID_SVX_START + 328) -#define RID_POPUPPANEL_PARAPAGE_BULLETS (RID_SVX_START + 329) -#define RID_POPUPPANEL_PARAPAGE_NUMBERING (RID_SVX_START + 330) - -#define RID_SIDEBAR_INSERT_PANEL (RID_SVX_START + 331) +#define RID_SIDEBAR_INSERT_PANEL (RID_SVX_START + 329) // !!! IMPORTANT: consider and update RID_SVX_FIRSTFREE when introducing new RIDs !!! (see above) diff --git a/include/svx/sidebar/ValueSetWithTextControl.hxx b/include/svx/sidebar/ValueSetWithTextControl.hxx index 4cb6fbd..33054ea 100644 --- a/include/svx/sidebar/ValueSetWithTextControl.hxx +++ b/include/svx/sidebar/ValueSetWithTextControl.hxx @@ -23,26 +23,10 @@ #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>. @@ -114,45 +98,6 @@ private: 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( vcl::Window* pParent, const ResId& rResId); - virtual ~SvxNumValueSet2(); - - virtual void UserDraw( const UserDrawEvent& rUDEvt ) SAL_OVERRIDE; - - - 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( vcl::Window* pParent, const ResId& rResId); - virtual ~SvxNumValueSet3(); - - virtual void UserDraw( const UserDrawEvent& rUDEvt ) SAL_OVERRIDE; - -}; - } } // end of namespace svx::sidebar #endif diff --git a/svx/Library_svx.mk b/svx/Library_svx.mk index b037c26..d21f5cf 100644 --- a/svx/Library_svx.mk +++ b/svx/Library_svx.mk @@ -183,10 +183,6 @@ $(eval $(call gb_Library_add_exception_objects,svx,\ svx/source/sidebar/text/TextUnderlineControl \ svx/source/sidebar/text/TextUnderlinePopup \ svx/source/sidebar/text/TextPropertyPanel \ - svx/source/sidebar/paragraph/ParaNumberingControl \ - svx/source/sidebar/paragraph/ParaNumberingPopup \ - svx/source/sidebar/paragraph/ParaBulletsControl \ - svx/source/sidebar/paragraph/ParaBulletsPopup \ svx/source/sidebar/paragraph/ParaLineSpacingControl \ svx/source/sidebar/paragraph/ParaLineSpacingPopup \ svx/source/sidebar/paragraph/ParaPropertyPanel \ diff --git a/svx/source/sidebar/paragraph/ParaBulletsControl.cxx b/svx/source/sidebar/paragraph/ParaBulletsControl.cxx deleted file mode 100644 index b4407b8..0000000 --- a/svx/source/sidebar/paragraph/ParaBulletsControl.cxx +++ /dev/null @@ -1,131 +0,0 @@ -/* -*- 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 . - */ -#include "ParaBulletsControl.hxx" -#include "ParaPropertyPanel.hrc" -#include <sfx2/sidebar/ResourceDefinitions.hrc> -#include <svx/dialogs.hrc> -#include <svx/dialmgr.hxx> -#include <unotools/viewoptions.hxx> -#include <editeng/kernitem.hxx> -#include <sfx2/bindings.hxx> -#include <sfx2/dispatch.hxx> -#include <sfx2/sidebar/Theme.hxx> -#include <svtools/unitconv.hxx> -#include <svx/nbdtmg.hxx> -#include <svx/nbdtmgfact.hxx> -#include <vcl/settings.hxx> - -namespace svx { namespace sidebar { - -ParaBulletsControl::ParaBulletsControl( - vcl::Window* pParent, - svx::sidebar::ParaPropertyPanel& rPanel ) - : PopupControl( pParent,SVX_RES(RID_POPUPPANEL_PARAPAGE_BULLETS) ) - , maBulletsVS( this,SVX_RES(VS_VALUES) ) - , maMoreButton( this,SVX_RES(CB_BULLET_MORE) ) - , mrParaPropertyPanel( rPanel ) - , mpBindings( mrParaPropertyPanel.GetBindings() ) -{ - FreeResource(); - - maBulletsVS.SetColCount(3); - maBulletsVS.SetLineCount(3); - maBulletsVS.SetStyle( maBulletsVS.GetStyle() | WB_ITEMBORDER |WB_NO_DIRECTSELECT); - maBulletsVS.SetExtraSpacing(BULLET_IMAGE_SPACING); - maBulletsVS.SetItemWidth(BULLET_IMAGE_WIDTH); - maBulletsVS.SetItemHeight(BULLET_IMAGE_HEIGHT); - maBulletsVS.InsertItem( DEFAULT_NONE ); - for( sal_uInt16 nVSIdx = 1; nVSIdx <= DEFAULT_BULLET_TYPES; ++nVSIdx ) - { - maBulletsVS.InsertItem( nVSIdx ); - } - - maBulletsVS.SetItemText( DEFAULT_NONE, SVX_RESSTR( RID_SVXSTR_NUMBULLET_NONE )); - NBOTypeMgrBase* pBullets = NBOutlineTypeMgrFact::CreateInstance(eNBOType::MIXBULLETS); - if ( pBullets ) - { - for( sal_uInt16 nIndex = 0; nIndex < DEFAULT_BULLET_TYPES; ++nIndex ) - { - maBulletsVS.SetItemText( nIndex + 1, pBullets->GetDescription(nIndex) ); - } - } - - maBulletsVS.Show(); - maBulletsVS.SetSelectHdl(LINK(this, ParaBulletsControl, BulletSelectHdl_Impl)); - - maBulletsVS.SetColor( GetSettings().GetStyleSettings().GetHighContrastMode() - ? GetSettings().GetStyleSettings().GetMenuColor() - : sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground ) ); - maBulletsVS.SetBackground( GetSettings().GetStyleSettings().GetHighContrastMode() - ? GetSettings().GetStyleSettings().GetMenuColor() - : sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground ) ); - - maMoreButton.SetClickHdl(LINK(this, ParaBulletsControl, MoreButtonClickHdl_Impl)); - -} - - -ParaBulletsControl::~ParaBulletsControl() -{ -} - - -void ParaBulletsControl::UpdateValueSet() -{ - maBulletsVS.StateChanged(StateChangedType::STYLE); - maBulletsVS.StateChanged(StateChangedType::INITSHOW); - - const sal_uInt16 nTypeIndex = mrParaPropertyPanel.GetBulletTypeIndex(); - if ( nTypeIndex != (sal_uInt16)0xFFFF ) - maBulletsVS.SelectItem( nTypeIndex ); - else - { - maBulletsVS.SelectItem(0); - } - maMoreButton.GrabFocus(); -} - - -IMPL_LINK(ParaBulletsControl, BulletSelectHdl_Impl, ValueSet*, EMPTYARG) -{ - const sal_uInt16 nIdx = maBulletsVS.GetSelectItemId(); - SfxUInt16Item aItem( FN_SVX_SET_BULLET, nIdx ); - if (mpBindings) - mpBindings->GetDispatcher()->Execute( FN_SVX_SET_BULLET, SfxCallMode::RECORD, &aItem, 0L ); - - mrParaPropertyPanel.EndBulletsPopupMode(); - - return 0; -} - - -IMPL_LINK(ParaBulletsControl, MoreButtonClickHdl_Impl, void*, EMPTYARG) -{ - if (mpBindings) - mpBindings->GetDispatcher()->Execute( SID_OUTLINE_BULLET, SfxCallMode::ASYNCHRON ); - - mrParaPropertyPanel.EndBulletsPopupMode(); - - return 0; -} - -}} // end of namespace sidebar - - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sidebar/paragraph/ParaBulletsControl.hxx b/svx/source/sidebar/paragraph/ParaBulletsControl.hxx deleted file mode 100644 index d54f987..0000000 --- a/svx/source/sidebar/paragraph/ParaBulletsControl.hxx +++ /dev/null @@ -1,58 +0,0 @@ -/* -*- 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 INCLUDED_SVX_SOURCE_SIDEBAR_PARAGRAPH_PARABULLETSCONTROL_HXX -#define INCLUDED_SVX_SOURCE_SIDEBAR_PARAGRAPH_PARABULLETSCONTROL_HXX - -#include "svx/sidebar/PopupControl.hxx" -#include "svx/sidebar/ValueSetWithTextControl.hxx" -#include <sfx2/bindings.hxx> -#include <svtools/ctrlbox.hxx> -#include <svtools/ctrltool.hxx> -#include "ParaPropertyPanel.hxx" -#include <vcl/fixed.hxx> -#include <svl/poolitem.hxx> -#include <editeng/lspcitem.hxx> -#include <sfx2/sidebar/EnumContext.hxx> -#include <vcl/button.hxx> - - -namespace svx { namespace sidebar { - -class ParaBulletsControl:public svx::sidebar::PopupControl -{ -private: - SvxNumValueSet3 maBulletsVS; - PushButton maMoreButton; - ParaPropertyPanel& mrParaPropertyPanel; - SfxBindings* mpBindings; - - DECL_LINK(BulletSelectHdl_Impl, ValueSet*); - DECL_LINK(MoreButtonClickHdl_Impl, void*); - -public: - ParaBulletsControl(vcl::Window* pParent, svx::sidebar::ParaPropertyPanel& rPanel); - virtual ~ParaBulletsControl(); - void UpdateValueSet(); -}; - -}} - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sidebar/paragraph/ParaBulletsPopup.cxx b/svx/source/sidebar/paragraph/ParaBulletsPopup.cxx deleted file mode 100644 index 5c76973..0000000 --- a/svx/source/sidebar/paragraph/ParaBulletsPopup.cxx +++ /dev/null @@ -1,61 +0,0 @@ -/* -*- 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 . - */ -#include "ParaBulletsPopup.hxx" -#include "ParaBulletsControl.hxx" -#include <boost/bind.hpp> -#include <unotools/viewoptions.hxx> - -namespace svx { namespace sidebar { - -ParaBulletsPopup::ParaBulletsPopup ( - vcl::Window* pParent, - const ::boost::function<PopupControl*(PopupContainer*)>& rControlCreator) - : Popup( - pParent, - rControlCreator, - OUString( "Paragraph Bullets")) -{ -} - - - - -ParaBulletsPopup::~ParaBulletsPopup (void) -{ -} - - - - -void ParaBulletsPopup::UpdateValueSet () -{ - ProvideContainerAndControl(); - - ParaBulletsControl* pControl = dynamic_cast<ParaBulletsControl*>(mpControl.get()); - if (pControl != NULL) - pControl->UpdateValueSet(); -} - - - -} } // end of namespace svx::sidebar - - - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sidebar/paragraph/ParaBulletsPopup.hxx b/svx/source/sidebar/paragraph/ParaBulletsPopup.hxx deleted file mode 100644 index 2b80cb0..0000000 --- a/svx/source/sidebar/paragraph/ParaBulletsPopup.hxx +++ /dev/null @@ -1,51 +0,0 @@ -/* -*- 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 INCLUDED_SVX_SOURCE_SIDEBAR_PARAGRAPH_PARABULLETSPOPUP_HXX -#define INCLUDED_SVX_SOURCE_SIDEBAR_PARAGRAPH_PARABULLETSPOPUP_HXX - -#include "svx/sidebar/Popup.hxx" - -#include <boost/function.hpp> -#include <svl/poolitem.hxx> -#include <tools/fldunit.hxx> -#include <sfx2/sidebar/EnumContext.hxx> - -namespace svx { namespace sidebar { - -class ParaBulletsPopup - : public Popup -{ -public : - ParaBulletsPopup ( - vcl::Window* pParent, - const ::boost::function<PopupControl*(PopupContainer*)>& rControlCreator); - virtual ~ParaBulletsPopup (void); - - void UpdateValueSet (); -//private: - //void PopupModeEndCallback (void); -}; - -} } // end of namespace svx::sidebar - -#endif - - - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sidebar/paragraph/ParaNumberingControl.cxx b/svx/source/sidebar/paragraph/ParaNumberingControl.cxx deleted file mode 100644 index 119b717..0000000 --- a/svx/source/sidebar/paragraph/ParaNumberingControl.cxx +++ /dev/null @@ -1,147 +0,0 @@ -/* -*- 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 . - */ -#include "ParaNumberingControl.hxx" -#include "ParaPropertyPanel.hrc" -#include <sfx2/sidebar/ResourceDefinitions.hrc> -#include <svx/dialogs.hrc> -#include <svx/dialmgr.hxx> -#include <unotools/viewoptions.hxx> -#include <editeng/kernitem.hxx> -#include <sfx2/bindings.hxx> -#include <sfx2/dispatch.hxx> -#include <sfx2/sidebar/Theme.hxx> -#include <svtools/unitconv.hxx> -#include <com/sun/star/lang/XMultiServiceFactory.hpp> -#include <com/sun/star/text/DefaultNumberingProvider.hpp> -#include <com/sun/star/text/XNumberingFormatter.hpp> -#include <com/sun/star/beans/PropertyValue.hpp> -#include <comphelper/processfactory.hxx> -#include <svx/nbdtmg.hxx> -#include <svx/nbdtmgfact.hxx> -#include <editeng/unolingu.hxx> -#include <vcl/settings.hxx> - -using namespace com::sun::star; -using namespace com::sun::star::uno; -using namespace com::sun::star::beans; -using namespace com::sun::star::lang; -using namespace com::sun::star::text; - -namespace svx { namespace sidebar { - -Reference<XDefaultNumberingProvider> lcl_GetNumberingProvider() -{ - return DefaultNumberingProvider::create( comphelper::getProcessComponentContext() ); -} - -ParaNumberingControl::ParaNumberingControl( - vcl::Window* pParent, - svx::sidebar::ParaPropertyPanel& rPanel ) - : PopupControl( pParent,SVX_RES(RID_POPUPPANEL_PARAPAGE_NUMBERING) ) - , maNumberVS( this,SVX_RES(VS_NUMBERING) ) - , maMoreButton( this,SVX_RES(CB_NUMBERING_MORE) ) - , mrParaPropertyPanel( rPanel ) - , mpBindings( mrParaPropertyPanel.GetBindings() ) -{ - FreeResource(); - - maNumberVS.SetStyle( maNumberVS.GetStyle() | WB_NO_DIRECTSELECT ); - maNumberVS.SetExtraSpacing( NUM_IMAGE_SPACING ); - maNumberVS.SetItemWidth(NUM_IMAGE_WIDTH); - maNumberVS.SetItemHeight(NUM_IMAGE_HEIGHT); - - Reference<XDefaultNumberingProvider> xDefNum = lcl_GetNumberingProvider(); - if(xDefNum.is()) - { - Sequence< Sequence< PropertyValue > > aNumberings; - Locale aLocale = GetSettings().GetLanguageTag().getLocale(); - try - { - aNumberings = xDefNum->getDefaultContinuousNumberingLevels( aLocale ); - } - catch(Exception&) - { - } - Reference<XNumberingFormatter> xFormat(xDefNum, UNO_QUERY); - maNumberVS.SetNumberingSettings(aNumberings, xFormat, aLocale); - } - - maNumberVS.Show(); - maNumberVS.SetSelectHdl( LINK(this, ParaNumberingControl, NumSelectHdl_Impl) ); - - maNumberVS.SetColor( GetSettings().GetStyleSettings().GetHighContrastMode() - ? GetSettings().GetStyleSettings().GetMenuColor() - : sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground ) ); - maNumberVS.SetBackground( GetSettings().GetStyleSettings().GetHighContrastMode() - ? GetSettings().GetStyleSettings().GetMenuColor() - : sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground ) ); - - maMoreButton.SetClickHdl(LINK(this, ParaNumberingControl, MoreButtonClickHdl_Impl)); -} - - -ParaNumberingControl::~ParaNumberingControl() -{ -} - - -IMPL_LINK(ParaNumberingControl, NumSelectHdl_Impl, ValueSet*, EMPTYARG) -{ - const sal_uInt16 nIdx = maNumberVS.GetSelectItemId(); - SfxUInt16Item aItem( FN_SVX_SET_NUMBER, nIdx ); - if (mpBindings) - mpBindings->GetDispatcher()->Execute( FN_SVX_SET_NUMBER, SfxCallMode::RECORD, &aItem, 0L ); - - mrParaPropertyPanel.EndNumberingPopupMode(); - - return 0; -} - - -IMPL_LINK(ParaNumberingControl, MoreButtonClickHdl_Impl, void*, EMPTYARG) -{ - if (mpBindings) - mpBindings->GetDispatcher()->Execute( SID_OUTLINE_BULLET, SfxCallMode::ASYNCHRON ); - - mrParaPropertyPanel.EndNumberingPopupMode(); - - return 0; -} - - -void ParaNumberingControl::UpdateValueSet() -{ - maNumberVS.StateChanged(StateChangedType::STYLE); - maNumberVS.StateChanged(StateChangedType::INITSHOW); - - const sal_uInt16 nTypeIndex = mrParaPropertyPanel.GetNumTypeIndex(); - if ( nTypeIndex != (sal_uInt16)0xFFFF ) - maNumberVS.SelectItem( nTypeIndex ); - else - { - maNumberVS.SelectItem(0); - } - maMoreButton.GrabFocus(); -} - -}} // end of namespace sidebar - - - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sidebar/paragraph/ParaNumberingControl.hxx b/svx/source/sidebar/paragraph/ParaNumberingControl.hxx deleted file mode 100644 index 3bbeae8..0000000 --- a/svx/source/sidebar/paragraph/ParaNumberingControl.hxx +++ /dev/null @@ -1,63 +0,0 @@ -/* -*- 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 INCLUDED_SVX_SOURCE_SIDEBAR_PARAGRAPH_PARANUMBERINGCONTROL_HXX -#define INCLUDED_SVX_SOURCE_SIDEBAR_PARAGRAPH_PARANUMBERINGCONTROL_HXX - - -#include "svx/sidebar/PopupControl.hxx" -#include "svx/sidebar/ValueSetWithTextControl.hxx" -#include <sfx2/bindings.hxx> -#include <svtools/ctrlbox.hxx> -#include <svtools/ctrltool.hxx> -#include "ParaPropertyPanel.hxx" -#include <vcl/fixed.hxx> -#include <svl/poolitem.hxx> -#include <editeng/lspcitem.hxx> -#include <sfx2/sidebar/EnumContext.hxx> -#include <vcl/button.hxx> - - -namespace svx { namespace sidebar { - - -class ParaNumberingControl:public svx::sidebar::PopupControl -{ -private: - SvxNumValueSet2 maNumberVS; - PushButton maMoreButton; - ParaPropertyPanel& mrParaPropertyPanel; - SfxBindings* mpBindings; - - DECL_LINK(NumSelectHdl_Impl, ValueSet*); - DECL_LINK(MoreButtonClickHdl_Impl, void*); - -public: - ParaNumberingControl( vcl::Window* pParent, - svx::sidebar::ParaPropertyPanel& rPanel); - virtual ~ParaNumberingControl(); - void UpdateValueSet(); - -}; - - -}} - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sidebar/paragraph/ParaNumberingPopup.cxx b/svx/source/sidebar/paragraph/ParaNumberingPopup.cxx deleted file mode 100644 index 287141e..0000000 --- a/svx/source/sidebar/paragraph/ParaNumberingPopup.cxx +++ /dev/null @@ -1,62 +0,0 @@ -/* -*- 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 . - */ -#include "ParaNumberingPopup.hxx" -#include "ParaNumberingControl.hxx" -#include <boost/bind.hpp> -#include <unotools/viewoptions.hxx> - -namespace svx { namespace sidebar { - -ParaNumberingPopup::ParaNumberingPopup ( - vcl::Window* pParent, - const ::boost::function<PopupControl*(PopupContainer*)>& rControlCreator) - : Popup( - pParent, - rControlCreator, - OUString( "Paragraph Numbering")) -{ -} - - - - -ParaNumberingPopup::~ParaNumberingPopup (void) -{ -} - - - - -void ParaNumberingPopup::UpdateValueSet () -{ - ProvideContainerAndControl(); - - ParaNumberingControl* pControl = dynamic_cast<ParaNumberingControl*>(mpControl.get()); - if (pControl != NULL) - pControl->UpdateValueSet(); -} - - - -} } // end of namespace svx::sidebar - - - - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sidebar/paragraph/ParaNumberingPopup.hxx b/svx/source/sidebar/paragraph/ParaNumberingPopup.hxx deleted file mode 100644 index 862b584..0000000 --- a/svx/source/sidebar/paragraph/ParaNumberingPopup.hxx +++ /dev/null @@ -1,52 +0,0 @@ -/* -*- 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 INCLUDED_SVX_SOURCE_SIDEBAR_PARAGRAPH_PARANUMBERINGPOPUP_HXX -#define INCLUDED_SVX_SOURCE_SIDEBAR_PARAGRAPH_PARANUMBERINGPOPUP_HXX - -#include "svx/sidebar/Popup.hxx" - -#include <boost/function.hpp> -#include <svl/poolitem.hxx> -#include <tools/fldunit.hxx> -#include <sfx2/sidebar/EnumContext.hxx> - -namespace svx { namespace sidebar { - -class ParaNumberingPopup - : public Popup -{ -public : - ParaNumberingPopup ( - vcl::Window* pParent, - const ::boost::function<PopupControl*(PopupContainer*)>& rControlCreator); - virtual ~ParaNumberingPopup (void); - - void UpdateValueSet (); -//private: - //void PopupModeEndCallback (void); -}; - -} } // end of namespace svx::sidebar - -#endif - - - - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx index b118185..404a04e 100644 --- a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx +++ b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx @@ -19,13 +19,8 @@ #include "ParaPropertyPanel.hxx" #include "ParaPropertyPanel.hrc" -#include "ParaBulletsPopup.hxx" -#include "ParaBulletsControl.hxx" -#include "ParaNumberingPopup.hxx" -#include "ParaNumberingControl.hxx" #include <sfx2/sidebar/ResourceDefinitions.hrc> #include <sfx2/sidebar/Tools.hxx> -#include <svx/sidebar/PopupContainer.hxx> #include <sfx2/dispatch.hxx> #include <editeng/lrspitem.hxx> #include <editeng/ulspitem.hxx> @@ -42,9 +37,6 @@ using namespace css; using namespace css::uno; -const char UNO_DEFAULTBULLET[] = ".uno:DefaultBullet"; -const char UNO_DEFAULTNUMBERING[] = ".uno:DefaultNumbering"; - const char UNO_INCREMENTINDENT[] = ".uno:IncrementIndent"; const char UNO_DECREMENTINDENT[] = ".uno:DecrementIndent"; const char UNO_HANGINGINDENT[] = ".uno:HangingIndent"; @@ -219,19 +211,6 @@ void ParaPropertyPanel::ReSize(bool /* bSize */) mxSidebar->requestLayout(); } -void ParaPropertyPanel::EndBulletsPopupMode (void) -{ - //i122054, Missed following line, for collapse the bullets popup - maBulletsPopup.Hide(); -} - -void ParaPropertyPanel::EndNumberingPopupMode (void) -{ - //i122054, Missed following line, for collapse the numbering popup - maNumberingPopup.Hide(); -} - - void ParaPropertyPanel::InitToolBoxIndent() { Link aLink = LINK( this, ParaPropertyPanel, ModifyIndentHdl_Impl ); @@ -265,17 +244,6 @@ void ParaPropertyPanel::InitToolBoxIndent() m_eLRSpaceUnit = maLRSpaceControl.GetCoreMetric(); } -void ParaPropertyPanel::InitToolBoxBulletsNumbering() -{ - const sal_uInt16 nIdBullet = mpTBxNumBullet->GetItemId(UNO_DEFAULTBULLET); - const sal_uInt16 nIdNumber = mpTBxNumBullet->GetItemId(UNO_DEFAULTNUMBERING); - - mpTBxNumBullet->SetItemImage(nIdBullet, maBulletOnOff.GetIcon()); - mpTBxNumBullet->SetItemImage(nIdNumber, maNumberOnOff.GetIcon()); - - mpTBxNumBullet->SetDropdownClickHdl(LINK(this,ParaPropertyPanel,NumBTbxDDHandler)); - mpTBxNumBullet->SetSelectHdl(LINK(this,ParaPropertyPanel,NumBTbxSelectHandler)); -} void ParaPropertyPanel::InitToolBoxSpacing() { Link aLink = LINK( this, ParaPropertyPanel, ULSpaceHdl_Impl ); @@ -309,53 +277,9 @@ void ParaPropertyPanel::initial() { //toolbox InitToolBoxIndent(); - InitToolBoxBulletsNumbering(); InitToolBoxSpacing(); } -// for Numbering & Bullet -IMPL_LINK(ParaPropertyPanel, NumBTbxDDHandler, ToolBox*, pToolBox) -{ - const sal_uInt16 nId = pToolBox->GetCurItemId(); - const OUString aCommand(pToolBox->GetItemCommand(nId)); - - EndTracking(); - pToolBox->SetItemDown( nId, true ); - - if (aCommand == UNO_DEFAULTBULLET) - { - maBulletsPopup.UpdateValueSet(); - maBulletsPopup.Show(*pToolBox); - } - else if (aCommand == UNO_DEFAULTNUMBERING) - { - maNumberingPopup.UpdateValueSet(); - maNumberingPopup.Show(*pToolBox); - } - pToolBox->SetItemDown( nId, false ); - return 0; -} - -IMPL_LINK(ParaPropertyPanel, NumBTbxSelectHandler, ToolBox*, pToolBox) -{ - const OUString aCommand(pToolBox->GetItemCommand(pToolBox->GetCurItemId())); - sal_uInt16 nSID = SID_TABLE_VERT_NONE; - - EndTracking(); - if (aCommand == UNO_DEFAULTBULLET) - { - nSID = FN_NUM_BULLET_ON; - } - else if (aCommand == UNO_DEFAULTNUMBERING) - { - nSID = FN_NUM_NUMBERING_ON; - } - SfxBoolItem aBoolItem(nSID, true); - GetBindings()->GetDispatcher()->Execute(nSID, SfxCallMode::RECORD, &aBoolItem, 0L); - - return 0; -} - // for Paragraph Indent IMPL_LINK_NOARG( ParaPropertyPanel, ModifyIndentHdl_Impl) { @@ -585,16 +509,6 @@ void ParaPropertyPanel::NotifyItemUpdate( case SID_DEC_INDENT: StateChangeIncDecImpl( nSID, eState, pState ); break; - - case FN_NUM_NUMBERING_ON: - case FN_NUM_BULLET_ON: - StateChangeBulletNumImpl( nSID, eState, pState ); - break; - - case FN_BUL_NUM_RULE_INDEX: - case FN_NUM_NUM_RULE_INDEX: - StateChangeBulletNumRuleImpl( nSID, eState, pState ); - break; } } @@ -853,56 +767,6 @@ void ParaPropertyPanel::StateChangeIncDecImpl( sal_uInt16 nSID, SfxItemState eSt } -// Add toggle state for numbering and bullet icons -void ParaPropertyPanel::StateChangeBulletNumImpl( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) -{ - if ( (eState >= SfxItemState::DEFAULT) && (pState->ISA(SfxBoolItem)) ) - { - const SfxBoolItem* pItem = static_cast<const SfxBoolItem*>(pState); - const bool aBool = pItem->GetValue(); - - const sal_uInt16 nIdNumber = mpTBxNumBullet->GetItemId(UNO_DEFAULTNUMBERING); - const sal_uInt16 nIdBullet = mpTBxNumBullet->GetItemId(UNO_DEFAULTBULLET); - - if (nSID==FN_NUM_NUMBERING_ON) - { - mpTBxNumBullet->SetItemState( - nIdNumber, - aBool ? TRISTATE_TRUE : TRISTATE_FALSE ); - } - else if (nSID==FN_NUM_BULLET_ON) - { - mpTBxNumBullet->SetItemState( - nIdBullet, - aBool ? TRISTATE_TRUE : TRISTATE_FALSE ); - } - } -} - - -void ParaPropertyPanel::StateChangeBulletNumRuleImpl( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) -{ - if ( eState >= SfxItemState::DEFAULT && pState->ISA(SfxUInt16Item) ) - { - sal_uInt16 nValue = (sal_uInt16)0xFFFF; - { - const SfxUInt16Item* pIt = static_cast<const SfxUInt16Item*>(pState); - if ( pIt ) - nValue = pIt->GetValue(); - } - - if ( nSID == FN_BUL_NUM_RULE_INDEX ) - { - mnBulletTypeIndex = nValue; - } - else if ( nSID == FN_NUM_NUM_RULE_INDEX ) - { - mnNumTypeIndex = nValue; - } - } -} - - FieldUnit ParaPropertyPanel::GetCurrentUnit( SfxItemState eState, const SfxPoolItem* pState ) { FieldUnit eUnit = FUNIT_NONE; @@ -934,16 +798,6 @@ FieldUnit ParaPropertyPanel::GetCurrentUnit( SfxItemState eState, const SfxPoolI return eUnit; } -PopupControl* ParaPropertyPanel::CreateBulletsPopupControl (PopupContainer* pParent) -{ - return new ParaBulletsControl(pParent, *this); -} - -PopupControl* ParaPropertyPanel::CreateNumberingPopupControl (PopupContainer* pParent) -{ - return new ParaNumberingControl(pParent, *this); -} - ParaPropertyPanel::ParaPropertyPanel(vcl::Window* pParent, const css::uno::Reference<css::frame::XFrame>& rxFrame, SfxBindings* pBindings, @@ -952,8 +806,6 @@ ParaPropertyPanel::ParaPropertyPanel(vcl::Window* pParent, maSpace3 (SVX_RES(IMG_SPACE3)), maIndHang (SVX_RES(IMG_INDENT_HANG)), - maNumBImageList (SVX_RES(IL_NUM_BULLET)), - maNumBImageListRTL (SVX_RES(IL_NUM_BULLET_RTL)), maTxtLeft (0), mpLnSPItem (NULL), meLnSpState (SfxItemState::DONTCARE), @@ -961,8 +813,6 @@ ParaPropertyPanel::ParaPropertyPanel(vcl::Window* pParent, mbOutLineRight (false), maUpper (0), maLower (0), - mnBulletTypeIndex ((sal_uInt16)0xFFFF), - mnNumTypeIndex ((sal_uInt16)0xFFFF), m_eMetricUnit(FUNIT_NONE), m_last_eMetricUnit(FUNIT_NONE), m_eLRSpaceUnit(), @@ -974,16 +824,10 @@ ParaPropertyPanel::ParaPropertyPanel(vcl::Window* pParent, maOutLineRightControl(SID_OUTLINE_RIGHT, *pBindings, *this, OUString("OutlineLeft"), rxFrame), maDecIndentControl(SID_DEC_INDENT, *pBindings,*this, OUString("DecrementIndent"), rxFrame), maIncIndentControl(SID_INC_INDENT, *pBindings,*this, OUString("IncrementIndent"), rxFrame), - maBulletOnOff(FN_NUM_BULLET_ON, *pBindings, *this, OUString("DefaultBullet"), rxFrame), - maNumberOnOff(FN_NUM_NUMBERING_ON, *pBindings, *this, OUString("DefaultNumbering"), rxFrame), m_aMetricCtl (SID_ATTR_METRIC, *pBindings,*this), - maBulletNumRuleIndex (FN_BUL_NUM_RULE_INDEX, *pBindings,*this), - maNumNumRuleIndex (FN_NUM_NUM_RULE_INDEX, *pBindings,*this), mxFrame(rxFrame), maContext(), mpBindings(pBindings), - maBulletsPopup(this, ::boost::bind(&ParaPropertyPanel::CreateBulletsPopupControl, this, _1)), - maNumberingPopup(this, ::boost::bind(&ParaPropertyPanel::CreateNumberingPopupControl, this, _1)), mxSidebar(rxSidebar) { //Alignment diff --git a/svx/source/sidebar/paragraph/ParaPropertyPanel.hrc b/svx/source/sidebar/paragraph/ParaPropertyPanel.hrc index b909267..35f59f9 100644 --- a/svx/source/sidebar/paragraph/ParaPropertyPanel.hrc +++ b/svx/source/sidebar/paragraph/ParaPropertyPanel.hrc @@ -19,18 +19,6 @@ #include "svx/dialogs.hrc" -//for numbering and bullet -#define IID_BULLET 1 -#define IID_NUMBER 2 -//============================== popup bullet and numbering ========================= -#define VS_VALUES 1 -#define CB_BULLET_MORE 4 -#define BMP_BULLET_MORE 5 - -#define VS_NUMBERING 10 -#define CB_NUMBERING_MORE 12 -#define BMP_NUMERING_MORE 13 - //============================== line space popup page ============================== #define LB_LINE_SPACING 1 @@ -38,10 +26,6 @@ #define ED_SBINDE_LINEDISTPOINT 3 //============================== Help ID ============================== -#define HID_POPUP_BULLET_CB_BULLET_MORE "HID_POPUP_BULLET_CB_BULLET_MORE" -#define HID_POPUP_BULLET_VS_VALUES "HID_POPUP_BULLET_VS_VALUES" -#define HID_POPUP_NUM_CB_NUMBERING_MORE "HID_POPUP_NUM_CB_NUMBERING_MORE" -#define HID_POPUP_NUM_VS_NUMBERING "HID_POPUP_NUM_VS_NUMBERING" #define HID_POPUP_LS_LB_LINE_SPACING "HID_POPUP_LS_LB_LINE_SPACING" #define HID_POPUP_LS_ED_SBINDE_LINEDISTPERCENT "HID_POPUP_LS_ED_SBINDE_LINEDISTPERCENT" @@ -54,36 +38,6 @@ #define LISTBOX_HEIGHT 80 #define VS_SPACING_WIDTH 78 -//==============================numbering and bullet============================== -#define POPUPPANEL_MARGIN_NB 4 - -#define NB_IMAGE_WIDTH 25 -#define NB_IMAGE_HEIGHT 25 -#define NB_IMAGE_SPACING 5 - -#define BULLET_IMAGE_WIDTH NB_IMAGE_WIDTH -#define BULLET_IMAGE_HEIGHT NB_IMAGE_HEIGHT -#define BULLET_IMAGE_SPACING NB_IMAGE_SPACING - -#define NUM_IMAGE_WIDTH 25 -#define NUM_IMAGE_HEIGHT 35 -#define NUM_IMAGE_SPACING NB_IMAGE_SPACING - -#define FIXED_TEXT_HEIGHT 13 -#define CUST_MORE_BUTTON_HEIGHT 15 - -#define VS_WIDTH_BULLET BULLET_IMAGE_WIDTH*3+BULLET_IMAGE_SPACING*2 -#define VS_HEIGHT_BULLET BULLET_IMAGE_HEIGHT*4+BULLET_IMAGE_SPACING*3 -#define VS_WIDTH_NUM NUM_IMAGE_WIDTH*3+NB_IMAGE_SPACING*2 -#define VS_HEIGHT_NUM NUM_IMAGE_HEIGHT*3+NB_IMAGE_SPACING*2 - -#define POPUP_WIDTH_BULLET VS_WIDTH_BULLET + POPUPPANEL_MARGIN_NB * 2 -#define POPUP_HEIGHT_BULLET VS_HEIGHT_BULLET + POPUPPANEL_MARGIN_NB * 3 + CUST_MORE_BUTTON_HEIGHT -#define POPUP_WIDTH_NUM VS_WIDTH_NUM + POPUPPANEL_MARGIN_NB * 2 -#define POPUP_HEIGHT_NUM VS_HEIGHT_NUM + POPUPPANEL_MARGIN_NB * 3 + CUST_MORE_BUTTON_HEIGHT - -#define CUST_MORE_BUTTON_X 1 - //==============================Line Spacing popup page======================= #define POPUP_PAGE_HEIGHT POP_BORDER_Y + BD_HEIGHT + POPUPPANEL_MARGIN_NB + OFFSET_Y diff --git a/svx/source/sidebar/paragraph/ParaPropertyPanel.hxx b/svx/source/sidebar/paragraph/ParaPropertyPanel.hxx index f8443b6..ac5a70a 100644 --- a/svx/source/sidebar/paragraph/ParaPropertyPanel.hxx +++ b/svx/source/sidebar/paragraph/ParaPropertyPanel.hxx @@ -37,18 +37,10 @@ #include <svl/poolitem.hxx> #include <tools/fldunit.hxx> -#include "ParaBulletsPopup.hxx" -#include "ParaNumberingPopup.hxx" - -class FloatingWindow; class ToolBox; - namespace svx { namespace sidebar { -class PopupControl; -class PopupContainer; - class ParaPropertyPanel : public PanelLayout, public ::sfx2::sidebar::IContextChangeReceiver, @@ -73,13 +65,8 @@ public: const SfxPoolItem* pState, const bool bIsEnabled) SAL_OVERRIDE; - sal_uInt16 GetBulletTypeIndex(){ return mnBulletTypeIndex; } - sal_uInt16 GetNumTypeIndex(){ return mnNumTypeIndex; } FieldUnit GetCurrentUnit( SfxItemState eState, const SfxPoolItem* pState ); - void EndBulletsPopupMode (void); - void EndNumberingPopupMode (void); - private: // UI controls //Alignment @@ -101,9 +88,6 @@ private: Image maSpace3; Image maIndHang; - ImageList maNumBImageList; - ImageList maNumBImageListRTL; - // Data Member long maTxtLeft; //Line spacing @@ -114,8 +98,6 @@ private: long maUpper; long maLower; - sal_uInt16 mnBulletTypeIndex; - sal_uInt16 mnNumTypeIndex; FieldUnit m_eMetricUnit; FieldUnit m_last_eMetricUnit; SfxMapUnit m_eLRSpaceUnit; @@ -128,17 +110,11 @@ private: ::sfx2::sidebar::ControllerItem maOutLineRightControl; ::sfx2::sidebar::ControllerItem maDecIndentControl; ::sfx2::sidebar::ControllerItem maIncIndentControl; - ::sfx2::sidebar::ControllerItem maBulletOnOff; - ::sfx2::sidebar::ControllerItem maNumberOnOff; ::sfx2::sidebar::ControllerItem m_aMetricCtl; - ::sfx2::sidebar::ControllerItem maBulletNumRuleIndex; - ::sfx2::sidebar::ControllerItem maNumNumRuleIndex; css::uno::Reference<css::frame::XFrame> mxFrame; ::sfx2::sidebar::EnumContext maContext; SfxBindings* mpBindings; - ParaBulletsPopup maBulletsPopup; - ParaNumberingPopup maNumberingPopup; css::uno::Reference<css::ui::XSidebar> mxSidebar; @@ -149,7 +125,6 @@ private: const css::uno::Reference<css::ui::XSidebar>& rxSidebar); virtual ~ParaPropertyPanel (void); - DECL_LINK(NumBTbxSelectHandler, ToolBox*); DECL_LINK(ModifyIndentHdl_Impl, void*); DECL_LINK(ClickIndent_IncDec_Hdl_Impl, ToolBox*); DECL_LINK(ClickProDemote_Hdl_Impl, ToolBox*); @@ -161,22 +136,13 @@ private: void StateChangedULImpl( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ); void StateChangeOutLineImpl( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ); void StateChangeIncDecImpl( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ); - // Add toggle state for numbering and bullet icons - void StateChangeBulletNumImpl( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ); - //Modified for Numbering&Bullets Dialog UX Enh - //Handing the transferred the num rule index data of the current selection - void StateChangeBulletNumRuleImpl( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ); void initial(); void ReSize(bool bSize); - PopupControl* CreateBulletsPopupControl (PopupContainer* pParent); - PopupControl* CreateNumberingPopupControl (PopupContainer* pParent); DECL_LINK(ClickLineSPDropDownHdl_Impl, ToolBox*); - DECL_LINK(NumBTbxDDHandler, ToolBox*); void InitToolBoxIndent(); - void InitToolBoxBulletsNumbering(); void InitToolBoxSpacing(); }; diff --git a/svx/source/sidebar/paragraph/ParaPropertyPanel.src b/svx/source/sidebar/paragraph/ParaPropertyPanel.src index 8783847..93cf18c 100644 --- a/svx/source/sidebar/paragraph/ParaPropertyPanel.src +++ b/svx/source/sidebar/paragraph/ParaPropertyPanel.src @@ -22,23 +22,6 @@ #define MASKCOLOR MaskColor = Color { Red = 0xFFFF ; Green = 0x0000 ; Blue = 0xFFFF ; }; -#define SVX_PROPERTYPANEL_PARA_NUMBULLET_IDLIST \ - IdList = \ - { \ - IID_BULLET ; \ - IID_NUMBER ; \ - }; \ - IdCount = { 2 ; }; - -//add by wj for sym2_7380 -#define SVX_PROPERTYPANEL_PARA_NUMBULLET_IDLIST_RTL \ - IdList = \ - { \ - IID_BULLET ; \ - IID_NUMBER ; \ - }; \ - IdCount = { 2 ; }; - Image IMG_SPACE3 { ImageBitmap = Bitmap{File = "symphony/spacing3.png";}; @@ -47,233 +30,5 @@ Image IMG_INDENT_HANG { ImageBitmap = Bitmap{File = "symphony/Indent_Hanging.png";}; }; -ImageList IL_NUM_BULLET -{ - Prefix = "symphony/para_numbullet"; - MaskColor = STD_MASKCOLOR ; - SVX_PROPERTYPANEL_PARA_NUMBULLET_IDLIST -}; -ImageList IL_NUM_BULLET_RTL -{ - Prefix = "symphony/para_numbullet_rtl"; - MaskColor = STD_MASKCOLOR ; - SVX_PROPERTYPANEL_PARA_NUMBULLET_IDLIST_RTL -}; - -//===========================================Bullet popup page============================== -Control RID_POPUPPANEL_PARAPAGE_BULLETS -{ - DialogControl = TRUE; - OutputSize = TRUE; - Border = FALSE; - - Size = MAP_APPFONT ( POPUP_WIDTH_BULLET , POPUP_HEIGHT_BULLET) ; - Control VS_VALUES - { - Pos = MAP_APPFONT ( POPUPPANEL_MARGIN_NB , POPUPPANEL_MARGIN_NB ) ; - Size = MAP_APPFONT ( VS_WIDTH_BULLET , VS_HEIGHT_BULLET) ; - HelpID = HID_POPUP_BULLET_VS_VALUES ; - TabStop = TRUE ; - Text = "Bullet"; - }; - PushButton CB_BULLET_MORE - { - Pos = MAP_APPFONT (CUST_MORE_BUTTON_X + POPUPPANEL_MARGIN_NB, VS_HEIGHT_BULLET + POPUPPANEL_MARGIN_NB * 2 ) ; - Size = MAP_APPFONT (POPUP_WIDTH_BULLET - 2*CUST_MORE_BUTTON_X - POPUPPANEL_MARGIN_NB*2, CUST_MORE_BUTTON_HEIGHT ) ; - HelpID = HID_POPUP_BULLET_CB_BULLET_MORE ; - TabStop = TRUE ; - Text [ en-US ] = "~More Options"; - }; - Bitmap BMP_BULLET_MORE - { - File = "symphony/__morebutton.bmp"; - }; -}; - -String RID_SVXSTR_SIDEBAR_BULLET_DESCRIPTIONS_0 -{ - Text [en-US] = "large square bullets"; -}; - -String RID_SVXSTR_SIDEBAR_BULLET_DESCRIPTIONS_1 -{ - Text [en-US] = "graphic bullets"; -}; - -String RID_SVXSTR_SIDEBAR_BULLET_DESCRIPTIONS_2 -{ - Text [en-US] = "graphic bullets"; -}; - -String RID_SVXSTR_SIDEBAR_BULLET_DESCRIPTIONS_3 -{ - Text [en-US] = "graphic bullets"; -}; - -String RID_SVXSTR_SIDEBAR_BULLET_DESCRIPTIONS_4 -{ - Text [en-US] = "graphic bullets"; -}; - -//===========================================Numbering popup page============================== -Control RID_POPUPPANEL_PARAPAGE_NUMBERING -{ - SVLook = TRUE ; - DialogControl = TRUE; - OutputSize = TRUE; - Border = FALSE; - - Size = MAP_APPFONT ( POPUP_WIDTH_NUM , POPUP_HEIGHT_NUM) ; - Control VS_NUMBERING - { - Pos = MAP_APPFONT ( POPUPPANEL_MARGIN_NB, POPUPPANEL_MARGIN_NB ) ; - Size = MAP_APPFONT ( VS_WIDTH_NUM , VS_HEIGHT_NUM) ; - HelpID = HID_POPUP_NUM_VS_NUMBERING ; - TabStop = TRUE ; - Text = "Numbering"; - }; - PushButton CB_NUMBERING_MORE - { - Pos = MAP_APPFONT (CUST_MORE_BUTTON_X + POPUPPANEL_MARGIN_NB, VS_HEIGHT_NUM + POPUPPANEL_MARGIN_NB * 2 ) ; - Size = MAP_APPFONT (POPUP_WIDTH_NUM - 2*CUST_MORE_BUTTON_X - POPUPPANEL_MARGIN_NB*2, CUST_MORE_BUTTON_HEIGHT ) ; - HelpID = HID_POPUP_NUM_CB_NUMBERING_MORE ; - TabStop = TRUE ; - Text [ en-US ] = "~More Options"; - }; - Bitmap BMP_NUMERING_MORE - { - File = "symphony/__morebutton.bmp"; - }; -}; - -String RID_SVXSTR_NUMBULLET_NONE -{ - Text [en-US] = "None"; -}; - -//i122118, Seems the bullets graphic order and count is changed in the gallary, -//Following descriptions should be changed accordingly. - -String RID_SVXSTR_GRAPHICS_DESCRIPTION_0 -{ - Text [en-US] = "Black Pearl"; -}; -String RID_SVXSTR_GRAPHICS_DESCRIPTION_1 -{ - Text [en-US] = "Blue Arrow 1"; -}; -String RID_SVXSTR_GRAPHICS_DESCRIPTION_2 -{ - Text [en-US] = "Blue Ball"; -}; -String RID_SVXSTR_GRAPHICS_DESCRIPTION_3 -{ - Text [en-US] = "Blue Diamond"; -}; -String RID_SVXSTR_GRAPHICS_DESCRIPTION_4 -{ - Text [en-US] = "Blue Red"; -}; -String RID_SVXSTR_GRAPHICS_DESCRIPTION_5 -{ - Text [en-US] = "Blue Square"; -}; -String RID_SVXSTR_GRAPHICS_DESCRIPTION_6 -{ - Text [en-US] = "Blue Star"; -}; -String RID_SVXSTR_GRAPHICS_DESCRIPTION_7 -{ - Text [en-US] = "Dark Red Circle"; -}; -String RID_SVXSTR_GRAPHICS_DESCRIPTION_8 -{ - Text [en-US] = "Blue Circle"; -}; -String RID_SVXSTR_GRAPHICS_DESCRIPTION_9 -{ - Text [en-US] = "Green Circle"; -}; -String RID_SVXSTR_GRAPHICS_DESCRIPTION_10 -{ - Text [en-US] = "Black Square"; -}; -String RID_SVXSTR_GRAPHICS_DESCRIPTION_11 -{ - Text [en-US] = "Orange Square"; -}; -String RID_SVXSTR_GRAPHICS_DESCRIPTION_12 -{ - Text [en-US] = "Purple Square"; -}; -String RID_SVXSTR_GRAPHICS_DESCRIPTION_13 -{ - Text [en-US] = "Blue Diamond"; -}; -String RID_SVXSTR_GRAPHICS_DESCRIPTION_14 -{ - Text [en-US] = "Light Blue Diamond"; -}; -String RID_SVXSTR_GRAPHICS_DESCRIPTION_15 -{ - Text [en-US] = "Red Diamond"; -}; -String RID_SVXSTR_GRAPHICS_DESCRIPTION_16 -{ - Text [en-US] = "Yellow Star"; -}; -String RID_SVXSTR_GRAPHICS_DESCRIPTION_17 -{ - Text [en-US] = "Blue Star"; -}; -String RID_SVXSTR_GRAPHICS_DESCRIPTION_18 -{ - Text [en-US] = "Blue Triangle"; -}; -String RID_SVXSTR_GRAPHICS_DESCRIPTION_19 -{ - Text [en-US] = "Dark Green Triangle"; -}; -String RID_SVXSTR_GRAPHICS_DESCRIPTION_20 -{ - Text [en-US] = "Red Arrow"; -}; -String RID_SVXSTR_GRAPHICS_DESCRIPTION_21 -{ - Text [en-US] = "Blue Arrow 2"; -}; -String RID_SVXSTR_GRAPHICS_DESCRIPTION_22 -{ - Text [en-US] = "Blue Box"; -}; -String RID_SVXSTR_GRAPHICS_DESCRIPTION_23 -{ - Text [en-US] = "Red Box"; -}; -String RID_SVXSTR_GRAPHICS_DESCRIPTION_24 -{ - Text [en-US] = "Light Blue Asterisk"; -}; -String RID_SVXSTR_GRAPHICS_DESCRIPTION_25 -{ - Text [en-US] = "Red Leaves"; -}; -String RID_SVXSTR_GRAPHICS_DESCRIPTION_26 -{ - Text [en-US] = "Blue Target"; -}; -String RID_SVXSTR_GRAPHICS_DESCRIPTION_27 -{ - Text [en-US] = "Blue Arrow 3"; -}; -String RID_SVXSTR_GRAPHICS_DESCRIPTION_28 -{ - Text [en-US] = "Dark Blue Arrow"; -}; -String RID_SVXSTR_GRAPHICS_DESCRIPTION_29 -{ - Text [en-US] = "Brown Arrow"; -}; -//i122118 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sidebar/tools/ValueSetWithTextControl.cxx b/svx/source/sidebar/tools/ValueSetWithTextControl.cxx index 9a3d882..dc5313c 100644 --- a/svx/source/sidebar/tools/ValueSetWithTextControl.cxx +++ b/svx/source/sidebar/tools/ValueSetWithTextControl.cxx @@ -22,52 +22,14 @@ #include <sfx2/sidebar/Theme.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 <com/sun/star/style/NumberingType.hpp> -#include <com/sun/star/lang/XMultiServiceFactory.hpp> -#include <com/sun/star/container/XIndexAccess.hpp> -#include <com/sun/star/text/XDefaultNumberingProvider.hpp> -#include <com/sun/star/text/XNumberingFormatter.hpp> -#include <com/sun/star/beans/PropertyValue.hpp> -#include <comphelper/processfactory.hxx> -#include <com/sun/star/text/XNumberingTypeInfo.hpp> #include <i18nlangtag/mslangid.hxx> #include <svtools/valueset.hxx> #include <editeng/brushitem.hxx> #include <vcl/graph.hxx> #include <vcl/settings.hxx> -#include <svx/nbdtmg.hxx> -#include <svx/nbdtmgfact.hxx> - -using namespace com::sun::star::uno; -using namespace com::sun::star::beans; -using namespace com::sun::star::lang; -using namespace com::sun::star::i18n; -using namespace com::sun::star::text; -using namespace com::sun::star::container; -using namespace com::sun::star::style; namespace svx { namespace sidebar { -static vcl::Font& lcl_GetDefaultBulletFont() -{ - static bool bInit = false; - static vcl::Font aDefBulletFont( OUString( "StarSymbol" ), - OUString(), Size( 0, 14 ) ); - if(!bInit) - { - aDefBulletFont.SetCharSet( RTL_TEXTENCODING_SYMBOL ); - aDefBulletFont.SetFamily( FAMILY_DONTKNOW ); - aDefBulletFont.SetPitch( PITCH_DONTKNOW ); - aDefBulletFont.SetWeight( WEIGHT_DONTKNOW ); - aDefBulletFont.SetTransparent( true ); - bInit = true; - } - return aDefBulletFont; -} - ValueSetWithTextControl::ValueSetWithTextControl( const tControlType eControlType, vcl::Window* pParent, @@ -270,272 +232,6 @@ void ValueSetWithTextControl::UserDraw( const UserDrawEvent& rUDEvt ) pDev->Pop(); } -SvxNumValueSet2::SvxNumValueSet2( vcl::Window* pParent, const ResId& rResId) : - ValueSet( pParent, rResId ), - aLineColor ( COL_LIGHTGRAY ), - pVDev ( NULL ) -{ - SetColCount( 3 ); - SetLineCount( 3 ); - SetStyle( GetStyle() | WB_ITEMBORDER ); -} - - SvxNumValueSet2::~SvxNumValueSet2() -{ - delete pVDev; -} - -void SvxNumValueSet2::SetNumberingSettings( - const Sequence<Sequence<PropertyValue> >& aNum, - Reference<XNumberingFormatter>& xFormat, - const Locale& rLocale ) -{ - aNumSettings = aNum; - xFormatter = xFormat; - aLocale = rLocale; - if(aNum.getLength() > 9) - SetStyle( GetStyle()|WB_VSCROLL); - InsertItem( DEFAULT_NONE, DEFAULT_NONE - 1 ); - SetItemText( DEFAULT_NONE, SVX_RESSTR( RID_SVXSTR_NUMBULLET_NONE )); - - for ( sal_Int32 i = 0; i < aNum.getLength(); i++ ) - { - InsertItem( i + 1); - if( i < 8 ) - { - NBOTypeMgrBase* pNumbering = NBOutlineTypeMgrFact::CreateInstance(eNBOType::NUMBERING); - if ( pNumbering ) - { - SetItemText( i + 1, pNumbering->GetDescription(i)); - } - } - } -} - -void SvxNumValueSet2::UserDraw( const UserDrawEvent& rUDEvt ) -{ - const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); - const Color aBackColor = rStyleSettings.GetFieldColor(); - const Color aTextColor = rStyleSettings.GetFieldTextColor(); - - OutputDevice* pDev = rUDEvt.GetDevice(); - Rectangle aRect = rUDEvt.GetRect(); - sal_uInt32 nItemId = rUDEvt.GetItemId(); - long nRectWidth = aRect.GetWidth(); - long nRectHeight = aRect.GetHeight(); - Size aRectSize(nRectWidth, aRect.GetHeight()); - Point aBLPos = aRect.TopLeft(); - vcl::Font aOldFont = pDev->GetFont(); - Color aOldColor = pDev->GetLineColor(); - pDev->SetLineColor(aBackColor); - vcl::Font aFont(OutputDevice::GetDefaultFont( - DEFAULTFONT_UI_SANS, MsLangId::getSystemLanguage(), DEFAULTFONT_FLAGS_ONLYONE)); - - Size aSize = aFont.GetSize(); - aSize.Height() = nRectHeight/5; - aFont.SetColor(aTextColor); - aFont.SetFillColor(aBackColor); - aFont.SetSize( aSize ); - pDev->SetFont(aFont); - pDev->SetLineColor(aTextColor); - if(!pVDev) - { - // Die Linien werden nur einmalig in das VirtualDevice gepainted - // nur die Gliederungspage bekommt es aktuell - pVDev = new VirtualDevice(*pDev); - pVDev->SetMapMode(pDev->GetMapMode()); - pVDev->EnableRTL( IsRTLEnabled() ); - pVDev->SetOutputSize( aRectSize ); - aOrgRect = aRect; - - pVDev->SetLineColor( aBackColor ); - pVDev->SetFillColor( aBackColor ); - pVDev->DrawRect(aOrgRect); - - if(aBackColor == aLineColor) - aLineColor.Invert(); - if(GetSettings().GetStyleSettings().GetHighContrastMode()) - pVDev->SetLineColor(aTextColor); - else - pVDev->SetLineColor(aLineColor); - // Linien nur einmalig Zeichnen - Point aStart(aBLPos.X() + nRectWidth *30 / 100,0); - Point aEnd(aBLPos.X() + nRectWidth * 9 / 10,0); - for( sal_uInt32 i = 11; i < 100; i += 33) - { - aStart.Y() = aEnd.Y() = aBLPos.Y() + nRectHeight * i / 100; - pVDev->DrawLine(aStart, aEnd); - aStart.Y() = aEnd.Y() = aBLPos.Y() + nRectHeight * (i + 11) / 100; - pVDev->DrawLine(aStart, aEnd); - } - } - if ( nItemId != DEFAULT_NONE) - pDev->DrawOutDev( aRect.TopLeft(), aRectSize, - aOrgRect.TopLeft(), aRectSize, - *pVDev ); - - Point aStart(aBLPos.X() + nRectWidth / 9,0); - if ( nItemId == DEFAULT_NONE) - { - OUString sText(SVX_RESSTR( RID_SVXSTR_NUMBULLET_NONE)); - vcl::Font aLclFont = pDev->GetFont(); - Size aLclSize = aLclFont.GetSize(); - aLclSize.Height() = nRectHeight/4; - aLclFont.SetSize( aLclSize ); - pDev->SetFont(aLclFont); - long nTextWidth = pDev->GetTextWidth(sText); - long nTextHeight = pDev->GetTextHeight(); - //GVT refine - while (nTextWidth>nRectWidth && aLclSize.Height()>4) { - aLclSize.Height() = aLclSize.Height()*0.9; - aLclFont.SetSize( aLclSize ); - pDev->SetFont(aLclFont); - nTextWidth = pDev->GetTextWidth(sText); - } - Point aSStart(aBLPos.X()+(nRectWidth-nTextWidth)/2, aBLPos.Y() +(nRectHeight-nTextHeight)/2); - pDev->DrawText(aSStart, sText); - pDev->SetFont(aOldFont); - } - else - { - NBOTypeMgrBase* pNumbering = NBOutlineTypeMgrFact::CreateInstance(eNBOType::NUMBERING); - if ( pNumbering && nItemId <= DEFAULT_BULLET_TYPES ) - { - for( sal_uInt32 i = 0; i < 3; i++ ) - { - sal_uInt32 nY = 11 + i * 33; - aStart.Y() = aBLPos.Y() + nRectHeight * nY / 100; - OUString sText; - sal_uInt16 nLvl = 0; - SvxNumRule aTempRule( 0, 10, false ); - pNumbering->ApplyNumRule(aTempRule,nItemId -1,1<<nLvl); - SvxNumberFormat aNumFmt(aTempRule.GetLevel(nLvl)); - sText = aNumFmt.GetPrefix() + aNumFmt.GetNumStr(i+1) + aNumFmt.GetSuffix(); - aStart.X() = aBLPos.X() + 2; - aStart.Y() -= pDev->GetTextHeight()/2; - pDev->DrawText(aStart, sText); - } - } - pDev->SetFont(aOldFont); - pDev->SetLineColor(aOldColor); - } - //End -} - - - -SvxNumValueSet3::SvxNumValueSet3( vcl::Window* pParent, const ResId& rResId) : - ValueSet( pParent, rResId ) -{ - SetColCount( 3 ); - SetLineCount( 4 ); - SetStyle( GetStyle() | WB_ITEMBORDER ); -} - - SvxNumValueSet3::~SvxNumValueSet3() -{ -} - -void SvxNumValueSet3::UserDraw( const UserDrawEvent& rUDEvt ) -{ - Rectangle aRect = rUDEvt.GetRect(); - OutputDevice* pDev = rUDEvt.GetDevice(); - sal_uInt32 nItemId = rUDEvt.GetItemId(); - - long nRectHeight = aRect.GetHeight(); - long nRectWidth = aRect.GetWidth(); - Point aBLPos = aRect.TopLeft(); - NBOTypeMgrBase* pBullets = NBOutlineTypeMgrFact::CreateInstance(eNBOType::MIXBULLETS); - if ( pBullets ) - { - if ( nItemId <= DEFAULT_BULLET_TYPES ) { - sal_uInt16 nLvl = 0; - SvxNumRule aTempRule( 0, 10, false ); - pBullets->ApplyNumRule(aTempRule,nItemId -1,1<<nLvl); - SvxNumberFormat aFmt(aTempRule.GetLevel(nLvl)); - sal_Int16 eNumType = aFmt.GetNumberingType(); - if( eNumType == SVX_NUM_CHAR_SPECIAL) - { - sal_Unicode cChar = aFmt.GetBulletChar(); - //End - const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); - const Color aBackColor = rStyleSettings.GetFieldColor(); - const Color aTextColor = rStyleSettings.GetFieldTextColor(); - - vcl::Font aOldFont = pDev->GetFont(); - vcl::Font aFont( lcl_GetDefaultBulletFont() ); - - Size aSize = aFont.GetSize(); - aSize.Height() = nRectHeight*3/6; - aFont.SetColor(aTextColor); - aFont.SetFillColor(aBackColor); - aFont.SetSize( aSize ); - pDev->SetFont(aFont); - pDev->SetFillColor( aBackColor ); //wj - - OUString sText(cChar); - vcl::Font aOldBulletFont = pDev->GetFont(); - vcl::Font aBulletFnt(aFmt.GetBulletFont() ? *aFmt.GetBulletFont() : aOldBulletFont); - Size aBulSize = aOldBulletFont.GetSize(); - aBulletFnt.SetSize(aBulSize); - pDev->SetFont(aBulletFnt); - long nTextWidth = pDev->GetTextWidth(sText); - long nTextHeight = pDev->GetTextHeight(); - Point aStart(aBLPos.X()+(nRectWidth-nTextWidth)/2, aBLPos.Y() +(nRectHeight-nTextHeight)/2); - pDev->DrawText(aStart, sText); - pDev->SetFont(aOldFont); - }else if ( eNumType == SVX_NUM_BITMAP ) - { - const SvxBrushItem* pBrushItem = aFmt.GetBrush(); - if(pBrushItem) - { - const Graphic* pGrf = pBrushItem->GetGraphic(); - if(pGrf) - { - Size aSize(nRectHeight*6/20, nRectHeight*6/20); - Point aStart(aBLPos.X() + nRectWidth*7/20, aBLPos.Y() + nRectHeight*7/20); - - pGrf->Draw( pDev, aStart, aSize ); - } - } - } - }else if ( nItemId == DEFAULT_NONE) - { - const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); - const Color aBackColor = rStyleSettings.GetFieldColor(); - const Color aTextColor = rStyleSettings.GetFieldTextColor(); - - vcl::Font aOldFont = pDev->GetFont(); - vcl::Font aFont(OutputDevice::GetDefaultFont(DEFAULTFONT_UI_SANS, MsLangId::getSystemLanguage(), DEFAULTFONT_FLAGS_ONLYONE)); - Size aSize = aFont.GetSize(); - //aSize.Height() = nRectHeight/5; - aSize.Height() = nRectHeight/4; - aFont.SetColor(aTextColor); - aFont.SetFillColor(aBackColor); - aFont.SetSize( aSize ); - pDev->SetFont(aFont); - pDev->SetFillColor( aBackColor ); - - OUString sText(SVX_RESSTR( RID_SVXSTR_NUMBULLET_NONE)); - - long nTextWidth = pDev->GetTextWidth(sText); - long nTextHeight = pDev->GetTextHeight(); - //GVT refine - while (nTextWidth>nRectWidth && aSize.Height()>4) { - aSize.Height() = aSize.Height()*0.9; - aFont.SetSize( aSize ); - pDev->SetFont(aFont); - nTextWidth = pDev->GetTextWidth(sText); - } - Point aStart(aBLPos.X()+(nRectWidth-nTextWidth)/2, aBLPos.Y() +(nRectHeight-nTextHeight)/2); - pDev->DrawText(aStart, sText); - - pDev->SetFont(aOldFont); - } - } - -} - } } // end of namespace svx::sidebar /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/uiconfig/ui/sidebarparagraph.ui b/svx/uiconfig/ui/sidebarparagraph.ui index cb3dc4c..f749a4d 100644 --- a/svx/uiconfig/ui/sidebarparagraph.ui +++ b/svx/uiconfig/ui/sidebarparagraph.ui @@ -20,7 +20,7 @@ <property name="column_spacing">6</property> <property name="column_homogeneous">True</property> <child> - <object class="GtkToolbar" id="numberbullet"> + <object class="sfxlo-SidebarToolBox" id="numberbullet"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="has_tooltip">True</property> @@ -30,8 +30,6 @@ <object class="GtkMenuToolButton" id="bullet"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="has_tooltip">True</property> - <property name="tooltip_text" translatable="yes">Bullets</property> <property name="is_important">True</property> <property name="action_name">.uno:DefaultBullet</property> <property name="use_underline">True</property> @@ -45,8 +43,6 @@ <object class="GtkMenuToolButton" id="number"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="has_tooltip">True</property> - <property name="tooltip_text" translatable="yes">Numbering</property> <property name="is_important">True</property> <property name="action_name">.uno:DefaultNumbering</property> <property name="use_underline">True</property> commit 261f84a08d8631d70c62d849cd11b21bc9d1f106 Author: Maxim Monastirsky <[email protected]> Date: Sat Nov 8 23:56:59 2014 +0200 fdo#85804 Introduce bullets and numbering popups Change-Id: I39ea402a3ce3296f55ea127b0139e89954e41252 diff --git a/include/svx/dialogs.hrc b/include/svx/dialogs.hrc index 0fe72fa..b8755e6 100644 --- a/include/svx/dialogs.hrc +++ b/include/svx/dialogs.hrc @@ -253,6 +253,8 @@ #define RID_SVXSTR_LINECOLOR (RID_SVX_START + 201) #define RID_SVXSTR_MORE_STYLES (RID_SVX_START + 202) #define RID_SVXSTR_FILLCOLOR (RID_SVX_START + 203) +#define RID_SVXSTR_MORENUMBERING (RID_SVX_START + 204) +#define RID_SVXSTR_MOREBULLETS (RID_SVX_START + 205) // Strings for insert/overwrite mode #define RID_SVXSTR_INSERT_HELPTEXT (RID_SVX_START + 210) diff --git a/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu b/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu index c25e19d..74acecb 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu @@ -242,6 +242,28 @@ <value>com.sun.star.comp.sd.InsertSlideController</value> </prop> </node> + <node oor:name="NumberingToolBox" oor:op="replace"> + <prop oor:name="Command"> + <value>.uno:DefaultNumbering</value> + </prop> + <prop oor:name="Module"> + <value/> + </prop> + <prop oor:name="Controller"> + <value>com.sun.star.comp.svx.NumberingToolBoxControl</value> + </prop> + </node> + <node oor:name="BulletsToolBox" oor:op="replace"> + <prop oor:name="Command"> + <value>.uno:DefaultBullet</value> + </prop> + <prop oor:name="Module"> + <value/> + </prop> + <prop oor:name="Controller"> + <value>com.sun.star.comp.svx.NumberingToolBoxControl</value> + </prop> + </node> <node oor:name="ExtrusionDirectionFloater" oor:op="replace"> <prop oor:name="Command"> <value>.uno:ExtrusionDirectionFloater</value> diff --git a/sd/source/ui/func/fuolbull.cxx b/sd/source/ui/func/fuolbull.cxx index d0790da..1f32941 100644 --- a/sd/source/ui/func/fuolbull.cxx +++ b/sd/source/ui/func/fuolbull.cxx @@ -202,7 +202,7 @@ void FuOutlineBullet::SetCurrentBulletsNumbering(SfxRequest& rReq) // get numbering rule corresponding to <nIdx> and apply the needed number formats to <pNumRule> NBOTypeMgrBase* pNumRuleMgr = NBOutlineTypeMgrFact::CreateInstance( - nSId == FN_SVX_SET_BULLET ? eNBOType::MIXBULLETS : eNBOType::NUMBERING ); + nSId == FN_SVX_SET_BULLET ? eNBOType::BULLETS : eNBOType::NUMBERING ); if ( pNumRuleMgr ) { sal_uInt16 nActNumLvl = (sal_uInt16)0xFFFF; diff --git a/sd/source/ui/view/drviewsf.cxx b/sd/source/ui/view/drviewsf.cxx index 0770ed2..ec75433 100644 --- a/sd/source/ui/view/drviewsf.cxx +++ b/sd/source/ui/view/drviewsf.cxx @@ -620,7 +620,7 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet ) rSet.Put(SfxUInt16Item(FN_NUM_NUM_RULE_INDEX,(sal_uInt16)0xFFFF)); if ( bBullets ) { - NBOTypeMgrBase* pBullets = NBOutlineTypeMgrFact::CreateInstance(eNBOType::MIXBULLETS); + NBOTypeMgrBase* pBullets = NBOutlineTypeMgrFact::CreateInstance(eNBOType::BULLETS); if ( pBullets ) { sal_uInt16 nBulIndex = pBullets->GetNBOIndexForNumRule(*pNumRule,nActNumLvl); diff --git a/svx/Library_svx.mk b/svx/Library_svx.mk index 1fc78a2..b037c26 100644 --- a/svx/Library_svx.mk +++ b/svx/Library_svx.mk @@ -219,6 +219,7 @@ $(eval $(call gb_Library_add_exception_objects,svx,\ svx/source/table/tabledesign \ svx/source/table/tablertfexporter \ svx/source/table/tablertfimporter \ + svx/source/tbxctrls/bulletsnumbering \ svx/source/tbxctrls/colrctrl \ svx/source/tbxctrls/SvxColorChildWindow \ svx/source/tbxctrls/fillctrl \ diff --git a/svx/sdi/svx.sdi b/svx/sdi/svx.sdi index 47d5c14..9691ba5 100644 --- a/svx/sdi/svx.sdi +++ b/svx/sdi/svx.sdi @@ -6523,8 +6523,7 @@ SfxVoidItem DefaultNumbering FN_NUM_NUMBERING_ON GroupId = GID_ENUMERATION; ] -SfxBoolItem CurrentBulletListType FN_BUL_NUM_RULE_INDEX -(SfxUInt16Item On FN_PARAM_1) +SfxUInt16Item CurrentBulletListType FN_BUL_NUM_RULE_INDEX [ /* flags: */ AutoUpdate = TRUE, @@ -6539,11 +6538,6 @@ SfxBoolItem CurrentBulletListType FN_BUL_NUM_RULE_INDEX RecordPerSet; Synchron; - ImageRotation = TRUE; - ImageReflection = TRUE; - /* status: */ - SlotType = SfxBoolItem - /* config: */ AccelConfig = FALSE, MenuConfig = FALSE, @@ -6551,8 +6545,7 @@ SfxBoolItem CurrentBulletListType FN_BUL_NUM_RULE_INDEX ToolBoxConfig = FALSE, GroupId = GID_ENUMERATION; ] -SfxBoolItem CurrentNumListType FN_NUM_NUM_RULE_INDEX -(SfxUInt16Item On FN_PARAM_1) +SfxUInt16Item CurrentNumListType FN_NUM_NUM_RULE_INDEX [ /* flags: */ AutoUpdate = TRUE, @@ -6567,11 +6560,6 @@ SfxBoolItem CurrentNumListType FN_NUM_NUM_RULE_INDEX RecordPerSet; Synchron; - ImageRotation = TRUE; - ImageReflection = TRUE; - /* status: */ - SlotType = SfxBoolItem - /* config: */ AccelConfig = FALSE, MenuConfig = FALSE, diff --git a/svx/source/dialog/svxbmpnumvalueset.cxx b/svx/source/dialog/svxbmpnumvalueset.cxx index f0e961a..0963e6d 100644 --- a/svx/source/dialog/svxbmpnumvalueset.cxx +++ b/svx/source/dialog/svxbmpnumvalueset.cxx @@ -185,7 +185,6 @@ void SvxNumValueSet::UserDraw( const UserDrawEvent& rUDEvt ) pVDev->SetOutputSize( aRectSize ); aOrgRect = aRect; pVDev->SetFillColor( aBackColor ); - pVDev->DrawRect(aOrgRect); if(aBackColor == aLineColor) aLineColor.Invert(); diff --git a/svx/source/tbxctrls/bulletsnumbering.cxx b/svx/source/tbxctrls/bulletsnumbering.cxx new file mode 100644 index 0000000..3b72ad9 --- /dev/null +++ b/svx/source/tbxctrls/bulletsnumbering.cxx @@ -0,0 +1,236 @@ +/* -*- 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 . + */ + +#include <com/sun/star/text/DefaultNumberingProvider.hpp> +#include <com/sun/star/text/XNumberingFormatter.hpp> + +#include <comphelper/processfactory.hxx> +#include <i18nlangtag/mslangid.hxx> +#include <sfx2/imagemgr.hxx> +#include <svtools/popupwindowcontroller.hxx> +#include <svtools/toolbarmenu.hxx> +#include <svx/dialogs.hrc> +#include <svx/dialmgr.hxx> +#include <svx/numvset.hxx> +#include <vcl/toolbox.hxx> +#include <vcl/settings.hxx> + +#define NUM_PAGETYPE_BULLET 0 +#define NUM_PAGETYPE_SINGLENUM 1 + +class NumberingPopup : public svtools::ToolbarMenu +{ + bool mbBulletItem; + svt::ToolboxController& mrController; + SvxNumValueSet* mpValueSet; + DECL_LINK( VSSelectHdl, void * ); + +public: + NumberingPopup( svt::ToolboxController& rController, + const css::uno::Reference< css::frame::XFrame >& rFrame, + vcl::Window* pParent, bool bBulletItem ); + + virtual void statusChanged( const css::frame::FeatureStateEvent& rEvent ) + throw ( css::uno::RuntimeException ) SAL_OVERRIDE; +}; + +class NumberingToolBoxControl : public svt::PopupWindowController +{ + bool mbBulletItem; + +public: + NumberingToolBoxControl( const css::uno::Reference< css::uno::XComponentContext >& rxContext ); + virtual vcl::Window* createPopupWindow( vcl::Window* pParent ) SAL_OVERRIDE; + + // XStatusListener + virtual void statusChanged( const css::frame::FeatureStateEvent& rEvent ) + throw ( css::uno::RuntimeException ) SAL_OVERRIDE; + + // XInitialization + virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) + throw ( css::uno::Exception, css::uno::RuntimeException, std::exception ) SAL_OVERRIDE; + + // XServiceInfo + virtual OUString SAL_CALL getImplementationName() + throw ( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE; + virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() + throw ( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE; + + using svt::ToolboxController::createPopupWindow; +}; + +//class NumberingPopup +NumberingPopup::NumberingPopup( svt::ToolboxController& rController, + const css::uno::Reference< css::frame::XFrame >& rFrame, + vcl::Window* pParent, bool bBulletItem ) : + ToolbarMenu( rFrame, pParent, WB_STDPOPUP ), + mbBulletItem( bBulletItem ), + mrController( rController ) +{ + WinBits nBits = WB_TABSTOP | WB_MENUSTYLEVALUESET | WB_FLATVALUESET | WB_NO_DIRECTSELECT; + mpValueSet = new SvxNumValueSet( this, nBits ); + mpValueSet->init( mbBulletItem ? NUM_PAGETYPE_BULLET : NUM_PAGETYPE_SINGLENUM ); + + if ( !mbBulletItem ) + { + css::uno::Reference< css::text::XDefaultNumberingProvider > xDefNum = css::text::DefaultNumberingProvider::create( comphelper::getProcessComponentContext() ); + if ( xDefNum.is() ) + { + css::uno::Sequence< css::uno::Sequence< css::beans::PropertyValue > > aNumberings; + css::lang::Locale aLocale = GetSettings().GetLanguageTag().getLocale(); + try + { + aNumberings = xDefNum->getDefaultContinuousNumberingLevels( aLocale ); + } + catch( css::uno::Exception& ) + {} + + css::uno::Reference< css::text::XNumberingFormatter > xFormat( xDefNum, css::uno::UNO_QUERY ); + mpValueSet->SetNumberingSettings( aNumberings, xFormat, aLocale ); + } + } + + Size aItemSize( LogicToPixel( Size( 30, 42 ), MAP_APPFONT ) ); + mpValueSet->SetExtraSpacing( 2 ); + mpValueSet->SetOutputSizePixel( mpValueSet->CalcWindowSizePixel( aItemSize ) ); + mpValueSet->SetColor( GetSettings().GetStyleSettings().GetFieldColor() ); + + appendEntry( 0, mpValueSet ); + appendSeparator(); + + if ( mbBulletItem ) + appendEntry( 1, SVX_RESSTR( RID_SVXSTR_MOREBULLETS ), ::GetImage( rFrame, ".uno:OutlineBullet", false ) ); + else + appendEntry( 1, SVX_RESSTR( RID_SVXSTR_MORENUMBERING ), ::GetImage( rFrame, ".uno:OutlineBullet", false ) ); + + SetOutputSizePixel( getMenuSize() ); + Link aLink = LINK( this, NumberingPopup, VSSelectHdl ); + mpValueSet->SetSelectHdl( aLink ); + SetSelectHdl( aLink ); + + if ( mbBulletItem ) + AddStatusListener( ".uno:CurrentBulletListType" ); + else + AddStatusListener( ".uno:CurrentNumListType" ); +} + +void NumberingPopup::statusChanged( const css::frame::FeatureStateEvent& rEvent ) + throw ( css::uno::RuntimeException ) +{ + mpValueSet->SetNoSelection(); + + sal_Int32 nSelItem; + if ( rEvent.State >>= nSelItem ) + mpValueSet->SelectItem( nSelItem ); +} + +IMPL_LINK( NumberingPopup, VSSelectHdl, void *, pControl ) +{ + if ( IsInPopupMode() ) + EndPopupMode(); + + if ( pControl == mpValueSet ) + { + sal_uInt16 nSelItem = mpValueSet->GetSelectItemId(); + css::uno::Sequence< css::beans::PropertyValue > aArgs( 1 ); + if ( mbBulletItem ) + { + aArgs[0].Name = "SetBullet"; + aArgs[0].Value <<= sal_uInt16( nSelItem ); + mrController.dispatchCommand( ".uno:SetBullet", aArgs ); + } + else + { + aArgs[0].Name = "SetNumber"; + aArgs[0].Value <<= sal_uInt16( nSelItem ); + mrController.dispatchCommand( ".uno:SetNumber", aArgs ); + } + } + else if ( getSelectedEntryId() == 1 ) + { + css::uno::Sequence< css::beans::PropertyValue > aArgs( 0 ); + mrController.dispatchCommand( ".uno:OutlineBullet", aArgs ); + } + + return 0; +} + + +//class NumberingToolBoxControl +NumberingToolBoxControl::NumberingToolBoxControl( const css::uno::Reference< css::uno::XComponentContext >& rxContext ): + svt::PopupWindowController( rxContext, css::uno::Reference< css::frame::XFrame >(), OUString() ), + mbBulletItem( false ) +{ +} + +vcl::Window* NumberingToolBoxControl::createPopupWindow( vcl::Window* pParent ) +{ + return new NumberingPopup( *this, m_xFrame, pParent, mbBulletItem ); +} + +void NumberingToolBoxControl::statusChanged( const css::frame::FeatureStateEvent& rEvent ) + throw ( css::uno::RuntimeException ) +{ + ToolBox* pToolBox = 0; + sal_uInt16 nId = 0; + if ( getToolboxId( nId, &pToolBox ) ) + { + pToolBox->EnableItem( nId, rEvent.IsEnabled ); + bool bChecked; + if ( rEvent.State >>= bChecked ) + pToolBox->CheckItem( nId, bChecked ); + } +} + +void SAL_CALL NumberingToolBoxControl::initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) + throw ( css::uno::Exception, css::uno::RuntimeException, std::exception ) +{ + svt::PopupWindowController::initialize( aArguments ); + + ToolBox* pToolBox = 0; + sal_uInt16 nId = 0; + if ( getToolboxId( nId, &pToolBox ) ) + pToolBox->SetItemBits( nId, pToolBox->GetItemBits( nId ) | ToolBoxItemBits::DROPDOWN ); + + mbBulletItem = m_aCommandURL == ".uno:DefaultBullet"; +} + +OUString SAL_CALL NumberingToolBoxControl::getImplementationName() + throw ( css::uno::RuntimeException, std::exception ) +{ + return OUString( "com.sun.star.comp.svx.NumberingToolBoxControl" ); +} + +css::uno::Sequence< OUString > SAL_CALL NumberingToolBoxControl::getSupportedServiceNames() + throw ( css::uno::RuntimeException, std::exception ) +{ + css::uno::Sequence< OUString > aRet( 1 ); + aRet[0] = "com.sun.star.frame.ToolbarController"; + return aRet; +} + +extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL +com_sun_star_comp_svx_NumberingToolBoxControl_get_implementation( + css::uno::XComponentContext *rxContext, + css::uno::Sequence<css::uno::Any> const & ) +{ + return cppu::acquire( new NumberingToolBoxControl( rxContext ) ); +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/tbxctrls/tbcontrl.src b/svx/source/tbxctrls/tbcontrl.src index b13cf62..0e250c3 100644 --- a/svx/source/tbxctrls/tbcontrl.src +++ b/svx/source/tbxctrls/tbcontrl.src @@ -81,6 +81,16 @@ String RID_SVXSTR_FILLCOLOR Text [ en-US ] = "Fill Color" ; }; +String RID_SVXSTR_MORENUMBERING +{ + Text [ en-US ] = "More Numbering..." ; +}; + +String RID_SVXSTR_MOREBULLETS +{ + Text [ en-US ] = "More Bullets..." ; +}; + ComboBox RID_SVXTBX_STYLE { HelpId = HID_STYLE_LISTBOX ; diff --git a/svx/util/svx.component b/svx/util/svx.component index 5529d27..967677b 100644 --- a/svx/util/svx.component +++ b/svx/util/svx.component @@ -80,4 +80,8 @@ constructor="org_apache_openoffice_comp_svx_sidebar_PanelFactory_get_implementation"> <service name="com.sun.star.ui.UIElementFactory"/> </implementation> + <implementation name="com.sun.star.comp.svx.NumberingToolBoxControl" + constructor="com_sun_star_comp_svx_NumberingToolBoxControl_get_implementation"> + <service name="com.sun.star.frame.ToolbarController"/> + </implementation> </component> diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx index 5dfef04..c94fa1f 100644 --- a/sw/source/uibase/shells/textsh1.cxx +++ b/sw/source/uibase/shells/textsh1.cxx @@ -1784,7 +1784,7 @@ void SwTextShell::GetState( SfxItemSet &rSet ) { rSet.Put(SfxUInt16Item(FN_BUL_NUM_RULE_INDEX, USHRT_MAX)); rSet.Put(SfxUInt16Item(FN_NUM_NUM_RULE_INDEX, USHRT_MAX)); - NBOTypeMgrBase* pBullets = NBOutlineTypeMgrFact::CreateInstance(eNBOType::MIXBULLETS); + NBOTypeMgrBase* pBullets = NBOutlineTypeMgrFact::CreateInstance(eNBOType::BULLETS); if ( pBullets ) { const sal_uInt16 nBulIndex = pBullets->GetNBOIndexForNumRule(aSvxRule,nActNumLvl); diff --git a/sw/source/uibase/shells/txtnum.cxx b/sw/source/uibase/shells/txtnum.cxx index 663927e..6f4fafe 100644 --- a/sw/source/uibase/shells/txtnum.cxx +++ b/sw/source/uibase/shells/txtnum.cxx @@ -258,7 +258,7 @@ void SwTextShell::ExecSetNumber(SfxRequest &rReq) svx::sidebar::NBOTypeMgrBase* pNBOTypeMgr = nSlot == FN_SVX_SET_NUMBER ? svx::sidebar::NBOutlineTypeMgrFact::CreateInstance( svx::sidebar::eNBOType::NUMBERING ) - : svx::sidebar::NBOutlineTypeMgrFact::CreateInstance( svx::sidebar::eNBOType::MIXBULLETS ); + : svx::sidebar::NBOutlineTypeMgrFact::CreateInstance( svx::sidebar::eNBOType::BULLETS ); if ( pNBOTypeMgr != NULL ) { const SwNumRule* pNumRuleAtCurrentSelection = GetShell().GetNumRuleAtCurrentSelection(); commit 9229170920ab770624415c4330da57af5b1b5398 Author: Kohei Yoshida <[email protected]> Date: Sat Nov 8 22:11:33 2014 -0500 Unindent. Change-Id: I98b5a0b91c92e58bae3caa69a4ed35c72dc839dd diff --git a/include/svx/sdr/contact/objectcontactofobjlistpainter.hxx b/include/svx/sdr/contact/objectcontactofobjlistpainter.hxx index 7489cff..9ff322f 100644 --- a/include/svx/sdr/contact/objectcontactofobjlistpainter.hxx +++ b/include/svx/sdr/contact/objectcontactofobjlistpainter.hxx @@ -24,119 +24,96 @@ #include <svx/svxdllapi.h> #include <svx/svdpage.hxx> - -// predeclarations - class SdrPage; class SdrObject; +namespace sdr { namespace contact { - -namespace sdr +class SVX_DLLPUBLIC ObjectContactPainter : public ObjectContact { - namespace contact - { - class SVX_DLLPUBLIC ObjectContactPainter : public ObjectContact - { - protected: - // Hierarchy access methods - virtual sal_uInt32 GetPaintObjectCount() const = 0; - virtual ViewContact& GetPaintObjectViewContact(sal_uInt32 nIndex) const = 0; - - public: - // basic constructor/destructor - ObjectContactPainter(); - virtual ~ObjectContactPainter(); - }; - } // end of namespace contact -} // end of namespace sdr - - - -namespace sdr -{ - namespace contact - { - // typedef for transferring SdrObject - typedef ::std::vector< SdrObject* > SdrObjectVector; +protected: + // Hierarchy access methods + virtual sal_uInt32 GetPaintObjectCount() const = 0; + virtual ViewContact& GetPaintObjectViewContact(sal_uInt32 nIndex) const = 0; - class SVX_DLLPUBLIC ObjectContactOfObjListPainter : public ObjectContactPainter - { - protected: - // Target OutputDevice - OutputDevice& mrTargetOutputDevice; +public: + // basic constructor/destructor + ObjectContactPainter(); + virtual ~ObjectContactPainter(); +}; - // Set StartPoint for next run, also given in constructor - SdrObjectVector maStartObjects; +// typedef for transferring SdrObject +typedef ::std::vector< SdrObject* > SdrObjectVector; - // the processed page which is the base e.g. for PageNumberFields - const SdrPage* mpProcessedPage; +class SVX_DLLPUBLIC ObjectContactOfObjListPainter : public ObjectContactPainter +{ +protected: + // Target OutputDevice + OutputDevice& mrTargetOutputDevice; - // Hierarchy access methods - virtual sal_uInt32 GetPaintObjectCount() const SAL_OVERRIDE; - virtual ViewContact& GetPaintObjectViewContact(sal_uInt32 nIndex) const SAL_OVERRIDE; + // Set StartPoint for next run, also given in constructor + SdrObjectVector maStartObjects; - public: - // basic constructor/destructor - ObjectContactOfObjListPainter( - OutputDevice& rTargetDevice, - const SdrObjectVector& rObjects, - const SdrPage* pProcessedPage); - virtual ~ObjectContactOfObjListPainter(); + // the processed page which is the base e.g. for PageNumberFields + const SdrPage* mpProcessedPage; - // Process the whole displaying - virtual void ProcessDisplay(DisplayInfo& rDisplayInfo) SAL_OVERRIDE; + // Hierarchy access methods + virtual sal_uInt32 GetPaintObjectCount() const SAL_OVERRIDE; + virtual ViewContact& GetPaintObjectViewContact(sal_uInt32 nIndex) const SAL_OVERRIDE; - // VirtualDevice? Default is false - virtual bool isOutputToVirtualDevice() const SAL_OVERRIDE; +public: + // basic constructor/destructor + ObjectContactOfObjListPainter( + OutputDevice& rTargetDevice, + const SdrObjectVector& rObjects, + const SdrPage* pProcessedPage); + virtual ~ObjectContactOfObjListPainter(); - // recording MetaFile? Default is false - virtual bool isOutputToRecordingMetaFile() const SAL_OVERRIDE; + // Process the whole displaying + virtual void ProcessDisplay(DisplayInfo& rDisplayInfo) SAL_OVERRIDE; - // pdf export? Default is false - virtual bool isOutputToPDFFile() const SAL_OVERRIDE; + // VirtualDevice? Default is false + virtual bool isOutputToVirtualDevice() const SAL_OVERRIDE; - // access to OutputDevice. May return 0L like the default implementations do. Needs to be overloaded as needed. - virtual OutputDevice* TryToGetOutputDevice() const SAL_OVERRIDE; - }; - } // end of namespace contact -} // end of namespace sdr + // recording MetaFile? Default is false + virtual bool isOutputToRecordingMetaFile() const SAL_OVERRIDE; + // pdf export? Default is false + virtual bool isOutputToPDFFile() const SAL_OVERRIDE; + // access to OutputDevice. May return 0L like the default implementations do. Needs to be overloaded as needed. + virtual OutputDevice* TryToGetOutputDevice() const SAL_OVERRIDE; +}; -namespace sdr +class ObjectContactOfPagePainter : public ObjectContactPainter { - namespace contact - { - class ObjectContactOfPagePainter : public ObjectContactPainter - { - protected: - // the original ObjectContact this painter is working on - ObjectContact& mrOriginalObjectContact; - - // Set StartPoint for next run, also given in constructor - SdrPageWeakRef mxStartPage; - - // Hierarchy access methods - virtual sal_uInt32 GetPaintObjectCount() const SAL_OVERRIDE; - virtual ViewContact& GetPaintObjectViewContact(sal_uInt32 nIndex) const SAL_OVERRIDE; - - public: - // basic constructor - ObjectContactOfPagePainter( - const SdrPage* pPage, - ObjectContact& rOriginalObjectContact); - virtual ~ObjectContactOfPagePainter(); - - // set another page - void SetStartPage(const SdrPage* pPage); - const SdrPage* GetStartPage() const { return mxStartPage.get(); } - - // access to OutputDevice. May return 0L like the default implementations do. Needs to be overloaded as needed. - virtual OutputDevice* TryToGetOutputDevice() const SAL_OVERRIDE; - }; - } // end of namespace contact -} // end of namespace sdr +protected: + // the original ObjectContact this painter is working on + ObjectContact& mrOriginalObjectContact; + + // Set StartPoint for next run, also given in constructor + SdrPageWeakRef mxStartPage; + + // Hierarchy access methods + virtual sal_uInt32 GetPaintObjectCount() const SAL_OVERRIDE; + virtual ViewContact& GetPaintObjectViewContact(sal_uInt32 nIndex) const SAL_OVERRIDE; + +public: + // basic constructor + ObjectContactOfPagePainter( + const SdrPage* pPage, + ObjectContact& rOriginalObjectContact); + virtual ~ObjectContactOfPagePainter(); + + // set another page + void SetStartPage(const SdrPage* pPage); + const SdrPage* GetStartPage() const { return mxStartPage.get(); } + + // access to OutputDevice. May return 0L like the default implementations do. Needs to be overloaded as needed. + virtual OutputDevice* TryToGetOutputDevice() const SAL_OVERRIDE; +}; + +}} diff --git a/include/svx/sdr/contact/viewcontactofe3d.hxx b/include/svx/sdr/contact/viewcontactofe3d.hxx index d30c300..e59e157 100644 --- a/include/svx/sdr/contact/viewcontactofe3d.hxx ... etc. - the rest is truncated _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
