[Libreoffice-commits] core.git: compilerplugins/clang extras/source include/svx sd/inc sd/source solenv/bin solenv/sanitizers svtools/source svx/inc svx/source svx/uiconfig svx/UIConfig_svx.mk sw/source vcl/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Mon Apr 6 19:25:37 UTC 2020
compilerplugins/clang/constantparam.booleans.results | 4
compilerplugins/clang/unusedfields.readonly.results | 2
extras/source/glade/libreoffice-catalog.xml.in | 28
include/svx/colorbox.hxx | 54
include/svx/colorwindow.hxx | 57
sd/inc/pch/precompiled_sd.hxx | 6
sd/inc/pch/precompiled_sdui.hxx | 3
sd/source/ui/animations/CustomAnimationDialog.cxx | 1111 -------------------
sd/source/ui/animations/CustomAnimationDialog.hxx | 41
solenv/bin/native-code.py | 4
solenv/sanitizers/ui/svx.suppr | 3
svtools/source/control/ctrlbox.cxx | 1
svx/UIConfig_svx.mk | 1
svx/inc/pch/precompiled_svx.hxx | 50
svx/source/tbxctrls/SvxColorValueSet.cxx | 3
svx/source/tbxctrls/tbcontrl.cxx | 473 --------
svx/uiconfig/ui/oldcolorwindow.ui | 180 ---
sw/source/ui/index/cnttab.cxx | 1
vcl/source/window/builder.cxx | 27
19 files changed, 56 insertions(+), 1993 deletions(-)
New commits:
commit a4f747e9cd70bc25994040e7812680c2c8356c08
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Mar 30 10:10:08 2020 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Apr 6 21:24:55 2020 +0200
remove newly unused stuff
Change-Id: Idce9955294372817c0dd1f40ebd38f16fc90eab5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91007
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/compilerplugins/clang/constantparam.booleans.results b/compilerplugins/clang/constantparam.booleans.results
index f3aae5d23682..ec68cb590a62 100644
--- a/compilerplugins/clang/constantparam.booleans.results
+++ b/compilerplugins/clang/constantparam.booleans.results
@@ -1186,10 +1186,6 @@ include/svx/algitem.hxx:39
void SvxOrientationItem::SvxOrientationItem(int,_Bool,const unsigned short)
const unsigned short nId
0
-include/svx/colorbox.hxx:50
- void SvxColorListBox::SvxColorListBox(class vcl::Window *,long)
- long nStyle
- 0
include/svx/ctredlin.hxx:210
void SvxTPFilter::SelectedAuthorPos(int)
int nPos
diff --git a/compilerplugins/clang/unusedfields.readonly.results b/compilerplugins/clang/unusedfields.readonly.results
index d875a5b1ae8e..629e9e36e05c 100644
--- a/compilerplugins/clang/unusedfields.readonly.results
+++ b/compilerplugins/clang/unusedfields.readonly.results
@@ -324,8 +324,6 @@ include/svl/ondemand.hxx:55
OnDemandLocaleDataWrapper aSysLocale class SvtSysLocale
include/svtools/editsyntaxhighlighter.hxx:32
MultiLineEditSyntaxHighlight m_aColorConfig svtools::ColorConfig
-include/svx/colorwindow.hxx:67
- SvxColorWindow maSelectedLink Link<const NamedColor &, void>
include/svx/graphctl.hxx:52
GraphCtrl xVD ScopedVclPtrInstance<class VirtualDevice>
include/svx/sdr/overlay/overlayanimatedbitmapex.hxx:51
diff --git a/extras/source/glade/libreoffice-catalog.xml.in b/extras/source/glade/libreoffice-catalog.xml.in
index 11e67de8c1b1..cb5b695f86da 100644
--- a/extras/source/glade/libreoffice-catalog.xml.in
+++ b/extras/source/glade/libreoffice-catalog.xml.in
@@ -28,34 +28,9 @@
generic-name="SearchResultsBox" parent="GtkComboBoxText"
icon-name="widget-gtk-comboboxtext"/>
- <glade-widget-class title="VclComboBoxNumeric" name="VclComboBoxNumeric"
- generic-name="ComboBoxNumeric" parent="GtkComboBoxText"
- icon-name="widget-gtk-comboboxtext">
- <properties>
- <property save="True" query="False" id="adjustment" name="Adjustment">
- <parameter-spec>
- <type>GParamObject</type>
- <value-type>GtkAdjustment</value-type>
- </parameter-spec>
- <tooltip>List of widgets in this group</tooltip>
- </property>
- </properties>
- </glade-widget-class>
-
- <glade-widget-class title="SvxColorValueSet" name="svxcorelo-SvxColorValueSet"
- generic-name="Set of Value Options" parent="GtkDrawingArea"
- icon-name="widget-gtk-drawingarea"/>
-
<glade-widget-class title="Content List Box" name="sfxlo-ContentListBox"
generic-name="Content List Box" parent="GtkTreeView"
icon-name="widget-gtk-treeview"/>
- <glade-widget-class title="Animation ListBox" name="sdlo-CustomAnimationList"
- generic-name="Animation ListBox" parent="GtkTreeView"
- icon-name="widget-gtk-treeview"/>
-
- <glade-widget-class title="PropertyControl" name="sdlo-PropertyControl"
- generic-name="PropertyControl" parent="GtkComboBoxText"
- icon-name="widget-gtk-comboboxtext"/>
<glade-widget-class title="Sidebar ToolBox" name="sfxlo-SidebarToolBox"
generic-name="Sidebar ToolBox" parent="GtkToolbar"
@@ -104,9 +79,6 @@
<glade-widget-class title="Managed Menu Button" name="svtlo-ManagedMenuButton"
generic-name="ManagedMenuButton" parent="GtkButton"
icon-name="widget-gtk-button"/>
- <glade-widget-class title="Category ListBox" name="sdlo-CategoryListBox"
- generic-name="Category ListBox" parent="GtkTreeView"
- icon-name="widget-gtk-treeview"/>
<glade-widget-class title="NotebookBar Toolbar Addons" name="NotebookBarAddonsToolMergePoint"
generic-name="ShowText" parent="GtkToolButton"
icon-name="widget-gtk-toolbutton"/>
diff --git a/include/svx/colorbox.hxx b/include/svx/colorbox.hxx
index b703aa224bec..51fbc00d4b5f 100644
--- a/include/svx/colorbox.hxx
+++ b/include/svx/colorbox.hxx
@@ -11,65 +11,11 @@
#define INCLUDED_SVX_COLORBOX_HXX
#include <memory>
-#include <vcl/menubtn.hxx>
#include <vcl/weld.hxx>
#include <svx/colorwindow.hxx>
-class SvxColorListBox;
class ColorListBox;
-class SvxListBoxColorWrapper
-{
-public:
- SvxListBoxColorWrapper(SvxColorListBox* pControl);
- void operator()(const OUString& rCommand, const NamedColor& rColor);
- void dispose();
-private:
- VclPtr<SvxColorListBox> mxControl;
-};
-
-class SVXCORE_DLLPUBLIC SvxColorListBox : public MenuButton
-{
-private:
- friend class SvxListBoxColorWrapper;
- VclPtr<SvxColorWindow> m_xColorWindow;
- Link<SvxColorListBox&, void> m_aSelectedLink;
- SvxListBoxColorWrapper m_aColorWrapper;
- Color m_aAutoDisplayColor;
- NamedColor m_aSelectedColor;
- sal_uInt16 m_nSlotId;
- std::shared_ptr<PaletteManager> m_xPaletteManager;
- ColorStatus m_aColorStatus;
-
- DECL_LINK(MenuActivateHdl, MenuButton *, void);
- void Selected(const NamedColor& rNamedColor);
- void createColorWindow();
- void LockWidthRequest();
- VclPtr<SvxColorWindow> const & getColorWindow() const;
-public:
- SvxColorListBox(vcl::Window* pParent, WinBits nStyle = 0);
- virtual ~SvxColorListBox() override;
- virtual void dispose() override;
-
- void SetSelectHdl(const Link<SvxColorListBox&, void>& rLink)
- {
- m_aSelectedLink = rLink;
- }
-
- Color const & GetSelectEntryColor() const { return m_aSelectedColor.first; }
-
- void SelectEntry(const Color& rColor);
-
- void SetNoSelection() { getColorWindow()->SetNoSelection(); }
-
- void ShowPreview(const NamedColor &rColor);
- void EnsurePaletteManager();
-
- DECL_LINK(WindowEventListener, VclWindowEvent&, void);
-
- virtual boost::property_tree::ptree DumpAsPropertyTree() override;
-};
-
class ListBoxColorWrapper
{
public:
diff --git a/include/svx/colorwindow.hxx b/include/svx/colorwindow.hxx
index 2452a2ae5827..372470c63cc4 100644
--- a/include/svx/colorwindow.hxx
+++ b/include/svx/colorwindow.hxx
@@ -24,8 +24,6 @@
#include <rtl/ustring.hxx>
#include <svx/SvxColorValueSet.hxx>
#include <svx/Palette.hxx>
-#include <vcl/lstbox.hxx>
-#include <vcl/fixed.hxx>
#include <vcl/toolbox.hxx>
#include <functional>
@@ -51,61 +49,6 @@ typedef std::function<void(const OUString&, const NamedColor&)> ColorSelectFunct
#define COL_NONE_COLOR ::Color(0x80, 0xFF, 0xFF, 0xFF)
-class SVXCORE_DLLPUBLIC SvxColorWindow final : public svtools::ToolbarPopup
-{
-private:
- const sal_uInt16 theSlotId;
- VclPtr<SvxColorValueSet> mpColorSet;
- VclPtr<SvxColorValueSet> mpRecentColorSet;
-
- VclPtr<ListBox> mpPaletteListBox;
- VclPtr<PushButton> mpButtonAutoColor;
- VclPtr<PushButton> mpButtonNoneColor;
- VclPtr<PushButton> mpButtonPicker;
- VclPtr<FixedLine> mpAutomaticSeparator;
- OUString maCommand;
- Link<const NamedColor&, void> maSelectedLink;
-
- VclPtr<vcl::Window> mxParentWindow;
- std::shared_ptr<PaletteManager> mxPaletteManager;
- ColorStatus& mrColorStatus;
-
- ColorSelectFunction maColorSelectFunction;
- bool mbReuseParentForPicker;
-
- DECL_LINK( SelectHdl, ValueSet*, void );
- DECL_LINK( SelectPaletteHdl, ListBox&, void);
- DECL_LINK( AutoColorClickHdl, Button*, void );
- DECL_LINK( OpenPickerClickHdl, Button*, void );
-
- static bool SelectValueSetEntry(SvxColorValueSet* pColorSet, const Color& rColor);
- static NamedColor GetSelectEntryColor(ValueSet const * pColorSet);
- NamedColor GetAutoColor() const;
-
-public:
- SvxColorWindow(const OUString& rCommand,
- std::shared_ptr<PaletteManager> const & rPaletteManager,
- ColorStatus& rColorStatus,
- sal_uInt16 nSlotId,
- const css::uno::Reference< css::frame::XFrame >& rFrame,
- vcl::Window* pParentWindow,
- // tdf#118251 When true, reuse pParentWindow as the parent of the color picker
- // that appears from the 'custom color' button. When false use the window of
- // rFrame. true is helpful when launched from a dialog, false for launched
- // from a toolbar
- bool bReuseParentForPicker,
- ColorSelectFunction const& rColorSelectFunction);
- virtual ~SvxColorWindow() override;
- virtual void dispose() override;
- void SetNoSelection();
- void SelectEntry(const NamedColor& rColor);
- void SelectEntry(const Color& rColor);
- NamedColor GetSelectEntryColor() const;
-
- virtual void KeyInput( const KeyEvent& rKEvt ) override;
- virtual void statusChanged( const css::frame::FeatureStateEvent& rEvent ) override;
-};
-
class SvxColorToolBoxControl;
class SVXCORE_DLLPUBLIC MenuOrToolMenuButton
diff --git a/sd/inc/pch/precompiled_sd.hxx b/sd/inc/pch/precompiled_sd.hxx
index 739759515976..a5c508dc8ac4 100644
--- a/sd/inc/pch/precompiled_sd.hxx
+++ b/sd/inc/pch/precompiled_sd.hxx
@@ -13,7 +13,7 @@
manual changes will be rewritten by the next run of update_pch.sh (which presumably
also fixes all possible problems, so it's usually better to use it).
- Generated on 2020-02-25 20:28:15 using:
+ Generated on 2020-03-27 20:49:46 using:
./bin/update_pch sd sd --cutoff=4 --exclude:system --exclude:module --include:local
If after updating build fails, use the following command to locate conflicting headers:
@@ -28,6 +28,7 @@
#include <initializer_list>
#include <iomanip>
#include <limits.h>
+#include <list>
#include <locale>
#include <map>
#include <memory>
@@ -73,10 +74,8 @@
#include <sal/typesizes.h>
#include <vcl/EnumContext.hxx>
#include <vcl/bitmapex.hxx>
-#include <vcl/builder.hxx>
#include <vcl/commandevent.hxx>
#include <vcl/commandinfoprovider.hxx>
-#include <vcl/ctrl.hxx>
#include <vcl/customweld.hxx>
#include <vcl/dllapi.h>
#include <vcl/errcode.hxx>
@@ -91,7 +90,6 @@
#include <vcl/image.hxx>
#include <vcl/imapobj.hxx>
#include <vcl/keycod.hxx>
-#include <vcl/menu.hxx>
#include <vcl/outdev.hxx>
#include <vcl/ptrstyle.hxx>
#include <vcl/scrbar.hxx>
diff --git a/sd/inc/pch/precompiled_sdui.hxx b/sd/inc/pch/precompiled_sdui.hxx
index 0dad26f2c9dc..49ac3467fc2d 100644
--- a/sd/inc/pch/precompiled_sdui.hxx
+++ b/sd/inc/pch/precompiled_sdui.hxx
@@ -13,7 +13,7 @@
manual changes will be rewritten by the next run of update_pch.sh (which presumably
also fixes all possible problems, so it's usually better to use it).
- Generated on 2020-02-25 20:28:19 using:
+ Generated on 2020-03-27 20:49:49 using:
./bin/update_pch sd sdui --cutoff=4 --exclude:system --include:module --include:local
If after updating build fails, use the following command to locate conflicting headers:
@@ -174,6 +174,7 @@
#include <basegfx/tuple/b2i64tuple.hxx>
#include <basegfx/tuple/b2ituple.hxx>
#include <basegfx/tuple/b3dtuple.hxx>
+#include <basegfx/utils/common.hxx>
#include <basegfx/vector/b2dsize.hxx>
#include <basegfx/vector/b2dvector.hxx>
#include <basegfx/vector/b2enums.hxx>
diff --git a/sd/source/ui/animations/CustomAnimationDialog.cxx b/sd/source/ui/animations/CustomAnimationDialog.cxx
index c62a7381f3bf..2c0df3768793 100644
--- a/sd/source/ui/animations/CustomAnimationDialog.cxx
+++ b/sd/source/ui/animations/CustomAnimationDialog.cxx
@@ -36,15 +36,10 @@
#include <memory>
#include <i18nutil/unicode.hxx>
-#include <vcl/menubtn.hxx>
#include <vcl/svapp.hxx>
-#include <vcl/field.hxx>
-#include <vcl/lstbox.hxx>
#include <vcl/stdtext.hxx>
#include <vcl/weld.hxx>
-#include <vcl/menu.hxx>
#include <vcl/settings.hxx>
-#include <vcl/builderfactory.hxx>
#include <svtools/ctrlbox.hxx>
#include <svtools/ctrltool.hxx>
@@ -87,82 +82,6 @@ using ::com::sun::star::beans::XPropertySet;
namespace sd {
-namespace {
-
-class PresetPropertyBox : public PropertySubControl
-{
-public:
- PresetPropertyBox( sal_Int32 nControlType, vcl::Window* pParent, const Any& rValue, const OUString& aPresetId, const Link<LinkParamNone*,void>& rModifyHdl );
- virtual ~PresetPropertyBox() override;
-
- virtual Any getValue() override;
- virtual void setValue( const Any& rValue, const OUString& rPresetId ) override;
- virtual Control* getControl() override;
-
-private:
- std::map< sal_uInt16, OUString > maPropertyValues;
- VclPtr<ListBox> mpControl;
- DECL_LINK(OnSelect, ListBox&, void);
- Link<LinkParamNone*,void> maModifyLink;
-};
-
-}
-
-PresetPropertyBox::PresetPropertyBox( sal_Int32 nControlType, vcl::Window* pParent, const Any& rValue, const OUString& aPresetId, const Link<LinkParamNone*,void>& rModifyHdl )
-: PropertySubControl( nControlType ), maModifyLink(rModifyHdl)
-{
- mpControl = VclPtr<ListBox>::Create( pParent, WB_BORDER|WB_TABSTOP|WB_DROPDOWN );
- mpControl->set_hexpand(true);
- mpControl->SetDropDownLineCount( 10 );
- mpControl->SetSelectHdl( LINK(this, PresetPropertyBox, OnSelect) );
- mpControl->SetHelpId( HID_SD_CUSTOMANIMATIONPANE_PRESETPROPERTYBOX );
-
- setValue( rValue, aPresetId );
-}
-
-IMPL_LINK_NOARG(PresetPropertyBox, OnSelect, ListBox&, void)
-{
- maModifyLink.Call(nullptr);
-}
-
-void PresetPropertyBox::setValue( const Any& rValue, const OUString& rPresetId )
-{
- if( !mpControl )
- return;
-
- mpControl->Clear();
-
- const CustomAnimationPresets& rPresets = CustomAnimationPresets::getCustomAnimationPresets();
- CustomAnimationPresetPtr pDescriptor = rPresets.getEffectDescriptor( rPresetId );
- if( pDescriptor.get() )
- {
-
- OUString aPropertyValue;
- rValue >>= aPropertyValue;
-
- std::vector<OUString> aSubTypes( pDescriptor->getSubTypes() );
-
- mpControl->Enable( !aSubTypes.empty() );
-
- for( const auto& aSubType : aSubTypes )
- {
- sal_Int32 nPos = mpControl->InsertEntry( rPresets.getUINameForProperty( aSubType ) );
- if( aSubType == aPropertyValue )
- mpControl->SelectEntryPos( nPos );
- maPropertyValues[nPos] = aSubType;
- }
- }
- else
- {
- mpControl->Enable( false );
- }
-}
-
-PresetPropertyBox::~PresetPropertyBox()
-{
- mpControl.disposeAndClear();
-}
-
SdPropertySubControl::SdPropertySubControl(weld::Container* pParent)
: mxBuilder(Application::CreateBuilder(pParent, "modules/simpress/ui/customanimationfragment.ui"))
, mxContainer(mxBuilder->weld_container("EffectFragment"))
@@ -170,16 +89,6 @@ SdPropertySubControl::SdPropertySubControl(weld::Container* pParent)
{
}
-Any PresetPropertyBox::getValue()
-{
- return makeAny( maPropertyValues[mpControl->GetSelectedEntryPos()] );
-}
-
-Control* PresetPropertyBox::getControl()
-{
- return mpControl;
-}
-
SdPropertySubControl::~SdPropertySubControl()
{
mpParent->move(mxContainer.get(), nullptr);
@@ -271,72 +180,7 @@ Any SdPresetPropertyBox::getValue()
namespace {
-class ColorPropertyBox : public PropertySubControl
-{
-public:
- ColorPropertyBox( sal_Int32 nControlType, vcl::Window* pParent, const Any& rValue, const Link<LinkParamNone*,void>& rModifyHdl );
- virtual ~ColorPropertyBox() override;
-
- virtual Any getValue() override;
- virtual void setValue( const Any& rValue, const OUString& rPresetId ) override;
- virtual Control* getControl() override;
-
-private:
- VclPtr<SvxColorListBox> mpControl;
- DECL_LINK(OnSelect, SvxColorListBox&, void);
- Link<LinkParamNone*,void> maModifyLink;
-};
-
-}
-
-ColorPropertyBox::ColorPropertyBox( sal_Int32 nControlType, vcl::Window* pParent, const Any& rValue, const Link<LinkParamNone*,void>& rModifyHdl )
-: PropertySubControl( nControlType ), maModifyLink(rModifyHdl)
-{
- mpControl = VclPtr<SvxColorListBox>::Create(pParent);
- mpControl->set_hexpand(true);
- mpControl->SetSelectHdl( LINK(this, ColorPropertyBox, OnSelect) );
- mpControl->SetHelpId( HID_SD_CUSTOMANIMATIONPANE_COLORPROPERTYBOX );
-
- sal_Int32 nColor = 0;
- rValue >>= nColor;
- mpControl->SelectEntry(Color(nColor));
-}
-
-IMPL_LINK_NOARG(ColorPropertyBox, OnSelect, SvxColorListBox&, void)
-{
- maModifyLink.Call(nullptr);
-}
-
-ColorPropertyBox::~ColorPropertyBox()
-{
- mpControl.disposeAndClear();
-}
-
-void ColorPropertyBox::setValue( const Any& rValue, const OUString& )
-{
- if( mpControl )
- {
- sal_Int32 nColor = 0;
- rValue >>= nColor;
-
- mpControl->SetNoSelection();
- mpControl->SelectEntry(Color(nColor));
- }
-}
-
-Any ColorPropertyBox::getValue()
-{
- return makeAny( sal_Int32(mpControl->GetSelectEntryColor().GetRGBColor()) );
-}
-
-Control* ColorPropertyBox::getControl()
-{
- return mpControl;
-}
-
-namespace {
-
-class SdColorPropertyBox : public SdPropertySubControl
+class SdColorPropertyBox : public SdPropertySubControl
{
public:
SdColorPropertyBox(weld::Label* pLabel, weld::Container* pParent, weld::Window* pTopLevel, const Any& rValue, const Link<LinkParamNone*,void>& rModifyHdl);
@@ -392,90 +236,6 @@ Any SdColorPropertyBox::getValue()
namespace {
-class FontPropertyBox : public PropertySubControl
-{
-public:
- FontPropertyBox( sal_Int32 nControlType, vcl::Window* pParent, const Any& rValue, const Link<LinkParamNone*,void>& rModifyHdl );
- virtual ~FontPropertyBox() override;
-
- virtual Any getValue() override;
- virtual void setValue( const Any& rValue, const OUString& rPresetId ) override;
-
- virtual Control* getControl() override;
-
-private:
- VclPtr<FontNameBox> mpControl;
- Link<LinkParamNone*,void> maModifyHdl;
- DECL_LINK(ControlSelectHdl, ComboBox&, void);
-};
-
-}
-
-FontPropertyBox::FontPropertyBox( sal_Int32 nControlType, vcl::Window* pParent, const Any& rValue, const Link<LinkParamNone*,void>& rModifyHdl )
-: PropertySubControl( nControlType ), maModifyHdl(rModifyHdl)
-{
- mpControl = VclPtr<FontNameBox>::Create( pParent, WB_BORDER|WB_TABSTOP|WB_DROPDOWN );
- mpControl->set_hexpand(true);
- mpControl->SetDropDownLineCount( 10 );
- mpControl->SetSelectHdl( LINK(this, FontPropertyBox, ControlSelectHdl) );
- mpControl->SetHelpId( HID_SD_CUSTOMANIMATIONPANE_FONTPROPERTYBOX );
-
- SfxObjectShell* pDocSh = SfxObjectShell::Current();
- const SfxPoolItem* pItem;
-
- const FontList* pFontList = nullptr;
- bool bMustDelete = false;
-
- if ( pDocSh && ( (pItem = pDocSh->GetItem( SID_ATTR_CHAR_FONTLIST ) ) != nullptr) )
- pFontList = static_cast<const SvxFontListItem*>(pItem)->GetFontList();
-
- if(!pFontList)
- {
- pFontList = new FontList(Application::GetDefaultDevice(), nullptr);
- bMustDelete = true;
- }
-
- mpControl->Fill( pFontList );
-
- if( bMustDelete )
- delete pFontList;
-
- setValue( rValue, OUString() );
-}
-
-IMPL_LINK_NOARG(FontPropertyBox, ControlSelectHdl, ComboBox&, void)
-{
- maModifyHdl.Call(nullptr);
-}
-
-void FontPropertyBox::setValue( const Any& rValue, const OUString& )
-{
- if( mpControl )
- {
- OUString aFontName;
- rValue >>= aFontName;
- mpControl->SetText( aFontName );
- }
-}
-
-FontPropertyBox::~FontPropertyBox()
-{
- mpControl.disposeAndClear();
-}
-
-Any FontPropertyBox::getValue()
-{
- OUString aFontName( mpControl->GetText() );
- return makeAny( aFontName );
-}
-
-Control* FontPropertyBox::getControl()
-{
- return mpControl;
-}
-
-namespace {
-
class SdFontPropertyBox : public SdPropertySubControl
{
public:
@@ -558,175 +318,6 @@ Any SdFontPropertyBox::getValue()
namespace {
-class DropdownMenuBox : public Edit
-{
-public:
- DropdownMenuBox( vcl::Window* pParent, Edit* pSubControl, PopupMenu* pMenu );
- virtual ~DropdownMenuBox() override;
- virtual void dispose() override;
-
- void Resize() override;
- bool PreNotify( NotifyEvent& rNEvt ) override;
-
- void SetMenuSelectHdl( const Link<MenuButton *, void>& rLink ) { mpDropdownButton->SetSelectHdl( rLink ); }
-
-private:
- VclPtr<Edit> mpSubControl;
- VclPtr<MenuButton> mpDropdownButton;
- VclPtr<PopupMenu> mpMenu;
-};
-
-}
-
-DropdownMenuBox::DropdownMenuBox( vcl::Window* pParent, Edit* pSubControl, PopupMenu* pMenu )
-: Edit( pParent, WB_BORDER|WB_TABSTOP| WB_DIALOGCONTROL ),
- mpSubControl(pSubControl),mpDropdownButton(nullptr),mpMenu(pMenu)
-{
- mpDropdownButton = VclPtr<MenuButton>::Create( this, WB_NOLIGHTBORDER | WB_RECTSTYLE | WB_NOTABSTOP);
- mpDropdownButton->SetSymbol(SymbolType::SPIN_DOWN);
- mpDropdownButton->Show();
- mpDropdownButton->SetPopupMenu( pMenu );
-
- SetSubEdit( mpSubControl );
- set_hexpand(true);
- mpSubControl->SetParent( this );
- mpSubControl->Show();
-}
-
-DropdownMenuBox::~DropdownMenuBox()
-{
- disposeOnce();
-}
-
-void DropdownMenuBox::dispose()
-{
- SetSubEdit(nullptr);
- mpDropdownButton.disposeAndClear();
- mpMenu.disposeAndClear();
- mpSubControl.disposeAndClear();
- Edit::dispose();
-}
-
-void DropdownMenuBox::Resize()
-{
- Size aOutSz = GetOutputSizePixel();
-
- long nSBWidth = GetSettings().GetStyleSettings().GetScrollBarSize();
- nSBWidth = CalcZoom( nSBWidth );
- mpSubControl->setPosSizePixel( 0, 1, aOutSz.Width() - nSBWidth, aOutSz.Height()-2 );
- mpDropdownButton->setPosSizePixel( aOutSz.Width() - nSBWidth, 0, nSBWidth, aOutSz.Height() );
-}
-
-bool DropdownMenuBox::PreNotify( NotifyEvent& rNEvt )
-{
- bool bResult = true;
-
- MouseNotifyEvent nSwitch=rNEvt.GetType();
- if (nSwitch==MouseNotifyEvent::KEYINPUT)
- {
- const vcl::KeyCode& aKeyCode=rNEvt.GetKeyEvent()->GetKeyCode();
- sal_uInt16 nKey=aKeyCode.GetCode();
-
- if (nKey==KEY_DOWN && aKeyCode.IsMod2())
- {
- mpDropdownButton->KeyInput( *rNEvt.GetKeyEvent() );
- }
- else
- {
- bResult=Edit::PreNotify(rNEvt);
- }
- }
- else
- bResult=Edit::PreNotify(rNEvt);
-
- return bResult;
-}
-
-namespace {
-
-class CharHeightPropertyBox : public PropertySubControl
-{
-public:
- CharHeightPropertyBox( sal_Int32 nControlType, vcl::Window* pParent, const Any& rValue, const Link<LinkParamNone*,void>& rModifyHdl );
- virtual ~CharHeightPropertyBox() override;
-
- virtual Any getValue() override;
- virtual void setValue( const Any& rValue, const OUString& ) override;
-
- virtual Control* getControl() override;
-
- DECL_LINK( implMenuSelectHdl, MenuButton*, void );
-
-private:
- DECL_LINK( EditModifyHdl, Edit&, void );
- VclBuilder maBuilder;
- VclPtr<DropdownMenuBox> mpControl;
- VclPtr<PopupMenu> mpMenu;
- VclPtr<MetricField> mpMetric;
- Link<LinkParamNone*,void> maModifyHdl;
-};
-
-}
-
-CharHeightPropertyBox::CharHeightPropertyBox(sal_Int32 nControlType, vcl::Window* pParent, const Any& rValue, const Link<LinkParamNone*,void>& rModifyHdl)
- : PropertySubControl(nControlType)
- , maBuilder(nullptr, VclBuilderContainer::getUIRootDir(), "modules/simpress/ui/fontsizemenu.ui", "")
- , maModifyHdl(rModifyHdl)
-{
- mpMetric.set( VclPtr<MetricField>::Create( pParent, WB_TABSTOP|WB_IGNORETAB| WB_NOBORDER) );
- mpMetric->SetUnit( FieldUnit::PERCENT );
- mpMetric->SetMin( 0 );
- mpMetric->SetMax( 1000 );
-
- mpMenu = maBuilder.get_menu("menu");
- mpControl = VclPtr<DropdownMenuBox>::Create( pParent, mpMetric, mpMenu );
- mpControl->SetMenuSelectHdl( LINK( this, CharHeightPropertyBox, implMenuSelectHdl ));
- mpControl->SetModifyHdl( LINK( this, CharHeightPropertyBox, EditModifyHdl ) );
- mpControl->SetHelpId( HID_SD_CUSTOMANIMATIONPANE_CHARHEIGHTPROPERTYBOX );
-
- setValue( rValue, OUString() );
-}
-
-CharHeightPropertyBox::~CharHeightPropertyBox()
-{
- maBuilder.disposeBuilder();
- mpControl.disposeAndClear();
-}
-
-IMPL_LINK_NOARG( CharHeightPropertyBox, EditModifyHdl, Edit&, void )
-{
- maModifyHdl.Call(nullptr);
-}
-
-IMPL_LINK( CharHeightPropertyBox, implMenuSelectHdl, MenuButton*, pPb, void )
-{
- sal_Int32 nValue = pPb->GetCurItemIdent().toInt32();
- mpMetric->SetValue(nValue);
- mpMetric->Modify();
-}
-
-void CharHeightPropertyBox::setValue( const Any& rValue, const OUString& )
-{
- if( mpMetric.get() )
- {
- double fValue = 0.0;
- rValue >>= fValue;
- mpMetric->SetValue( static_cast<long>(fValue * 100.0) );
- }
-}
-
-Any CharHeightPropertyBox::getValue()
-{
- return makeAny( static_cast<double>(mpMetric->GetValue()) / 100.0 );
-}
-
-Control* CharHeightPropertyBox::getControl()
-{
- return mpControl;
-}
-
-namespace {
-
class SdCharHeightPropertyBox : public SdPropertySubControl
{
public:
@@ -794,109 +385,6 @@ Any SdCharHeightPropertyBox::getValue()
namespace {
-class TransparencyPropertyBox : public PropertySubControl
-{
-public:
- TransparencyPropertyBox( sal_Int32 nControlType, vcl::Window* pParent, const Any& rValue, const Link<LinkParamNone*,void>& rModifyHdl );
- virtual ~TransparencyPropertyBox() override;
-
- virtual Any getValue() override;
- virtual void setValue( const Any& rValue, const OUString& rPresetId ) override;
-
- virtual Control* getControl() override;
-
- DECL_LINK( implMenuSelectHdl, MenuButton*, void );
- DECL_LINK( implModifyHdl, Edit&, void );
-
- void updateMenu();
-
-private:
- VclPtr<DropdownMenuBox> mpControl;
- VclPtr<PopupMenu> mpMenu;
- VclPtr<MetricField> mpMetric;
- Link<LinkParamNone*,void> maModifyHdl;
-};
-
-}
-
-TransparencyPropertyBox::TransparencyPropertyBox( sal_Int32 nControlType, vcl::Window* pParent, const Any& rValue, const Link<LinkParamNone*,void>& rModifyHdl )
-: PropertySubControl( nControlType )
-, maModifyHdl( rModifyHdl )
-{
- mpMetric.set( VclPtr<MetricField>::Create( pParent ,WB_TABSTOP|WB_IGNORETAB| WB_NOBORDER) );
- mpMetric->SetUnit( FieldUnit::PERCENT );
- mpMetric->SetMin( 0 );
- mpMetric->SetMax( 100 );
-
- mpMenu = VclPtr<PopupMenu>::Create();
- for( sal_Int32 i = 25; i < 101; i += 25 )
- {
- OUString aStr(unicode::formatPercent(i,
- Application::GetSettings().GetUILanguageTag()));
- mpMenu->InsertItem( i, aStr );
- }
-
- mpControl = VclPtr<DropdownMenuBox>::Create( pParent, mpMetric, mpMenu );
- mpControl->SetMenuSelectHdl( LINK( this, TransparencyPropertyBox, implMenuSelectHdl ));
- mpControl->SetHelpId( HID_SD_CUSTOMANIMATIONPANE_TRANSPARENCYPROPERTYBOX );
-
- Link<Edit&,void> aLink( LINK( this, TransparencyPropertyBox, implModifyHdl ) );
- mpControl->SetModifyHdl( aLink );
-
- setValue( rValue, OUString() );
-}
-
-TransparencyPropertyBox::~TransparencyPropertyBox()
-{
- mpControl.disposeAndClear();
-}
-
-void TransparencyPropertyBox::updateMenu()
-{
- sal_Int64 nValue = mpMetric->GetValue();
- for( sal_uInt16 i = 25; i < 101; i += 25 )
- mpMenu->CheckItem( i, nValue == i );
-}
-
-IMPL_LINK_NOARG(TransparencyPropertyBox, implModifyHdl, Edit&, void)
-{
- updateMenu();
- maModifyHdl.Call(nullptr);
-}
-
-IMPL_LINK( TransparencyPropertyBox, implMenuSelectHdl, MenuButton*, pPb, void )
-{
- if( pPb->GetCurItemId() != mpMetric->GetValue() )
- {
- mpMetric->SetValue( pPb->GetCurItemId() );
- mpMetric->Modify();
- }
-}
-
-void TransparencyPropertyBox::setValue( const Any& rValue, const OUString& )
-{
- if( mpMetric.get() )
- {
- double fValue = 0.0;
- rValue >>= fValue;
- long nValue = static_cast<long>(fValue * 100);
- mpMetric->SetValue( nValue );
- updateMenu();
- }
-}
-
-Any TransparencyPropertyBox::getValue()
-{
- return makeAny( static_cast<double>(mpMetric->GetValue()) / 100.0 );
-}
-
-Control* TransparencyPropertyBox::getControl()
-{
- return mpControl;
-}
-
-namespace {
-
class SdTransparencyPropertyBox : public SdPropertySubControl
{
public:
@@ -986,129 +474,6 @@ Any SdTransparencyPropertyBox::getValue()
namespace {
-class RotationPropertyBox : public PropertySubControl
-{
-public:
- RotationPropertyBox( sal_Int32 nControlType, vcl::Window* pParent, const Any& rValue, const Link<LinkParamNone*,void>& rModifyHdl );
- virtual ~RotationPropertyBox() override;
-
- virtual Any getValue() override;
- virtual void setValue( const Any& rValue, const OUString& ) override;
-
- virtual Control* getControl() override;
-
- DECL_LINK( implMenuSelectHdl, MenuButton*, void );
- DECL_LINK( implModifyHdl, Edit&, void );
-
- void updateMenu();
-
-private:
- VclBuilder maBuilder;
- VclPtr<DropdownMenuBox> mpControl;
- VclPtr<PopupMenu> mpMenu;
- VclPtr<MetricField> mpMetric;
- Link<LinkParamNone*,void> maModifyHdl;
-};
-
-}
-
-RotationPropertyBox::RotationPropertyBox( sal_Int32 nControlType, vcl::Window* pParent, const Any& rValue, const Link<LinkParamNone*,void>& rModifyHdl )
- : PropertySubControl(nControlType)
- , maBuilder(nullptr, VclBuilderContainer::getUIRootDir(), "modules/simpress/ui/rotatemenu.ui", "")
- , maModifyHdl(rModifyHdl)
-{
- mpMetric.set( VclPtr<MetricField>::Create( pParent ,WB_TABSTOP|WB_IGNORETAB| WB_NOBORDER) );
- mpMetric->SetUnit( FieldUnit::CUSTOM );
- mpMetric->SetCustomUnitText( OUString( u'\x00b0') ); // degree sign
- mpMetric->SetMin( -10000 );
- mpMetric->SetMax( 10000 );
-
- mpMenu = maBuilder.get_menu("menu");
- mpControl = VclPtr<DropdownMenuBox>::Create( pParent, mpMetric, mpMenu );
- mpControl->SetMenuSelectHdl( LINK( this, RotationPropertyBox, implMenuSelectHdl ));
- mpControl->SetHelpId( HID_SD_CUSTOMANIMATIONPANE_ROTATIONPROPERTYBOX );
-
- Link<Edit&,void> aLink( LINK( this, RotationPropertyBox, implModifyHdl ) );
- mpControl->SetModifyHdl( aLink );
-
- setValue( rValue, OUString() );
-}
-
-RotationPropertyBox::~RotationPropertyBox()
-{
- maBuilder.disposeBuilder();
- mpControl.disposeAndClear();
-}
-
-void RotationPropertyBox::updateMenu()
-{
- sal_Int64 nValue = mpMetric->GetValue();
- bool bDirection = nValue >= 0;
- nValue = (nValue < 0 ? -nValue : nValue);
-
- mpMenu->CheckItem("90", nValue == 90);
- mpMenu->CheckItem("180", nValue == 180);
- mpMenu->CheckItem("360", nValue == 360);
- mpMenu->CheckItem("720", nValue == 720);
-
- mpMenu->CheckItem("closewise", bDirection);
- mpMenu->CheckItem("counterclock", !bDirection);
-}
-
-IMPL_LINK_NOARG(RotationPropertyBox, implModifyHdl, Edit&, void)
-{
- updateMenu();
- maModifyHdl.Call(nullptr);
-}
-
-IMPL_LINK( RotationPropertyBox, implMenuSelectHdl, MenuButton*, pPb, void )
-{
- sal_Int64 nValue = mpMetric->GetValue();
- bool bDirection = nValue >= 0;
- nValue = (nValue < 0 ? -nValue : nValue);
-
- OString sIdent = pPb->GetCurItemIdent();
- if (sIdent == "clockwise")
- bDirection = true;
- else if (sIdent == "counterclock")
- bDirection = false;
- else
- nValue = sIdent.toInt32();
-
- if( !bDirection )
- nValue = -nValue;
-
- if( nValue != mpMetric->GetValue() )
- {
- mpMetric->SetValue( nValue );
- mpMetric->Modify();
- }
-}
-
-void RotationPropertyBox::setValue( const Any& rValue, const OUString& )
-{
- if( mpMetric.get() )
- {
- double fValue = 0.0;
- rValue >>= fValue;
- long nValue = static_cast<long>(fValue);
- mpMetric->SetValue( nValue );
- updateMenu();
- }
-}
-
-Any RotationPropertyBox::getValue()
-{
- return makeAny( static_cast<double>(mpMetric->GetValue()) );
-}
-
-Control* RotationPropertyBox::getControl()
-{
- return mpControl;
-}
-
-namespace {
-
class SdRotationPropertyBox : public SdPropertySubControl
{
public:
@@ -1146,250 +511,68 @@ SdRotationPropertyBox::SdRotationPropertyBox(weld::Label* pLabel, weld::Containe
mxControl->set_help_id(HID_SD_CUSTOMANIMATIONPANE_ROTATIONPROPERTYBOX);
mxControl->show();
- setValue(rValue, OUString());
-}
-
-void SdRotationPropertyBox::updateMenu()
-{
- sal_Int64 nValue = mxMetric->get_value(FieldUnit::DEGREE);
- bool bDirection = nValue >= 0;
- nValue = (nValue < 0 ? -nValue : nValue);
-
- mxControl->set_item_active("90", nValue == 90);
- mxControl->set_item_active("180", nValue == 180);
- mxControl->set_item_active("360", nValue == 360);
- mxControl->set_item_active("720", nValue == 720);
-
- mxControl->set_item_active("closewise", bDirection);
- mxControl->set_item_active("counterclock", !bDirection);
-}
-
-IMPL_LINK_NOARG(SdRotationPropertyBox, implModifyHdl, weld::MetricSpinButton&, void)
-{
- updateMenu();
- maModifyHdl.Call(nullptr);
-}
-
-IMPL_LINK(SdRotationPropertyBox, implMenuSelectHdl, const OString&, rIdent, void)
-{
- auto nValue = mxMetric->get_value(FieldUnit::DEGREE);
- bool bDirection = nValue >= 0;
- nValue = (nValue < 0 ? -nValue : nValue);
-
- if (rIdent == "clockwise")
- bDirection = true;
- else if (rIdent == "counterclock")
- bDirection = false;
- else
- nValue = rIdent.toInt32();
-
- if( !bDirection )
- nValue = -nValue;
-
- if (nValue != mxMetric->get_value(FieldUnit::DEGREE))
- {
- mxMetric->set_value(nValue, FieldUnit::DEGREE);
- implModifyHdl(*mxMetric);
- }
-}
-
-void SdRotationPropertyBox::setValue( const Any& rValue, const OUString& )
-{
- if (mxMetric)
- {
- double fValue = 0.0;
- rValue >>= fValue;
- long nValue = static_cast<long>(fValue);
- mxMetric->set_value(nValue, FieldUnit::DEGREE);
- updateMenu();
- }
-}
-
-Any SdRotationPropertyBox::getValue()
-{
- return makeAny(static_cast<double>(mxMetric->get_value(FieldUnit::DEGREE)));
-}
-
-namespace {
-
-class ScalePropertyBox : public PropertySubControl
-{
-public:
- ScalePropertyBox( sal_Int32 nControlType, vcl::Window* pParent, const Any& rValue, const Link<LinkParamNone*,void>& rModifyHdl );
- virtual ~ScalePropertyBox() override;
-
- virtual Any getValue() override;
- virtual void setValue( const Any& rValue, const OUString& ) override;
-
- virtual Control* getControl() override;
-
- DECL_LINK( implMenuSelectHdl, MenuButton*, void );
- DECL_LINK( implModifyHdl, Edit&, void );
-
- void updateMenu();
-
-private:
- VclBuilder maBuilder;
- VclPtr<DropdownMenuBox> mpControl;
- VclPtr<PopupMenu> mpMenu;
- VclPtr<MetricField> mpMetric;
- Link<LinkParamNone*,void> maModifyHdl;
- int mnDirection;
-};
-
-}
-
-ScalePropertyBox::ScalePropertyBox(sal_Int32 nControlType, vcl::Window* pParent, const Any& rValue, const Link<LinkParamNone*,void>& rModifyHdl)
- : PropertySubControl( nControlType )
- , maBuilder(nullptr, VclBuilderContainer::getUIRootDir(), "modules/simpress/ui/scalemenu.ui", "")
- , maModifyHdl( rModifyHdl )
-{
- mpMetric.set( VclPtr<MetricField>::Create( pParent ,WB_TABSTOP|WB_IGNORETAB| WB_NOBORDER) );
- mpMetric->SetUnit( FieldUnit::PERCENT );
- mpMetric->SetMin( 0 );
- mpMetric->SetMax( 10000 );
-
- mpMenu = maBuilder.get_menu("menu");
- mpControl = VclPtr<DropdownMenuBox>::Create( pParent, mpMetric, mpMenu );
- mpControl->SetMenuSelectHdl( LINK( this, ScalePropertyBox, implMenuSelectHdl ));
- mpControl->SetHelpId( HID_SD_CUSTOMANIMATIONPANE_SCALEPROPERTYBOX );
-
- Link<Edit&,void> aLink( LINK( this, ScalePropertyBox, implModifyHdl ) );
- mpControl->SetModifyHdl( aLink );
-
- setValue( rValue, OUString() );
-}
-
-ScalePropertyBox::~ScalePropertyBox()
-{
- maBuilder.disposeBuilder();
- mpControl.disposeAndClear();
+ setValue(rValue, OUString());
}
-void ScalePropertyBox::updateMenu()
+void SdRotationPropertyBox::updateMenu()
{
- sal_Int64 nValue = mpMetric->GetValue();
+ sal_Int64 nValue = mxMetric->get_value(FieldUnit::DEGREE);
+ bool bDirection = nValue >= 0;
+ nValue = (nValue < 0 ? -nValue : nValue);
- mpMenu->CheckItem("25", nValue == 25);
- mpMenu->CheckItem("50", nValue == 50);
- mpMenu->CheckItem("150", nValue == 150);
- mpMenu->CheckItem("400", nValue == 400);
+ mxControl->set_item_active("90", nValue == 90);
+ mxControl->set_item_active("180", nValue == 180);
+ mxControl->set_item_active("360", nValue == 360);
+ mxControl->set_item_active("720", nValue == 720);
- mpMenu->CheckItem("hori", mnDirection == 1);
- mpMenu->CheckItem("vert", mnDirection == 2);
- mpMenu->CheckItem("both", mnDirection == 3);
+ mxControl->set_item_active("closewise", bDirection);
+ mxControl->set_item_active("counterclock", !bDirection);
}
-IMPL_LINK_NOARG(ScalePropertyBox, implModifyHdl, Edit&, void)
+IMPL_LINK_NOARG(SdRotationPropertyBox, implModifyHdl, weld::MetricSpinButton&, void)
{
updateMenu();
maModifyHdl.Call(nullptr);
}
-IMPL_LINK( ScalePropertyBox, implMenuSelectHdl, MenuButton*, pPb, void )
+IMPL_LINK(SdRotationPropertyBox, implMenuSelectHdl, const OString&, rIdent, void)
{
- sal_Int64 nValue = mpMetric->GetValue();
-
- int nDirection = mnDirection;
+ auto nValue = mxMetric->get_value(FieldUnit::DEGREE);
+ bool bDirection = nValue >= 0;
+ nValue = (nValue < 0 ? -nValue : nValue);
- OString sIdent(pPb->GetCurItemIdent());
- if (sIdent == "hori")
- nDirection = 1;
- else if (sIdent == "veri")
- nDirection = 2;
- else if (sIdent == "both")
- nDirection = 3;
+ if (rIdent == "clockwise")
+ bDirection = true;
+ else if (rIdent == "counterclock")
+ bDirection = false;
else
- nValue = sIdent.toInt32();
-
- bool bModified = false;
+ nValue = rIdent.toInt32();
- if( nDirection != mnDirection )
- {
- mnDirection = nDirection;
- bModified = true;
- }
+ if( !bDirection )
+ nValue = -nValue;
- if( nValue != mpMetric->GetValue() )
+ if (nValue != mxMetric->get_value(FieldUnit::DEGREE))
{
- mpMetric->SetValue( nValue );
- bModified = true;
+ mxMetric->set_value(nValue, FieldUnit::DEGREE);
+ implModifyHdl(*mxMetric);
}
+}
- if( bModified )
+void SdRotationPropertyBox::setValue( const Any& rValue, const OUString& )
+{
+ if (mxMetric)
{
- mpMetric->Modify();
+ double fValue = 0.0;
+ rValue >>= fValue;
+ long nValue = static_cast<long>(fValue);
+ mxMetric->set_value(nValue, FieldUnit::DEGREE);
updateMenu();
}
}
-void ScalePropertyBox::setValue( const Any& rValue, const OUString& )
-{
- if( !mpMetric.get() )
- return;
-
- ValuePair aValues;
- rValue >>= aValues;
-
- double fValue1 = 0.0;
- double fValue2 = 0.0;
-
- aValues.First >>= fValue1;
- aValues.Second >>= fValue2;
-
- if( fValue2 == 0.0 )
- mnDirection = 1;
- else if( fValue1 == 0.0 )
- mnDirection = 2;
- else
- mnDirection = 3;
-
- // Shrink animation is represented by negative value
- // Shrink factor is calculated as (1 + $fValue)
- // e.g 1 + (-0.75) = 0.25 => shrink to 25% of the size
- // 0.25 = -0.75 + 1
- if ( fValue1 < 0.0 )
- fValue1 += 1;
- if ( fValue2 < 0.0 )
- fValue2 += 1;
-
- long nValue;
- if( fValue1 )
- nValue = static_cast<long>(fValue1 * 100.0);
- else
- nValue = static_cast<long>(fValue2 * 100.0);
- mpMetric->SetValue( nValue );
- updateMenu();
-}
-
-Any ScalePropertyBox::getValue()
-{
- double fValue1 = static_cast<double>(mpMetric->GetValue()) / 100.0;
-
- // Shrink animation is represented by value < 1 (< 100%)
- // Shrink factor is calculated as (1 + $fValue)
- // e.g shrink to 25% of the size: 0.25 = 1 + $fValue =>
- // $fValue = -0.75; -0.75 = 0.25 -1
- if ( fValue1 < 1.0 )
- fValue1 -= 1;
-
- double fValue2 = fValue1;
-
- if( mnDirection == 1 )
- fValue2 = 0.0;
- else if( mnDirection == 2 )
- fValue1 = 0.0;
-
- ValuePair aValues;
- aValues.First <<= fValue1;
- aValues.Second <<= fValue2;
-
- return makeAny( aValues );
-}
-
-Control* ScalePropertyBox::getControl()
+Any SdRotationPropertyBox::getValue()
{
- return mpControl;
+ return makeAny(static_cast<double>(mxMetric->get_value(FieldUnit::DEGREE)));
}
namespace {
@@ -1557,130 +740,6 @@ Any SdScalePropertyBox::getValue()
namespace {
-class FontStylePropertyBox : public PropertySubControl
-{
-public:
- FontStylePropertyBox( sal_Int32 nControlType, vcl::Window* pParent, const Any& rValue, const Link<LinkParamNone*,void>& rModifyHdl );
- virtual ~FontStylePropertyBox() override;
-
- virtual Any getValue() override;
- virtual void setValue( const Any& rValue, const OUString& ) override;
-
- virtual Control* getControl() override;
-
- DECL_LINK( implMenuSelectHdl, MenuButton*, void );
-
- void update();
-
-private:
- VclBuilder maBuilder;
- VclPtr<DropdownMenuBox> mpControl;
- VclPtr<PopupMenu> mpMenu;
- VclPtr<Edit> mpEdit;
- Link<LinkParamNone*,void> maModifyHdl;
-
- float mfFontWeight;
- awt::FontSlant meFontSlant;
- sal_Int16 mnFontUnderline;
-};
-
-}
-
-FontStylePropertyBox::FontStylePropertyBox( sal_Int32 nControlType, vcl::Window* pParent, const Any& rValue, const Link<LinkParamNone*,void>& rModifyHdl )
- : PropertySubControl(nControlType)
- , maBuilder(nullptr, VclBuilderContainer::getUIRootDir(), "modules/simpress/ui/fontstylemenu.ui", "")
- , maModifyHdl( rModifyHdl )
-{
- mpEdit.set( VclPtr<Edit>::Create( pParent, WB_TABSTOP|WB_IGNORETAB|WB_NOBORDER|WB_READONLY) );
- mpEdit->SetText( SdResId(STR_CUSTOMANIMATION_SAMPLE) );
-
- mpMenu = maBuilder.get_menu("menu");
- mpControl = VclPtr<DropdownMenuBox>::Create( pParent, mpEdit, mpMenu );
- mpControl->SetMenuSelectHdl( LINK( this, FontStylePropertyBox, implMenuSelectHdl ));
- mpControl->SetHelpId( HID_SD_CUSTOMANIMATIONPANE_FONTSTYLEPROPERTYBOX );
-
- setValue( rValue, OUString() );
-}
-
-FontStylePropertyBox::~FontStylePropertyBox()
-{
- maBuilder.disposeBuilder();
- mpControl.disposeAndClear();
-}
-
-void FontStylePropertyBox::update()
-{
- // update menu
- mpMenu->CheckItem("bold", mfFontWeight == awt::FontWeight::BOLD);
- mpMenu->CheckItem("italic", meFontSlant == awt::FontSlant_ITALIC);
- mpMenu->CheckItem("underline", mnFontUnderline != awt::FontUnderline::NONE );
-
- // update sample edit
- vcl::Font aFont( mpEdit->GetFont() );
- aFont.SetWeight( mfFontWeight == awt::FontWeight::BOLD ? WEIGHT_BOLD : WEIGHT_NORMAL );
- aFont.SetItalic( meFontSlant == awt::FontSlant_ITALIC ? ITALIC_NORMAL : ITALIC_NONE );
- aFont.SetUnderline( mnFontUnderline == awt::FontUnderline::NONE ? LINESTYLE_NONE : LINESTYLE_SINGLE );
- mpEdit->SetFont( aFont );
- mpEdit->Invalidate();
-}
-
-IMPL_LINK( FontStylePropertyBox, implMenuSelectHdl, MenuButton*, pPb, void )
-{
- OString sIdent = pPb->GetCurItemIdent();
- if (sIdent == "bold")
- {
- if( mfFontWeight == awt::FontWeight::BOLD )
- mfFontWeight = awt::FontWeight::NORMAL;
- else
- mfFontWeight = awt::FontWeight::BOLD;
- }
- else if (sIdent == "italic")
- {
- if( meFontSlant == awt::FontSlant_ITALIC )
- meFontSlant = awt::FontSlant_NONE;
- else
- meFontSlant = awt::FontSlant_ITALIC;
- }
- else if (sIdent == "underline")
- {
- if( mnFontUnderline == awt::FontUnderline::SINGLE )
- mnFontUnderline = awt::FontUnderline::NONE;
- else
- mnFontUnderline = awt::FontUnderline::SINGLE;
- }
-
- update();
- maModifyHdl.Call(nullptr);
-}
-
-void FontStylePropertyBox::setValue( const Any& rValue, const OUString& )
-{
- Sequence<Any> aValues;
- rValue >>= aValues;
-
- aValues[0] >>= mfFontWeight;
- aValues[1] >>= meFontSlant;
- aValues[2] >>= mnFontUnderline;
-
- update();
-}
-
-Any FontStylePropertyBox::getValue()
-{
- Sequence<Any> aValues(3);
- aValues[0] <<= mfFontWeight;
- aValues[1] <<= meFontSlant;
- aValues[2] <<= mnFontUnderline;
- return makeAny( aValues );
-}
-
-Control* FontStylePropertyBox::getControl()
-{
- return mpControl;
-}
-
-namespace {
-
class SdFontStylePropertyBox : public SdPropertySubControl
{
public:
@@ -2967,102 +2026,6 @@ std::unique_ptr<STLPropertySet> CustomAnimationDialog::createDefaultSet()
return pSet;
}
-PropertyControl::PropertyControl( vcl::Window* pParent )
-: ListBox( pParent, WB_TABSTOP | WB_BORDER | WB_DROPDOWN )
-{
-}
-
-VCL_BUILDER_FACTORY(PropertyControl)
-
-PropertyControl::~PropertyControl()
-{
- disposeOnce();
-}
-
-void PropertyControl::dispose()
-{
- mpSubControl.reset();
- ListBox::dispose();
-}
-
-void PropertyControl::setSubControl( std::unique_ptr<PropertySubControl> pSubControl )
-{
- mpSubControl = std::move(pSubControl);
-
- Control* pControl = mpSubControl ? mpSubControl->getControl() : nullptr;
-
- if( pControl )
- {
- pControl->SetPosSizePixel( GetPosPixel(), GetSizePixel() );
- pControl->SetZOrder( this, ZOrderFlags::Before );
- pControl->Show();
- Hide();
- }
- else
- {
- Show();
- }
-}
-
-void PropertyControl::Resize()
-{
- Control* pControl = mpSubControl ? mpSubControl->getControl() : nullptr;
- if( pControl )
- pControl->SetPosSizePixel( GetPosPixel(), GetSizePixel() );
- ListBox::Resize();
-}
-
-PropertySubControl::~PropertySubControl()
-{
-}
-
-std::unique_ptr<PropertySubControl> PropertySubControl::create( sal_Int32 nType, vcl::Window* pParent, const Any& rValue, const OUString& rPresetId, const Link<LinkParamNone*,void>& rModifyHdl )
-{
- std::unique_ptr<PropertySubControl> pSubControl;
- switch( nType )
- {
- case nPropertyTypeDirection:
- case nPropertyTypeSpokes:
- case nPropertyTypeZoom:
- pSubControl.reset( new PresetPropertyBox( nType, pParent, rValue, rPresetId, rModifyHdl ) );
- break;
-
- case nPropertyTypeColor:
- case nPropertyTypeFillColor:
- case nPropertyTypeFirstColor:
- case nPropertyTypeCharColor:
- case nPropertyTypeLineColor:
- pSubControl.reset( new ColorPropertyBox( nType, pParent, rValue, rModifyHdl ) );
- break;
-
- case nPropertyTypeFont:
- pSubControl.reset( new FontPropertyBox( nType, pParent, rValue, rModifyHdl ) );
- break;
-
- case nPropertyTypeCharHeight:
- pSubControl.reset( new CharHeightPropertyBox( nType, pParent, rValue, rModifyHdl ) );
- break;
-
- case nPropertyTypeRotate:
- pSubControl.reset( new RotationPropertyBox( nType, pParent, rValue, rModifyHdl ) );
- break;
-
- case nPropertyTypeTransparency:
- pSubControl.reset( new TransparencyPropertyBox( nType, pParent, rValue, rModifyHdl ) );
- break;
-
- case nPropertyTypeScale:
- pSubControl.reset( new ScalePropertyBox( nType, pParent, rValue, rModifyHdl ) );
- break;
-
- case nPropertyTypeCharDecoration:
- pSubControl.reset( new FontStylePropertyBox( nType, pParent, rValue, rModifyHdl ) );
- break;
- }
-
- return pSubControl;
-}
-
std::unique_ptr<SdPropertySubControl> SdPropertySubControl::create(sal_Int32 nType, weld::Label* pLabel, weld::Container* pParent, weld::Window* pTopLevel, const Any& rValue, const OUString& rPresetId, const Link<LinkParamNone*,void>& rModifyHdl)
{
std::unique_ptr<SdPropertySubControl> pSubControl;
diff --git a/sd/source/ui/animations/CustomAnimationDialog.hxx b/sd/source/ui/animations/CustomAnimationDialog.hxx
index 1ed6972e76e4..64272633505d 100644
--- a/sd/source/ui/animations/CustomAnimationDialog.hxx
+++ b/sd/source/ui/animations/CustomAnimationDialog.hxx
@@ -21,7 +21,6 @@
#define INCLUDED_SD_SOURCE_UI_ANIMATIONS_CUSTOMANIMATIONDIALOG_HXX
#include <vcl/svapp.hxx>
-#include <vcl/lstbox.hxx>
#include <vcl/weld.hxx>
namespace sd {
@@ -89,30 +88,6 @@ const sal_Int32 nPropertyTypeTransparency = 19;
const sal_Int32 nPropertyTypeFontStyle = 20;
const sal_Int32 nPropertyTypeScale = 21;
-class PropertySubControl
-{
-public:
- explicit PropertySubControl( sal_Int32 nType ) : mnType( nType ) {}
- virtual ~PropertySubControl();
-
- virtual css::uno::Any getValue() = 0;
- virtual void setValue( const css::uno::Any& rValue, const OUString& rPresetId ) = 0;
-
- virtual Control* getControl() = 0;
-
- static std::unique_ptr<PropertySubControl>
- create( sal_Int32 nType,
- vcl::Window* pParent,
- const css::uno::Any& rValue,
- const OUString& rPresetId,
- const Link<LinkParamNone*,void>& rModifyHdl );
-
- sal_Int32 getControlType() const { return mnType; }
-
-private:
- sal_Int32 mnType;
-};
-
class SdPropertySubControl
{
public:
@@ -137,22 +112,6 @@ protected:
weld::Container* mpParent;
};
-class PropertyControl : public ListBox
-{
-public:
- explicit PropertyControl( vcl::Window* pParent );
- virtual ~PropertyControl() override;
- virtual void dispose() override;
-
- void setSubControl( std::unique_ptr<PropertySubControl> pSubControl );
- PropertySubControl* getSubControl() const { return mpSubControl.get(); }
-
- virtual void Resize() override;
-
-private:
- std::unique_ptr<PropertySubControl> mpSubControl;
-};
-
class CustomAnimationDurationTabPage;
class CustomAnimationEffectTabPage;
class CustomAnimationTextAnimTabPage;
diff --git a/solenv/bin/native-code.py b/solenv/bin/native-code.py
index c076128cb506..3a3e898c48f6 100755
--- a/solenv/bin/native-code.py
+++ b/solenv/bin/native-code.py
@@ -506,10 +506,8 @@ constructor_map = {
custom_widgets = [
'BookmarksBox',
- 'CategoryListBox',
'ContentListBox',
'ContextVBox',
- 'CustomAnimationList',
'DataTreeListBox',
'DropdownBox',
'EmojiView',
@@ -517,12 +515,10 @@ custom_widgets = [
'ManagedMenuButton',
'PriorityHBox',
'PriorityMergedHBox',
- 'PropertyControl',
'RecentDocsView',
'SearchBox',
'SearchResultsBox',
'SidebarToolBox',
- 'SvxColorValueSet',
'TemplateDefaultView',
]
diff --git a/solenv/sanitizers/ui/svx.suppr b/solenv/sanitizers/ui/svx.suppr
index b79bd11a0dab..8adf225a594e 100644
--- a/solenv/sanitizers/ui/svx.suppr
+++ b/solenv/sanitizers/ui/svx.suppr
@@ -60,9 +60,6 @@ svx/uiconfig/ui/mediawindow.ui://GtkScale[@id='timeslider'] no-labelled-by
svx/uiconfig/ui/mediawindow.ui://GtkScale[@id='volumeslider'] no-labelled-by
svx/uiconfig/ui/metricfieldbox.ui://GtkSpinButton[@id='metricfield'] no-labelled-by
svx/uiconfig/ui/numberingwindow.ui://GtkButton[@id='more'] button-no-label
-svx/uiconfig/ui/oldcolorwindow.ui://GtkButton[@id='auto_color_button'] button-no-label
-svx/uiconfig/ui/oldcolorwindow.ui://GtkComboBox[@id='palette_listbox'] no-labelled-by
-svx/uiconfig/ui/oldcolorwindow.ui://GtkLabel[@id='label1'] orphan-label
svx/uiconfig/ui/optgridpage.ui://GtkLabel[@id='label4'] orphan-label
svx/uiconfig/ui/optgridpage.ui://GtkLabel[@id='label5'] orphan-label
svx/uiconfig/ui/paralinespacingcontrol.ui://GtkSpinButton[@id='percent_box'] no-labelled-by
diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx
index d81dda3b8b17..0fe1a5d47a5c 100644
--- a/svtools/source/control/ctrlbox.cxx
+++ b/svtools/source/control/ctrlbox.cxx
@@ -25,7 +25,6 @@
#include <vcl/customweld.hxx>
#include <vcl/event.hxx>
#include <vcl/svapp.hxx>
-#include <vcl/field.hxx>
#include <vcl/fieldvalues.hxx>
#include <vcl/settings.hxx>
#include <vcl/image.hxx>
diff --git a/svx/UIConfig_svx.mk b/svx/UIConfig_svx.mk
index 414361b8a316..567464c49cb5 100644
--- a/svx/UIConfig_svx.mk
+++ b/svx/UIConfig_svx.mk
@@ -89,7 +89,6 @@ $(eval $(call gb_UIConfig_add_uifiles,svx,\
svx/uiconfig/ui/metricfieldbox \
svx/uiconfig/ui/namespacedialog \
svx/uiconfig/ui/numberingwindow \
- svx/uiconfig/ui/oldcolorwindow \
svx/uiconfig/ui/optgridpage \
svx/uiconfig/ui/paralinespacingcontrol \
svx/uiconfig/ui/paralrspacing \
diff --git a/svx/inc/pch/precompiled_svx.hxx b/svx/inc/pch/precompiled_svx.hxx
index 74ded456eab0..b566a4589b0f 100644
--- a/svx/inc/pch/precompiled_svx.hxx
+++ b/svx/inc/pch/precompiled_svx.hxx
@@ -13,7 +13,7 @@
manual changes will be rewritten by the next run of update_pch.sh (which presumably
also fixes all possible problems, so it's usually better to use it).
- Generated on 2020-02-14 10:26:10 using:
+ Generated on 2020-03-27 21:07:57 using:
./bin/update_pch svx svx --cutoff=3 --exclude:system --exclude:module --include:local
If after updating build fails, use the following command to locate conflicting headers:
@@ -26,22 +26,20 @@
#include <cassert>
#include <climits>
#include <cstddef>
-#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <limits.h>
#include <map>
#include <memory>
+#include <optional>
#include <ostream>
#include <set>
#include <stddef.h>
-#include <string>
#include <type_traits>
#include <unordered_map>
#include <utility>
#include <vector>
-#include <boost/property_tree/json_parser.hpp>
#include <boost/property_tree/ptree.hpp>
#include <boost/property_tree/ptree_fwd.hpp>
#endif // PCH_LEVEL >= 1
@@ -57,7 +55,7 @@
#include <rtl/bootstrap.hxx>
#include <rtl/instance.hxx>
#include <rtl/ref.hxx>
-#include <rtl/strbuf.hxx>
+#include <rtl/string.hxx>
#include <rtl/tencinfo.h>
#include <rtl/textenc.h>
#include <rtl/ustrbuf.hxx>
@@ -72,7 +70,6 @@
#include <vcl/BitmapFilter.hxx>
#include <vcl/EnumContext.hxx>
#include <vcl/GraphicObject.hxx>
-#include <vcl/IContext.hxx>
#include <vcl/Scanline.hxx>
#include <vcl/alpha.hxx>
#include <vcl/bitmapex.hxx>
@@ -82,7 +79,6 @@
#include <vcl/ctrl.hxx>
#include <vcl/customweld.hxx>
#include <vcl/dllapi.h>
-#include <vcl/dockwin.hxx>
#include <vcl/errcode.hxx>
#include <vcl/errinf.hxx>
#include <vcl/event.hxx>
@@ -90,12 +86,10 @@
#include <vcl/font.hxx>
#include <vcl/gdimtf.hxx>
#include <vcl/graph.hxx>
-#include <vcl/help.hxx>
#include <vcl/idle.hxx>
#include <vcl/image.hxx>
#include <vcl/imap.hxx>
#include <vcl/imapobj.hxx>
-#include <vcl/layout.hxx>
#include <vcl/menu.hxx>
#include <vcl/metric.hxx>
#include <vcl/outdev.hxx>
@@ -138,13 +132,12 @@
#include <com/sun/star/awt/GradientStyle.hpp>
#include <com/sun/star/awt/Point.hpp>
#include <com/sun/star/awt/Rectangle.hpp>
+#include <com/sun/star/awt/XControl.hpp>
#include <com/sun/star/awt/XControlContainer.hpp>
#include <com/sun/star/beans/NamedValue.hpp>
-#include <com/sun/star/beans/PropertyState.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/beans/XPropertyChangeListener.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/beans/XPropertySetInfo.hpp>
#include <com/sun/star/container/XIndexAccess.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/container/XNameContainer.hpp>
@@ -152,8 +145,8 @@
#include <com/sun/star/drawing/LineCap.hpp>
#include <com/sun/star/drawing/TextFitToSizeType.hpp>
#include <com/sun/star/form/XForm.hpp>
+#include <com/sun/star/form/XFormComponent.hpp>
#include <com/sun/star/frame/XController.hpp>
-#include <com/sun/star/frame/XController2.hpp>
#include <com/sun/star/frame/XDispatch.hpp>
#include <com/sun/star/frame/XDispatchProvider.hpp>
#include <com/sun/star/frame/XFrame.hpp>
@@ -167,18 +160,20 @@
#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
#include <com/sun/star/lang/Locale.hpp>
#include <com/sun/star/lang/XComponent.hpp>
+#include <com/sun/star/lang/XEventListener.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XTypeProvider.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <com/sun/star/sdbc/XResultSet.hpp>
+#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
+#include <com/sun/star/sdbcx/XRowLocate.hpp>
#include <com/sun/star/style/NumberingType.hpp>
#include <com/sun/star/style/XStyle.hpp>
#include <com/sun/star/text/DefaultNumberingProvider.hpp>
#include <com/sun/star/text/WritingMode2.hpp>
-#include <com/sun/star/text/XNumberingFormatter.hpp>
#include <com/sun/star/text/textfield/Type.hpp>
-#include <com/sun/star/ui/XContextChangeEventListener.hpp>
#include <com/sun/star/uno/Any.h>
#include <com/sun/star/uno/Any.hxx>
#include <com/sun/star/uno/Exception.hpp>
@@ -201,10 +196,8 @@
#include <com/sun/star/view/XSelectionSupplier.hpp>
#include <comphelper/broadcasthelper.hxx>
#include <comphelper/comphelperdllapi.h>
-#include <comphelper/lok.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/proparrhlp.hxx>
-#include <comphelper/property.hxx>
#include <comphelper/propertycontainer.hxx>
#include <comphelper/propertysequence.hxx>
#include <comphelper/sequence.hxx>
@@ -212,7 +205,6 @@
#include <comphelper/string.hxx>
#include <comphelper/types.hxx>
#include <comphelper/weak.hxx>
-#include <connectivity/dbtoolsdllapi.hxx>
#include <cppu/cppudllapi.h>
#include <cppu/unotype.hxx>
#include <cppuhelper/basemutex.hxx>
@@ -245,8 +237,6 @@
#include <editeng/flditem.hxx>
#include <editeng/fontitem.hxx>
#include <editeng/frmdir.hxx>
-#include <editeng/itemtype.hxx>
-#include <editeng/kernitem.hxx>
#include <editeng/lrspitem.hxx>
#include <editeng/numdef.hxx>
#include <editeng/numitem.hxx>
@@ -260,13 +250,13 @@
#include <editeng/udlnitem.hxx>
#include <editeng/ulspitem.hxx>
#include <editeng/unoedhlp.hxx>
+#include <editeng/unoedsrc.hxx>
#include <editeng/wghtitem.hxx>
#include <i18nlangtag/lang.h>
#include <i18nlangtag/languagetag.hxx>
#include <i18nlangtag/mslangid.hxx>
#include <o3tl/cow_wrapper.hxx>
#include <o3tl/deleter.hxx>
-#include <optional>
#include <o3tl/safeint.hxx>
#include <o3tl/typed_flags_set.hxx>
#include <o3tl/underlyingenumvalue.hxx>
@@ -283,19 +273,15 @@
#include <sfx2/dispatch.hxx>
#include <sfx2/dllapi.h>
#include <sfx2/dockwin.hxx>
-#include <sfx2/lokhelper.hxx>
#include <sfx2/module.hxx>
#include <sfx2/objsh.hxx>
#include <sfx2/request.hxx>
-#include <sfx2/sidebar/ControlFactory.hxx>
-#include <sfx2/sidebar/SidebarToolBox.hxx>
-#include <sfx2/sidebar/Theme.hxx>
#include <sfx2/stbitem.hxx>
+#include <sfx2/tabdlg.hxx>
#include <sfx2/tbxctrl.hxx>
#include <sfx2/viewfrm.hxx>
#include <sfx2/viewsh.hxx>
#include <sfx2/weldutils.hxx>
-#include <sot/exchange.hxx>
#include <sot/formats.hxx>
#include <svl/SfxBroadcaster.hxx>
#include <svl/cenumitm.hxx>
@@ -360,13 +346,10 @@
#include <unotools/viewoptions.hxx>
#endif // PCH_LEVEL >= 3
#if PCH_LEVEL >= 4
-#include <DescriptionGenerator.hxx>
#include <cell.hxx>
-#include <celltypes.hxx>
#include <charmapacc.hxx>
#include <fmprop.hxx>
#include <fmservs.hxx>
-#include <fmshimp.hxx>
#include <helpids.h>
#include <labelitemwindow.hxx>
#include <svx/AccessibleControlShape.hxx>
@@ -386,18 +369,17 @@
#include <svx/drawitem.hxx>
#include <svx/e3ditem.hxx>
#include <svx/fmmodel.hxx>
-#include <svx/fmpage.hxx>
#include <svx/fmshell.hxx>
#include <svx/fmtools.hxx>
#include <svx/framebordertype.hxx>
#include <svx/galmisc.hxx>
#include <svx/itemwin.hxx>
#include <svx/itextprovider.hxx>
-#include <svx/linectrl.hxx>
#include <svx/obj3d.hxx>
#include <svx/pageitem.hxx>
#include <svx/rotmodit.hxx>
#include <svx/rulritem.hxx>
+#include <svx/sdmetitm.hxx>
#include <svx/sdooitm.hxx>
#include <svx/sdprcitm.hxx>
#include <svx/sdrpaintwindow.hxx>
@@ -422,16 +404,12 @@
#include <svx/svdpagv.hxx>
#include <svx/svdtext.hxx>
#include <svx/svdtrans.hxx>
-#include <svx/svdtypes.hxx>
#include <svx/svdview.hxx>
#include <svx/svx3ditems.hxx>
#include <svx/svxdlg.hxx>
#include <svx/svxdllapi.h>
-#include <svx/tbxcolor.hxx>
#include <svx/unoapi.hxx>
#include <svx/unomid.hxx>
-#include <svx/unopage.hxx>
-#include <svx/unoprov.hxx>
#include <svx/unoshtxt.hxx>
#include <svx/view3d.hxx>
#include <svx/viewpt3d.hxx>
@@ -446,13 +424,9 @@
#include <svx/xit.hxx>
#include <svx/xlineit0.hxx>
#include <svx/xlnclit.hxx>
-#include <svx/xlndsit.hxx>
-#include <svx/xlnedit.hxx>
-#include <svx/xlnstit.hxx>
#include <svx/xlntrit.hxx>
#include <svx/xlnwtit.hxx>
#include <svx/xtable.hxx>
-#include <svx/zoomslideritem.hxx>
#endif // PCH_LEVEL >= 4
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/tbxctrls/SvxColorValueSet.cxx b/svx/source/tbxctrls/SvxColorValueSet.cxx
index 773dce6de000..2c0ba7c73966 100644
--- a/svx/source/tbxctrls/SvxColorValueSet.cxx
+++ b/svx/source/tbxctrls/SvxColorValueSet.cxx
@@ -19,7 +19,6 @@
#include <svx/SvxColorValueSet.hxx>
#include <svx/xtable.hxx>
-#include <vcl/builderfactory.hxx>
#include <vcl/svapp.hxx>
#include <vcl/settings.hxx>
#include <osl/diagnose.h>
@@ -36,8 +35,6 @@ ColorValueSet::ColorValueSet(std::unique_ptr<weld::ScrolledWindow> pWindow)
SetEdgeBlending(true);
}
-VCL_BUILDER_FACTORY_CONSTRUCTOR(SvxColorValueSet, WB_TABSTOP)
-
sal_uInt32 SvxColorValueSet::getMaxRowCount()
{
return StyleSettings::GetColorValueSetMaximumRowCount();
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 38d5574b745a..ba36e98f24c9 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -26,8 +26,8 @@
#include <svl/itemset.hxx>
#include <vcl/commandinfoprovider.hxx>
#include <vcl/event.hxx>
-#include <vcl/toolbox.hxx>
#include <vcl/menubtn.hxx>
+#include <vcl/toolbox.hxx>
#include <vcl/customweld.hxx>
#include <vcl/vclptr.hxx>
#include <svtools/valueset.hxx>
@@ -1627,120 +1627,6 @@ boost::property_tree::ptree SvxFontNameBox_Impl::DumpAsPropertyTree()
return aTree;
}
-SvxColorWindow::SvxColorWindow(const OUString& rCommand,
- std::shared_ptr<PaletteManager> const & rPaletteManager,
- ColorStatus& rColorStatus,
- sal_uInt16 nSlotId,
- const Reference< XFrame >& rFrame,
- vcl::Window* pParentWindow,
- bool bReuseParentForPicker,
- ColorSelectFunction const & aFunction):
-
- ToolbarPopup( rFrame, pParentWindow, "palette_popup_window", "svx/ui/oldcolorwindow.ui" ),
- theSlotId( nSlotId ),
- maCommand( rCommand ),
- mxParentWindow(pParentWindow),
- mxPaletteManager( rPaletteManager ),
- mrColorStatus( rColorStatus ),
- maColorSelectFunction(aFunction),
- mbReuseParentForPicker(bReuseParentForPicker)
-{
- get(mpPaletteListBox, "palette_listbox");
- get(mpButtonAutoColor, "auto_color_button");
- get(mpButtonNoneColor, "none_color_button");
- get(mpButtonPicker, "color_picker_button");
- get(mpColorSet, "colorset");
- get(mpRecentColorSet, "recent_colorset");
- get(mpAutomaticSeparator, "separator4");
-
- mpColorSet->SetStyle( WinBits(WB_FLATVALUESET | WB_ITEMBORDER | WB_3DLOOK | WB_NO_DIRECTSELECT | WB_TABSTOP) );
- mpRecentColorSet->SetStyle( WinBits(WB_FLATVALUESET | WB_ITEMBORDER | WB_3DLOOK | WB_NO_DIRECTSELECT | WB_TABSTOP) );
-
- switch ( theSlotId )
- {
- case SID_ATTR_CHAR_COLOR_BACKGROUND:
- case SID_BACKGROUND_COLOR:
- case SID_ATTR_CHAR_BACK_COLOR:
- case SID_TABLE_CELL_BACKGROUND_COLOR:
- {
- mpButtonAutoColor->SetText( SvxResId( RID_SVXSTR_NOFILL ) );
- break;
- }
- case SID_AUTHOR_COLOR:
- {
- mpButtonAutoColor->SetText( SvxResId( RID_SVXSTR_BY_AUTHOR ) );
- break;
- }
- case SID_BMPMASK_COLOR:
- {
- mpButtonAutoColor->SetText( SvxResId( RID_SVXSTR_TRANSPARENT ) );
- break;
- }
- case SID_ATTR_CHAR_COLOR:
- case SID_ATTR_CHAR_COLOR2:
- case SID_EXTRUSION_3D_COLOR:
- {
- mpButtonAutoColor->SetText(EditResId(RID_SVXSTR_AUTOMATIC));
- break;
- }
- case SID_FM_CTL_PROPERTIES:
- {
- mpButtonAutoColor->SetText( SvxResId( RID_SVXSTR_DEFAULT ) );
- break;
- }
- default:
- {
- mpButtonAutoColor->Hide();
- mpAutomaticSeparator->Hide();
- break;
- }
- }
-
- mpColorSet->SetAccessibleName( GetText() );
-
- mpPaletteListBox->SetStyle( mpPaletteListBox->GetStyle() | WB_BORDER );
- mpPaletteListBox->SetSelectHdl( LINK( this, SvxColorWindow, SelectPaletteHdl ) );
- mpPaletteListBox->AdaptDropDownLineCountToMaximum();
- std::vector<OUString> aPaletteList = mxPaletteManager->GetPaletteList();
- for (const auto& rPalette : aPaletteList )
- {
- mpPaletteListBox->InsertEntry( rPalette );
- }
- OUString aPaletteName( officecfg::Office::Common::UserColors::PaletteName::get() );
- mpPaletteListBox->SelectEntry( aPaletteName );
- const sal_Int32 nSelectedEntry(mpPaletteListBox->GetSelectedEntryPos());
- if (nSelectedEntry != LISTBOX_ENTRY_NOTFOUND)
- mxPaletteManager->SetPalette(nSelectedEntry);
-
- mpButtonAutoColor->SetClickHdl( LINK( this, SvxColorWindow, AutoColorClickHdl ) );
- mpButtonNoneColor->SetClickHdl( LINK( this, SvxColorWindow, AutoColorClickHdl ) );
- mpButtonPicker->SetClickHdl( LINK( this, SvxColorWindow, OpenPickerClickHdl ) );
-
- mpColorSet->SetSelectHdl( LINK( this, SvxColorWindow, SelectHdl ) );
- mpRecentColorSet->SetSelectHdl( LINK( this, SvxColorWindow, SelectHdl ) );
- SetHelpId( HID_POPUP_COLOR );
- mpColorSet->SetHelpId( HID_POPUP_COLOR_CTRL );
-
- mxPaletteManager->ReloadColorSet(*mpColorSet);
- const sal_uInt32 nMaxItems(SvxColorValueSet::getMaxRowCount() * SvxColorValueSet::getColumnCount());
- Size aSize = mpColorSet->layoutAllVisible(nMaxItems);
- mpColorSet->set_height_request(aSize.Height());
- mpColorSet->set_width_request(aSize.Width());
-
- mxPaletteManager->ReloadRecentColorSet(*mpRecentColorSet);
- aSize = mpRecentColorSet->layoutAllVisible(mxPaletteManager->GetRecentColorCount());
- mpRecentColorSet->set_height_request(aSize.Height());
- mpRecentColorSet->set_width_request(aSize.Width());
-
- AddStatusListener( ".uno:ColorTableState" );
- AddStatusListener( maCommand );
- if ( maCommand == ".uno:FrameLineColor" )
- {
- AddStatusListener( ".uno:BorderTLBR" );
- AddStatusListener( ".uno:BorderBLTR" );
- }
-}
-
ColorWindow::ColorWindow(const OUString& rCommand,
std::shared_ptr<PaletteManager> const & rPaletteManager,
ColorStatus& rColorStatus,
@@ -1863,41 +1749,10 @@ void ColorWindow::ShowNoneButton()
mxButtonNoneColor->show();
}
-SvxColorWindow::~SvxColorWindow()
-{
- disposeOnce();
-}
-
ColorWindow::~ColorWindow()
{
}
-void SvxColorWindow::dispose()
-{
- mpColorSet.clear();
- mpRecentColorSet.clear();
- mpPaletteListBox.clear();
- mpButtonAutoColor.clear();
- mpButtonNoneColor.clear();
- mpButtonPicker.clear();
- mpAutomaticSeparator.clear();
- mxParentWindow.clear();
- ToolbarPopup::dispose();
-}
-
-void SvxColorWindow::KeyInput( const KeyEvent& rKEvt )
-{
- mpColorSet->GrabFocus();
- mpColorSet->KeyInput(rKEvt);
-}
-
-NamedColor SvxColorWindow::GetSelectEntryColor(ValueSet const * pColorSet)
-{
- Color aColor = pColorSet->GetItemColor(pColorSet->GetSelectedItemId());
- OUString sColorName = pColorSet->GetItemText(pColorSet->GetSelectedItemId());
- return std::make_pair(aColor, sColorName);
-}
-
NamedColor ColorWindow::GetSelectEntryColor(SvtValueSet const * pColorSet)
{
Color aColor = pColorSet->GetItemColor(pColorSet->GetSelectedItemId());
@@ -1951,17 +1806,6 @@ namespace
}
}
-NamedColor SvxColorWindow::GetSelectEntryColor() const
-{
- if (!mpColorSet->IsNoSelection())
- return GetSelectEntryColor(mpColorSet);
- if (!mpRecentColorSet->IsNoSelection())
- return GetSelectEntryColor(mpRecentColorSet);
- if (mpButtonNoneColor->GetStyle() & WB_DEFBUTTON)
- return GetNoneColor();
- return GetAutoColor();
-}
-
NamedColor ColorWindow::GetSelectEntryColor() const
{
if (!mxColorSet->IsNoSelection())
@@ -1973,27 +1817,6 @@ NamedColor ColorWindow::GetSelectEntryColor() const
return GetAutoColor();
}
-IMPL_LINK(SvxColorWindow, SelectHdl, ValueSet*, pColorSet, void)
-{
- VclPtr<SvxColorWindow> xThis(this);
-
- NamedColor aNamedColor = GetSelectEntryColor(pColorSet);
-
- if ( pColorSet != mpRecentColorSet )
- {
- mxPaletteManager->AddRecentColor(aNamedColor.first, aNamedColor.second);
- if ( !IsInPopupMode() )
- mxPaletteManager->ReloadRecentColorSet(*mpRecentColorSet);
- }
-
- if ( IsInPopupMode() )
- EndPopupMode();
-
- maSelectedLink.Call(aNamedColor);
-
- maColorSelectFunction(maCommand, aNamedColor);
-}
-
IMPL_LINK(ColorWindow, SelectHdl, SvtValueSet*, pColorSet, void)
{
NamedColor aNamedColor = GetSelectEntryColor(pColorSet);
@@ -2017,14 +1840,6 @@ IMPL_LINK(ColorWindow, SelectHdl, SvtValueSet*, pColorSet, void)
aColorSelectFunction(sCommand, aNamedColor);
}
-IMPL_LINK_NOARG(SvxColorWindow, SelectPaletteHdl, ListBox&, void)
-{
- sal_Int32 nPos = mpPaletteListBox->GetSelectedEntryPos();
- mxPaletteManager->SetPalette( nPos );
- mxPaletteManager->ReloadColorSet(*mpColorSet);
- mpColorSet->layoutToGivenHeight(mpColorSet->GetSizePixel().Height(), mxPaletteManager->GetColorCount());
-}
-
IMPL_LINK_NOARG(ColorWindow, SelectPaletteHdl, weld::ComboBox&, void)
{
int nPos = mxPaletteListBox->get_active();
@@ -2033,32 +1848,11 @@ IMPL_LINK_NOARG(ColorWindow, SelectPaletteHdl, weld::ComboBox&, void)
mxColorSet->layoutToGivenHeight(mxColorSet->GetOutputSizePixel().Height(), mxPaletteManager->GetColorCount());
}
-NamedColor SvxColorWindow::GetAutoColor() const
-{
- return ::GetAutoColor(theSlotId);
-}
-
NamedColor ColorWindow::GetAutoColor() const
{
return ::GetAutoColor(theSlotId);
}
-IMPL_LINK(SvxColorWindow, AutoColorClickHdl, Button*, pButton, void)
-{
- VclPtr<SvxColorWindow> xThis(this);
-
- NamedColor aNamedColor = pButton == mpButtonAutoColor ? GetAutoColor() : GetNoneColor();
-
- mpRecentColorSet->SetNoSelection();
-
- if ( IsInPopupMode() )
- EndPopupMode();
-
- maSelectedLink.Call(aNamedColor);
-
- maColorSelectFunction(maCommand, aNamedColor);
-}
-
IMPL_LINK(ColorWindow, AutoColorClickHdl, weld::Button&, rButton, void)
{
NamedColor aNamedColor = &rButton == mxButtonAutoColor.get() ? GetAutoColor() : GetNoneColor();
@@ -2079,26 +1873,6 @@ IMPL_LINK(ColorWindow, AutoColorClickHdl, weld::Button&, rButton, void)
aColorSelectFunction(sCommand, aNamedColor);
}
-IMPL_LINK_NOARG(SvxColorWindow, OpenPickerClickHdl, Button*, void)
-{
- VclPtr<SvxColorWindow> xThis(this);
-
- if ( IsInPopupMode() )
- EndPopupMode();
-
- weld::Window* pParentFrame;
- if (mbReuseParentForPicker)
- {
- pParentFrame = mxParentWindow->GetFrameWeld();
- }
- else
- {
- const css::uno::Reference<css::awt::XWindow> xParent = mxFrame->getContainerWindow();
- pParentFrame = Application::GetFrameWeld(xParent);
- }
- mxPaletteManager->PopupColorPicker(pParentFrame, maCommand, GetSelectEntryColor().first);
-}
-
IMPL_LINK_NOARG(ColorWindow, OpenPickerClickHdl, weld::Button&, void)
{
// copy before set_inactive
@@ -2112,14 +1886,6 @@ IMPL_LINK_NOARG(ColorWindow, OpenPickerClickHdl, weld::Button&, void)
xPaletteManager->PopupColorPicker(pParentWindow, sCommand, nColor);
}
-void SvxColorWindow::SetNoSelection()
-{
- mpColorSet->SetNoSelection();
- mpRecentColorSet->SetNoSelection();
- mpButtonAutoColor->set_property("has-default", "false");
- mpButtonNoneColor->set_property("has-default", "false");
-}
-
void ColorWindow::SetNoSelection()
{
mxColorSet->SetNoSelection();
@@ -2136,23 +1902,6 @@ bool ColorWindow::IsNoSelection() const
return !mxButtonAutoColor->get_visible() && !mxButtonNoneColor->get_visible();
}
-void SvxColorWindow::statusChanged( const css::frame::FeatureStateEvent& rEvent )
-{
- if (rEvent.FeatureURL.Complete == ".uno:ColorTableState")
- {
- if (rEvent.IsEnabled && mxPaletteManager->GetPalette() == 0)
- {
- mxPaletteManager->ReloadColorSet(*mpColorSet);
- mpColorSet->layoutToGivenHeight(mpColorSet->GetSizePixel().Height(), mxPaletteManager->GetColorCount());
- }
- }
- else
- {
- mrColorStatus.statusChanged(rEvent);
- SelectEntry(mrColorStatus.GetColor());
- }
-}
-
void ColorWindow::statusChanged( const css::frame::FeatureStateEvent& rEvent )
{
if (rEvent.FeatureURL.Complete == ".uno:ColorTableState")
@@ -2170,19 +1919,6 @@ void ColorWindow::statusChanged( const css::frame::FeatureStateEvent& rEvent )
}
}
-bool SvxColorWindow::SelectValueSetEntry(SvxColorValueSet* pColorSet, const Color& rColor)
-{
- for (size_t i = 1; i <= pColorSet->GetItemCount(); ++i)
- {
- if (rColor == pColorSet->GetItemColor(i))
- {
- pColorSet->SelectItem(i);
- return true;
- }
- }
- return false;
-}
-
bool ColorWindow::SelectValueSetEntry(ColorValueSet* pColorSet, const Color& rColor)
{
for (size_t i = 1; i <= pColorSet->GetItemCount(); ++i)
@@ -2196,47 +1932,6 @@ bool ColorWindow::SelectValueSetEntry(ColorValueSet* pColorSet, const Color& rCo
return false;
}
-void SvxColorWindow::SelectEntry(const NamedColor& rNamedColor)
-{
- SetNoSelection();
-
- const Color &rColor = rNamedColor.first;
-
- if (rColor == COL_TRANSPARENT || rColor == COL_AUTO)
- {
- mpButtonAutoColor->set_property("has-default", "true");
- return;
- }
-
- if (mpButtonNoneColor->IsVisible() && rColor == COL_NONE_COLOR)
- {
- mpButtonNoneColor->set_property("has-default", "true");
- return;
- }
-
- // try current palette
- bool bFoundColor = SelectValueSetEntry(mpColorSet, rColor);
- // try recently used
- if (!bFoundColor)
- bFoundColor = SelectValueSetEntry(mpRecentColorSet, rColor);
- // if it's not there, add it there now to the end of the recently used
- // so its available somewhere handy, but not without trashing the
- // whole recently used
- if (!bFoundColor)
- {
- const OUString& rColorName = rNamedColor.second;
- mxPaletteManager->AddRecentColor(rColor, rColorName, false);
- mxPaletteManager->ReloadRecentColorSet(*mpRecentColorSet);
- SelectValueSetEntry(mpRecentColorSet, rColor);
- }
-}
-
-void SvxColorWindow::SelectEntry(const Color& rColor)
-{
- OUString sColorName = "#" + rColor.AsRGBHexString().toAsciiUpperCase();
- SvxColorWindow::SelectEntry(std::make_pair(rColor, sColorName));
-}
-
void ColorWindow::SelectEntry(const NamedColor& rNamedColor)
{
SetNoSelection();
@@ -3932,23 +3627,6 @@ void SvxCurrencyToolBoxControl::GetCurrencySymbols( std::vector<OUString>& rList
}
}
-SvxListBoxColorWrapper::SvxListBoxColorWrapper(SvxColorListBox* pControl)
- : mxControl(pControl)
-{
-}
-
-void SvxListBoxColorWrapper::operator()(const OUString& /*rCommand*/, const NamedColor& rColor)
-{
- if (!mxControl)
- return;
- mxControl->Selected(rColor);
-}
-
-void SvxListBoxColorWrapper::dispose()
-{
- mxControl.clear();
-}
-
ListBoxColorWrapper::ListBoxColorWrapper(ColorListBox* pControl)
: mpControl(pControl)
{
@@ -3959,27 +3637,6 @@ void ListBoxColorWrapper::operator()(const OUString& /*rCommand*/, const NamedCo
mpControl->Selected(rColor);
}
-SvxColorListBox::SvxColorListBox(vcl::Window* pParent, WinBits nStyle)
- : MenuButton(pParent, nStyle)
- , m_aColorWrapper(this)
- , m_aAutoDisplayColor(Application::GetSettings().GetStyleSettings().GetDialogColor())
- , m_nSlotId(0)
-{
- m_aSelectedColor = GetAutoColor(m_nSlotId);
- LockWidthRequest();
- ShowPreview(m_aSelectedColor);
- SetActivateHdl(LINK(this, SvxColorListBox, MenuActivateHdl));
-}
-
-void SvxColorListBox::EnsurePaletteManager()
-{
- if (!m_xPaletteManager)
- {
- m_xPaletteManager = std::make_shared<PaletteManager>();
- m_xPaletteManager->SetColorSelectFunction(std::ref(m_aColorWrapper));
- }
-}
-
void ColorListBox::EnsurePaletteManager()
{
if (!m_xPaletteManager)
@@ -4000,134 +3657,6 @@ void ColorListBox::SetSlotId(sal_uInt16 nSlotId, bool bShowNoneButton)
createColorWindow();
}
-//to avoid the box resizing every time the color is changed to
-//the optimal size of the individual color, get the longest
-//standard color and stick with that as the size for all
-void SvxColorListBox::LockWidthRequest()
-{
- if (get_width_request() != -1)
- return;
- NamedColor aLongestColor;
- long nMaxStandardColorTextWidth = 0;
- XColorListRef const xColorTable = XColorList::CreateStdColorList();
- for (long i = 0; i != xColorTable->Count(); ++i)
- {
- XColorEntry& rEntry = *xColorTable->GetColor(i);
- long nColorTextWidth = GetTextWidth(rEntry.GetName());
- if (nColorTextWidth > nMaxStandardColorTextWidth)
- {
- nMaxStandardColorTextWidth = nColorTextWidth;
- aLongestColor.second = rEntry.GetName();
- }
- }
- ShowPreview(aLongestColor);
- set_width_request(get_preferred_size().Width());
-}
-
-void SvxColorListBox::ShowPreview(const NamedColor &rColor)
-{
- const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
- Size aImageSize(rStyleSettings.GetListBoxPreviewDefaultPixelSize());
-
- ScopedVclPtrInstance<VirtualDevice> xDevice;
- xDevice->SetOutputSize(aImageSize);
- const tools::Rectangle aRect(Point(0, 0), aImageSize);
- if (rColor.first == COL_AUTO)
- xDevice->SetFillColor(m_aAutoDisplayColor);
- else
- xDevice->SetFillColor(rColor.first);
-
- xDevice->SetLineColor(rStyleSettings.GetDisableColor());
- xDevice->DrawRect(aRect);
-
- BitmapEx aBitmap(xDevice->GetBitmapEx(Point(0, 0), xDevice->GetOutputSize()));
- SetImageAlign(ImageAlign::Left);
- SetModeImage(Image(aBitmap));
- SetText(rColor.second);
-}
-
-IMPL_LINK(SvxColorListBox, WindowEventListener, VclWindowEvent&, rWindowEvent, void)
-{
- if (rWindowEvent.GetId() == VclEventId::WindowEndPopupMode)
- {
- m_xColorWindow.disposeAndClear();
- SetPopover(nullptr);
- }
-}
-
-IMPL_LINK_NOARG(SvxColorListBox, MenuActivateHdl, MenuButton *, void)
-{
- if (!m_xColorWindow || m_xColorWindow->isDisposed())
- createColorWindow();
-}
-
-void SvxColorListBox::createColorWindow()
-{
- const SfxViewFrame* pViewFrame = SfxViewFrame::Current();
- const SfxFrame* pFrame = pViewFrame ? &pViewFrame->GetFrame() : nullptr;
- css::uno::Reference<css::frame::XFrame> xFrame(pFrame ? pFrame->GetFrameInterface() : uno::Reference<css::frame::XFrame>());
-
- EnsurePaletteManager();
-
- m_xColorWindow = VclPtr<SvxColorWindow>::Create(
- OUString() /*m_aCommandURL*/,
- m_xPaletteManager,
- m_aColorStatus,
- m_nSlotId,
- xFrame,
- this,
- true,
- m_aColorWrapper);
-
- m_xColorWindow->AddEventListener(LINK(this, SvxColorListBox, WindowEventListener));
-
- SetNoSelection();
- m_xColorWindow->SelectEntry(m_aSelectedColor);
- SetPopover(m_xColorWindow);
-}
-
-void SvxColorListBox::Selected(const NamedColor& rColor)
-{
- ShowPreview(rColor);
- m_aSelectedColor = rColor;
- if (m_aSelectedLink.IsSet())
- m_aSelectedLink.Call(*this);
-}
-
-SvxColorListBox::~SvxColorListBox()
-{
- disposeOnce();
-}
-
-void SvxColorListBox::dispose()
-{
- m_xColorWindow.disposeAndClear();
- m_aColorWrapper.dispose();
- MenuButton::dispose();
-}
-
-VclPtr<SvxColorWindow> const & SvxColorListBox::getColorWindow() const
-{
- if (!m_xColorWindow || m_xColorWindow->isDisposed())
- const_cast<SvxColorListBox*>(this)->createColorWindow();
- return m_xColorWindow;
-}
-
-void SvxColorListBox::SelectEntry(const Color& rColor)
-{
- VclPtr<SvxColorWindow> xColorWindow = getColorWindow();
- xColorWindow->SelectEntry(rColor);
- m_aSelectedColor = xColorWindow->GetSelectEntryColor();
- ShowPreview(m_aSelectedColor);
-}
-
-boost::property_tree::ptree SvxColorListBox::DumpAsPropertyTree()
-{
- boost::property_tree::ptree aTree = MenuButton::DumpAsPropertyTree();
- aTree.put("type", "colorlistbox");
- return aTree;
-}
-
ColorListBox::ColorListBox(std::unique_ptr<weld::MenuButton> pControl, weld::Window* pTopLevel)
: m_xButton(std::move(pControl))
, m_pTopLevel(pTopLevel)
diff --git a/svx/uiconfig/ui/oldcolorwindow.ui b/svx/uiconfig/ui/oldcolorwindow.ui
deleted file mode 100644
index 042fdd3cc71c..000000000000
--- a/svx/uiconfig/ui/oldcolorwindow.ui
+++ /dev/null
@@ -1,180 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.20.0 -->
-<interface domain="svx">
- <requires lib="gtk+" version="3.18"/>
- <requires lib="LibreOffice" version="1.0"/>
- <object class="GtkImage" id="auto_icon">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="pixbuf">cmd/sc_square_unfilled.png</property>
- </object>
- <object class="GtkImage" id="custom_color_icon">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="margin_right">6</property>
- <property name="xalign">0</property>
- <property name="pixbuf">cmd/sc_colorsettings.png</property>
- <property name="icon_size">1</property>
- </object>
- <object class="GtkImage" id="none_icon">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="pixbuf">cmd/sc_square_unfilled.png</property>
- </object>
- <object class="GtkWindow" id="palette_popup_window">
- <property name="can_focus">False</property>
- <property name="hexpand">True</property>
- <property name="vexpand">True</property>
- <property name="border_width">4</property>
- <property name="resizable">False</property>
- <property name="type_hint">dock</property>
- <child>
- <object class="GtkBox" id="box1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <child>
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">6</property>
- <property name="homogeneous">True</property>
- <child>
- <object class="GtkButton" id="auto_color_button">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="image">auto_icon</property>
- <property name="relief">none</property>
- <property name="xalign">0</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="none_color_button">
- <property name="label" translatable="yes" context="oldcolorwindow|none_color_button">None</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="image">none_icon</property>
- <property name="relief">none</property>
- <property name="xalign">0</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkSeparator" id="separator4">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkComboBox" id="palette_listbox">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
- </packing>
- </child>
- <child>
- <object class="svxcorelo-SvxColorValueSet" id="colorset">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">3</property>
- </packing>
- </child>
- <child>
- <object class="GtkSeparator" id="separator1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">4</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes" context="oldcolorwindow|label1">Recent</property>
- <property name="xalign">0</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">5</property>
- </packing>
- </child>
- <child>
- <object class="svxcorelo-SvxColorValueSet" id="recent_colorset">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">7</property>
- </packing>
- </child>
- <child>
- <object class="GtkSeparator" id="separator3">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">8</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="color_picker_button">
- <property name="label" translatable="yes" context="oldcolorwindow|color_picker_button">Custom Color…</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="image">custom_color_icon</property>
- <property name="relief">none</property>
- <property name="xalign">0</property>
- <property name="always_show_image">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">9</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
-</interface>
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index 16959698f976..f428406b27b4 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -22,6 +22,7 @@
#include <o3tl/safeint.hxx>
#include <sal/log.hxx>
#include <svl/style.hxx>
+#include <vcl/button.hxx>
#include <vcl/weld.hxx>
#include <svl/stritem.hxx>
#include <unotools/pathoptions.hxx>
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index a7ea94053e7c..884a36474a5c 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -2082,7 +2082,7 @@ VclPtr<vcl::Window> VclBuilder::makeObject(vcl::Window *pParent, const OString &
SAL_WARN("vcl.builder", "making metric box for type: " << name
<< " unit: " << sUnit
<< " name: " << id
- << " use a VclComboBoxNumeric instead");
+ << " use a GtkSpinButton instead");
VclPtrInstance<MetricBox> xBox(pParent, nBits);
xBox->EnableAutoSize(true);
xBox->SetUnit(eUnit);
@@ -2104,31 +2104,6 @@ VclPtr<vcl::Window> VclBuilder::makeObject(vcl::Window *pParent, const OString &
xWindow = xListBox;
}
}
- else if (name == "VclComboBoxNumeric")
- {
- OUString sPattern = BuilderUtils::extractCustomProperty(rMap);
- OUString sAdjustment = extractAdjustment(rMap);
- extractModel(id, rMap);
-
- WinBits nBits = WB_CLIPCHILDREN|WB_LEFT|WB_VCENTER|WB_3DLOOK;
-
- bool bDropdown = BuilderUtils::extractDropdown(rMap);
-
- if (bDropdown)
- nBits |= WB_DROPDOWN;
-
- connectNumericFormatterAdjustment(id, sAdjustment);
- OUString sUnit = extractUnit(sPattern);
- FieldUnit eUnit = detectMetricUnit(sUnit);
- SAL_INFO("vcl.builder", "making metric box for " << name << " " << sUnit);
- VclPtrInstance<MetricBox> xBox(pParent, nBits);
- xBox->EnableAutoSize(true);
- xBox->SetUnit(eUnit);
- xBox->SetDecimalDigits(extractDecimalDigits(sPattern));
- if (eUnit == FieldUnit::CUSTOM)
- xBox->SetCustomUnitText(sUnit);
- xWindow = xBox;
- }
else if (name == "VclOptionalBox")
{
xWindow = VclPtr<OptionalBox>::Create(pParent);
More information about the Libreoffice-commits
mailing list