summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Monastirsky <momonasmon@gmail.com>2014-11-09 00:38:08 +0200
committerMaxim Monastirsky <momonasmon@gmail.com>2014-11-09 07:42:26 +0200
commit853e9c00a359b93c546e2e8a5fcee9e8aebf49b8 (patch)
tree4b536ec37d9161099595285596407b53ca28c276
parent261f84a08d8631d70c62d849cd11b21bc9d1f106 (diff)
fdo#85804 Use the new popups in the sidebar too
Change-Id: Ib4767eeef1dc6c404bb36068f806c42ccc1086b6
-rw-r--r--include/svx/dialogs.hrc7
-rw-r--r--include/svx/sidebar/ValueSetWithTextControl.hxx55
-rw-r--r--svx/Library_svx.mk4
-rw-r--r--svx/source/sidebar/paragraph/ParaBulletsControl.cxx131
-rw-r--r--svx/source/sidebar/paragraph/ParaBulletsControl.hxx58
-rw-r--r--svx/source/sidebar/paragraph/ParaBulletsPopup.cxx61
-rw-r--r--svx/source/sidebar/paragraph/ParaBulletsPopup.hxx51
-rw-r--r--svx/source/sidebar/paragraph/ParaNumberingControl.cxx147
-rw-r--r--svx/source/sidebar/paragraph/ParaNumberingControl.hxx63
-rw-r--r--svx/source/sidebar/paragraph/ParaNumberingPopup.cxx62
-rw-r--r--svx/source/sidebar/paragraph/ParaNumberingPopup.hxx52
-rw-r--r--svx/source/sidebar/paragraph/ParaPropertyPanel.cxx156
-rw-r--r--svx/source/sidebar/paragraph/ParaPropertyPanel.hrc46
-rw-r--r--svx/source/sidebar/paragraph/ParaPropertyPanel.hxx34
-rw-r--r--svx/source/sidebar/paragraph/ParaPropertyPanel.src245
-rw-r--r--svx/source/sidebar/tools/ValueSetWithTextControl.cxx304
-rw-r--r--svx/uiconfig/ui/sidebarparagraph.ui6
17 files changed, 3 insertions, 1479 deletions
diff --git a/include/svx/dialogs.hrc b/include/svx/dialogs.hrc
index b8755e601f5c..067298f294c8 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 4cb6fbd9c5bc..33054ead6feb 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 b037c26bec25..d21f5cf5ae48 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 b4407b8baa20..000000000000
--- 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 d54f98765c31..000000000000
--- 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 5c769737fb81..000000000000
--- 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 2b80cb015014..000000000000
--- 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 119b7179c05f..000000000000
--- 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 3bbeae8d476f..000000000000
--- 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 287141ea3c16..000000000000
--- 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 862b584fe0f1..000000000000
--- 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 b11818518f71..404a04e5eecc 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 b90926709592..35f59f9ddf48 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 f8443b6a86a8..ac5a70a40751 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 878384742832..93cf18ca6a46 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 9a3d88262d9f..dc5313c17057 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 cb3dc4c575a6..f749a4d04149 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>