[Libreoffice-commits] core.git: 2 commits - extras/source include/svx solenv/bin svx/source sw/source sw/uiconfig
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Thu Dec 19 21:12:46 UTC 2019
extras/source/glade/libreoffice-catalog.xml.in | 4
include/svx/samecontentlistbox.hxx | 9 -
solenv/bin/native-code.py | 1
svx/source/dialog/samecontentlistbox.cxx | 41 +-----
sw/source/uibase/sidebar/PageFooterPanel.hxx | 3
sw/source/uibase/sidebar/PageFormatPanel.hxx | 2
sw/source/uibase/sidebar/PageHeaderPanel.hxx | 3
sw/source/uibase/sidebar/WrapPropertyPanel.cxx | 165 ++++++++++++-------------
sw/source/uibase/sidebar/WrapPropertyPanel.hxx | 35 ++---
sw/uiconfig/swriter/ui/sidebarwrap.ui | 29 ++--
10 files changed, 127 insertions(+), 165 deletions(-)
New commits:
commit 3e0c33395c50aa58baac678067024cd23698a3d6
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Dec 19 15:12:55 2019 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Dec 19 22:11:45 2019 +0100
weld WrapPropertyPanel
Change-Id: I8ff662fbdcd4defc3d04795e70d95df31b154e20
Reviewed-on: https://gerrit.libreoffice.org/85532
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sw/source/uibase/sidebar/PageFooterPanel.hxx b/sw/source/uibase/sidebar/PageFooterPanel.hxx
index 00a536a38fb5..d855af799854 100644
--- a/sw/source/uibase/sidebar/PageFooterPanel.hxx
+++ b/sw/source/uibase/sidebar/PageFooterPanel.hxx
@@ -28,9 +28,6 @@
#include <svx/rulritem.hxx>
-#include <vcl/fixed.hxx>
-#include <vcl/button.hxx>
-#include <vcl/lstbox.hxx>
#include <svl/intitem.hxx>
#include <svl/poolitem.hxx>
#include <svl/eitem.hxx>
diff --git a/sw/source/uibase/sidebar/PageFormatPanel.hxx b/sw/source/uibase/sidebar/PageFormatPanel.hxx
index 206d478fe403..db7311593c3f 100644
--- a/sw/source/uibase/sidebar/PageFormatPanel.hxx
+++ b/sw/source/uibase/sidebar/PageFormatPanel.hxx
@@ -29,8 +29,6 @@
#include <svx/rulritem.hxx>
#include <svx/papersizelistbox.hxx>
-#include <vcl/fixed.hxx>
-#include <vcl/lstbox.hxx>
#include <tools/fldunit.hxx>
#include <svl/poolitem.hxx>
#include <svx/relfld.hxx>
diff --git a/sw/source/uibase/sidebar/PageHeaderPanel.hxx b/sw/source/uibase/sidebar/PageHeaderPanel.hxx
index bed71f71b043..60132d536080 100644
--- a/sw/source/uibase/sidebar/PageHeaderPanel.hxx
+++ b/sw/source/uibase/sidebar/PageHeaderPanel.hxx
@@ -28,9 +28,6 @@
#include <svx/rulritem.hxx>
-#include <vcl/fixed.hxx>
-#include <vcl/button.hxx>
-#include <vcl/lstbox.hxx>
#include <svl/intitem.hxx>
#include <svl/poolitem.hxx>
#include <svl/eitem.hxx>
diff --git a/sw/source/uibase/sidebar/WrapPropertyPanel.cxx b/sw/source/uibase/sidebar/WrapPropertyPanel.cxx
index b9d01096a1f7..f87afb188735 100644
--- a/sw/source/uibase/sidebar/WrapPropertyPanel.cxx
+++ b/sw/source/uibase/sidebar/WrapPropertyPanel.cxx
@@ -21,6 +21,7 @@
#include <cmdid.h>
#include <swtypes.hxx>
+#include <svx/spacinglistbox.hxx>
#include <svx/svxids.hrc>
#include <svx/svdtrans.hxx>
#include <sfx2/bindings.hxx>
@@ -29,7 +30,6 @@
#include <svl/eitem.hxx>
#include <vcl/commandinfoprovider.hxx>
#include <vcl/svapp.hxx>
-#include <vcl/lstbox.hxx>
#include <vcl/settings.hxx>
#include <editeng/lrspitem.hxx>
#include <editeng/ulspitem.hxx>
@@ -69,7 +69,7 @@ WrapPropertyPanel::WrapPropertyPanel(
vcl::Window* pParent,
const css::uno::Reference< css::frame::XFrame >& rxFrame,
SfxBindings* pBindings )
- : PanelLayout(pParent, "WrapPropertyPanel", "modules/swriter/ui/sidebarwrap.ui", rxFrame)
+ : PanelLayout(pParent, "WrapPropertyPanel", "modules/swriter/ui/sidebarwrap.ui", rxFrame, true)
, mxFrame( rxFrame )
, mpBindings(pBindings)
// spacing
@@ -89,19 +89,19 @@ WrapPropertyPanel::WrapPropertyPanel(
, maSwEnableContourControl(FN_FRAME_WRAP_CONTOUR, *pBindings, *this)
, maSwLRSpacingControl(SID_ATTR_LRSPACE, *pBindings, *this)
, maSwULSpacingControl(SID_ATTR_ULSPACE, *pBindings, *this)
+ , mxRBNoWrap(m_xBuilder->weld_radio_button("buttonnone"))
+ , mxRBWrapLeft(m_xBuilder->weld_radio_button("buttonbefore"))
+ , mxRBWrapRight(m_xBuilder->weld_radio_button("buttonafter"))
+ , mxRBWrapParallel(m_xBuilder->weld_radio_button("buttonparallel"))
+ , mxRBWrapThrough(m_xBuilder->weld_radio_button("buttonthrough"))
+ , mxRBIdealWrap(m_xBuilder->weld_radio_button("buttonoptimal"))
+ , mxEditContour(m_xBuilder->weld_button("editcontour"))
+ , mxEnableContour(m_xBuilder->weld_check_button("enablecontour"))
+ , mxSpacingLB(m_xBuilder->weld_combo_box("spacingLB"))
+ , mxCustomEntry(m_xBuilder->weld_label("customlabel"))
{
- get(mpRBNoWrap, "buttonnone");
- get(mpRBWrapLeft, "buttonbefore");
- get(mpRBWrapRight, "buttonafter");
- get(mpRBWrapParallel, "buttonparallel");
- get(mpRBWrapThrough, "buttonthrough");
- get(mpRBIdealWrap, "buttonoptimal");
- get(mpEnableContour, "enablecontour");
- get(mpEditContour, "editcontour");
- get(mpSpacingLB, "spacingLB");
FieldUnit eMetric = ::GetDfltMetric(false);
- mpSpacingLB->Init(IsInch(eMetric) ? SpacingType::SPACING_INCH : SpacingType::SPACING_CM);
- get(mpCustomEntry, "customlabel");
+ SpacingListBox::Fill(IsInch(eMetric) ? SpacingType::SPACING_INCH : SpacingType::SPACING_CM, *mxSpacingLB);
Initialize();
}
@@ -113,16 +113,16 @@ WrapPropertyPanel::~WrapPropertyPanel()
void WrapPropertyPanel::dispose()
{
- mpRBNoWrap.clear();
- mpRBWrapLeft.clear();
- mpRBWrapRight.clear();
- mpRBWrapParallel.clear();
- mpRBWrapThrough.clear();
- mpRBIdealWrap.clear();
- mpEnableContour.clear();
- mpEditContour.clear();
- mpSpacingLB.clear();
- mpCustomEntry.clear();
+ mxRBNoWrap.reset();
+ mxRBWrapLeft.reset();
+ mxRBWrapRight.reset();
+ mxRBWrapParallel.reset();
+ mxRBWrapThrough.reset();
+ mxRBIdealWrap.reset();
+ mxEnableContour.reset();
+ mxEditContour.reset();
+ mxSpacingLB.reset();
+ mxCustomEntry.reset();
maSwNoWrapControl.dispose();
maSwWrapLeftControl.dispose();
@@ -139,43 +139,43 @@ void WrapPropertyPanel::dispose()
void WrapPropertyPanel::Initialize()
{
- Link<Button*,void> aLink = LINK(this, WrapPropertyPanel, WrapTypeHdl);
- mpRBNoWrap->SetClickHdl(aLink);
- mpRBWrapLeft->SetClickHdl(aLink);
- mpRBWrapRight->SetClickHdl(aLink);
- mpRBWrapParallel->SetClickHdl(aLink);
- mpRBWrapThrough->SetClickHdl(aLink);
- mpRBIdealWrap->SetClickHdl(aLink);
+ Link<weld::ToggleButton&,void> aLink = LINK(this, WrapPropertyPanel, WrapTypeHdl);
+ mxRBNoWrap->connect_toggled(aLink);
+ mxRBWrapLeft->connect_toggled(aLink);
+ mxRBWrapRight->connect_toggled(aLink);
+ mxRBWrapParallel->connect_toggled(aLink);
+ mxRBWrapThrough->connect_toggled(aLink);
+ mxRBIdealWrap->connect_toggled(aLink);
- Link<Button*,void> EditContourLink = LINK(this, WrapPropertyPanel, EditContourHdl);
- mpEditContour->SetClickHdl(EditContourLink);
+ Link<weld::Button&,void> EditContourLink = LINK(this, WrapPropertyPanel, EditContourHdl);
+ mxEditContour->connect_clicked(EditContourLink);
if (comphelper::LibreOfficeKit::isActive())
{
// Disable Edit Contour button for LOK purposes.
- mpEditContour->Hide();
+ mxEditContour->hide();
}
- Link<Button*, void> EnableContourLink = LINK(this,WrapPropertyPanel, EnableContourHdl);
- mpEnableContour->SetClickHdl(EnableContourLink);
- mpSpacingLB->SetSelectHdl(LINK(this, WrapPropertyPanel, SpacingLBHdl));
+ Link<weld::ToggleButton&, void> EnableContourLink = LINK(this,WrapPropertyPanel, EnableContourHdl);
+ mxEnableContour->connect_toggled(EnableContourLink);
+ mxSpacingLB->connect_changed(LINK(this, WrapPropertyPanel, SpacingLBHdl));
- mpRBNoWrap->SetModeRadioImage(vcl::CommandInfoProvider::GetImageForCommand(UNO_WRAPOFF, mxFrame));
+ mxRBNoWrap->set_image(vcl::CommandInfoProvider::GetXGraphicForCommand(UNO_WRAPOFF, mxFrame));
if ( AllSettings::GetLayoutRTL() )
{
- mpRBWrapLeft->SetModeRadioImage(vcl::CommandInfoProvider::GetImageForCommand(UNO_WRAPRIGHT, mxFrame));
- mpRBWrapRight->SetModeRadioImage(vcl::CommandInfoProvider::GetImageForCommand(UNO_WRAPLEFT, mxFrame));
+ mxRBWrapLeft->set_image(vcl::CommandInfoProvider::GetXGraphicForCommand(UNO_WRAPRIGHT, mxFrame));
+ mxRBWrapRight->set_image(vcl::CommandInfoProvider::GetXGraphicForCommand(UNO_WRAPLEFT, mxFrame));
}
else
{
- mpRBWrapLeft->SetModeRadioImage(vcl::CommandInfoProvider::GetImageForCommand(UNO_WRAPLEFT, mxFrame));
- mpRBWrapRight->SetModeRadioImage(vcl::CommandInfoProvider::GetImageForCommand(UNO_WRAPRIGHT, mxFrame));
+ mxRBWrapLeft->set_image(vcl::CommandInfoProvider::GetXGraphicForCommand(UNO_WRAPLEFT, mxFrame));
+ mxRBWrapRight->set_image(vcl::CommandInfoProvider::GetXGraphicForCommand(UNO_WRAPRIGHT, mxFrame));
}
- mpRBWrapParallel->SetModeRadioImage(vcl::CommandInfoProvider::GetImageForCommand(UNO_WRAPON, mxFrame));
- mpRBWrapThrough->SetModeRadioImage(vcl::CommandInfoProvider::GetImageForCommand(UNO_WRAPTHROUGH, mxFrame));
- mpRBIdealWrap->SetModeRadioImage(vcl::CommandInfoProvider::GetImageForCommand(UNO_WRAPIDEAL, mxFrame));
+ mxRBWrapParallel->set_image(vcl::CommandInfoProvider::GetXGraphicForCommand(UNO_WRAPON, mxFrame));
+ mxRBWrapThrough->set_image(vcl::CommandInfoProvider::GetXGraphicForCommand(UNO_WRAPTHROUGH, mxFrame));
+ mxRBIdealWrap->set_image(vcl::CommandInfoProvider::GetXGraphicForCommand(UNO_WRAPIDEAL, mxFrame));
- aCustomEntry = mpCustomEntry->GetText();
+ aCustomEntry = mxCustomEntry->get_label();
mpBindings->Update( FN_FRAME_NOWRAP );
mpBindings->Update( FN_FRAME_WRAP );
@@ -193,40 +193,43 @@ void WrapPropertyPanel::UpdateSpacingLB()
{
if( (nLeft == nRight) && (nTop == nBottom) && (nLeft == nTop) )
{
- for(sal_Int32 i = 0; i < mpSpacingLB->GetEntryCount(); i++)
+ sal_Int32 nCount = mxSpacingLB->get_count();
+ for (sal_Int32 i = 0; i < nCount; i++)
{
- if(reinterpret_cast<sal_uLong>(mpSpacingLB->GetEntryData(i)) == nLeft )
+ if (mxSpacingLB->get_id(i).toUInt32() == nLeft)
{
- mpSpacingLB->SelectEntryPos(i);
- mpSpacingLB->RemoveEntry(aCustomEntry);
+ mxSpacingLB->set_active(i);
+ int nCustomEntry = mxSpacingLB->find_text(aCustomEntry);
+ if (nCustomEntry != -1)
+ mxSpacingLB->remove(nCustomEntry);
return;
}
}
}
- if(mpSpacingLB->GetEntryPos(aCustomEntry) == LISTBOX_ENTRY_NOTFOUND)
- mpSpacingLB->InsertEntry(aCustomEntry);
- mpSpacingLB->SelectEntry(aCustomEntry);
+ if (mxSpacingLB->find_text(aCustomEntry) == -1)
+ mxSpacingLB->append_text(aCustomEntry);
+ mxSpacingLB->set_active_text(aCustomEntry);
}
-IMPL_LINK_NOARG(WrapPropertyPanel, EditContourHdl, Button*, void)
+IMPL_LINK_NOARG(WrapPropertyPanel, EditContourHdl, weld::Button&, void)
{
SfxBoolItem aItem(SID_CONTOUR_DLG, true);
mpBindings->GetDispatcher()->ExecuteList(SID_CONTOUR_DLG,
SfxCallMode::RECORD, { &aItem });
}
-IMPL_LINK_NOARG(WrapPropertyPanel, EnableContourHdl, Button*, void)
+IMPL_LINK_NOARG(WrapPropertyPanel, EnableContourHdl, weld::ToggleButton&, void)
{
- bool IsContour = mpEnableContour->IsChecked();
+ bool IsContour = mxEnableContour->get_active();
SfxBoolItem aItem(FN_FRAME_WRAP_CONTOUR, IsContour);
mpBindings->GetDispatcher()->ExecuteList(FN_FRAME_WRAP_CONTOUR,
SfxCallMode::RECORD, { &aItem });
}
-IMPL_LINK(WrapPropertyPanel, SpacingLBHdl, ListBox&, rBox, void)
+IMPL_LINK(WrapPropertyPanel, SpacingLBHdl, weld::ComboBox&, rBox, void)
{
- sal_uInt16 nVal = static_cast<sal_uInt16>(reinterpret_cast<sal_uLong>(rBox.GetSelectedEntryData()));
+ sal_uInt16 nVal = rBox.get_active_id().toUInt32();
SvxLRSpaceItem aLRItem(nVal, nVal, 0, 0, RES_LR_SPACE);
SvxULSpaceItem aULItem(nVal, nVal, RES_UL_SPACE);
@@ -238,26 +241,26 @@ IMPL_LINK(WrapPropertyPanel, SpacingLBHdl, ListBox&, rBox, void)
SfxCallMode::RECORD, { &aULItem });
}
-IMPL_LINK_NOARG(WrapPropertyPanel, WrapTypeHdl, Button*, void)
+IMPL_LINK_NOARG(WrapPropertyPanel, WrapTypeHdl, weld::ToggleButton&, void)
{
sal_uInt16 nSlot = 0;
- if ( mpRBWrapLeft->IsChecked() )
+ if ( mxRBWrapLeft->get_active() )
{
nSlot = FN_FRAME_WRAP_LEFT;
}
- else if( mpRBWrapRight->IsChecked() )
+ else if( mxRBWrapRight->get_active() )
{
nSlot = FN_FRAME_WRAP_RIGHT;
}
- else if ( mpRBWrapParallel->IsChecked() )
+ else if ( mxRBWrapParallel->get_active() )
{
nSlot = FN_FRAME_WRAP;
}
- else if( mpRBWrapThrough->IsChecked() )
+ else if( mxRBWrapThrough->get_active() )
{
nSlot = FN_FRAME_WRAPTHRU;
}
- else if( mpRBIdealWrap->IsChecked() )
+ else if( mxRBIdealWrap->get_active() )
{
nSlot = FN_FRAME_WRAP_IDEAL;
}
@@ -273,14 +276,14 @@ IMPL_LINK_NOARG(WrapPropertyPanel, WrapTypeHdl, Button*, void)
void WrapPropertyPanel::UpdateEditContour()
{
- if(mpRBNoWrap->IsChecked() || mpRBWrapThrough->IsChecked())
+ if (mxRBNoWrap->get_active() || mxRBWrapThrough->get_active())
{
- mpEnableContour->Check( false );
- mpEnableContour->Disable();
+ mxEnableContour->set_active(false);
+ mxEnableContour->set_sensitive(false);
}
else
{
- mpEnableContour->Enable();
+ mxEnableContour->set_sensitive(true);
}
}
@@ -294,37 +297,37 @@ void WrapPropertyPanel::NotifyItemUpdate(
dynamic_cast< const SfxBoolItem *>( pState ) != nullptr )
{
//Set Radio Button enable
- mpRBNoWrap->Enable();
- mpRBWrapLeft->Enable();
- mpRBWrapRight->Enable();
- mpRBWrapParallel->Enable();
- mpRBWrapThrough->Enable();
- mpRBIdealWrap->Enable();
- mpEnableContour->Enable();
+ mxRBNoWrap->set_sensitive(true);
+ mxRBWrapLeft->set_sensitive(true);
+ mxRBWrapRight->set_sensitive(true);
+ mxRBWrapParallel->set_sensitive(true);
+ mxRBWrapThrough->set_sensitive(true);
+ mxRBIdealWrap->set_sensitive(true);
+ mxEnableContour->set_sensitive(true);
const SfxBoolItem* pBoolItem = static_cast< const SfxBoolItem* >( pState );
switch( nSId )
{
case FN_FRAME_WRAP_RIGHT:
- mpRBWrapRight->Check( pBoolItem->GetValue() );
+ mxRBWrapRight->set_active( pBoolItem->GetValue() );
break;
case FN_FRAME_WRAP_LEFT:
- mpRBWrapLeft->Check( pBoolItem->GetValue() );
+ mxRBWrapLeft->set_active( pBoolItem->GetValue() );
break;
case FN_FRAME_WRAPTHRU:
- mpRBWrapThrough->Check( pBoolItem->GetValue() );
+ mxRBWrapThrough->set_active( pBoolItem->GetValue() );
break;
case FN_FRAME_WRAP_IDEAL:
- mpRBIdealWrap->Check( pBoolItem->GetValue() );
+ mxRBIdealWrap->set_active( pBoolItem->GetValue() );
break;
case FN_FRAME_WRAP:
- mpRBWrapParallel->Check( pBoolItem->GetValue() );
+ mxRBWrapParallel->set_active( pBoolItem->GetValue() );
break;
case FN_FRAME_WRAP_CONTOUR:
- mpEnableContour->Check( pBoolItem->GetValue() );
+ mxEnableContour->set_active( pBoolItem->GetValue() );
break;
case FN_FRAME_NOWRAP:
- mpRBNoWrap->Check( pBoolItem->GetValue() );
+ mxRBNoWrap->set_active( pBoolItem->GetValue() );
break;
}
UpdateEditContour();
diff --git a/sw/source/uibase/sidebar/WrapPropertyPanel.hxx b/sw/source/uibase/sidebar/WrapPropertyPanel.hxx
index d50c9fc560db..9d1eeac36369 100644
--- a/sw/source/uibase/sidebar/WrapPropertyPanel.hxx
+++ b/sw/source/uibase/sidebar/WrapPropertyPanel.hxx
@@ -20,12 +20,9 @@
#define INCLUDED_SW_SOURCE_UIBASE_SIDEBAR_WRAPPROPERTYPANEL_HXX
#include <svx/sidebar/PanelLayout.hxx>
-#include <vcl/button.hxx>
-#include <vcl/fixed.hxx>
#include <sfx2/sidebar/ControllerItem.hxx>
#include <com/sun/star/frame/XFrame.hpp>
-#include <vcl/lstbox.hxx>
-#include <svx/spacinglistbox.hxx>
+#include <vcl/weld.hxx>
namespace sw { namespace sidebar {
@@ -56,17 +53,6 @@ namespace sw { namespace sidebar {
css::uno::Reference< css::frame::XFrame > mxFrame;
SfxBindings* mpBindings;
- VclPtr<RadioButton> mpRBNoWrap;
- VclPtr<RadioButton> mpRBWrapLeft;
- VclPtr<RadioButton> mpRBWrapRight;
- VclPtr<RadioButton> mpRBWrapParallel;
- VclPtr<RadioButton> mpRBWrapThrough;
- VclPtr<RadioButton> mpRBIdealWrap;
- VclPtr<Button> mpEditContour;
- VclPtr<CheckBox> mpEnableContour;
- VclPtr<SpacingListBox> mpSpacingLB;
- VclPtr<FixedText> mpCustomEntry;
-
//Spacing
sal_uInt16 nTop;
sal_uInt16 nBottom;
@@ -87,14 +73,25 @@ namespace sw { namespace sidebar {
::sfx2::sidebar::ControllerItem maSwLRSpacingControl;
::sfx2::sidebar::ControllerItem maSwULSpacingControl;
+ std::unique_ptr<weld::RadioButton> mxRBNoWrap;
+ std::unique_ptr<weld::RadioButton> mxRBWrapLeft;
+ std::unique_ptr<weld::RadioButton> mxRBWrapRight;
+ std::unique_ptr<weld::RadioButton> mxRBWrapParallel;
+ std::unique_ptr<weld::RadioButton> mxRBWrapThrough;
+ std::unique_ptr<weld::RadioButton> mxRBIdealWrap;
+ std::unique_ptr<weld::Button> mxEditContour;
+ std::unique_ptr<weld::CheckButton> mxEnableContour;
+ std::unique_ptr<weld::ComboBox> mxSpacingLB;
+ std::unique_ptr<weld::Label> mxCustomEntry;
+
void Initialize();
void UpdateEditContour();
void UpdateSpacingLB();
- DECL_LINK(WrapTypeHdl, Button*, void);
- DECL_LINK(EnableContourHdl, Button*, void);
- DECL_LINK(EditContourHdl, Button*, void);
- DECL_LINK(SpacingLBHdl, ListBox&, void);
+ DECL_LINK(WrapTypeHdl, weld::ToggleButton&, void);
+ DECL_LINK(EnableContourHdl, weld::ToggleButton&, void);
+ DECL_LINK(EditContourHdl, weld::Button&, void);
+ DECL_LINK(SpacingLBHdl, weld::ComboBox&, void);
};
} } // end of namespace ::sw::sidebar
diff --git a/sw/uiconfig/swriter/ui/sidebarwrap.ui b/sw/uiconfig/swriter/ui/sidebarwrap.ui
index f49c78bda853..c193a7c91ec9 100644
--- a/sw/uiconfig/swriter/ui/sidebarwrap.ui
+++ b/sw/uiconfig/swriter/ui/sidebarwrap.ui
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.20.0 -->
+<!-- Generated with glade 3.22.1 -->
<interface domain="sw">
<requires lib="gtk+" version="3.18"/>
<object class="GtkGrid" id="WrapPropertyPanel">
@@ -25,9 +25,8 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="use_underline">True</property>
<property name="tooltip_text" translatable="yes" context="sidebarwrap|buttonnone|tooltip_text">None</property>
- <property name="action_name">.uno:WrapOff</property>
+ <property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
@@ -48,12 +47,12 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="use_underline">True</property>
<property name="tooltip_text" translatable="yes" context="sidebarwrap|buttonparallel|tooltip_text">Parallel</property>
- <property name="action_name">.uno:WrapOn</property>
+ <property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
+ <property name="group">buttonnone</property>
<child internal-child="accessible">
<object class="AtkObject" id="buttonparallel-atkobject">
<property name="AtkObject::accessible-name" translatable="yes" context="sidebarwrap|buttonparallel-atkobject">Parallel</property>
@@ -70,13 +69,13 @@
<object class="GtkRadioButton" id="buttonoptimal">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="use_underline">True</property>
<property name="receives_default">False</property>
<property name="tooltip_text" translatable="yes" context="sidebarwrap|buttonoptimal|tooltip_text">Optimal</property>
- <property name="action_name">.uno:WrapIdeal</property>
+ <property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
+ <property name="group">buttonnone</property>
<child internal-child="accessible">
<object class="AtkObject" id="buttonoptimal-atkobject">
<property name="AtkObject::accessible-name" translatable="yes" context="sidebarwrap|buttonoptimal-atkobject">Optimal</property>
@@ -94,12 +93,12 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="use_underline">True</property>
<property name="tooltip_text" translatable="yes" context="sidebarwrap|buttonbefore|tooltip_text">Before</property>
- <property name="action_name">.uno:WrapLeft</property>
+ <property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
+ <property name="group">buttonnone</property>
<child internal-child="accessible">
<object class="AtkObject" id="buttonbefore-atkobject">
<property name="AtkObject::accessible-name" translatable="yes" context="sidebarwrap|buttonbefore-atkobject">Before</property>
@@ -117,12 +116,12 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="use_underline">True</property>
<property name="tooltip_text" translatable="yes" context="sidebarwrap|buttonafter|tooltip_text">After</property>
- <property name="action_name">.uno:WrapRight</property>
+ <property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
+ <property name="group">buttonnone</property>
<child internal-child="accessible">
<object class="AtkObject" id="buttonafter-atkobject">
<property name="AtkObject::accessible-name" translatable="yes" context="sidebarwrap|buttonafter-atkobject">After</property>
@@ -140,12 +139,12 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="use_underline">True</property>
<property name="tooltip_text" translatable="yes" context="sidebarwrap|buttonthrough|tooltip_text">Through</property>
- <property name="action_name">.uno:WrapThrough</property>
+ <property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
+ <property name="group">buttonnone</property>
<child internal-child="accessible">
<object class="AtkObject" id="buttonthrough-atkobject">
<property name="AtkObject::accessible-name" translatable="yes" context="sidebarwrap|buttonthrough-atkobject">Through</property>
@@ -176,8 +175,8 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="use_underline">True</property>
<property name="tooltip_text" translatable="yes" context="sidebarwrap|enablecontour|tooltip_text">Click to automatically trim unnecessary parts of the image</property>
+ <property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
</object>
@@ -226,7 +225,7 @@
</packing>
</child>
<child>
- <object class="svxcorelo-SpacingListBox" id="spacingLB">
+ <object class="GtkComboBoxText" id="spacingLB">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes" context="sidebarwrap|spacingLB|tooltip_text">Set the amount of space between the image and surrounding text</property>
commit 2f9376bd802b08b6ded929a5729a2612d0903175
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Dec 19 14:21:53 2019 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Dec 19 22:11:22 2019 +0100
SameContentListBox is newly unused
Change-Id: I73b2aa5a140d1442901e6b1c7e1334bce74c5e41
Reviewed-on: https://gerrit.libreoffice.org/85529
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/extras/source/glade/libreoffice-catalog.xml.in b/extras/source/glade/libreoffice-catalog.xml.in
index 7ba7ff42deaf..8923acb26c81 100644
--- a/extras/source/glade/libreoffice-catalog.xml.in
+++ b/extras/source/glade/libreoffice-catalog.xml.in
@@ -143,10 +143,6 @@
generic-name="Spacing Preset ListBox" parent="GtkComboBox"
icon-name="widget-gtk-combobox"/>
- <glade-widget-class title="Same Content Preset ListBox" name="svxcorelo-SameContentListBox"
- generic-name="Same Content Preset ListBox" parent="GtkComboBox"
- icon-name="widget-gtk-combobox"/>
-
<glade-widget-class title="Sidebar ToolBox" name="sfxlo-SidebarToolBox"
generic-name="Sidebar ToolBox" parent="GtkToolbar"
icon-name="widget-gtk-toolbar">
diff --git a/include/svx/samecontentlistbox.hxx b/include/svx/samecontentlistbox.hxx
index 73946e2a3f35..f767fbd30e84 100644
--- a/include/svx/samecontentlistbox.hxx
+++ b/include/svx/samecontentlistbox.hxx
@@ -21,16 +21,11 @@
#define INCLUDED_SVX_SAMECONTENTLISTBOXHELPER_HXX
#include <svx/svxdllapi.h>
-#include <vcl/lstbox.hxx>
#include <vcl/weld.hxx>
-/// Custom Widget ListBox to hold entries for SameContent setting of Header/Footer
-class SVX_DLLPUBLIC SameContentListBox final : public ListBox
+namespace SameContentListBox
{
-public:
- SameContentListBox( vcl::Window* pParent );
- static void Fill(weld::ComboBox& rComboBox);
- Size GetOptimalSize() const override;
+ void SVX_DLLPUBLIC Fill(weld::ComboBox& rComboBox);
};
#endif
diff --git a/solenv/bin/native-code.py b/solenv/bin/native-code.py
index 5b67a5300bf4..71c27047a2d9 100755
--- a/solenv/bin/native-code.py
+++ b/solenv/bin/native-code.py
@@ -494,7 +494,6 @@ custom_widgets = [
'PropertyControl',
'RecentDocsView',
'RowEdit',
- 'SameContentListBox',
'SdPageObjsTLB',
'SearchBox',
'SearchResultsBox',
diff --git a/svx/source/dialog/samecontentlistbox.cxx b/svx/source/dialog/samecontentlistbox.cxx
index e1bd38c05669..9330c7ed58dc 100644
--- a/svx/source/dialog/samecontentlistbox.cxx
+++ b/svx/source/dialog/samecontentlistbox.cxx
@@ -19,40 +19,21 @@
#include <svx/strings.hrc>
#include <svx/dialmgr.hxx>
#include <svx/samecontentlistbox.hxx>
-#include <vcl/builderfactory.hxx>
#include <samecontent.hrc>
-SameContentListBox::SameContentListBox(vcl::Window* pParent)
- : ListBox( pParent, WB_BORDER | WB_DROPDOWN)
+namespace SameContentListBox
{
- for (size_t i = 0; i < SAL_N_ELEMENTS(RID_SVXSTRARY_SAMECONTENT); ++i)
+ void Fill(weld::ComboBox& rComboBox)
{
- OUString aStr = SvxResId(RID_SVXSTRARY_SAMECONTENT[i].first);
- sal_uInt16 nData = RID_SVXSTRARY_SAMECONTENT[i].second;
- sal_Int32 nPos = InsertEntry( aStr );
- SetEntryData( nPos, reinterpret_cast<void*>(static_cast<sal_uLong>(nData)) );
+ rComboBox.clear();
+ for (size_t i = 0; i < SAL_N_ELEMENTS(RID_SVXSTRARY_SAMECONTENT); ++i)
+ {
+ OUString aStr = SvxResId(RID_SVXSTRARY_SAMECONTENT[i].first);
+ sal_uInt32 nData = RID_SVXSTRARY_SAMECONTENT[i].second;
+ rComboBox.append(OUString::number(nData), aStr);
+ }
+ rComboBox.set_active(0);
+ rComboBox.set_size_request(150, -1);
}
- SetDropDownLineCount(8);
- SelectEntryPos(0);
-}
-
-void SameContentListBox::Fill(weld::ComboBox& rComboBox)
-{
- rComboBox.clear();
- for (size_t i = 0; i < SAL_N_ELEMENTS(RID_SVXSTRARY_SAMECONTENT); ++i)
- {
- OUString aStr = SvxResId(RID_SVXSTRARY_SAMECONTENT[i].first);
- sal_uInt32 nData = RID_SVXSTRARY_SAMECONTENT[i].second;
- rComboBox.append(OUString::number(nData), aStr);
- }
- rComboBox.set_active(0);
- rComboBox.set_size_request(150, -1);
-}
-
-VCL_BUILDER_FACTORY(SameContentListBox);
-
-Size SameContentListBox::GetOptimalSize() const
-{
- return Size(150, ListBox::GetOptimalSize().Height());
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
More information about the Libreoffice-commits
mailing list