diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-02-05 20:58:08 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-02-06 13:11:54 +0100 |
commit | 66693d82bae6c4333ac754f76550eb5f4a289b22 (patch) | |
tree | bcb2c29b5738bbcc63de875258b4ca62fda1b913 /cui | |
parent | cad01ea74c603affcc15a5e32f75967f6dff0f87 (diff) |
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@redhat.com>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/inc/pch/precompiled_cui.hxx | 3 | ||||
-rw-r--r-- | cui/source/tabpages/tpbitmap.cxx | 8 | ||||
-rw-r--r-- | cui/source/tabpages/tpcolor.cxx | 10 | ||||
-rw-r--r-- | cui/source/tabpages/tplnedef.cxx | 2 |
4 files changed, 10 insertions, 13 deletions
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; } } } |