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/source/tabpages/tpcolor.cxx | |
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/source/tabpages/tpcolor.cxx')
-rw-r--r-- | cui/source/tabpages/tpcolor.cxx | 10 |
1 files changed, 4 insertions, 6 deletions
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 |