[Libreoffice-commits] core.git: compilerplugins/clang cui/inc cui/source include/svx sd/source svx/source sw/inc sw/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Thu Feb 6 12:12:34 UTC 2020
compilerplugins/clang/mergeclasses.results | 1
cui/inc/pch/precompiled_cui.hxx | 3 -
cui/source/tabpages/tpbitmap.cxx | 8 ++--
cui/source/tabpages/tpcolor.cxx | 10 ++---
cui/source/tabpages/tplnedef.cxx | 2 -
include/svx/dlgctrl.hxx | 13 ------
include/svx/itemwin.hxx | 7 +++
sd/source/ui/sidebar/SlideBackground.cxx | 2 -
svx/source/dialog/dlgctrl.cxx | 31 ----------------
svx/source/sidebar/area/AreaPropertyPanelBase.cxx | 2 -
svx/source/tbxctrls/itemwin.cxx | 42 +++++++++++++++++++---
sw/inc/pch/precompiled_sw.hxx | 5 ++
sw/source/uibase/sidebar/PageStylesPanel.cxx | 2 -
13 files changed, 60 insertions(+), 68 deletions(-)
New commits:
commit 66693d82bae6c4333ac754f76550eb5f4a289b22
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Feb 5 20:58:08 2020 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Feb 6 13:11:54 2020 +0100
merge FillTypeLB with SvxFillTypeBox
Change-Id: Ia6229e8cc04c88e6740a12648c50cf5efca3bbd0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88067
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/compilerplugins/clang/mergeclasses.results b/compilerplugins/clang/mergeclasses.results
index 3e084ce65dea..12fd4da9f315 100644
--- a/compilerplugins/clang/mergeclasses.results
+++ b/compilerplugins/clang/mergeclasses.results
@@ -39,7 +39,6 @@ merge ExcBoolRecord with Exc1904
merge ExcelConverterBase with ExcelToSc
merge ExportTyp with ExportBiff5
merge FailTest with testMathMalformedXml
-merge FillTypeLB with SvxFillTypeBox
merge FmGridListener with FmXGridPeer::GridListenerDelegator
merge FmXDisposeListener with DisposeListenerGridBridge
merge FmXFormShell_Base_Disambiguation with FmXFormShell
diff --git a/cui/inc/pch/precompiled_cui.hxx b/cui/inc/pch/precompiled_cui.hxx
index 8164c642b607..ee93cd31562b 100644
--- a/cui/inc/pch/precompiled_cui.hxx
+++ b/cui/inc/pch/precompiled_cui.hxx
@@ -13,7 +13,7 @@
manual changes will be rewritten by the next run of update_pch.sh (which presumably
also fixes all possible problems, so it's usually better to use it).
- Generated on 2020-02-05 19:54:35 using:
+ Generated on 2020-02-05 20:59:24 using:
./bin/update_pch cui cui --cutoff=8 --exclude:system --include:module --exclude:local
If after updating build fails, use the following command to locate conflicting headers:
@@ -128,7 +128,6 @@
#include <vcl/image.hxx>
#include <vcl/keycod.hxx>
#include <vcl/keycodes.hxx>
-#include <vcl/lstbox.hxx>
#include <vcl/mapmod.hxx>
#include <vcl/menu.hxx>
#include <vcl/metaactiontypes.hxx>
diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx
index b18cfffbe607..b668ba6e7ebd 100644
--- a/cui/source/tabpages/tpbitmap.cxx
+++ b/cui/source/tabpages/tpbitmap.cxx
@@ -160,7 +160,7 @@ void SvxBitmapTabPage::ActivatePage( const SfxItemSet& rSet )
if ( !aItem.isPattern() )
{
nPos = SearchBitmapList( aItem.GetGraphicObject() );
- if ( nPos == LISTBOX_ENTRY_NOTFOUND )
+ if (nPos == -1)
return;
}
else
@@ -537,7 +537,7 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickRenameHdl, SvxPresetListBox*, void)
{
pDlg->GetName( aName );
sal_Int32 nBitmapPos = SearchBitmapList( aName );
- bool bValidBitmapName = (nBitmapPos == static_cast<sal_Int32>(nPos) ) || (nBitmapPos == LISTBOX_ENTRY_NOTFOUND);
+ bool bValidBitmapName = (nBitmapPos == static_cast<sal_Int32>(nPos) ) || (nBitmapPos == -1);
if(bValidBitmapName)
{
@@ -792,7 +792,7 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickImportHdl, weld::Button&, void)
sal_Int32 SvxBitmapTabPage::SearchBitmapList(const GraphicObject& rGraphicObject)
{
long nCount = m_pBitmapList->Count();
- sal_Int32 nPos = LISTBOX_ENTRY_NOTFOUND;
+ sal_Int32 nPos = -1;
for(long i = 0;i < nCount;i++)
{
@@ -809,7 +809,7 @@ sal_Int32 SvxBitmapTabPage::SearchBitmapList(const OUString& rBitmapName)
{
long nCount = m_pBitmapList->Count();
bool bValidBitmapName = true;
- sal_Int32 nPos = LISTBOX_ENTRY_NOTFOUND;
+ sal_Int32 nPos = -1;
for(long i = 0;i < nCount && bValidBitmapName;i++)
{
diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx
index 66fa7f9cd165..24a8199e12f4 100644
--- a/cui/source/tabpages/tpcolor.cxx
+++ b/cui/source/tabpages/tpcolor.cxx
@@ -320,7 +320,7 @@ IMPL_LINK_NOARG(SvxColorTabPage, ClickAddHdl_Impl, weld::Button&, void)
while (!bValidColorName)
{
aName = aNewName + " " + OUString::number( j++ );
- bValidColorName = (FindInCustomColors(aName) == LISTBOX_ENTRY_NOTFOUND);
+ bValidColorName = (FindInCustomColors(aName) == -1);
}
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
@@ -331,7 +331,7 @@ IMPL_LINK_NOARG(SvxColorTabPage, ClickAddHdl_Impl, weld::Button&, void)
{
pDlg->GetName( aName );
- bValidColorName = (FindInCustomColors(aName) == LISTBOX_ENTRY_NOTFOUND);
+ bValidColorName = (FindInCustomColors(aName) == -1);
if (bValidColorName)
{
nError = 0;
@@ -610,7 +610,7 @@ sal_Int32 SvxColorTabPage::FindInCustomColors(OUString const & aColorName)
css::uno::Sequence< OUString > aCustomColorNameList(officecfg::Office::Common::UserColors::CustomColorName::get());
long nCount = aCustomColorNameList.getLength();
bool bValidColorName = true;
- sal_Int32 nPos = LISTBOX_ENTRY_NOTFOUND;
+ sal_Int32 nPos = -1;
for(long i = 0;i < nCount && bValidColorName;i++)
{
@@ -625,9 +625,7 @@ sal_Int32 SvxColorTabPage::FindInCustomColors(OUString const & aColorName)
sal_Int32 SvxColorTabPage::FindInPalette( const Color& rColor )
{
- sal_Int32 nPos = pColorList->GetIndexOfColor( rColor );
-
- return ( nPos == -1) ? LISTBOX_ENTRY_NOTFOUND : nPos;
+ return pColorList->GetIndexOfColor(rColor);
}
// A RGB value is converted to a CMYK value - not in an ideal way as
diff --git a/cui/source/tabpages/tplnedef.cxx b/cui/source/tabpages/tplnedef.cxx
index 8662c42985fb..ba1ab3588fd0 100644
--- a/cui/source/tabpages/tplnedef.cxx
+++ b/cui/source/tabpages/tplnedef.cxx
@@ -171,7 +171,7 @@ void SvxLineDefTabPage::ActivatePage( const SfxItemSet& )
DBG_ASSERT( aURL.GetProtocol() != INetProtocol::NotValid, "invalid URL" );
*pPageType = PageType::Area; // 2
- *pPosDashLb = LISTBOX_ENTRY_NOTFOUND;
+ *pPosDashLb = -1;
}
}
}
diff --git a/include/svx/dlgctrl.hxx b/include/svx/dlgctrl.hxx
index 5efe8062e13a..b8285349b5e8 100644
--- a/include/svx/dlgctrl.hxx
+++ b/include/svx/dlgctrl.hxx
@@ -23,7 +23,6 @@
#include <svx/svxdllapi.h>
#include <svx/rectenum.hxx>
#include <vcl/customweld.hxx>
-#include <vcl/lstbox.hxx>
#include <vcl/weld.hxx>
#include <vcl/virdev.hxx>
#include <svx/xtable.hxx>
@@ -213,18 +212,6 @@ public:
/************************************************************************/
-class SAL_WARN_UNUSED SVX_DLLPUBLIC FillTypeLB : public ListBox
-{
-public:
- FillTypeLB( vcl::Window* pParent, WinBits aWB ) : ListBox( pParent, aWB ) {}
-
- void Fill();
-
- static void Fill(weld::ComboBox& rListBox);
-};
-
-/************************************************************************/
-
class SAL_WARN_UNUSED SVX_DLLPUBLIC SvxLineLB
{
private:
diff --git a/include/svx/itemwin.hxx b/include/svx/itemwin.hxx
index e1a31d428724..a304405523ce 100644
--- a/include/svx/itemwin.hxx
+++ b/include/svx/itemwin.hxx
@@ -20,6 +20,7 @@
#define INCLUDED_SVX_ITEMWIN_HXX
#include <vcl/field.hxx>
+#include <vcl/lstbox.hxx>
#include <svtools/toolbarmenu.hxx>
#include <svx/dlgctrl.hxx>
#include <svx/svxdllapi.h>
@@ -75,11 +76,15 @@ public:
void RefreshDlgUnit();
};
-class SVX_DLLPUBLIC SvxFillTypeBox final : public FillTypeLB
+class SVX_DLLPUBLIC SvxFillTypeBox final : public ListBox
{
public:
SvxFillTypeBox( vcl::Window* pParent );
+ void Fill();
+
+ static void Fill(weld::ComboBox& rListBox);
+
void Selected() { bSelect = true; }
virtual boost::property_tree::ptree DumpAsPropertyTree() override;
diff --git a/sd/source/ui/sidebar/SlideBackground.cxx b/sd/source/ui/sidebar/SlideBackground.cxx
index 85a9671b171b..129ac3bd1cc6 100644
--- a/sd/source/ui/sidebar/SlideBackground.cxx
+++ b/sd/source/ui/sidebar/SlideBackground.cxx
@@ -224,7 +224,7 @@ void SlideBackground::SetMarginsFieldUnit()
void SlideBackground::Initialize()
{
- FillTypeLB::Fill(*mxFillStyle);
+ SvxFillTypeBox::Fill(*mxFillStyle);
SetMarginsFieldUnit();
diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx
index 1e2631e990c7..fc73e1ac5a84 100644
--- a/svx/source/dialog/dlgctrl.cxx
+++ b/svx/source/dialog/dlgctrl.cxx
@@ -891,37 +891,6 @@ void SvxPixelCtl::Reset()
Invalidate();
}
-void FillTypeLB::Fill()
-{
- SetUpdateMode( false );
-
- InsertEntry( SvxResId(RID_SVXSTR_INVISIBLE) );
- InsertEntry( SvxResId(RID_SVXSTR_COLOR) );
- InsertEntry( SvxResId(RID_SVXSTR_GRADIENT) );
- InsertEntry( SvxResId(RID_SVXSTR_HATCH) );
- InsertEntry( SvxResId(RID_SVXSTR_BITMAP) );
- InsertEntry( SvxResId(RID_SVXSTR_PATTERN) );
-
- AdaptDropDownLineCountToMaximum();
- SetUpdateMode( true );
-}
-
-void FillTypeLB::Fill(weld::ComboBox& rListBox)
-{
- rListBox.freeze();
-
- rListBox.append_text(SvxResId(RID_SVXSTR_INVISIBLE));
- rListBox.append_text(SvxResId(RID_SVXSTR_COLOR));
- rListBox.append_text(SvxResId(RID_SVXSTR_GRADIENT));
- rListBox.append_text(SvxResId(RID_SVXSTR_HATCH));
- rListBox.append_text(SvxResId(RID_SVXSTR_BITMAP));
- rListBox.append_text(SvxResId(RID_SVXSTR_PATTERN));
-
- rListBox.thaw();
-
- rListBox.set_active(1); // solid color
-}
-
SvxLineLB::SvxLineLB(std::unique_ptr<weld::ComboBox> pControl)
: m_xControl(std::move(pControl))
, mbAddStandardFields(true)
diff --git a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
index fab124cadf6d..56b3e5602df4 100644
--- a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
+++ b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
@@ -146,7 +146,7 @@ void AreaPropertyPanelBase::dispose()
void AreaPropertyPanelBase::Initialize()
{
- FillTypeLB::Fill(*mxLbFillType);
+ SvxFillTypeBox::Fill(*mxLbFillType);
maGradientLinear.SetXOffset(DEFAULT_CENTERX);
maGradientLinear.SetYOffset(DEFAULT_CENTERY);
diff --git a/svx/source/tbxctrls/itemwin.cxx b/svx/source/tbxctrls/itemwin.cxx
index 9bff3642360f..0baf9407b01e 100644
--- a/svx/source/tbxctrls/itemwin.cxx
+++ b/svx/source/tbxctrls/itemwin.cxx
@@ -31,6 +31,8 @@
#include <vcl/svapp.hxx>
#include <vcl/settings.hxx>
+#include <svx/dialmgr.hxx>
+#include <svx/strings.hrc>
#include <svx/svxids.hrc>
#include <svx/xlnclit.hxx>
@@ -191,7 +193,7 @@ void SvxMetricField::DataChanged( const DataChangedEvent& rDCEvt )
}
SvxFillTypeBox::SvxFillTypeBox( vcl::Window* pParent ) :
- FillTypeLB( pParent, WB_BORDER | WB_DROPDOWN | WB_AUTOHSCROLL | WB_TABSTOP ),
+ ListBox( pParent, WB_BORDER | WB_DROPDOWN | WB_AUTOHSCROLL | WB_TABSTOP ),
nCurPos ( 0 ),
bSelect ( false )
{
@@ -220,13 +222,12 @@ bool SvxFillTypeBox::PreNotify( NotifyEvent& rNEvt )
}
}
- return FillTypeLB::PreNotify( rNEvt );
+ return ListBox::PreNotify( rNEvt );
}
-
bool SvxFillTypeBox::EventNotify( NotifyEvent& rNEvt )
{
- bool bHandled = FillTypeLB::EventNotify( rNEvt );
+ bool bHandled = ListBox::EventNotify( rNEvt );
if (isDisposed())
return false;
@@ -269,11 +270,42 @@ void SvxFillTypeBox::ReleaseFocus_Impl()
boost::property_tree::ptree SvxFillTypeBox::DumpAsPropertyTree()
{
- boost::property_tree::ptree aTree = FillTypeLB::DumpAsPropertyTree();
+ boost::property_tree::ptree aTree = ListBox::DumpAsPropertyTree();
aTree.put("command", ".uno:FillStyle");
return aTree;
}
+void SvxFillTypeBox::Fill()
+{
+ SetUpdateMode( false );
+
+ InsertEntry( SvxResId(RID_SVXSTR_INVISIBLE) );
+ InsertEntry( SvxResId(RID_SVXSTR_COLOR) );
+ InsertEntry( SvxResId(RID_SVXSTR_GRADIENT) );
+ InsertEntry( SvxResId(RID_SVXSTR_HATCH) );
+ InsertEntry( SvxResId(RID_SVXSTR_BITMAP) );
+ InsertEntry( SvxResId(RID_SVXSTR_PATTERN) );
+
+ AdaptDropDownLineCountToMaximum();
+ SetUpdateMode( true );
+}
+
+void SvxFillTypeBox::Fill(weld::ComboBox& rListBox)
+{
+ rListBox.freeze();
+
+ rListBox.append_text(SvxResId(RID_SVXSTR_INVISIBLE));
+ rListBox.append_text(SvxResId(RID_SVXSTR_COLOR));
+ rListBox.append_text(SvxResId(RID_SVXSTR_GRADIENT));
+ rListBox.append_text(SvxResId(RID_SVXSTR_HATCH));
+ rListBox.append_text(SvxResId(RID_SVXSTR_BITMAP));
+ rListBox.append_text(SvxResId(RID_SVXSTR_PATTERN));
+
+ rListBox.thaw();
+
+ rListBox.set_active(1); // solid color
+}
+
SvxFillAttrBox::SvxFillAttrBox( vcl::Window* pParent ) :
ListBox(pParent, WB_BORDER | WB_DROPDOWN | WB_AUTOHSCROLL | WB_TABSTOP),
nCurPos( 0 )
diff --git a/sw/inc/pch/precompiled_sw.hxx b/sw/inc/pch/precompiled_sw.hxx
index 3f378ab2236e..218f9873a2d4 100644
--- a/sw/inc/pch/precompiled_sw.hxx
+++ b/sw/inc/pch/precompiled_sw.hxx
@@ -13,7 +13,7 @@
manual changes will be rewritten by the next run of update_pch.sh (which presumably
also fixes all possible problems, so it's usually better to use it).
- Generated on 2020-02-01 11:40:57 using:
+ Generated on 2020-02-05 21:00:03 using:
./bin/update_pch sw sw --cutoff=7 --exclude:system --exclude:module --include:local
If after updating build fails, use the following command to locate conflicting headers:
@@ -68,6 +68,9 @@
#include <rtl/math.hxx>
#include <rtl/ref.hxx>
#include <rtl/strbuf.hxx>
+#include <rtl/string.h>
+#include <rtl/stringconcat.hxx>
+#include <rtl/stringutils.hxx>
#include <rtl/tencinfo.h>
#include <rtl/textenc.h>
#include <rtl/unload.h>
diff --git a/sw/source/uibase/sidebar/PageStylesPanel.cxx b/sw/source/uibase/sidebar/PageStylesPanel.cxx
index 628bc6a880ca..8ce341228c5c 100644
--- a/sw/source/uibase/sidebar/PageStylesPanel.cxx
+++ b/sw/source/uibase/sidebar/PageStylesPanel.cxx
@@ -149,7 +149,7 @@ void PageStylesPanel::dispose()
void PageStylesPanel::Initialize()
{
- FillTypeLB::Fill(*mxBgFillType);
+ SvxFillTypeBox::Fill(*mxBgFillType);
aCustomEntry = mxCustomEntry->get_label();
mpBindings->Invalidate(SID_ATTR_PAGE_COLUMN);
More information about the Libreoffice-commits
mailing list