[Libreoffice-commits] core.git: chart2/source extras/source formula/source include/vcl sc/inc sc/source sc/uiconfig solenv/bin solenv/gbuild solenv/sanitizers svx/source vcl/source vcl/unx
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Sat May 11 16:35:23 UTC 2019
chart2/source/controller/dialogs/res_ErrorBar.cxx | 4
chart2/source/controller/dialogs/tp_DataSource.cxx | 2
chart2/source/controller/dialogs/tp_RangeChooser.cxx | 6
extras/source/glade/libreoffice-catalog.xml.in | 12
formula/source/ui/dlg/funcutl.cxx | 2
include/vcl/weld.hxx | 21
sc/inc/colorscale.hxx | 1
sc/source/core/data/colorscale.cxx | 11
sc/source/ui/condformat/condformatdlg.cxx | 345 ++----
sc/source/ui/condformat/condformatdlgentry.cxx | 1076 +++++++------------
sc/source/ui/inc/condformatdlg.hxx | 86 -
sc/source/ui/inc/condformatdlgentry.hxx | 189 +--
sc/source/ui/inc/tabvwsh.hxx | 3
sc/source/ui/namedlg/namedefdlg.cxx | 8
sc/source/ui/namedlg/namedlg.cxx | 8
sc/source/ui/view/formatsh.cxx | 10
sc/source/ui/view/reffact.cxx | 43
sc/source/ui/view/tabvwshc.cxx | 91 -
sc/uiconfig/scalc/ui/conditionalentry.ui | 722 +++++++-----
sc/uiconfig/scalc/ui/conditionalformatdialog.ui | 179 ++-
sc/uiconfig/scalc/ui/conditionaliconset.ui | 4
solenv/bin/native-code.py | 3
solenv/gbuild/UIConfig.mk | 4
solenv/sanitizers/ui/modules/scalc.false | 1
solenv/sanitizers/ui/modules/scalc.suppr | 15
svx/source/dialog/langbox.cxx | 4
svx/source/dialog/srchdlg.cxx | 4
vcl/source/app/salvtables.cxx | 110 +
vcl/source/window/stacking.cxx | 2
vcl/unx/gtk3/gtk3gtkinst.cxx | 160 ++
30 files changed, 1543 insertions(+), 1583 deletions(-)
New commits:
commit 492b0d5d076d38234fea4e4e7c5dbec578296fd2
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue May 7 12:27:43 2019 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Sat May 11 18:34:23 2019 +0200
weld conditional formatting
Change-Id: Ia9c99a17d5a95d67a412cfde959192c99caa70be
Reviewed-on: https://gerrit.libreoffice.org/71956
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/chart2/source/controller/dialogs/res_ErrorBar.cxx b/chart2/source/controller/dialogs/res_ErrorBar.cxx
index d2788b8e2d3f..f8fa420120f5 100644
--- a/chart2/source/controller/dialogs/res_ErrorBar.cxx
+++ b/chart2/source/controller/dialogs/res_ErrorBar.cxx
@@ -713,11 +713,11 @@ void ErrorBarResources::isRangeFieldContentValid(weld::Entry& rEdit)
if( bIsValid || !rEdit.get_sensitive())
{
- rEdit.set_error(false);
+ rEdit.set_message_type(weld::EntryMessageType::Normal);
}
else
{
- rEdit.set_error(true);
+ rEdit.set_message_type(weld::EntryMessageType::Error);
}
}
diff --git a/chart2/source/controller/dialogs/tp_DataSource.cxx b/chart2/source/controller/dialogs/tp_DataSource.cxx
index 00963cf054f7..c650e7951af6 100644
--- a/chart2/source/controller/dialogs/tp_DataSource.cxx
+++ b/chart2/source/controller/dialogs/tp_DataSource.cxx
@@ -296,7 +296,7 @@ bool DataSourceTabPage::isRangeFieldContentValid(weld::Entry& rEdit )
OUString aRange(rEdit.get_text());
bool bIsValid = aRange.isEmpty() ||
m_rDialogModel.getRangeSelectionHelper()->verifyCellRange(aRange);
- rEdit.set_error(!bIsValid);
+ rEdit.set_message_type(bIsValid ? weld::EntryMessageType::Normal : weld::EntryMessageType::Error);
return bIsValid;
}
diff --git a/chart2/source/controller/dialogs/tp_RangeChooser.cxx b/chart2/source/controller/dialogs/tp_RangeChooser.cxx
index 6205f9f45a8d..a20a12f0ab4a 100644
--- a/chart2/source/controller/dialogs/tp_RangeChooser.cxx
+++ b/chart2/source/controller/dialogs/tp_RangeChooser.cxx
@@ -279,16 +279,14 @@ bool RangeChooserTabPage::isValid()
if( bIsValid )
{
- m_xED_Range->set_error(false);
- m_xED_Range->set_error(false);
+ m_xED_Range->set_message_type(weld::EntryMessageType::Normal);
if( m_pTabPageNotifiable )
m_pTabPageNotifiable->setValidPage( this );
m_aLastValidRangeString = aRange;
}
else
{
- m_xED_Range->set_error(true);
- m_xED_Range->set_error(true);
+ m_xED_Range->set_message_type(weld::EntryMessageType::Error);
if( m_pTabPageNotifiable )
m_pTabPageNotifiable->setInvalidPage( this );
}
diff --git a/extras/source/glade/libreoffice-catalog.xml.in b/extras/source/glade/libreoffice-catalog.xml.in
index 7a450c288d92..581a3b844416 100644
--- a/extras/source/glade/libreoffice-catalog.xml.in
+++ b/extras/source/glade/libreoffice-catalog.xml.in
@@ -277,14 +277,6 @@
generic-name="LanguageBox" parent="VclComboBoxText"
icon-name="widget-gtk-combobox"/>
- <glade-widget-class title="Reference Button" name="foruilo-RefButton"
- generic-name="Reference Button" parent="GtkButton"
- icon-name="widget-gtk-button"/>
-
- <glade-widget-class title="Reference Edit" name="foruilo-RefEdit"
- generic-name="Reference Edit" parent="GtkEntry"
- icon-name="widget-gtk-textentry"/>
-
<glade-widget-class title="URL Entry" name="cuilo-SvxHyperURLBox"
generic-name="URL Entry" parent="GtkEntry"
icon-name="widget-gtk-textentry"/>
@@ -358,10 +350,6 @@
generic-name="ClientBox" parent="GtkDrawingArea"
icon-name="widget-gtk-drawingarea"/>
- <glade-widget-class title="ScCondFormatList" name="sclo-ScCondFormatList"
- generic-name="CondFormatList" parent="GtkDrawingArea"
- icon-name="widget-gtk-drawingarea"/>
-
<glade-widget-class title="IndexFieldsControl" name="dbulo-DbaIndexFieldsControl"
generic-name="IndexFieldsControl" parent="GtkTreeView"
icon-name="widget-gtk-treeview"/>
diff --git a/formula/source/ui/dlg/funcutl.cxx b/formula/source/ui/dlg/funcutl.cxx
index 8cf4b2155d3d..13730efe00a8 100644
--- a/formula/source/ui/dlg/funcutl.cxx
+++ b/formula/source/ui/dlg/funcutl.cxx
@@ -401,7 +401,7 @@ void WeldRefEdit::SetRefString( const OUString& rStr )
void WeldRefEdit::SetRefValid(bool bValid)
{
- xEntry->set_error(!bValid);
+ xEntry->set_message_type(bValid ? weld::EntryMessageType::Normal : weld::EntryMessageType::Error);
}
void WeldRefEdit::SetText(const OUString& rStr)
diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index 15d5b609d1b8..646daa1aeea7 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -232,6 +232,9 @@ public:
virtual VclPtr<VirtualDevice> create_virtual_device() const = 0;
+ //make this widget look like a page in a notebook
+ virtual void set_stack_background() = 0;
+
virtual css::uno::Reference<css::datatransfer::dnd::XDropTarget> get_drop_target() = 0;
virtual ~Widget() {}
@@ -448,6 +451,13 @@ struct VCL_DLLPUBLIC ComboBoxEntry
}
};
+enum class EntryMessageType
+{
+ Normal,
+ Warning,
+ Error,
+};
+
class VCL_DLLPUBLIC ComboBox : virtual public Container
{
private:
@@ -520,7 +530,7 @@ public:
//entry related
virtual bool has_entry() const = 0;
- virtual void set_entry_error(bool bError) = 0;
+ virtual void set_entry_message_type(EntryMessageType eType) = 0;
virtual void set_entry_text(const OUString& rStr) = 0;
virtual void set_entry_width_chars(int nChars) = 0;
virtual void set_entry_max_length(int nChars) = 0;
@@ -1036,7 +1046,7 @@ public:
virtual int get_position() const = 0;
virtual void set_editable(bool bEditable) = 0;
virtual bool get_editable() const = 0;
- virtual void set_error(bool bShowError) = 0;
+ virtual void set_message_type(EntryMessageType eType) = 0;
// font size is in points, not pixels, e.g. see Window::[G]etPointFont
virtual void set_font(const vcl::Font& rFont) = 0;
@@ -1250,7 +1260,10 @@ public:
//entry related
virtual bool has_entry() const override { return true; }
- virtual void set_entry_error(bool bError) override { m_xEntry->set_error(bError); }
+ virtual void set_entry_message_type(EntryMessageType eType) override
+ {
+ m_xEntry->set_message_type(eType);
+ }
virtual void set_entry_text(const OUString& rStr) override { m_xEntry->set_text(rStr); }
virtual void set_entry_width_chars(int nChars) override { m_xEntry->set_width_chars(nChars); }
virtual void set_entry_max_length(int nChars) override { m_xEntry->set_max_length(nChars); }
@@ -1502,7 +1515,7 @@ public:
virtual void set_label(const OUString& rText) = 0;
virtual OUString get_label() const = 0;
virtual void set_mnemonic_widget(Widget* pTarget) = 0;
- virtual void set_error(bool bShowError) = 0;
+ virtual void set_message_type(EntryMessageType eType) = 0;
// font size is in points, not pixels, e.g. see Window::[G]etPointFont
virtual void set_font(const vcl::Font& rFont) = 0;
};
diff --git a/sc/inc/colorscale.hxx b/sc/inc/colorscale.hxx
index eb89d0cf2c34..aa3e6f6e7e60 100644
--- a/sc/inc/colorscale.hxx
+++ b/sc/inc/colorscale.hxx
@@ -381,6 +381,7 @@ public:
static const ScIconSetMap g_IconSetMap[];
static const char* getIconSetName( ScIconSetType eType );
static sal_Int32 getIconSetElements( ScIconSetType eType );
+ static OUString getIconName(ScIconSetType eType, sal_Int32 nIndex);
static BitmapEx& getBitmap(sc::IconSetBitmapMap& rBitmapMap, ScIconSetType eType, sal_Int32 nIndex);
typedef ScIconSetFormatData::Entries_t::iterator iterator;
diff --git a/sc/source/core/data/colorscale.cxx b/sc/source/core/data/colorscale.cxx
index 53e9e63fc548..1a932df73b53 100644
--- a/sc/source/core/data/colorscale.cxx
+++ b/sc/source/core/data/colorscale.cxx
@@ -1383,8 +1383,7 @@ sal_Int32 ScIconSetFormat::getIconSetElements( ScIconSetType eType )
return 0;
}
-BitmapEx& ScIconSetFormat::getBitmap(sc::IconSetBitmapMap & rIconSetBitmapMap,
- ScIconSetType const eType, sal_Int32 const nIndex)
+OUString ScIconSetFormat::getIconName(ScIconSetType const eType, sal_Int32 const nIndex)
{
OUString sBitmap;
@@ -1399,6 +1398,14 @@ BitmapEx& ScIconSetFormat::getBitmap(sc::IconSetBitmapMap & rIconSetBitmapMap,
assert(!sBitmap.isEmpty());
+ return sBitmap;
+}
+
+BitmapEx& ScIconSetFormat::getBitmap(sc::IconSetBitmapMap & rIconSetBitmapMap,
+ ScIconSetType const eType, sal_Int32 const nIndex)
+{
+ OUString sBitmap(ScIconSetFormat::getIconName(eType, nIndex));
+
std::map<OUString, BitmapEx>::iterator itr = rIconSetBitmapMap.find(sBitmap);
if (itr != rIconSetBitmapMap.end())
return itr->second;
diff --git a/sc/source/ui/condformat/condformatdlg.cxx b/sc/source/ui/condformat/condformatdlg.cxx
index 0d0551129039..07f570b65529 100644
--- a/sc/source/ui/condformat/condformatdlg.cxx
+++ b/sc/source/ui/condformat/condformatdlg.cxx
@@ -25,42 +25,35 @@
#include <condformatdlgentry.hxx>
#include <condformatdlgitem.hxx>
-ScCondFormatList::ScCondFormatList(vcl::Window* pParent, WinBits nStyle)
- : Control(pParent, nStyle | WB_DIALOGCONTROL)
- , mbHasScrollBar(false)
+ScCondFormatList::ScCondFormatList(ScCondFormatDlg* pDialogParent,
+ std::unique_ptr<weld::ScrolledWindow> xWindow,
+ std::unique_ptr<weld::Container> xGrid)
+ : mxScrollWindow(std::move(xWindow))
+ , mxGrid(std::move(xGrid))
, mbFrozen(false)
, mbNewEntry(false)
- , mpScrollBar(VclPtr<ScrollBar>::Create(this, WB_VERT ))
, mpDoc(nullptr)
- , mpDialogParent(nullptr)
+ , mpDialogParent(pDialogParent)
{
- mpScrollBar->SetScrollHdl( LINK( this, ScCondFormatList, ScrollHdl ) );
- mpScrollBar->EnableDrag();
- SetControlBackground( GetSettings().GetStyleSettings().GetWindowColor() );
- SetBackground(GetControlBackground());
+ mxScrollWindow->set_size_request(mxScrollWindow->get_approximate_digit_width() * 85,
+ mxScrollWindow->get_text_height() * 23);
+ mxGrid->set_stack_background();
}
-ScCondFormatList::~ScCondFormatList()
+weld::Window* ScCondFormatList::GetFrameWeld()
{
- disposeOnce();
+ return mpDialogParent->getDialog();
}
-void ScCondFormatList::dispose()
+ScCondFormatList::~ScCondFormatList()
{
Freeze();
- mpDialogParent.clear();
- mpScrollBar.disposeAndClear();
- for (auto& rxEntry : maEntries)
- rxEntry.disposeAndClear();
- maEntries.clear();
- Control::dispose();
}
-void ScCondFormatList::init(ScDocument* pDoc, ScCondFormatDlg* pDialogParent,
+void ScCondFormatList::init(ScDocument* pDoc,
const ScConditionalFormat* pFormat, const ScRangeList& rRanges,
const ScAddress& rPos, condformat::dialog::ScCondFormatDialogType eType)
{
- mpDialogParent = pDialogParent;
mpDoc = pDoc;
maPos = rPos;
maRanges = rRanges;
@@ -80,9 +73,9 @@ void ScCondFormatList::init(ScDocument* pDoc, ScCondFormatDlg* pDialogParent,
{
const ScCondFormatEntry* pConditionEntry = static_cast<const ScCondFormatEntry*>( pEntry );
if(pConditionEntry->GetOperation() != ScConditionMode::Direct)
- maEntries.push_back(VclPtr<ScConditionFrmtEntry>::Create( this, mpDoc, pDialogParent, maPos, pConditionEntry ) );
+ maEntries.emplace_back(new ScConditionFrmtEntry( this, mpDoc, mpDialogParent, maPos, pConditionEntry ) );
else
- maEntries.push_back(VclPtr<ScFormulaFrmtEntry>::Create( this, mpDoc, pDialogParent, maPos, pConditionEntry ) );
+ maEntries.emplace_back(new ScFormulaFrmtEntry( this, mpDoc, mpDialogParent, maPos, pConditionEntry ) );
}
break;
@@ -90,19 +83,19 @@ void ScCondFormatList::init(ScDocument* pDoc, ScCondFormatDlg* pDialogParent,
{
const ScColorScaleFormat* pColorScale = static_cast<const ScColorScaleFormat*>( pEntry );
if( pColorScale->size() == 2 )
- maEntries.push_back(VclPtr<ScColorScale2FrmtEntry>::Create( this, mpDoc, maPos, pColorScale ) );
+ maEntries.emplace_back(new ScColorScale2FrmtEntry( this, mpDoc, maPos, pColorScale ) );
else
- maEntries.push_back(VclPtr<ScColorScale3FrmtEntry>::Create( this, mpDoc, maPos, pColorScale ) );
+ maEntries.emplace_back(new ScColorScale3FrmtEntry( this, mpDoc, maPos, pColorScale ) );
}
break;
case ScFormatEntry::Type::Databar:
- maEntries.push_back(VclPtr<ScDataBarFrmtEntry>::Create( this, mpDoc, maPos, static_cast<const ScDataBarFormat*>( pEntry ) ) );
+ maEntries.emplace_back(new ScDataBarFrmtEntry( this, mpDoc, maPos, static_cast<const ScDataBarFormat*>( pEntry ) ) );
break;
case ScFormatEntry::Type::Iconset:
- maEntries.push_back(VclPtr<ScIconSetFrmtEntry>::Create( this, mpDoc, maPos, static_cast<const ScIconSetFormat*>( pEntry ) ) );
+ maEntries.emplace_back(new ScIconSetFrmtEntry( this, mpDoc, maPos, static_cast<const ScIconSetFormat*>( pEntry ) ) );
break;
case ScFormatEntry::Type::Date:
- maEntries.push_back(VclPtr<ScDateFrmtEntry>::Create( this, mpDoc, static_cast<const ScCondDateFormatEntry*>( pEntry ) ) );
+ maEntries.emplace_back(new ScDateFrmtEntry( this, mpDoc, static_cast<const ScCondDateFormatEntry*>( pEntry ) ) );
break;
}
}
@@ -114,19 +107,19 @@ void ScCondFormatList::init(ScDocument* pDoc, ScCondFormatDlg* pDialogParent,
switch(eType)
{
case condformat::dialog::CONDITION:
- maEntries.push_back(VclPtr<ScConditionFrmtEntry>::Create( this, mpDoc, pDialogParent, maPos ));
+ maEntries.emplace_back(new ScConditionFrmtEntry( this, mpDoc, mpDialogParent, maPos ));
break;
case condformat::dialog::COLORSCALE:
- maEntries.push_back(VclPtr<ScColorScale3FrmtEntry>::Create( this, mpDoc, maPos ));
+ maEntries.emplace_back(new ScColorScale3FrmtEntry( this, mpDoc, maPos ));
break;
case condformat::dialog::DATABAR:
- maEntries.push_back(VclPtr<ScDataBarFrmtEntry>::Create( this, mpDoc, maPos ));
+ maEntries.emplace_back(new ScDataBarFrmtEntry( this, mpDoc, maPos ));
break;
case condformat::dialog::ICONSET:
- maEntries.push_back(VclPtr<ScIconSetFrmtEntry>::Create( this, mpDoc, maPos ));
+ maEntries.emplace_back(new ScIconSetFrmtEntry( this, mpDoc, maPos ));
break;
case condformat::dialog::DATE:
- maEntries.push_back(VclPtr<ScDateFrmtEntry>::Create( this, mpDoc ));
+ maEntries.emplace_back(new ScDateFrmtEntry( this, mpDoc ));
break;
case condformat::dialog::NONE:
break;
@@ -149,27 +142,6 @@ void ScCondFormatList::SetRange(const ScRangeList& rRange)
maRanges = rRange;
}
-VCL_BUILDER_FACTORY_CONSTRUCTOR(ScCondFormatList, 0)
-
-Size ScCondFormatList::GetOptimalSize() const
-{
- return LogicToPixel(Size(300, 185), MapMode(MapUnit::MapAppFont));
-}
-
-void ScCondFormatList::Resize()
-{
- Control::Resize();
- RecalcAll();
-}
-
-void ScCondFormatList::queue_resize(StateChangedType eReason)
-{
- Control::queue_resize(eReason);
- if (!mpDialogParent) //detects that this is during dispose
- return;
- RecalcAll();
-}
-
std::unique_ptr<ScConditionalFormat> ScCondFormatList::GetConditionalFormat() const
{
if(maEntries.empty())
@@ -204,68 +176,31 @@ void ScCondFormatList::RecalcAll()
if (mbFrozen)
return;
- sal_Int32 nTotalHeight = 0;
sal_Int32 nIndex = 1;
for (const auto& item : maEntries)
{
if (!item)
continue;
- nTotalHeight += item->GetSizePixel().Height();
item->SetIndex(nIndex);
+ item->set_grid_top_attach(nIndex - 1);
++nIndex;
}
-
- Size aCtrlSize = GetOutputSize();
- long nSrcBarSize = GetSettings().GetStyleSettings().GetScrollBarSize();
- if(nTotalHeight > GetSizePixel().Height())
- {
- mbHasScrollBar = true;
- mpScrollBar->SetPosSizePixel(Point(aCtrlSize.Width() -nSrcBarSize, 0),
- Size(nSrcBarSize, aCtrlSize.Height()) );
- mpScrollBar->SetRangeMax(nTotalHeight);
- mpScrollBar->SetVisibleSize(aCtrlSize.Height());
- mpScrollBar->Show();
- }
- else
- {
- mbHasScrollBar = false;
- mpScrollBar->Hide();
- }
-
- Point aPoint(0,-1*mpScrollBar->GetThumbPos());
- for (const auto& item : maEntries)
- {
- if (!item)
- continue;
- item->SetPosPixel(aPoint);
- Size aSize = item->GetSizePixel();
- if(mbHasScrollBar)
- aSize.setWidth( aCtrlSize.Width() - nSrcBarSize );
- else
- aSize.setWidth( aCtrlSize.Width() );
- item->SetSizePixel(aSize);
-
- aPoint.AdjustY(item->GetSizePixel().Height() );
- }
}
-void ScCondFormatList::DoScroll(long nDelta)
+IMPL_LINK(ScCondFormatList, ColFormatTypeHdl, weld::ComboBox&, rBox, void)
{
- Point aNewPoint = mpScrollBar->GetPosPixel();
- tools::Rectangle aRect(Point(), GetOutputSize());
- aRect.AdjustRight( -(mpScrollBar->GetSizePixel().Width()) );
- Scroll( 0, -nDelta, aRect );
- mpScrollBar->SetPosPixel(aNewPoint);
+ Application::PostUserEvent(LINK(this, ScCondFormatList, AfterColFormatTypeHdl), &rBox);
}
-IMPL_LINK(ScCondFormatList, ColFormatTypeHdl, ListBox&, rBox, void)
+IMPL_LINK(ScCondFormatList, AfterColFormatTypeHdl, void*, p, void)
{
+ weld::ComboBox* pBox = static_cast<weld::ComboBox*>(p);
EntryContainer::iterator itr = std::find_if(maEntries.begin(), maEntries.end(),
- [](const VclPtr<ScCondFrmtEntry>& widget) { return widget->IsSelected(); });
+ [](const std::unique_ptr<ScCondFrmtEntry>& widget) { return widget->IsSelected(); });
if(itr == maEntries.end())
return;
- sal_Int32 nPos = rBox.GetSelectedEntryPos();
+ sal_Int32 nPos = pBox->get_active();
switch(nPos)
{
case 0:
@@ -273,32 +208,28 @@ IMPL_LINK(ScCondFormatList, ColFormatTypeHdl, ListBox&, rBox, void)
return;
Freeze();
- itr->disposeAndClear();
- *itr = VclPtr<ScColorScale2FrmtEntry>::Create( this, mpDoc, maPos );
+ itr->reset(new ScColorScale2FrmtEntry(this, mpDoc, maPos));
break;
case 1:
if((*itr)->GetType() == condformat::entry::COLORSCALE3)
return;
Freeze();
- itr->disposeAndClear();
- *itr = VclPtr<ScColorScale3FrmtEntry>::Create( this, mpDoc, maPos );
+ itr->reset(new ScColorScale3FrmtEntry(this, mpDoc, maPos));
break;
case 2:
if((*itr)->GetType() == condformat::entry::DATABAR)
return;
Freeze();
- itr->disposeAndClear();
- *itr = VclPtr<ScDataBarFrmtEntry>::Create( this, mpDoc, maPos );
+ itr->reset(new ScDataBarFrmtEntry(this, mpDoc, maPos));
break;
case 3:
if((*itr)->GetType() == condformat::entry::ICONSET)
return;
Freeze();
- itr->disposeAndClear();
- *itr = VclPtr<ScIconSetFrmtEntry>::Create( this, mpDoc, maPos );
+ itr->reset(new ScIconSetFrmtEntry(this, mpDoc, maPos));
break;
default:
break;
@@ -309,24 +240,24 @@ IMPL_LINK(ScCondFormatList, ColFormatTypeHdl, ListBox&, rBox, void)
RecalcAll();
}
-IMPL_LINK(ScCondFormatList, TypeListHdl, ListBox&, rBox, void)
+IMPL_LINK(ScCondFormatList, TypeListHdl, weld::ComboBox&, rBox, void)
{
//Resolves: fdo#79021 At this point we are still inside the ListBox Select.
//If we call maEntries.replace here then the pBox will be deleted before it
//has finished Select and will crash on accessing its deleted this. So Post
//to do the real work after the Select has completed
- Application::PostUserEvent(LINK(this, ScCondFormatList, AfterTypeListHdl), &rBox, true);
+ Application::PostUserEvent(LINK(this, ScCondFormatList, AfterTypeListHdl), &rBox);
}
IMPL_LINK(ScCondFormatList, AfterTypeListHdl, void*, p, void)
{
- ListBox* pBox = static_cast<ListBox*>(p);
+ weld::ComboBox* pBox = static_cast<weld::ComboBox*>(p);
EntryContainer::iterator itr = std::find_if(maEntries.begin(), maEntries.end(),
- [](const VclPtr<ScCondFrmtEntry>& widget) { return widget->IsSelected(); });
+ [](const std::unique_ptr<ScCondFrmtEntry>& widget) { return widget->IsSelected(); });
if(itr == maEntries.end())
return;
- sal_Int32 nPos = pBox->GetSelectedEntryPos();
+ sal_Int32 nPos = pBox->get_active();
switch(nPos)
{
case 0:
@@ -343,8 +274,7 @@ IMPL_LINK(ScCondFormatList, AfterTypeListHdl, void*, p, void)
return;
}
Freeze();
- itr->disposeAndClear();
- *itr = VclPtr<ScColorScale3FrmtEntry>::Create(this, mpDoc, maPos);
+ itr->reset(new ScColorScale3FrmtEntry(this, mpDoc, maPos));
mpDialogParent->InvalidateRefData();
(*itr)->SetActive();
break;
@@ -353,8 +283,7 @@ IMPL_LINK(ScCondFormatList, AfterTypeListHdl, void*, p, void)
return;
Freeze();
- itr->disposeAndClear();
- *itr = VclPtr<ScConditionFrmtEntry>::Create(this, mpDoc, mpDialogParent, maPos);
+ itr->reset(new ScConditionFrmtEntry(this, mpDoc, mpDialogParent, maPos));
mpDialogParent->InvalidateRefData();
(*itr)->SetActive();
break;
@@ -363,8 +292,7 @@ IMPL_LINK(ScCondFormatList, AfterTypeListHdl, void*, p, void)
return;
Freeze();
- itr->disposeAndClear();
- *itr = VclPtr<ScFormulaFrmtEntry>::Create(this, mpDoc, mpDialogParent, maPos);
+ itr->reset(new ScFormulaFrmtEntry(this, mpDoc, mpDialogParent, maPos));
mpDialogParent->InvalidateRefData();
(*itr)->SetActive();
break;
@@ -373,8 +301,7 @@ IMPL_LINK(ScCondFormatList, AfterTypeListHdl, void*, p, void)
return;
Freeze();
- itr->disposeAndClear();
- *itr = VclPtr<ScDateFrmtEntry>::Create( this, mpDoc );
+ itr->reset(new ScDateFrmtEntry( this, mpDoc ));
mpDialogParent->InvalidateRefData();
(*itr)->SetActive();
break;
@@ -384,30 +311,28 @@ IMPL_LINK(ScCondFormatList, AfterTypeListHdl, void*, p, void)
RecalcAll();
}
-IMPL_LINK_NOARG( ScCondFormatList, AddBtnHdl, Button*, void )
+IMPL_LINK_NOARG( ScCondFormatList, AddBtnHdl, weld::Button&, void )
{
Freeze();
- VclPtr<ScCondFrmtEntry> pNewEntry = VclPtr<ScConditionFrmtEntry>::Create(this, mpDoc, mpDialogParent, maPos);
- maEntries.push_back( pNewEntry );
+ maEntries.emplace_back(new ScConditionFrmtEntry(this, mpDoc, mpDialogParent, maPos));
for(auto& rxEntry : maEntries)
{
rxEntry->SetInactive();
}
mpDialogParent->InvalidateRefData();
- pNewEntry->SetActive();
+ maEntries.back()->SetActive();
mpDialogParent->OnSelectionChange(maEntries.size() - 1, maEntries.size());
Thaw();
RecalcAll();
}
-IMPL_LINK_NOARG( ScCondFormatList, RemoveBtnHdl, Button*, void )
+IMPL_LINK_NOARG( ScCondFormatList, RemoveBtnHdl, weld::Button&, void )
{
Freeze();
auto itr = std::find_if(maEntries.begin(), maEntries.end(),
- [](const VclPtr<ScCondFrmtEntry>& widget) { return widget->IsSelected(); });
+ [](const std::unique_ptr<ScCondFrmtEntry>& widget) { return widget->IsSelected(); });
if (itr != maEntries.end())
{
- itr->disposeAndClear();
maEntries.erase(itr);
}
mpDialogParent->InvalidateRefData();
@@ -416,13 +341,13 @@ IMPL_LINK_NOARG( ScCondFormatList, RemoveBtnHdl, Button*, void )
RecalcAll();
}
-IMPL_LINK_NOARG(ScCondFormatList, UpBtnHdl, Button*, void)
+IMPL_LINK_NOARG(ScCondFormatList, UpBtnHdl, weld::Button&, void)
{
Freeze();
size_t index = 0;
for (size_t i = 0; i < maEntries.size(); i++)
{
- auto widget = maEntries[i];
+ auto& widget = maEntries[i];
if (widget->IsSelected() && i > 0)
{
std::swap(maEntries[i], maEntries[i - 1]);
@@ -436,13 +361,13 @@ IMPL_LINK_NOARG(ScCondFormatList, UpBtnHdl, Button*, void)
RecalcAll();
}
-IMPL_LINK_NOARG(ScCondFormatList, DownBtnHdl, Button*, void)
+IMPL_LINK_NOARG(ScCondFormatList, DownBtnHdl, weld::Button&, void)
{
Freeze();
size_t index = 0;
for (size_t i = 0; i < maEntries.size(); i++)
{
- auto widget = maEntries[i];
+ auto& widget = maEntries[i];
if (widget->IsSelected())
{
index = i;
@@ -466,13 +391,10 @@ IMPL_LINK( ScCondFormatList, EntrySelectHdl, ScCondFrmtEntry&, rEntry, void )
return;
Freeze();
- //A child has focus, but we will hide that, so regrab to whatever new thing gets
- //shown instead of leaving it stuck in the inaccessible hidden element
- bool bReGrabFocus = HasChildPathFocus();
size_t index = 0;
for(size_t i = 0; i < maEntries.size(); i++)
{
- if (maEntries[i] == &rEntry)
+ if (maEntries[i].get() == &rEntry)
{
index = i;
}
@@ -483,37 +405,31 @@ IMPL_LINK( ScCondFormatList, EntrySelectHdl, ScCondFrmtEntry&, rEntry, void )
rEntry.SetActive();
Thaw();
RecalcAll();
- if (bReGrabFocus)
- GrabFocus();
-}
-
-IMPL_LINK_NOARG( ScCondFormatList, ScrollHdl, ScrollBar*, void )
-{
- DoScroll(mpScrollBar->GetDelta());
}
ScCondFormatDlg::ScCondFormatDlg(SfxBindings* pB, SfxChildWindow* pCW,
- vcl::Window* pParent, ScViewData* pViewData,
+ weld::Window* pParent, ScViewData* pViewData,
const ScCondFormatDlgItem* pItem)
- : ScAnyRefDlg(pB, pCW, pParent, "ConditionalFormatDialog",
- "modules/scalc/ui/conditionalformatdialog.ui")
+ : ScAnyRefDlgController(pB, pCW, pParent,
+ "modules/scalc/ui/conditionalformatdialog.ui",
+ "ConditionalFormatDialog")
, mpViewData(pViewData)
- , mpLastEdit(nullptr)
, mpDlgItem(static_cast<ScCondFormatDlgItem*>(pItem->Clone()))
-{
- get(mpBtnOk, "ok");
- get(mpBtnAdd, "add");
- get(mpBtnUp, "up");
- get(mpBtnDown, "down");
- get(mpBtnRemove, "delete");
- get(mpBtnCancel, "cancel");
-
- get(mpFtRange, "ftassign");
- get(mpEdRange, "edassign");
- mpEdRange->SetReferences(this, mpFtRange);
-
- get(mpRbRange, "rbassign");
- mpRbRange->SetReferences(this, mpEdRange);
+ , mpLastEdit(nullptr)
+ , mxBtnOk(m_xBuilder->weld_button("ok"))
+ , mxBtnAdd(m_xBuilder->weld_button("add"))
+ , mxBtnRemove(m_xBuilder->weld_button("delete"))
+ , mxBtnUp(m_xBuilder->weld_button("up"))
+ , mxBtnDown(m_xBuilder->weld_button("down"))
+ , mxBtnCancel(m_xBuilder->weld_button("cancel"))
+ , mxFtRange(m_xBuilder->weld_label("ftassign"))
+ , mxEdRange(new formula::WeldRefEdit(m_xBuilder->weld_entry("edassign")))
+ , mxRbRange(new formula::WeldRefButton(m_xBuilder->weld_button("rbassign")))
+ , mxCondFormList(new ScCondFormatList(this, m_xBuilder->weld_scrolled_window("listwindow"),
+ m_xBuilder->weld_container("list")))
+{
+ mxEdRange->SetReferences(this, mxFtRange.get());
+ mxRbRange->SetReferences(this, mxEdRange.get());
ScConditionalFormat* pFormat = nullptr;
mnKey = mpDlgItem->GetIndex();
@@ -545,58 +461,35 @@ ScCondFormatDlg::ScCondFormatDlg(SfxBindings* pB, SfxChildWindow* pCW,
}
maPos = aRange.GetTopLeftCorner();
- get(mpCondFormList, "list");
- mpCondFormList->init(mpViewData->GetDocument(), this, pFormat, aRange, maPos, mpDlgItem->GetDialogType());
+ mxCondFormList->init(mpViewData->GetDocument(), pFormat, aRange, maPos, mpDlgItem->GetDialogType());
- // tdf#114603: enable setting the background to a different color;
- // relevant for GTK; see also #i75179#
- mpEdRange->SetForceControlBackground(true);
-
- mpBtnOk->SetClickHdl(LINK(this, ScCondFormatDlg, BtnPressedHdl ) );
- mpBtnAdd->SetClickHdl( LINK( mpCondFormList, ScCondFormatList, AddBtnHdl ) );
- mpBtnRemove->SetClickHdl( LINK( mpCondFormList, ScCondFormatList, RemoveBtnHdl ) );
- mpBtnUp->SetClickHdl(LINK(mpCondFormList, ScCondFormatList, UpBtnHdl));
- mpBtnDown->SetClickHdl(LINK(mpCondFormList, ScCondFormatList, DownBtnHdl));
- mpBtnCancel->SetClickHdl( LINK(this, ScCondFormatDlg, BtnPressedHdl ) );
- mpEdRange->SetModifyHdl( LINK( this, ScCondFormatDlg, EdRangeModifyHdl ) );
- mpEdRange->SetGetFocusHdl( LINK( this, ScCondFormatDlg, RangeGetFocusHdl ) );
+ mxBtnOk->connect_clicked(LINK(this, ScCondFormatDlg, BtnPressedHdl ) );
+ mxBtnAdd->connect_clicked( LINK( mxCondFormList.get(), ScCondFormatList, AddBtnHdl ) );
+ mxBtnRemove->connect_clicked( LINK( mxCondFormList.get(), ScCondFormatList, RemoveBtnHdl ) );
+ mxBtnUp->connect_clicked(LINK(mxCondFormList.get(), ScCondFormatList, UpBtnHdl));
+ mxBtnDown->connect_clicked(LINK(mxCondFormList.get(), ScCondFormatList, DownBtnHdl));
+ mxBtnCancel->connect_clicked( LINK(this, ScCondFormatDlg, BtnPressedHdl ) );
+ mxEdRange->SetModifyHdl( LINK( this, ScCondFormatDlg, EdRangeModifyHdl ) );
+ mxEdRange->SetGetFocusHdl( LINK( this, ScCondFormatDlg, RangeGetFocusHdl ) );
OUString aRangeString;
aRange.Format(aRangeString, ScRefFlags::VALID, pViewData->GetDocument(),
pViewData->GetDocument()->GetAddressConvention());
- mpEdRange->SetText(aRangeString);
+ mxEdRange->SetText(aRangeString);
- msBaseTitle = GetText();
+ msBaseTitle = m_xDialog->get_title();
updateTitle();
}
void ScCondFormatDlg::updateTitle()
{
- OUString aTitle = msBaseTitle + " " + mpEdRange->GetText();
+ OUString aTitle = msBaseTitle + " " + mxEdRange->GetText();
- SetText(aTitle);
+ m_xDialog->set_title(aTitle);
}
ScCondFormatDlg::~ScCondFormatDlg()
{
- disposeOnce();
-}
-
-void ScCondFormatDlg::dispose()
-{
- mpBtnOk.clear();
- mpBtnAdd.clear();
- mpBtnRemove.clear();
- mpBtnUp.clear();
- mpBtnDown.clear();
- mpBtnCancel.clear();
- mpFtRange.clear();
- mpEdRange.clear();
- mpRbRange.clear();
- mpCondFormList.clear();
- mpLastEdit.clear();
-
- ScAnyRefDlg::dispose();
}
void ScCondFormatDlg::SetActive()
@@ -604,14 +497,14 @@ void ScCondFormatDlg::SetActive()
if(mpLastEdit)
mpLastEdit->GrabFocus();
else
- mpEdRange->GrabFocus();
+ mxEdRange->GrabFocus();
RefInputDone();
}
void ScCondFormatDlg::RefInputDone( bool bForced )
{
- ScAnyRefDlg::RefInputDone(bForced);
+ ScAnyRefDlgController::RefInputDone(bForced);
// ScAnyRefModalDlg::RefInputDone resets the title back
// to its original state.
@@ -627,39 +520,39 @@ void ScCondFormatDlg::RefInputDone( bool bForced )
bool ScCondFormatDlg::IsTableLocked() const
{
- return !mpLastEdit || mpLastEdit == mpEdRange;
+ return !mpLastEdit || mpLastEdit == mxEdRange.get();
}
bool ScCondFormatDlg::IsRefInputMode() const
{
- return mpEdRange->IsEnabled();
+ return mxEdRange->GetWidget()->get_sensitive();
}
void ScCondFormatDlg::SetReference(const ScRange& rRef, ScDocument*)
{
- formula::RefEdit* pEdit = mpLastEdit;
+ formula::WeldRefEdit* pEdit = mpLastEdit;
if (!mpLastEdit)
- pEdit = mpEdRange;
+ pEdit = mxEdRange.get();
- if( pEdit->IsEnabled() )
+ if (pEdit->GetWidget()->get_sensitive())
{
if(rRef.aStart != rRef.aEnd)
RefInputStart(pEdit);
ScRefFlags nFlags;
- if (mpLastEdit && mpLastEdit != mpEdRange)
+ if (mpLastEdit && mpLastEdit != mxEdRange.get())
nFlags = ScRefFlags::RANGE_ABS_3D;
else
nFlags = ScRefFlags::RANGE_ABS;
OUString aRefStr(rRef.Format(nFlags, mpViewData->GetDocument(),
ScAddress::Details(mpViewData->GetDocument()->GetAddressConvention(), 0, 0)));
- if (pEdit != mpEdRange)
+ if (pEdit != mxEdRange.get())
{
Selection sel = pEdit->GetSelection();
- sel.Justify(); // in case of RtL selection
+ sel.Justify(); // in case of RTL selection
sel.Max() = sel.Min() + aRefStr.getLength();
- pEdit->ReplaceSelected(aRefStr);
+ pEdit->GetWidget()->replace_selection(aRefStr);
pEdit->SetSelection(sel); // to replace it again with next drag event
}
else
@@ -670,15 +563,15 @@ void ScCondFormatDlg::SetReference(const ScRange& rRef, ScDocument*)
std::unique_ptr<ScConditionalFormat> ScCondFormatDlg::GetConditionalFormat() const
{
- OUString aRangeStr = mpEdRange->GetText();
+ OUString aRangeStr = mxEdRange->GetText();
if(aRangeStr.isEmpty())
return nullptr;
ScRangeList aRange;
ScRefFlags nFlags = aRange.Parse(aRangeStr, mpViewData->GetDocument(),
mpViewData->GetDocument()->GetAddressConvention(), maPos.Tab());
- mpCondFormList->SetRange(aRange);
- std::unique_ptr<ScConditionalFormat> pFormat = mpCondFormList->GetConditionalFormat();
+ mxCondFormList->SetRange(aRange);
+ std::unique_ptr<ScConditionalFormat> pFormat = mxCondFormList->GetConditionalFormat();
if((nFlags & ScRefFlags::VALID) && !aRange.empty() && pFormat)
pFormat->SetRange(aRange);
@@ -695,9 +588,9 @@ void ScCondFormatDlg::InvalidateRefData()
// Close the Conditional Format Dialog
//
-bool ScCondFormatDlg::Close()
+void ScCondFormatDlg::Close()
{
- return DoClose( ScCondFormatDlgWrapper::GetChildWindowId() );
+ DoClose( ScCondFormatDlgWrapper::GetChildWindowId() );
}
// Occurs when the Conditional Format Dialog the OK button is pressed.
@@ -740,7 +633,7 @@ void ScCondFormatDlg::OkPressed()
GetBindings().GetDispatcher()->Execute( SID_OPENDLG_CONDFRMT_MANAGER,
SfxCallMode::ASYNCHRON );
}
- Close();
+ m_xDialog->response(RET_OK);
}
// Occurs when the Conditional Format Dialog is cancelled.
@@ -755,24 +648,24 @@ void ScCondFormatDlg::CancelPressed()
GetBindings().GetDispatcher()->Execute( SID_OPENDLG_CONDFRMT_MANAGER,
SfxCallMode::ASYNCHRON );
}
- Close();
+ m_xDialog->response(RET_CANCEL);
}
void ScCondFormatDlg::OnSelectionChange(size_t nIndex, size_t nSize, bool bSelected)
{
if (nSize <= 1 || !bSelected)
{
- mpBtnUp->Enable(false);
- mpBtnDown->Enable(false);
+ mxBtnUp->set_sensitive(false);
+ mxBtnDown->set_sensitive(false);
}
else
{
- mpBtnUp->Enable(nIndex != 0);
- mpBtnDown->Enable(nIndex < nSize - 1);
+ mxBtnUp->set_sensitive(nIndex != 0);
+ mxBtnDown->set_sensitive(nIndex < nSize - 1);
}
}
-IMPL_LINK( ScCondFormatDlg, EdRangeModifyHdl, Edit&, rEdit, void )
+IMPL_LINK(ScCondFormatDlg, EdRangeModifyHdl, formula::WeldRefEdit&, rEdit, void)
{
OUString aRangeStr = rEdit.GetText();
ScRangeList aRange;
@@ -780,28 +673,28 @@ IMPL_LINK( ScCondFormatDlg, EdRangeModifyHdl, Edit&, rEdit, void )
mpViewData->GetDocument()->GetAddressConvention());
if(nFlags & ScRefFlags::VALID)
{
- rEdit.SetControlBackground(GetSettings().GetStyleSettings().GetWindowColor());
- mpBtnOk->Enable(true);
+ rEdit.GetWidget()->set_message_type(weld::EntryMessageType::Normal);
+ mxBtnOk->set_sensitive(true);
}
else
{
- rEdit.SetControlBackground(COL_LIGHTRED);
- mpBtnOk->Enable(false);
+ rEdit.GetWidget()->set_message_type(weld::EntryMessageType::Error);
+ mxBtnOk->set_sensitive(false);
}
updateTitle();
}
-IMPL_LINK( ScCondFormatDlg, RangeGetFocusHdl, Control&, rControl, void )
+IMPL_LINK(ScCondFormatDlg, RangeGetFocusHdl, formula::WeldRefEdit&, rControl, void)
{
- mpLastEdit = static_cast<formula::RefEdit*>(&rControl);
+ mpLastEdit = &rControl;
}
-IMPL_LINK( ScCondFormatDlg, BtnPressedHdl, Button*, pBtn, void)
+IMPL_LINK( ScCondFormatDlg, BtnPressedHdl, weld::Button&, rBtn, void)
{
- if (pBtn == mpBtnOk)
+ if (&rBtn == mxBtnOk.get())
OkPressed();
- else if (pBtn == mpBtnCancel)
+ else if (&rBtn == mxBtnCancel.get())
CancelPressed();
}
diff --git a/sc/source/ui/condformat/condformatdlgentry.cxx b/sc/source/ui/condformat/condformatdlgentry.cxx
index 8b1eb6e47c24..2a0e5f5ad34b 100644
--- a/sc/source/ui/condformat/condformatdlgentry.cxx
+++ b/sc/source/ui/condformat/condformatdlgentry.cxx
@@ -19,6 +19,7 @@
#include <svl/style.hxx>
#include <sfx2/dispatch.hxx>
+#include <sfx2/frame.hxx>
#include <svl/stritem.hxx>
#include <svl/intitem.hxx>
#include <svx/colorbox.hxx>
@@ -37,32 +38,21 @@
#include <set>
-ScCondFrmtEntry::ScCondFrmtEntry(vcl::Window* pParent, ScDocument* pDoc, const ScAddress& rPos)
- : VclContainer(pParent, WB_CLIPCHILDREN | WB_BORDER | WB_CHILDDLGCTRL)
+ScCondFrmtEntry::ScCondFrmtEntry(ScCondFormatList* pParent, ScDocument* pDoc, const ScAddress& rPos)
+ : mpParent(pParent)
+ , mxBuilder(Application::CreateBuilder(pParent->GetContainer(), "modules/scalc/ui/conditionalentry.ui"))
+ , mxBorder(mxBuilder->weld_widget("border"))
+ , mxGrid(mxBuilder->weld_container("grid"))
+ , mxFtCondNr(mxBuilder->weld_label("number"))
+ , mxFtCondition(mxBuilder->weld_label("condition"))
, mbActive(false)
, maStrCondition(ScResId(SCSTR_CONDITION))
+ , mxLbType(mxBuilder->weld_combo_box("type"))
, mpDoc(pDoc)
, maPos(rPos)
{
- m_pUIBuilder.reset(new VclBuilder(this, getUIRootDir(), "modules/scalc/ui/conditionalentry.ui"));
-
- get(maGrid, "grid");
- get(maFtCondNr, "number");
- get(maFtCondition, "condition");
- get(maLbType, "type");
-
- Color aBack(GetSettings().GetStyleSettings().GetWindowColor());
-
- SetControlBackground(aBack);
- SetBackground(GetControlBackground());
-
- maFtCondNr->SetControlBackground(aBack);
- maFtCondNr->SetBackground(maFtCondNr->GetControlBackground());
-
- maFtCondition->SetControlBackground(aBack);
- maFtCondition->SetBackground(maFtCondition->GetControlBackground());
-
- maLbType->SetSelectHdl( LINK( pParent, ScCondFormatList, TypeListHdl ) );
+ mxLbType->connect_changed(LINK(pParent, ScCondFormatList, TypeListHdl));
+ mxGrid->connect_mouse_press(LINK(this, ScCondFrmtEntry, EntrySelectHdl));
maClickHdl = LINK( pParent, ScCondFormatList, EntrySelectHdl );
Show();
@@ -70,81 +60,43 @@ ScCondFrmtEntry::ScCondFrmtEntry(vcl::Window* pParent, ScDocument* pDoc, const S
ScCondFrmtEntry::~ScCondFrmtEntry()
{
- disposeOnce();
-}
-
-Size ScCondFrmtEntry::calculateRequisition() const
-{
- return getLayoutRequisition(*maGrid);
+ mpParent->GetContainer()->move(mxBorder.get(), nullptr);
}
-void ScCondFrmtEntry::setAllocation(const Size &rAllocation)
+IMPL_LINK_NOARG(ScCondFrmtEntry, EntrySelectHdl, const MouseEvent&, bool)
{
- setLayoutPosSize(*maGrid, Point(0, 0), rAllocation);
-}
-
-void ScCondFrmtEntry::dispose()
-{
- maFtCondNr.clear();
- maFtCondition.clear();
- maLbType.clear();
- maGrid.clear();
- disposeBuilder();
- VclContainer::dispose();
-}
-
-bool ScCondFrmtEntry::EventNotify( NotifyEvent& rNEvt )
-{
- if (rNEvt.GetType() == MouseNotifyEvent::MOUSEBUTTONDOWN)
- {
- maClickHdl.Call(*this);
- }
- return VclContainer::EventNotify(rNEvt);
+ maClickHdl.Call(*this);
+ return false;
}
void ScCondFrmtEntry::SetIndex(sal_Int32 nIndex)
{
- maFtCondNr->SetText(maStrCondition + OUString::number(nIndex));
-}
-
-void ScCondFrmtEntry::SetHeight()
-{
- const long nMaxHeight = get_preferred_size().Height();
- if (nMaxHeight > 0)
- {
- Size aSize = GetSizePixel();
- const long nPad = LogicToPixel(Size(0, 2), MapMode(MapUnit::MapAppFont)).getHeight();
- aSize.setHeight( nMaxHeight + nPad );
- SetSizePixel(aSize);
- }
+ mxFtCondNr->set_label(maStrCondition + OUString::number(nIndex));
}
void ScCondFrmtEntry::Select()
{
- maFtCondition->SetText(OUString());
- maFtCondition->Hide();
- maLbType->Show();
+ mxFtCondition->set_label(OUString());
+ mxFtCondition->hide();
+ mxLbType->show();
mbActive = true;
- SetHeight();
}
void ScCondFrmtEntry::Deselect()
{
OUString aCondText = GetExpressionString();
- maFtCondition->SetText(aCondText);
- maFtCondition->Show();
- maLbType->Hide();
+ mxFtCondition->set_label(aCondText);
+ mxFtCondition->show();
+ mxLbType->hide();
mbActive = false;
- SetHeight();
}
//condition
namespace {
-void FillStyleListBox( const ScDocument* pDoc, ListBox& rLbStyle )
+void FillStyleListBox( const ScDocument* pDoc, weld::ComboBox& rLbStyle )
{
- rLbStyle.SetSeparatorPos(0);
std::set<OUString> aStyleNames;
SfxStyleSheetIterator aStyleIter( pDoc->GetStyleSheetPool(), SfxStyleFamily::Para );
for ( SfxStyleSheetBase* pStyle = aStyleIter.First(); pStyle; pStyle = aStyleIter.Next() )
@@ -153,7 +105,7 @@ void FillStyleListBox( const ScDocument* pDoc, ListBox& rLbStyle )
}
for(const auto& rStyleName : aStyleNames)
{
- rLbStyle.InsertEntry( rStyleName );
+ rLbStyle.append_text(rStyleName);
}
}
@@ -186,21 +138,22 @@ const ScConditionMode ScConditionFrmtEntry::mpEntryToCond[ScConditionFrmtEntry::
ScConditionMode::NotContainsText
};
-ScConditionFrmtEntry::ScConditionFrmtEntry(vcl::Window* pParent, ScDocument* pDoc, ScCondFormatDlg* pDialogParent,
+ScConditionFrmtEntry::ScConditionFrmtEntry(ScCondFormatList* pParent, ScDocument* pDoc, ScCondFormatDlg* pDialogParent,
const ScAddress& rPos, const ScCondFormatEntry* pFormatEntry)
: ScCondFrmtEntry(pParent, pDoc, rPos)
+ , mxLbCondType(mxBuilder->weld_combo_box("typeis"))
+ , mxEdVal1(new formula::WeldRefEdit(mxBuilder->weld_entry("val1")))
+ , mxEdVal2(new formula::WeldRefEdit(mxBuilder->weld_entry("val2")))
+ , mxFtVal(mxBuilder->weld_label("valueft"))
+ , mxFtStyle(mxBuilder->weld_label("styleft"))
+ , mxLbStyle(mxBuilder->weld_combo_box("style"))
+ , mxWdPreviewWin(mxBuilder->weld_widget("previewwin"))
+ , mxWdPreview(new weld::CustomWeld(*mxBuilder, "preview", maWdPreview))
, mbIsInStyleCreate(false)
{
- get(maLbCondType, "typeis");
- get(maEdVal1, "val1");
- get(maEdVal2, "val2");
- get(maFtVal, "valueft");
- get(maFtStyle, "styleft");
- get(maLbStyle, "style");
- get(maWdPreview, "preview");
- maWdPreview->set_height_request(maLbStyle->get_preferred_size().Height());
+ mxWdPreview->set_size_request(-1, mxLbStyle->get_preferred_size().Height());
- maLbType->SelectEntryPos(1);
+ mxLbType->set_active(1);
Init(pDialogParent);
@@ -208,101 +161,86 @@ ScConditionFrmtEntry::ScConditionFrmtEntry(vcl::Window* pParent, ScDocument* pDo
if(pFormatEntry)
{
- maLbStyle->SelectEntry(pFormatEntry->GetStyle());
- StyleSelectHdl(*maLbStyle);
+ mxLbStyle->set_active_text(pFormatEntry->GetStyle());
+ StyleSelectHdl(*mxLbStyle);
ScConditionMode eMode = pFormatEntry->GetOperation();
- maLbCondType->SelectEntryPos(ConditionModeToEntryPos(eMode));
+ mxLbCondType->set_active(ConditionModeToEntryPos(eMode));
switch(GetNumberEditFields(eMode))
{
case 0:
- maEdVal1->Hide();
- maEdVal2->Hide();
+ mxEdVal1->GetWidget()->hide();
+ mxEdVal2->GetWidget()->hide();
break;
case 1:
- maEdVal1->Show();
- maEdVal1->SetText(pFormatEntry->GetExpression(maPos, 0));
- maEdVal2->Hide();
- OnEdChanged(*maEdVal1);
+ mxEdVal1->GetWidget()->show();
+ mxEdVal1->SetText(pFormatEntry->GetExpression(maPos, 0));
+ mxEdVal2->GetWidget()->hide();
+ OnEdChanged(*mxEdVal1);
break;
case 2:
- maEdVal1->Show();
- maEdVal1->SetText(pFormatEntry->GetExpression(maPos, 0));
- OnEdChanged(*maEdVal1);
- maEdVal2->Show();
- maEdVal2->SetText(pFormatEntry->GetExpression(maPos, 1));
- OnEdChanged(*maEdVal2);
+ mxEdVal1->GetWidget()->show();
+ mxEdVal1->SetText(pFormatEntry->GetExpression(maPos, 0));
+ OnEdChanged(*mxEdVal1);
+ mxEdVal2->GetWidget()->show();
+ mxEdVal2->SetText(pFormatEntry->GetExpression(maPos, 1));
+ OnEdChanged(*mxEdVal2);
break;
}
}
else
{
- maLbCondType->SelectEntryPos(0);
- maEdVal2->Hide();
- maLbStyle->SelectEntryPos(1);
+ mxLbCondType->set_active(0);
+ mxEdVal2->GetWidget()->hide();
+ mxLbStyle->set_active(1);
}
}
ScConditionFrmtEntry::~ScConditionFrmtEntry()
{
- disposeOnce();
-}
-
-void ScConditionFrmtEntry::dispose()
-{
- maLbCondType.clear();
- maEdVal1.clear();
- maEdVal2.clear();
- maFtVal.clear();
- maFtStyle.clear();
- maLbStyle.clear();
- maWdPreview.clear();
- ScCondFrmtEntry::dispose();
}
void ScConditionFrmtEntry::Init(ScCondFormatDlg* pDialogParent)
{
- maEdVal1->SetGetFocusHdl( LINK( pDialogParent, ScCondFormatDlg, RangeGetFocusHdl ) );
- maEdVal2->SetGetFocusHdl( LINK( pDialogParent, ScCondFormatDlg, RangeGetFocusHdl ) );
-
- maEdVal1->SetForceControlBackground(true);
- maEdVal2->SetForceControlBackground(true);
+ mxEdVal1->SetGetFocusHdl( LINK( pDialogParent, ScCondFormatDlg, RangeGetFocusHdl ) );
+ mxEdVal2->SetGetFocusHdl( LINK( pDialogParent, ScCondFormatDlg, RangeGetFocusHdl ) );
- maEdVal1->SetModifyHdl( LINK( this, ScConditionFrmtEntry, OnEdChanged ) );
- maEdVal2->SetModifyHdl( LINK( this, ScConditionFrmtEntry, OnEdChanged ) );
+ mxEdVal1->SetModifyHdl( LINK( this, ScConditionFrmtEntry, OnEdChanged ) );
+ mxEdVal2->SetModifyHdl( LINK( this, ScConditionFrmtEntry, OnEdChanged ) );
- FillStyleListBox( mpDoc, *maLbStyle );
- maLbStyle->SetSelectHdl( LINK( this, ScConditionFrmtEntry, StyleSelectHdl ) );
+ FillStyleListBox( mpDoc, *mxLbStyle );
+ mxLbStyle->connect_changed( LINK( this, ScConditionFrmtEntry, StyleSelectHdl ) );
- maLbCondType->SetSelectHdl( LINK( this, ScConditionFrmtEntry, ConditionTypeSelectHdl ) );
+ mxLbCondType->connect_changed( LINK( this, ScConditionFrmtEntry, ConditionTypeSelectHdl ) );
}
ScFormatEntry* ScConditionFrmtEntry::createConditionEntry() const
{
- ScConditionMode eMode = EntryPosToConditionMode(maLbCondType->GetSelectedEntryPos());
- OUString aExpr1 = maEdVal1->GetText();
+ ScConditionMode eMode = EntryPosToConditionMode(mxLbCondType->get_active());
+ OUString aExpr1 = mxEdVal1->GetText();
OUString aExpr2;
if (GetNumberEditFields(eMode) == 2)
{
- aExpr2 = maEdVal2->GetText();
+ aExpr2 = mxEdVal2->GetText();
if (aExpr2.isEmpty())
{
return nullptr;
}
}
- ScFormatEntry* pEntry = new ScCondFormatEntry(eMode, aExpr1, aExpr2, mpDoc, maPos, maLbStyle->GetSelectedEntry());
+ ScFormatEntry* pEntry = new ScCondFormatEntry(eMode, aExpr1, aExpr2, mpDoc, maPos, mxLbStyle->get_active_text());
return pEntry;
}
-IMPL_LINK(ScConditionFrmtEntry, OnEdChanged, Edit&, rEdit, void)
+IMPL_LINK(ScConditionFrmtEntry, OnEdChanged, formula::WeldRefEdit&, rRefEdit, void)
{
- OUString aFormula = rEdit.GetText();
+ weld::Entry& rEdit = *rRefEdit.GetWidget();
+ OUString aFormula = rEdit.get_text();
if( aFormula.isEmpty() )
{
- maFtVal->SetText(ScResId(STR_ENTER_VALUE));
+ mxFtVal->set_label(ScResId(STR_ENTER_VALUE));
return;
}
@@ -312,8 +250,8 @@ IMPL_LINK(ScConditionFrmtEntry, OnEdChanged, Edit&, rEdit, void)
// Error, warn the user
if( ta->GetCodeError() != FormulaError::NONE || ( ta->GetLen() == 0 ) )
{
- rEdit.SetControlBackground(COL_LIGHTRED);
- maFtVal->SetText(ScResId(STR_VALID_DEFERROR));
+ rEdit.set_message_type(weld::EntryMessageType::Error);
+ mxFtVal->set_label(ScResId(STR_VALID_DEFERROR));
return;
}
@@ -325,24 +263,24 @@ IMPL_LINK(ScConditionFrmtEntry, OnEdChanged, Edit&, rEdit, void)
( ( op == ocBad ) && ( t == formula::svString ) )
)
{
- rEdit.SetControlBackground(COL_YELLOW);
- maFtVal->SetText(ScResId(STR_UNQUOTED_STRING));
+ rEdit.set_message_type(weld::EntryMessageType::Warning);
+ mxFtVal->set_label(ScResId(STR_UNQUOTED_STRING));
return;
}
- rEdit.SetControlBackground(GetSettings().GetStyleSettings().GetWindowColor());
- maFtVal->SetText("");
+ rEdit.set_message_type(weld::EntryMessageType::Normal);
+ mxFtVal->set_label("");
}
void ScConditionFrmtEntry::Select()
{
- maFtVal->Show();
+ mxFtVal->show();
ScCondFrmtEntry::Select();
}
void ScConditionFrmtEntry::Deselect()
{
- maFtVal->Hide();
+ mxFtVal->hide();
ScCondFrmtEntry::Deselect();
}
@@ -404,7 +342,7 @@ sal_Int32 ScConditionFrmtEntry::GetNumberEditFields( ScConditionMode eMode )
OUString ScConditionFrmtEntry::GetExpressionString()
{
- return ScCondFormatHelper::GetExpression(CONDITION, maLbCondType->GetSelectedEntryPos(), maEdVal1->GetText(), maEdVal2->GetText());
+ return ScCondFormatHelper::GetExpression(CONDITION, mxLbCondType->get_active(), mxEdVal1->GetText(), mxEdVal2->GetText());
}
ScFormatEntry* ScConditionFrmtEntry::GetEntry() const
@@ -414,48 +352,46 @@ ScFormatEntry* ScConditionFrmtEntry::GetEntry() const
void ScConditionFrmtEntry::SetActive()
{
- ScConditionMode eMode = EntryPosToConditionMode(maLbCondType->GetSelectedEntryPos());
- maLbCondType->Show();
+ ScConditionMode eMode = EntryPosToConditionMode(mxLbCondType->get_active());
+ mxLbCondType->show();
switch(GetNumberEditFields(eMode))
{
case 1:
- maEdVal1->Show();
+ mxEdVal1->GetWidget()->show();
break;
case 2:
- maEdVal1->Show();
- maEdVal2->Show();
+ mxEdVal1->GetWidget()->show();
+ mxEdVal2->GetWidget()->show();
break;
}
- maFtStyle->Show();
- maLbStyle->Show();
- maWdPreview->Show();
+ mxFtStyle->show();
+ mxLbStyle->show();
+ mxWdPreviewWin->show();
Select();
}
void ScConditionFrmtEntry::SetInactive()
{
- maLbCondType->Hide();
- maEdVal1->Hide();
- maEdVal2->Hide();
- maFtStyle->Hide();
- maLbStyle->Hide();
- maWdPreview->Hide();
+ mxLbCondType->hide();
+ mxEdVal1->GetWidget()->hide();
+ mxEdVal2->GetWidget()->hide();
+ mxFtStyle->hide();
+ mxLbStyle->hide();
+ mxWdPreviewWin->hide();
Deselect();
}
namespace {
-void UpdateStyleList(ListBox& rLbStyle, const ScDocument* pDoc)
+void UpdateStyleList(weld::ComboBox& rLbStyle, const ScDocument* pDoc)
{
- OUString aSelectedStyle = rLbStyle.GetSelectedEntry();
- for(sal_Int32 i = rLbStyle.GetEntryCount(); i > 1; --i)
- {
- rLbStyle.RemoveEntry(i - 1);
- }
+ OUString aSelectedStyle = rLbStyle.get_active_text();
+ for (sal_Int32 i = rLbStyle.get_count(); i > 1; --i)
+ rLbStyle.remove(i - 1);
FillStyleListBox(pDoc, rLbStyle);
- rLbStyle.SelectEntry(aSelectedStyle);
+ rLbStyle.set_active_text(aSelectedStyle);
}
}
@@ -465,19 +401,21 @@ void ScConditionFrmtEntry::Notify(SfxBroadcaster&, const SfxHint& rHint)
if(rHint.GetId() == SfxHintId::StyleSheetModified)
{
if(!mbIsInStyleCreate)
- UpdateStyleList(*maLbStyle, mpDoc);
+ UpdateStyleList(*mxLbStyle, mpDoc);
}
}
namespace {
-void StyleSelect( ListBox& rLbStyle, const ScDocument* pDoc, SvxFontPrevWindow& rWdPreview )
+void StyleSelect(weld::Window* pDialogParent, weld::ComboBox& rLbStyle, const ScDocument* pDoc, FontPrevWindow& rWdPreview)
{
- if(rLbStyle.GetSelectedEntryPos() == 0)
+ if (rLbStyle.get_active() == 0)
{
// call new style dialog
SfxUInt16Item aFamilyItem( SID_STYLE_FAMILY, sal_uInt16(SfxStyleFamily::Para) );
SfxStringItem aRefItem( SID_STYLE_REFERENCE, ScResId(STR_STYLENAME_STANDARD) );
+ css::uno::Any aAny(pDialogParent->GetXWindow());
+ SfxUnoAnyItem aDialogParent( SID_DIALOG_PARENT, aAny );
// unlock the dispatcher so SID_STYLE_NEW can be executed
// (SetDispatcherLock would affect all Calc documents)
@@ -491,7 +429,7 @@ void StyleSelect( ListBox& rLbStyle, const ScDocument* pDoc, SvxFontPrevWindow&
// The return value (SfxUInt16Item) is ignored, look for new styles instead.
pDisp->ExecuteList(SID_STYLE_NEW,
SfxCallMode::SYNCHRON | SfxCallMode::RECORD,
- { &aFamilyItem, &aRefItem });
+ { &aFamilyItem, &aRefItem }, { &aDialogParent });
if (bLocked)
pDisp->Lock(true);
@@ -502,21 +440,21 @@ void StyleSelect( ListBox& rLbStyle, const ScDocument* pDoc, SvxFontPrevWindow&
for ( SfxStyleSheetBase* pStyle = aStyleIter.First(); pStyle && !bFound; pStyle = aStyleIter.Next() )
{
const OUString& aName = pStyle->GetName();
- if ( rLbStyle.GetEntryPos(aName) == LISTBOX_ENTRY_NOTFOUND ) // all lists contain the same entries
+ if (rLbStyle.find_text(aName) == -1) // all lists contain the same entries
{
- for( sal_Int32 i = 1, n = rLbStyle.GetEntryCount(); i <= n && !bFound; ++i)
+ for( sal_Int32 i = 1, n = rLbStyle.get_count(); i <= n && !bFound; ++i)
{
- OUString aStyleName = ScGlobal::pCharClass->uppercase(rLbStyle.GetEntry(i));
+ OUString aStyleName = ScGlobal::pCharClass->uppercase(rLbStyle.get_text(i));
if( i == n )
{
- rLbStyle.InsertEntry(aName);
- rLbStyle.SelectEntry(aName);
+ rLbStyle.append_text(aName);
+ rLbStyle.set_active_text(aName);
bFound = true;
}
else if( aStyleName > ScGlobal::pCharClass->uppercase(aName) )
{
- rLbStyle.InsertEntry(aName, i);
- rLbStyle.SelectEntry(aName);
+ rLbStyle.insert_text(i, aName);
+ rLbStyle.set_active_text(aName);
bFound = true;
}
}
@@ -524,86 +462,77 @@ void StyleSelect( ListBox& rLbStyle, const ScDocument* pDoc, SvxFontPrevWindow&
}
}
- OUString aStyleName = rLbStyle.GetSelectedEntry();
+ OUString aStyleName = rLbStyle.get_active_text();
SfxStyleSheetBase* pStyleSheet = pDoc->GetStyleSheetPool()->Find( aStyleName, SfxStyleFamily::Para );
if(pStyleSheet)
{
const SfxItemSet& rSet = pStyleSheet->GetItemSet();
- rWdPreview.Init( rSet );
+ rWdPreview.SetFromItemSet(rSet, false);
}
}
}
-IMPL_LINK_NOARG(ScConditionFrmtEntry, StyleSelectHdl, ListBox&, void)
+IMPL_LINK_NOARG(ScConditionFrmtEntry, StyleSelectHdl, weld::ComboBox&, void)
{
mbIsInStyleCreate = true;
- StyleSelect( *maLbStyle, mpDoc, *maWdPreview );
+ StyleSelect(mpParent->GetFrameWeld(), *mxLbStyle, mpDoc, maWdPreview);
mbIsInStyleCreate = false;
}
// formula
-ScFormulaFrmtEntry::ScFormulaFrmtEntry( vcl::Window* pParent, ScDocument* pDoc, ScCondFormatDlg* pDialogParent, const ScAddress& rPos, const ScCondFormatEntry* pFormat )
+ScFormulaFrmtEntry::ScFormulaFrmtEntry(ScCondFormatList* pParent, ScDocument* pDoc, ScCondFormatDlg* pDialogParent, const ScAddress& rPos, const ScCondFormatEntry* pFormat)
: ScCondFrmtEntry(pParent, pDoc, rPos)
+ , mxFtStyle(mxBuilder->weld_label("styleft"))
+ , mxLbStyle(mxBuilder->weld_combo_box("style"))
+ , mxWdPreviewWin(mxBuilder->weld_widget("previewwin"))
+ , mxWdPreview(new weld::CustomWeld(*mxBuilder, "preview", maWdPreview))
+ , mxEdFormula(new formula::WeldRefEdit(mxBuilder->weld_entry("formula")))
{
- get(maFtStyle, "styleft");
- get(maLbStyle, "style");
- get(maWdPreview, "preview");
- maWdPreview->set_height_request(maLbStyle->get_preferred_size().Height());
- get(maEdFormula, "formula");
+ mxWdPreview->set_size_request(-1, mxLbStyle->get_preferred_size().Height());
Init(pDialogParent);
- maLbType->SelectEntryPos(2);
+ mxLbType->set_active(2);
if(pFormat)
{
- maEdFormula->SetText(pFormat->GetExpression(rPos, 0, 0, pDoc->GetGrammar()));
- maLbStyle->SelectEntry(pFormat->GetStyle());
+ mxEdFormula->SetText(pFormat->GetExpression(rPos, 0, 0, pDoc->GetGrammar()));
+ mxLbStyle->set_active_text(pFormat->GetStyle());
}
else
{
- maLbStyle->SelectEntryPos(1);
+ mxLbStyle->set_active(1);
}
- StyleSelectHdl(*maLbStyle);
+ StyleSelectHdl(*mxLbStyle);
}
ScFormulaFrmtEntry::~ScFormulaFrmtEntry()
{
- disposeOnce();
-}
-
-void ScFormulaFrmtEntry::dispose()
-{
- maFtStyle.clear();
- maLbStyle.clear();
- maWdPreview.clear();
- maEdFormula.clear();
- ScCondFrmtEntry::dispose();
}
void ScFormulaFrmtEntry::Init(ScCondFormatDlg* pDialogParent)
{
- maEdFormula->SetGetFocusHdl( LINK( pDialogParent, ScCondFormatDlg, RangeGetFocusHdl ) );
+ mxEdFormula->SetGetFocusHdl( LINK( pDialogParent, ScCondFormatDlg, RangeGetFocusHdl ) );
- FillStyleListBox( mpDoc, *maLbStyle );
- maLbStyle->SetSelectHdl( LINK( this, ScFormulaFrmtEntry, StyleSelectHdl ) );
+ FillStyleListBox( mpDoc, *mxLbStyle );
+ mxLbStyle->connect_changed( LINK( this, ScFormulaFrmtEntry, StyleSelectHdl ) );
}
-IMPL_LINK_NOARG(ScFormulaFrmtEntry, StyleSelectHdl, ListBox&, void)
+IMPL_LINK_NOARG(ScFormulaFrmtEntry, StyleSelectHdl, weld::ComboBox&, void)
{
- StyleSelect( *maLbStyle, mpDoc, *maWdPreview );
+ StyleSelect(mpParent->GetFrameWeld(), *mxLbStyle, mpDoc, maWdPreview);
}
ScFormatEntry* ScFormulaFrmtEntry::createFormulaEntry() const
{
- OUString aFormula = maEdFormula->GetText();
+ OUString aFormula = mxEdFormula->GetText();
if(aFormula.isEmpty())
return nullptr;
- ScFormatEntry* pEntry = new ScCondFormatEntry(ScConditionMode::Direct, aFormula, OUString(), mpDoc, maPos, maLbStyle->GetSelectedEntry());
+ ScFormatEntry* pEntry = new ScCondFormatEntry(ScConditionMode::Direct, aFormula, OUString(), mpDoc, maPos, mxLbStyle->get_active_text());
return pEntry;
}
@@ -614,25 +543,25 @@ ScFormatEntry* ScFormulaFrmtEntry::GetEntry() const
OUString ScFormulaFrmtEntry::GetExpressionString()
{
- return ScCondFormatHelper::GetExpression(FORMULA, 0, maEdFormula->GetText());
+ return ScCondFormatHelper::GetExpression(FORMULA, 0, mxEdFormula->GetText());
}
void ScFormulaFrmtEntry::SetActive()
{
- maWdPreview->Show();
- maFtStyle->Show();
- maLbStyle->Show();
- maEdFormula->Show();
+ mxWdPreviewWin->show();
+ mxFtStyle->show();
+ mxLbStyle->show();
+ mxEdFormula->GetWidget()->show();
Select();
}
void ScFormulaFrmtEntry::SetInactive()
{
- maWdPreview->Hide();
- maFtStyle->Hide();
- maLbStyle->Hide();
- maEdFormula->Hide();
+ mxWdPreviewWin->hide();
+ mxFtStyle->hide();
+ mxLbStyle->hide();
+ mxEdFormula->GetWidget()->hide();
Deselect();
}
@@ -677,45 +606,37 @@ ScColorScaleEntryType getTypeForId(const OUString& sId)
// Item ids are imported from .ui into OUString* and are referenced by entry data.
// See commit 83cefb5ceb4428d61a5b9fae80d1e673131e9bfe
-ScColorScaleEntryType getSelectedType(const ListBox& rListBox)
+ScColorScaleEntryType getSelectedType(const weld::ComboBox& rListBox)
{
- const OUString* sId = static_cast<OUString*>(rListBox.GetSelectedEntryData());
- assert(sId
- && "The color scale type entries must have item ids in "
- "sc/uiconfig/scalc/ui/conditionalentry.ui");
- return getTypeForId(*sId);
+ return getTypeForId(rListBox.get_active_id());
}
-sal_Int32 getEntryPos(const ListBox& rListBox, ScColorScaleEntryType eType)
+sal_Int32 getEntryPos(const weld::ComboBox& rListBox, ScColorScaleEntryType eType)
{
- const sal_Int32 nSize = rListBox.GetEntryCount();
+ const sal_Int32 nSize = rListBox.get_count();
for (sal_Int32 i = 0; i < nSize; ++i)
{
- const OUString* sId = static_cast<OUString*>(rListBox.GetEntryData(i));
- assert(sId
- && "The color scale type entries must have item ids in "
- "sc/uiconfig/scalc/ui/conditionalentry.ui");
- if (getTypeForId(*sId) == eType)
+ if (getTypeForId(rListBox.get_id(i)) == eType)
return i;
}
return -1;
}
-void selectType(ListBox& rListBox, ScColorScaleEntryType eType)
+void selectType(weld::ComboBox& rListBox, ScColorScaleEntryType eType)
{
const sal_Int32 nPos = getEntryPos(rListBox, eType);
if (nPos >= 0)
- rListBox.SelectEntryPos(nPos);
+ rListBox.set_active(nPos);
}
-void removeType(ListBox& rListBox, ScColorScaleEntryType eType)
+void removeType(weld::ComboBox& rListBox, ScColorScaleEntryType eType)
{
const sal_Int32 nPos = getEntryPos(rListBox, eType);
if (nPos >= 0)
- rListBox.RemoveEntry(nPos);
+ rListBox.remove(nPos);
}
-void SetColorScaleEntryTypes( const ScColorScaleEntry& rEntry, ListBox& rLbType, Edit& rEdit, SvxColorListBox& rLbCol, const ScDocument* pDoc )
+void SetColorScaleEntryTypes( const ScColorScaleEntry& rEntry, weld::ComboBox& rLbType, weld::Entry& rEdit, ColorListBox& rLbCol, const ScDocument* pDoc )
{
// entry Automatic is not available for color scales
assert(rEntry.GetType() > COLORSCALE_AUTO);
@@ -730,11 +651,11 @@ void SetColorScaleEntryTypes( const ScColorScaleEntry& rEntry, ListBox& rLbType,
case COLORSCALE_PERCENT:
{
double nVal = rEntry.GetValue();
- rEdit.SetText(convertNumberToString(nVal, pDoc));
+ rEdit.set_text(convertNumberToString(nVal, pDoc));
}
break;
case COLORSCALE_FORMULA:
- rEdit.SetText(rEntry.GetFormula(formula::FormulaGrammar::GRAM_DEFAULT));
+ rEdit.set_text(rEntry.GetFormula(formula::FormulaGrammar::GRAM_DEFAULT));
break;
case COLORSCALE_AUTO:
abort();
@@ -743,7 +664,7 @@ void SetColorScaleEntryTypes( const ScColorScaleEntry& rEntry, ListBox& rLbType,
rLbCol.SelectEntry(rEntry.GetColor());
}
-void SetColorScaleEntry(ScColorScaleEntry* pEntry, const ListBox& rType, const Edit& rValue,
+void SetColorScaleEntry(ScColorScaleEntry* pEntry, const weld::ComboBox& rType, const weld::Entry& rValue,
ScDocument* pDoc, const ScAddress& rPos)
{
ScColorScaleEntryType eType = getSelectedType(rType);
@@ -762,19 +683,19 @@ void SetColorScaleEntry(ScColorScaleEntry* pEntry, const ListBox& rType, const E
sal_uInt32 nIndex = 0;
double nVal = 0;
SvNumberFormatter* pNumberFormatter = pDoc->GetFormatTable();
- (void)pNumberFormatter->IsNumberFormat(rValue.GetText(), nIndex, nVal);
+ (void)pNumberFormatter->IsNumberFormat(rValue.get_text(), nIndex, nVal);
pEntry->SetValue(nVal);
}
break;
case COLORSCALE_FORMULA:
- pEntry->SetFormula(rValue.GetText(), pDoc, rPos);
+ pEntry->SetFormula(rValue.get_text(), pDoc, rPos);
break;
default:
break;
}
}
-ScColorScaleEntry* createColorScaleEntry( const ListBox& rType, const SvxColorListBox& rColor, const Edit& rValue, ScDocument* pDoc, const ScAddress& rPos )
+ScColorScaleEntry* createColorScaleEntry( const weld::ComboBox& rType, const ColorListBox& rColor, const weld::Entry& rValue, ScDocument* pDoc, const ScAddress& rPos )
{
ScColorScaleEntry* pEntry = new ScColorScaleEntry();
@@ -786,83 +707,67 @@ ScColorScaleEntry* createColorScaleEntry( const ListBox& rType, const SvxColorLi
}
-ScColorScale2FrmtEntry::ScColorScale2FrmtEntry( vcl::Window* pParent, ScDocument* pDoc, const ScAddress& rPos, const ScColorScaleFormat* pFormat )
+ScColorScale2FrmtEntry::ScColorScale2FrmtEntry(ScCondFormatList* pParent, ScDocument* pDoc, const ScAddress& rPos, const ScColorScaleFormat* pFormat)
: ScCondFrmtEntry(pParent, pDoc, rPos)
-{
- get(maLbColorFormat, "colorformat");
- get(maLbEntryTypeMin, "colscalemin");
- get(maLbEntryTypeMax, "colscalemax");
- get(maEdMin, "edcolscalemin");
- get(maEdMax, "edcolscalemax");
- get(maLbColMin, "lbcolmin");
- get(maLbColMax, "lbcolmax");
- get(maFtMin, "Label_minimum");
- get(maFtMax, "Label_maximum");
-
- maFtMin->Show();
- maFtMax->Show();
+ , mxLbColorFormat(mxBuilder->weld_combo_box("colorformat"))
+ , mxLbEntryTypeMin(mxBuilder->weld_combo_box("colscalemin"))
+ , mxLbEntryTypeMax(mxBuilder->weld_combo_box("colscalemax"))
+ , mxEdMin(mxBuilder->weld_entry("edcolscalemin"))
+ , mxEdMax(mxBuilder->weld_entry("edcolscalemax"))
+ , mxLbColMin(new ColorListBox(mxBuilder->weld_menu_button("lbcolmin"), pParent->GetFrameWeld()))
+ , mxLbColMax(new ColorListBox(mxBuilder->weld_menu_button("lbcolmax"), pParent->GetFrameWeld()))
+ , mxFtMin(mxBuilder->weld_label("Label_minimum"))
+ , mxFtMax(mxBuilder->weld_label("Label_maximum"))
+{
+ mxFtMin->show();
+ mxFtMax->show();
// remove the automatic entry from color scales
- removeType(*maLbEntryTypeMin, COLORSCALE_AUTO);
- removeType(*maLbEntryTypeMax, COLORSCALE_AUTO);
+ removeType(*mxLbEntryTypeMin, COLORSCALE_AUTO);
+ removeType(*mxLbEntryTypeMax, COLORSCALE_AUTO);
// "min" selector doesn't need "max" entry, and vice versa
- removeType(*maLbEntryTypeMin, COLORSCALE_MAX);
- removeType(*maLbEntryTypeMax, COLORSCALE_MIN);
+ removeType(*mxLbEntryTypeMin, COLORSCALE_MAX);
+ removeType(*mxLbEntryTypeMax, COLORSCALE_MIN);
- maLbType->SelectEntryPos(0);
- maLbColorFormat->SelectEntryPos(0);
+ mxLbType->set_active(0);
+ mxLbColorFormat->set_active(0);
Init();
if(pFormat)
{
ScColorScaleEntries::const_iterator itr = pFormat->begin();
- SetColorScaleEntryTypes(*itr[0], *maLbEntryTypeMin, *maEdMin, *maLbColMin, pDoc);
+ SetColorScaleEntryTypes(*itr[0], *mxLbEntryTypeMin, *mxEdMin, *mxLbColMin, pDoc);
++itr;
- SetColorScaleEntryTypes(*itr[0], *maLbEntryTypeMax, *maEdMax, *maLbColMax, pDoc);
+ SetColorScaleEntryTypes(*itr[0], *mxLbEntryTypeMax, *mxEdMax, *mxLbColMax, pDoc);
}
else
{
- selectType(*maLbEntryTypeMin, COLORSCALE_MIN);
- selectType(*maLbEntryTypeMax, COLORSCALE_MAX);
+ selectType(*mxLbEntryTypeMin, COLORSCALE_MIN);
+ selectType(*mxLbEntryTypeMax, COLORSCALE_MAX);
}
- maLbColorFormat->SetSelectHdl( LINK( pParent, ScCondFormatList, ColFormatTypeHdl ) );
+ mxLbColorFormat->connect_changed( LINK( pParent, ScCondFormatList, ColFormatTypeHdl ) );
- EntryTypeHdl(*maLbEntryTypeMin);
- EntryTypeHdl(*maLbEntryTypeMax);
+ EntryTypeHdl(*mxLbEntryTypeMin);
+ EntryTypeHdl(*mxLbEntryTypeMax);
}
ScColorScale2FrmtEntry::~ScColorScale2FrmtEntry()
{
- disposeOnce();
-}
-
-void ScColorScale2FrmtEntry::dispose()
-{
- maLbColorFormat.clear();
- maLbEntryTypeMin.clear();
- maLbEntryTypeMax.clear();
- maEdMin.clear();
- maEdMax.clear();
- maLbColMin.clear();
- maLbColMax.clear();
- maFtMin.clear();
- maFtMax.clear();
- ScCondFrmtEntry::dispose();
}
void ScColorScale2FrmtEntry::Init()
{
- maLbEntryTypeMin->SetSelectHdl( LINK( this, ScColorScale2FrmtEntry, EntryTypeHdl ) );
- maLbEntryTypeMax->SetSelectHdl( LINK( this, ScColorScale2FrmtEntry, EntryTypeHdl ) );
- maLbColMin->SelectEntry(Color(0xFFF685)); // Light Yellow 2
- maLbColMax->SelectEntry(Color(0x65C295)); // Light Green 2
+ mxLbEntryTypeMin->connect_changed( LINK( this, ScColorScale2FrmtEntry, EntryTypeHdl ) );
+ mxLbEntryTypeMax->connect_changed( LINK( this, ScColorScale2FrmtEntry, EntryTypeHdl ) );
+ mxLbColMin->SelectEntry(Color(0xFFF685)); // Light Yellow 2
+ mxLbColMax->SelectEntry(Color(0x65C295)); // Light Green 2
}
ScFormatEntry* ScColorScale2FrmtEntry::createColorscaleEntry() const
{
ScColorScaleFormat* pColorScale = new ScColorScaleFormat(mpDoc);
- pColorScale->AddEntry(createColorScaleEntry(*maLbEntryTypeMin, *maLbColMin, *maEdMin, mpDoc, maPos));
- pColorScale->AddEntry(createColorScaleEntry(*maLbEntryTypeMax, *maLbColMax, *maEdMax, mpDoc, maPos));
+ pColorScale->AddEntry(createColorScaleEntry(*mxLbEntryTypeMin, *mxLbColMin, *mxEdMin, mpDoc, maPos));
+ pColorScale->AddEntry(createColorScaleEntry(*mxLbEntryTypeMax, *mxLbColMax, *mxEdMax, mpDoc, maPos));
return pColorScale;
}
@@ -878,43 +783,43 @@ ScFormatEntry* ScColorScale2FrmtEntry::GetEntry() const
void ScColorScale2FrmtEntry::SetActive()
{
- maLbColorFormat->Show();
+ mxLbColorFormat->show();
- maLbEntryTypeMin->Show();
- maLbEntryTypeMax->Show();
+ mxLbEntryTypeMin->show();
+ mxLbEntryTypeMax->show();
- maEdMin->Show();
- maEdMax->Show();
+ mxEdMin->show();
+ mxEdMax->show();
- maLbColMin->Show();
- maLbColMax->Show();
+ mxLbColMin->show();
+ mxLbColMax->show();
Select();
}
void ScColorScale2FrmtEntry::SetInactive()
{
- maLbColorFormat->Hide();
+ mxLbColorFormat->hide();
- maLbEntryTypeMin->Hide();
- maLbEntryTypeMax->Hide();
+ mxLbEntryTypeMin->hide();
+ mxLbEntryTypeMax->hide();
- maEdMin->Hide();
- maEdMax->Hide();
+ mxEdMin->hide();
+ mxEdMax->hide();
- maLbColMin->Hide();
- maLbColMax->Hide();
+ mxLbColMin->hide();
+ mxLbColMax->hide();
Deselect();
}
-IMPL_LINK( ScColorScale2FrmtEntry, EntryTypeHdl, ListBox&, rBox, void )
+IMPL_LINK( ScColorScale2FrmtEntry, EntryTypeHdl, weld::ComboBox&, rBox, void )
{
- Edit* pEd = nullptr;
- if (&rBox == maLbEntryTypeMin.get())
- pEd = maEdMin;
- else if (&rBox == maLbEntryTypeMax.get())
- pEd = maEdMax.get();
+ weld::Entry* pEd = nullptr;
+ if (&rBox == mxLbEntryTypeMin.get())
+ pEd = mxEdMin.get();
+ else if (&rBox == mxLbEntryTypeMax.get())
+ pEd = mxEdMax.get();
if (!pEd)
return;
@@ -926,105 +831,86 @@ IMPL_LINK( ScColorScale2FrmtEntry, EntryTypeHdl, ListBox&, rBox, void )
}
if (bEnableEdit)
- pEd->Enable();
+ pEd->set_sensitive(true);
else
- pEd->Disable();
+ pEd->set_sensitive(false);
}
-ScColorScale3FrmtEntry::ScColorScale3FrmtEntry( vcl::Window* pParent, ScDocument* pDoc, const ScAddress& rPos, const ScColorScaleFormat* pFormat )
+ScColorScale3FrmtEntry::ScColorScale3FrmtEntry(ScCondFormatList* pParent, ScDocument* pDoc, const ScAddress& rPos, const ScColorScaleFormat* pFormat)
: ScCondFrmtEntry(pParent, pDoc, rPos)
-{
- get(maLbColorFormat, "colorformat");
- get(maLbEntryTypeMin, "colscalemin");
- get(maLbEntryTypeMiddle, "colscalemiddle");
- get(maLbEntryTypeMax, "colscalemax");
- get(maEdMin, "edcolscalemin");
- get(maEdMiddle, "edcolscalemiddle");
- get(maEdMax, "edcolscalemax");
- get(maLbColMin, "lbcolmin");
- get(maLbColMiddle, "lbcolmiddle");
- get(maLbColMax, "lbcolmax");
- get(maFtMin, "Label_minimum");
- get(maFtMax, "Label_maximum");
-
- maFtMin->Show();
- maFtMax->Show();
+ , mxLbColorFormat(mxBuilder->weld_combo_box("colorformat"))
+ , mxLbEntryTypeMin(mxBuilder->weld_combo_box("colscalemin"))
+ , mxLbEntryTypeMiddle(mxBuilder->weld_combo_box("colscalemiddle"))
+ , mxLbEntryTypeMax(mxBuilder->weld_combo_box("colscalemax"))
+ , mxEdMin(mxBuilder->weld_entry("edcolscalemin"))
+ , mxEdMiddle(mxBuilder->weld_entry("edcolscalemiddle"))
+ , mxEdMax(mxBuilder->weld_entry("edcolscalemax"))
+ , mxLbColMin(new ColorListBox(mxBuilder->weld_menu_button("lbcolmin"), pParent->GetFrameWeld()))
+ , mxLbColMiddle(new ColorListBox(mxBuilder->weld_menu_button("lbcolmiddle"), pParent->GetFrameWeld()))
+ , mxLbColMax(new ColorListBox(mxBuilder->weld_menu_button("lbcolmax"), pParent->GetFrameWeld()))
+ , mxFtMin(mxBuilder->weld_label("Label_minimum"))
+ , mxFtMax(mxBuilder->weld_label("Label_maximum"))
+{
+ mxFtMin->show();
+ mxFtMax->show();
// remove the automatic entry from color scales
- removeType(*maLbEntryTypeMin, COLORSCALE_AUTO);
- removeType(*maLbEntryTypeMiddle, COLORSCALE_AUTO);
- removeType(*maLbEntryTypeMax, COLORSCALE_AUTO);
+ removeType(*mxLbEntryTypeMin, COLORSCALE_AUTO);
+ removeType(*mxLbEntryTypeMiddle, COLORSCALE_AUTO);
+ removeType(*mxLbEntryTypeMax, COLORSCALE_AUTO);
// "min" selector doesn't need "max" entry, and vice versa
- removeType(*maLbEntryTypeMin, COLORSCALE_MAX);
- removeType(*maLbEntryTypeMax, COLORSCALE_MIN);
- maLbColorFormat->SelectEntryPos(1);
+ removeType(*mxLbEntryTypeMin, COLORSCALE_MAX);
+ removeType(*mxLbEntryTypeMax, COLORSCALE_MIN);
+ mxLbColorFormat->set_active(1);
Init();
- maLbType->SelectEntryPos(0);
+ mxLbType->set_active(0);
if(pFormat)
{
ScColorScaleEntries::const_iterator itr = pFormat->begin();
- SetColorScaleEntryTypes(*itr[0], *maLbEntryTypeMin, *maEdMin, *maLbColMin, pDoc);
+ SetColorScaleEntryTypes(*itr[0], *mxLbEntryTypeMin, *mxEdMin, *mxLbColMin, pDoc);
assert(pFormat->size() == 3);
++itr;
- SetColorScaleEntryTypes(*itr[0], *maLbEntryTypeMiddle, *maEdMiddle, *maLbColMiddle, pDoc);
+ SetColorScaleEntryTypes(*itr[0], *mxLbEntryTypeMiddle, *mxEdMiddle, *mxLbColMiddle, pDoc);
++itr;
- SetColorScaleEntryTypes(*itr[0], *maLbEntryTypeMax, *maEdMax, *maLbColMax, pDoc);
+ SetColorScaleEntryTypes(*itr[0], *mxLbEntryTypeMax, *mxEdMax, *mxLbColMax, pDoc);
}
else
{
- maLbColorFormat->SelectEntryPos(1);
- selectType(*maLbEntryTypeMin, COLORSCALE_MIN);
- selectType(*maLbEntryTypeMiddle, COLORSCALE_PERCENTILE);
- selectType(*maLbEntryTypeMax, COLORSCALE_MAX);
- maEdMiddle->SetText(OUString::number(50));
+ mxLbColorFormat->set_active(1);
+ selectType(*mxLbEntryTypeMin, COLORSCALE_MIN);
+ selectType(*mxLbEntryTypeMiddle, COLORSCALE_PERCENTILE);
+ selectType(*mxLbEntryTypeMax, COLORSCALE_MAX);
+ mxEdMiddle->set_text(OUString::number(50));
}
- maLbColorFormat->SetSelectHdl( LINK( pParent, ScCondFormatList, ColFormatTypeHdl ) );
- EntryTypeHdl(*maLbEntryTypeMin);
- EntryTypeHdl(*maLbEntryTypeMiddle);
- EntryTypeHdl(*maLbEntryTypeMax);
+ mxLbColorFormat->connect_changed( LINK( pParent, ScCondFormatList, ColFormatTypeHdl ) );
+ EntryTypeHdl(*mxLbEntryTypeMin);
+ EntryTypeHdl(*mxLbEntryTypeMiddle);
+ EntryTypeHdl(*mxLbEntryTypeMax);
}
ScColorScale3FrmtEntry::~ScColorScale3FrmtEntry()
{
- disposeOnce();
-}
-
-void ScColorScale3FrmtEntry::dispose()
-{
- maLbColorFormat.clear();
- maLbEntryTypeMin.clear();
- maLbEntryTypeMiddle.clear();
- maLbEntryTypeMax.clear();
- maEdMin.clear();
- maEdMiddle.clear();
- maEdMax.clear();
- maLbColMin.clear();
- maLbColMiddle.clear();
- maLbColMax.clear();
- maFtMin.clear();
- maFtMax.clear();
- ScCondFrmtEntry::dispose();
}
void ScColorScale3FrmtEntry::Init()
{
- maLbEntryTypeMin->SetSelectHdl( LINK( this, ScColorScale3FrmtEntry, EntryTypeHdl ) );
- maLbEntryTypeMax->SetSelectHdl( LINK( this, ScColorScale3FrmtEntry, EntryTypeHdl ) );
- maLbEntryTypeMiddle->SetSelectHdl( LINK( this, ScColorScale3FrmtEntry, EntryTypeHdl ) );
- maLbColMin->SelectEntry(COL_LIGHTRED);
- maLbColMiddle->SelectEntry(COL_YELLOW);
- maLbColMax->SelectEntry(Color(0x00CC00));
+ mxLbEntryTypeMin->connect_changed( LINK( this, ScColorScale3FrmtEntry, EntryTypeHdl ) );
+ mxLbEntryTypeMax->connect_changed( LINK( this, ScColorScale3FrmtEntry, EntryTypeHdl ) );
+ mxLbEntryTypeMiddle->connect_changed( LINK( this, ScColorScale3FrmtEntry, EntryTypeHdl ) );
+ mxLbColMin->SelectEntry(COL_LIGHTRED);
+ mxLbColMiddle->SelectEntry(COL_YELLOW);
+ mxLbColMax->SelectEntry(Color(0x00CC00));
}
ScFormatEntry* ScColorScale3FrmtEntry::createColorscaleEntry() const
{
ScColorScaleFormat* pColorScale = new ScColorScaleFormat(mpDoc);
- pColorScale->AddEntry(createColorScaleEntry(*maLbEntryTypeMin, *maLbColMin, *maEdMin, mpDoc, maPos));
- if(maLbColorFormat->GetSelectedEntryPos() == 1)
- pColorScale->AddEntry(createColorScaleEntry(*maLbEntryTypeMiddle, *maLbColMiddle, *maEdMiddle, mpDoc, maPos));
- pColorScale->AddEntry(createColorScaleEntry(*maLbEntryTypeMax, *maLbColMax, *maEdMax, mpDoc, maPos));
+ pColorScale->AddEntry(createColorScaleEntry(*mxLbEntryTypeMin, *mxLbColMin, *mxEdMin, mpDoc, maPos));
+ if (mxLbColorFormat->get_active() == 1)
+ pColorScale->AddEntry(createColorScaleEntry(*mxLbEntryTypeMiddle, *mxLbColMiddle, *mxEdMiddle, mpDoc, maPos));
+ pColorScale->AddEntry(createColorScaleEntry(*mxLbEntryTypeMax, *mxLbColMax, *mxEdMax, mpDoc, maPos));
return pColorScale;
}
@@ -1040,50 +926,50 @@ ScFormatEntry* ScColorScale3FrmtEntry::GetEntry() const
void ScColorScale3FrmtEntry::SetActive()
{
- maLbColorFormat->Show();
- maLbEntryTypeMin->Show();
- maLbEntryTypeMiddle->Show();
- maLbEntryTypeMax->Show();
+ mxLbColorFormat->show();
+ mxLbEntryTypeMin->show();
+ mxLbEntryTypeMiddle->show();
+ mxLbEntryTypeMax->show();
- maEdMin->Show();
- maEdMiddle->Show();
- maEdMax->Show();
+ mxEdMin->show();
+ mxEdMiddle->show();
+ mxEdMax->show();
- maLbColMin->Show();
- maLbColMiddle->Show();
- maLbColMax->Show();
+ mxLbColMin->show();
+ mxLbColMiddle->show();
+ mxLbColMax->show();
Select();
}
void ScColorScale3FrmtEntry::SetInactive()
{
- maLbColorFormat->Hide();
+ mxLbColorFormat->hide();
- maLbEntryTypeMin->Hide();
- maLbEntryTypeMiddle->Hide();
- maLbEntryTypeMax->Hide();
+ mxLbEntryTypeMin->hide();
+ mxLbEntryTypeMiddle->hide();
+ mxLbEntryTypeMax->hide();
- maEdMin->Hide();
- maEdMiddle->Hide();
- maEdMax->Hide();
+ mxEdMin->hide();
+ mxEdMiddle->hide();
+ mxEdMax->hide();
- maLbColMin->Hide();
- maLbColMiddle->Hide();
- maLbColMax->Hide();
+ mxLbColMin->hide();
+ mxLbColMiddle->hide();
+ mxLbColMax->hide();
Deselect();
}
-IMPL_LINK( ScColorScale3FrmtEntry, EntryTypeHdl, ListBox&, rBox, void )
+IMPL_LINK( ScColorScale3FrmtEntry, EntryTypeHdl, weld::ComboBox&, rBox, void )
{
- Edit* pEd = nullptr;
- if(&rBox == maLbEntryTypeMin.get())
- pEd = maEdMin.get();
- else if(&rBox == maLbEntryTypeMiddle.get())
- pEd = maEdMiddle.get();
- else if(&rBox == maLbEntryTypeMax.get())
- pEd = maEdMax.get();
+ weld::Entry* pEd = nullptr;
+ if(&rBox == mxLbEntryTypeMin.get())
+ pEd = mxEdMin.get();
+ else if(&rBox == mxLbEntryTypeMiddle.get())
+ pEd = mxEdMiddle.get();
+ else if(&rBox == mxLbEntryTypeMax.get())
+ pEd = mxEdMax.get();
if (!pEd)
return;
@@ -1095,31 +981,31 @@ IMPL_LINK( ScColorScale3FrmtEntry, EntryTypeHdl, ListBox&, rBox, void )
}
if(bEnableEdit)
- pEd->Enable();
+ pEd->set_sensitive(true);
else
- pEd->Disable();
+ pEd->set_sensitive(false);
}
-IMPL_LINK_NOARG( ScConditionFrmtEntry, ConditionTypeSelectHdl, ListBox&, void )
+IMPL_LINK_NOARG(ScConditionFrmtEntry, ConditionTypeSelectHdl, weld::ComboBox&, void)
{
- sal_Int32 nSelectPos = maLbCondType->GetSelectedEntryPos();
+ sal_Int32 nSelectPos = mxLbCondType->get_active();
ScConditionMode eMode = EntryPosToConditionMode(nSelectPos);
switch(GetNumberEditFields(eMode))
{
case 0:
- maEdVal1->Hide();
- maEdVal2->Hide();
- maFtVal->Hide();
+ mxEdVal1->GetWidget()->hide();
+ mxEdVal2->GetWidget()->hide();
+ mxFtVal->hide();
break;
case 1:
- maEdVal1->Show();
- maEdVal2->Hide();
- maFtVal->Show();
+ mxEdVal1->GetWidget()->show();
+ mxEdVal2->GetWidget()->hide();
+ mxFtVal->show();
break;
case 2:
- maEdVal1->Show();
- maEdVal2->Show();
- maFtVal->Show();
+ mxEdVal1->GetWidget()->show();
+ mxEdVal2->GetWidget()->show();
+ mxFtVal->show();
break;
}
}
@@ -1128,7 +1014,7 @@ IMPL_LINK_NOARG( ScConditionFrmtEntry, ConditionTypeSelectHdl, ListBox&, void )
namespace {
-void SetDataBarEntryTypes( const ScColorScaleEntry& rEntry, ListBox& rLbType, Edit& rEdit, const ScDocument* pDoc )
+void SetDataBarEntryTypes( const ScColorScaleEntry& rEntry, weld::ComboBox& rLbType, weld::Entry& rEdit, const ScDocument* pDoc )
{
selectType(rLbType, rEntry.GetType());
switch(rEntry.GetType())
@@ -1145,72 +1031,57 @@ void SetDataBarEntryTypes( const ScColorScaleEntry& rEntry, ListBox& rLbType, Ed
SvNumberFormatter* pNumberFormatter = pDoc->GetFormatTable();
OUString aText;
pNumberFormatter->GetInputLineString(nVal, 0, aText);
- rEdit.SetText(aText);
+ rEdit.set_text(aText);
}
break;
case COLORSCALE_FORMULA:
- rEdit.SetText(rEntry.GetFormula(formula::FormulaGrammar::GRAM_DEFAULT));
+ rEdit.set_text(rEntry.GetFormula(formula::FormulaGrammar::GRAM_DEFAULT));
break;
}
}
}
-ScDataBarFrmtEntry::ScDataBarFrmtEntry( vcl::Window* pParent, ScDocument* pDoc, const ScAddress& rPos, const ScDataBarFormat* pFormat )
+ScDataBarFrmtEntry::ScDataBarFrmtEntry(ScCondFormatList* pParent, ScDocument* pDoc, const ScAddress& rPos, const ScDataBarFormat* pFormat)
: ScCondFrmtEntry(pParent, pDoc, rPos)
+ , mxLbColorFormat(mxBuilder->weld_combo_box("colorformat"))
+ , mxLbDataBarMinType(mxBuilder->weld_combo_box("colscalemin"))
+ , mxLbDataBarMaxType(mxBuilder->weld_combo_box("colscalemax"))
+ , mxEdDataBarMin(mxBuilder->weld_entry("edcolscalemin"))
+ , mxEdDataBarMax(mxBuilder->weld_entry("edcolscalemax"))
+ , mxBtOptions(mxBuilder->weld_button("options"))
+ , mxFtMin(mxBuilder->weld_label("Label_minimum"))
+ , mxFtMax(mxBuilder->weld_label("Label_maximum"))
{
- get(maLbColorFormat, "colorformat");
- get(maLbDataBarMinType, "colscalemin");
- get(maLbDataBarMaxType, "colscalemax");
- get(maEdDataBarMin, "edcolscalemin");
- get(maEdDataBarMax, "edcolscalemax");
- get(maBtOptions, "options");
- get(maFtMin, "Label_minimum");
- get(maFtMax, "Label_maximum");
-
// "min" selector doesn't need "max" entry, and vice versa
- removeType(*maLbDataBarMinType, COLORSCALE_MAX);
- removeType(*maLbDataBarMaxType, COLORSCALE_MIN);
+ removeType(*mxLbDataBarMinType, COLORSCALE_MAX);
+ removeType(*mxLbDataBarMaxType, COLORSCALE_MIN);
- maFtMin->Show();
- maFtMax->Show();
+ mxFtMin->show();
+ mxFtMax->show();
- maLbColorFormat->SelectEntryPos(2);
- maLbType->SelectEntryPos(0);
+ mxLbColorFormat->set_active(2);
+ mxLbType->set_active(0);
if(pFormat)
{
mpDataBarData.reset(new ScDataBarFormatData(*pFormat->GetDataBarData()));
- SetDataBarEntryTypes(*mpDataBarData->mpLowerLimit, *maLbDataBarMinType, *maEdDataBarMin, pDoc);
- SetDataBarEntryTypes(*mpDataBarData->mpUpperLimit, *maLbDataBarMaxType, *maEdDataBarMax, pDoc);
- DataBarTypeSelectHdl(*maLbDataBarMinType);
+ SetDataBarEntryTypes(*mpDataBarData->mpLowerLimit, *mxLbDataBarMinType, *mxEdDataBarMin, pDoc);
+ SetDataBarEntryTypes(*mpDataBarData->mpUpperLimit, *mxLbDataBarMaxType, *mxEdDataBarMax, pDoc);
+ DataBarTypeSelectHdl(*mxLbDataBarMinType);
}
else
{
- selectType(*maLbDataBarMinType, COLORSCALE_AUTO);
- selectType(*maLbDataBarMaxType, COLORSCALE_AUTO);
- DataBarTypeSelectHdl(*maLbDataBarMinType);
+ selectType(*mxLbDataBarMinType, COLORSCALE_AUTO);
+ selectType(*mxLbDataBarMaxType, COLORSCALE_AUTO);
+ DataBarTypeSelectHdl(*mxLbDataBarMinType);
}
Init();
- maLbColorFormat->SetSelectHdl( LINK( pParent, ScCondFormatList, ColFormatTypeHdl ) );
+ mxLbColorFormat->connect_changed( LINK( pParent, ScCondFormatList, ColFormatTypeHdl ) );
}
ScDataBarFrmtEntry::~ScDataBarFrmtEntry()
{
- disposeOnce();
-}
-
-void ScDataBarFrmtEntry::dispose()
-{
- maLbColorFormat.clear();
- maLbDataBarMinType.clear();
- maLbDataBarMaxType.clear();
- maEdDataBarMin.clear();
- maEdDataBarMax.clear();
- maBtOptions.clear();
- maFtMin.clear();
- maFtMax.clear();
- ScCondFrmtEntry::dispose();
}
ScFormatEntry* ScDataBarFrmtEntry::GetEntry() const
@@ -1220,10 +1091,10 @@ ScFormatEntry* ScDataBarFrmtEntry::GetEntry() const
void ScDataBarFrmtEntry::Init()
{
- maLbDataBarMinType->SetSelectHdl( LINK( this, ScDataBarFrmtEntry, DataBarTypeSelectHdl ) );
- maLbDataBarMaxType->SetSelectHdl( LINK( this, ScDataBarFrmtEntry, DataBarTypeSelectHdl ) );
+ mxLbDataBarMinType->connect_changed( LINK( this, ScDataBarFrmtEntry, DataBarTypeSelectHdl ) );
+ mxLbDataBarMaxType->connect_changed( LINK( this, ScDataBarFrmtEntry, DataBarTypeSelectHdl ) );
- maBtOptions->SetClickHdl( LINK( this, ScDataBarFrmtEntry, OptionBtnHdl ) );
+ mxBtOptions->connect_clicked( LINK( this, ScDataBarFrmtEntry, OptionBtnHdl ) );
if(!mpDataBarData)
{
@@ -1238,10 +1109,10 @@ void ScDataBarFrmtEntry::Init()
ScFormatEntry* ScDataBarFrmtEntry::createDatabarEntry() const
{
- SetColorScaleEntry(mpDataBarData->mpLowerLimit.get(), *maLbDataBarMinType,
- *maEdDataBarMin, mpDoc, maPos);
- SetColorScaleEntry(mpDataBarData->mpUpperLimit.get(), *maLbDataBarMaxType,
- *maEdDataBarMax, mpDoc, maPos);
+ SetColorScaleEntry(mpDataBarData->mpLowerLimit.get(), *mxLbDataBarMinType,
+ *mxEdDataBarMin, mpDoc, maPos);
+ SetColorScaleEntry(mpDataBarData->mpUpperLimit.get(), *mxLbDataBarMaxType,
+ *mxEdDataBarMax, mpDoc, maPos);
ScDataBarFormat* pDataBar = new ScDataBarFormat(mpDoc);
pDataBar->SetDataBarData(new ScDataBarFormatData(*mpDataBarData));
return pDataBar;
@@ -1254,68 +1125,69 @@ OUString ScDataBarFrmtEntry::GetExpressionString()
void ScDataBarFrmtEntry::SetActive()
{
- maLbColorFormat->Show();
+ mxLbColorFormat->show();
- maLbDataBarMinType->Show();
- maLbDataBarMaxType->Show();
- maEdDataBarMin->Show();
- maEdDataBarMax->Show();
- maBtOptions->Show();
+ mxLbDataBarMinType->show();
+ mxLbDataBarMaxType->show();
+ mxEdDataBarMin->show();
+ mxEdDataBarMax->show();
+ mxBtOptions->show();
Select();
}
void ScDataBarFrmtEntry::SetInactive()
{
- maLbColorFormat->Hide();
+ mxLbColorFormat->hide();
- maLbDataBarMinType->Hide();
- maLbDataBarMaxType->Hide();
- maEdDataBarMin->Hide();
- maEdDataBarMax->Hide();
- maBtOptions->Hide();
+ mxLbDataBarMinType->hide();
+ mxLbDataBarMaxType->hide();
+ mxEdDataBarMin->hide();
+ mxEdDataBarMax->hide();
+ mxBtOptions->hide();
Deselect();
}
-IMPL_LINK_NOARG( ScDataBarFrmtEntry, DataBarTypeSelectHdl, ListBox&, void )
+IMPL_LINK_NOARG( ScDataBarFrmtEntry, DataBarTypeSelectHdl, weld::ComboBox&, void )
{
- if (getSelectedType(*maLbDataBarMinType) <= COLORSCALE_MAX)
- maEdDataBarMin->Disable();
+ if (getSelectedType(*mxLbDataBarMinType) <= COLORSCALE_MAX)
+ mxEdDataBarMin->set_sensitive(false);
else
- maEdDataBarMin->Enable();
+ mxEdDataBarMin->set_sensitive(true);
- if (getSelectedType(*maLbDataBarMaxType) <= COLORSCALE_MAX)
- maEdDataBarMax->Disable();
+ if (getSelectedType(*mxLbDataBarMaxType) <= COLORSCALE_MAX)
+ mxEdDataBarMax->set_sensitive(false);
else
- maEdDataBarMax->Enable();
+ mxEdDataBarMax->set_sensitive(true);
}
-IMPL_LINK_NOARG( ScDataBarFrmtEntry, OptionBtnHdl, Button*, void )
+IMPL_LINK_NOARG( ScDataBarFrmtEntry, OptionBtnHdl, weld::Button&, void )
{
- SetColorScaleEntry(mpDataBarData->mpLowerLimit.get(), *maLbDataBarMinType,
- *maEdDataBarMin, mpDoc, maPos);
- SetColorScaleEntry(mpDataBarData->mpUpperLimit.get(), *maLbDataBarMaxType,
- *maEdDataBarMax, mpDoc, maPos);
- ScDataBarSettingsDlg aDlg(GetFrameWeld(), *mpDataBarData, mpDoc, maPos);
+ SetColorScaleEntry(mpDataBarData->mpLowerLimit.get(), *mxLbDataBarMinType,
+ *mxEdDataBarMin, mpDoc, maPos);
+ SetColorScaleEntry(mpDataBarData->mpUpperLimit.get(), *mxLbDataBarMaxType,
+ *mxEdDataBarMax, mpDoc, maPos);
+ ScDataBarSettingsDlg aDlg(mpParent->GetFrameWeld(), *mpDataBarData, mpDoc, maPos);
if (aDlg.run() == RET_OK)
{
mpDataBarData.reset(aDlg.GetData());
- SetDataBarEntryTypes(*mpDataBarData->mpLowerLimit, *maLbDataBarMinType, *maEdDataBarMin, mpDoc);
- SetDataBarEntryTypes(*mpDataBarData->mpUpperLimit, *maLbDataBarMaxType, *maEdDataBarMax, mpDoc);
- DataBarTypeSelectHdl(*maLbDataBarMinType);
+ SetDataBarEntryTypes(*mpDataBarData->mpLowerLimit, *mxLbDataBarMinType, *mxEdDataBarMin, mpDoc);
+ SetDataBarEntryTypes(*mpDataBarData->mpUpperLimit, *mxLbDataBarMaxType, *mxEdDataBarMax, mpDoc);
+ DataBarTypeSelectHdl(*mxLbDataBarMinType);
}
}
-ScDateFrmtEntry::ScDateFrmtEntry(vcl::Window* pParent, ScDocument* pDoc, const ScCondDateFormatEntry* pFormat)
+ScDateFrmtEntry::ScDateFrmtEntry(ScCondFormatList* pParent, ScDocument* pDoc, const ScCondDateFormatEntry* pFormat)
: ScCondFrmtEntry(pParent, pDoc, ScAddress())
+ , mxLbDateEntry(mxBuilder->weld_combo_box("datetype"))
+ , mxFtStyle(mxBuilder->weld_label("styleft"))
+ , mxLbStyle(mxBuilder->weld_combo_box("style"))
+ , mxWdPreviewWin(mxBuilder->weld_widget("previewwin"))
+ , mxWdPreview(new weld::CustomWeld(*mxBuilder, "preview", maWdPreview))
, mbIsInStyleCreate(false)
{
- get(maLbDateEntry, "datetype");
- get(maFtStyle, "styleft");
- get(maLbStyle, "style");
- get(maWdPreview, "preview");
- maWdPreview->set_height_request(maLbStyle->get_preferred_size().Height());
+ mxWdPreview->set_size_request(mxLbStyle->get_preferred_size().Height(), -1);
Init();
@@ -1324,54 +1196,44 @@ ScDateFrmtEntry::ScDateFrmtEntry(vcl::Window* pParent, ScDocument* pDoc, const S
if(pFormat)
{
sal_Int32 nPos = static_cast<sal_Int32>(pFormat->GetDateType());
- maLbDateEntry->SelectEntryPos(nPos);
+ mxLbDateEntry->set_active(nPos);
- maLbStyle->SelectEntry(pFormat->GetStyleName());
+ mxLbStyle->set_active_text(pFormat->GetStyleName());
}
- StyleSelectHdl(*maLbStyle);
+ StyleSelectHdl(*mxLbStyle);
}
ScDateFrmtEntry::~ScDateFrmtEntry()
{
- disposeOnce();
-}
-
-void ScDateFrmtEntry::dispose()
-{
- maLbDateEntry.clear();
- maFtStyle.clear();
- maLbStyle.clear();
- maWdPreview.clear();
- ScCondFrmtEntry::dispose();
}
void ScDateFrmtEntry::Init()
{
- maLbDateEntry->SelectEntryPos(0);
- maLbType->SelectEntryPos(3);
+ mxLbDateEntry->set_active(0);
+ mxLbType->set_active(3);
- FillStyleListBox( mpDoc, *maLbStyle );
- maLbStyle->SetSelectHdl( LINK( this, ScDateFrmtEntry, StyleSelectHdl ) );
- maLbStyle->SelectEntryPos(1);
+ FillStyleListBox( mpDoc, *mxLbStyle );
+ mxLbStyle->connect_changed( LINK( this, ScDateFrmtEntry, StyleSelectHdl ) );
+ mxLbStyle->set_active(1);
}
void ScDateFrmtEntry::SetActive()
{
- maLbDateEntry->Show();
- maFtStyle->Show();
- maWdPreview->Show();
- maLbStyle->Show();
+ mxLbDateEntry->show();
+ mxFtStyle->show();
+ mxWdPreviewWin->show();
+ mxLbStyle->show();
Select();
}
void ScDateFrmtEntry::SetInactive()
{
- maLbDateEntry->Hide();
- maFtStyle->Hide();
- maWdPreview->Hide();
- maLbStyle->Hide();
+ mxLbDateEntry->hide();
+ mxFtStyle->hide();
+ mxWdPreviewWin->hide();
+ mxLbStyle->hide();
Deselect();
}
@@ -1381,16 +1243,16 @@ void ScDateFrmtEntry::Notify( SfxBroadcaster&, const SfxHint& rHint )
if(rHint.GetId() == SfxHintId::StyleSheetModified)
{
if(!mbIsInStyleCreate)
- UpdateStyleList(*maLbStyle, mpDoc);
+ UpdateStyleList(*mxLbStyle, mpDoc);
}
}
ScFormatEntry* ScDateFrmtEntry::GetEntry() const
{
ScCondDateFormatEntry* pNewEntry = new ScCondDateFormatEntry(mpDoc);
- condformat::ScCondFormatDateType eType = static_cast<condformat::ScCondFormatDateType>(maLbDateEntry->GetSelectedEntryPos());
+ condformat::ScCondFormatDateType eType = static_cast<condformat::ScCondFormatDateType>(mxLbDateEntry->get_active());
pNewEntry->SetDateType(eType);
- pNewEntry->SetStyleName(maLbStyle->GetSelectedEntry());
+ pNewEntry->SetStyleName(mxLbStyle->get_active_text());
return pNewEntry;
}
@@ -1399,65 +1261,68 @@ OUString ScDateFrmtEntry::GetExpressionString()
return ScCondFormatHelper::GetExpression(DATE, 0);
}
-IMPL_LINK_NOARG( ScDateFrmtEntry, StyleSelectHdl, ListBox&, void )
+IMPL_LINK_NOARG( ScDateFrmtEntry, StyleSelectHdl, weld::ComboBox&, void )
{
mbIsInStyleCreate = true;
- StyleSelect( *maLbStyle, mpDoc, *maWdPreview );
+ StyleSelect(mpParent->GetFrameWeld(), *mxLbStyle, mpDoc, maWdPreview);
mbIsInStyleCreate = false;
}
-class ScIconSetFrmtDataEntry : public VclContainer
- , public VclBuilderContainer
+class ScIconSetFrmtDataEntry
{
+protected:
+ std::unique_ptr<weld::Builder> mxBuilder;
private:
- VclPtr<VclGrid> maGrid;
- VclPtr<FixedImage> maImgIcon;
- VclPtr<FixedText> maFtEntry;
- VclPtr<Edit> maEdEntry;
- VclPtr<ListBox> maLbEntryType;
+ std::unique_ptr<weld::Container> mxGrid;
+ std::unique_ptr<weld::Image> mxImgIcon;
+ std::unique_ptr<weld::Label> mxFtEntry;
+ std::unique_ptr<weld::Entry> mxEdEntry;
+ std::unique_ptr<weld::ComboBox> mxLbEntryType;
public:
- ScIconSetFrmtDataEntry( vcl::Window* pParent, ScIconSetType eType, ScDocument* pDoc,
- sal_Int32 i, const ScColorScaleEntry* pEntry = nullptr );
- virtual ~ScIconSetFrmtDataEntry() override;
- virtual Size calculateRequisition() const override;
- virtual void setAllocation(const Size &rAllocation) override;
- virtual void dispose() override;
+ ScIconSetFrmtDataEntry(weld::Container* pParent, ScIconSetType eType, ScDocument* pDoc,
+ sal_Int32 i, const ScColorScaleEntry* pEntry = nullptr);
+ void Show() { mxGrid->show(); }
+ void Hide() { mxGrid->hide(); }
+ void set_grid_top_attach(int nTop)
+ {
+ mxGrid->set_grid_left_attach(0);
+ mxGrid->set_grid_top_attach(nTop);
+ }
ScColorScaleEntry* CreateEntry(ScDocument* pDoc, const ScAddress& rPos) const;
void SetFirstEntry();
};
-ScIconSetFrmtDataEntry::ScIconSetFrmtDataEntry(vcl::Window* pParent, ScIconSetType eType, ScDocument* pDoc, sal_Int32 i, const ScColorScaleEntry* pEntry)
- : VclContainer(pParent)
+ScIconSetFrmtDataEntry::ScIconSetFrmtDataEntry(weld::Container* pParent, ScIconSetType eType, ScDocument* pDoc, sal_Int32 i, const ScColorScaleEntry* pEntry)
+ : mxBuilder(Application::CreateBuilder(pParent, "modules/scalc/ui/conditionaliconset.ui"))
+ , mxGrid(mxBuilder->weld_container("ConditionalIconSet"))
+ , mxImgIcon(mxBuilder->weld_image("icon"))
+ , mxFtEntry(mxBuilder->weld_label("label"))
+ , mxEdEntry(mxBuilder->weld_entry("entry"))
+ , mxLbEntryType(mxBuilder->weld_combo_box("listbox"))
{
- m_pUIBuilder.reset(new VclBuilder(this, getUIRootDir(), "modules/scalc/ui/conditionaliconset.ui"));
- get(maGrid, "ConditionalIconSet");
- get(maImgIcon, "icon");
- get(maFtEntry, "label");
- get(maEdEntry, "entry");
- get(maLbEntryType, "listbox");
- maImgIcon->SetImage(Image(ScIconSetFormat::getBitmap(pDoc->GetIconSetBitmapMap(), eType, i)));
+ mxImgIcon->set_from_icon_name(ScIconSetFormat::getIconName(eType, i));
if(pEntry)
{
switch(pEntry->GetType())
{
case COLORSCALE_VALUE:
- maLbEntryType->SelectEntryPos(0);
- maEdEntry->SetText(convertNumberToString(pEntry->GetValue(), pDoc));
+ mxLbEntryType->set_active(0);
+ mxEdEntry->set_text(convertNumberToString(pEntry->GetValue(), pDoc));
break;
case COLORSCALE_PERCENTILE:
- maLbEntryType->SelectEntryPos(2);
- maEdEntry->SetText(convertNumberToString(pEntry->GetValue(), pDoc));
+ mxLbEntryType->set_active(2);
+ mxEdEntry->set_text(convertNumberToString(pEntry->GetValue(), pDoc));
break;
case COLORSCALE_PERCENT:
- maLbEntryType->SelectEntryPos(1);
- maEdEntry->SetText(convertNumberToString(pEntry->GetValue(), pDoc));
+ mxLbEntryType->set_active(1);
+ mxEdEntry->set_text(convertNumberToString(pEntry->GetValue(), pDoc));
break;
case COLORSCALE_FORMULA:
- maLbEntryType->SelectEntryPos(3);
- maEdEntry->SetText(pEntry->GetFormula(formula::FormulaGrammar::GRAM_DEFAULT));
+ mxLbEntryType->set_active(3);
+ mxEdEntry->set_text(pEntry->GetFormula(formula::FormulaGrammar::GRAM_DEFAULT));
break;
default:
assert(false);
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list