From f75734ee0fa3ba75258a6e78846a7f5096502a99 Mon Sep 17 00:00:00 2001 From: Henry Castro Date: Mon, 24 Feb 2020 13:34:03 -0400 Subject: [PATCH] lok: use "None" string item in the ListBox control The string item "- none -" confuse mobile users, it is preferable to use the "None" string Change-Id: Ib9b5716aa796624255fed7fac5413db69e028bb6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89839 Tested-by: Jenkins Reviewed-by: Henry Castro --- cui/source/tabpages/tpline.cxx | 8 ++++++-- svx/source/tbxctrls/linectrl.cxx | 6 +++++- svx/source/tbxctrls/tbcontrl.cxx | 8 ++++++-- svx/source/xoutdev/xattr2.cxx | 4 +++- svx/source/xoutdev/xtabdash.cxx | 5 ++++- 5 files changed, 24 insertions(+), 7 deletions(-) diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx index c5a658f4fd71..98ce79ad80f1 100644 --- a/cui/source/tabpages/tpline.cxx +++ b/cui/source/tabpages/tpline.cxx @@ -62,6 +62,7 @@ #include #include #include +#include #define MAX_BMP_WIDTH 16 #define MAX_BMP_HEIGHT 16 @@ -229,7 +230,8 @@ void SvxLineTabPage::FillListboxes() m_xLbLineStyle->set_active( nOldSelect ); // Line end style - OUString sNone( SvxResId( RID_SVXSTR_NONE ) ); + OUString sNone( comphelper::LibreOfficeKit::isActive() ? SvxResId( RID_SVXSTR_INVISIBLE ) + : SvxResId( RID_SVXSTR_NONE ) ); nOldSelect = m_xLbStartStyle->get_active(); m_xLbStartStyle->clear(); m_xLbStartStyle->append_text(sNone); @@ -291,7 +293,9 @@ void SvxLineTabPage::ActivatePage( const SfxItemSet& rSet ) *m_pnLineEndListState = ChangeType::NONE; nPos = m_xLbLineStyle->get_active(); - OUString sNone(SvxResId(RID_SVXSTR_NONE)); + OUString sNone( comphelper::LibreOfficeKit::isActive() ? SvxResId( RID_SVXSTR_INVISIBLE ) + : SvxResId( RID_SVXSTR_NONE ) ); + m_xLbStartStyle->clear(); m_xLbStartStyle->append_text(sNone); diff --git a/svx/source/tbxctrls/linectrl.cxx b/svx/source/tbxctrls/linectrl.cxx index d0b984a0002f..7b2ccc2bb242 100644 --- a/svx/source/tbxctrls/linectrl.cxx +++ b/svx/source/tbxctrls/linectrl.cxx @@ -48,6 +48,8 @@ #include #include +#include + using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::util; @@ -356,7 +358,9 @@ void SvxLineEndWindow::FillValueSet() // First entry: no line end. // An entry is temporarily added to get the UI bitmap basegfx::B2DPolyPolygon aNothing; - mpLineEndList->Insert(std::make_unique(aNothing, SvxResId(RID_SVXSTR_NONE))); + mpLineEndList->Insert(std::make_unique(aNothing, + comphelper::LibreOfficeKit::isActive() ? SvxResId(RID_SVXSTR_INVISIBLE) + : SvxResId(RID_SVXSTR_NONE))); const XLineEndEntry* pEntry = mpLineEndList->GetLineEnd(nCount); BitmapEx aBmp = mpLineEndList->GetUiBitmap( nCount ); OSL_ENSURE( !aBmp.IsEmpty(), "UI bitmap was not created" ); diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index c0398e5783d6..e49b73b5a1f6 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -119,6 +119,8 @@ #include #include +#include + #define MAX_MRU_FONTNAME_ENTRIES 5 // don't make more than 15 entries visible at once @@ -1964,7 +1966,8 @@ namespace NamedColor GetNoneColor() { - return std::make_pair(COL_NONE_COLOR, SvxResId(RID_SVXSTR_NONE)); + return std::make_pair(COL_NONE_COLOR, comphelper::LibreOfficeKit::isActive() ? SvxResId(RID_SVXSTR_INVISIBLE) + : SvxResId(RID_SVXSTR_NONE)); } } @@ -2604,7 +2607,8 @@ SvxLineWindow_Impl::SvxLineWindow_Impl(SvxFrameToolBoxControl* pControl, weld::W m_xLineStyleLb->SetStyle( WinBits(WB_FLATVALUESET | WB_ITEMBORDER | WB_3DLOOK | WB_NO_DIRECTSELECT | WB_TABSTOP) ); m_xLineStyleLb->SetSourceUnit( FieldUnit::TWIP ); - m_xLineStyleLb->SetNone( SvxResId(RID_SVXSTR_NONE) ); + m_xLineStyleLb->SetNone( comphelper::LibreOfficeKit::isActive() ? SvxResId(RID_SVXSTR_INVISIBLE) + :SvxResId(RID_SVXSTR_NONE) ); m_xLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( SvxBorderLineStyle::SOLID ), SvxBorderLineStyle::SOLID ); m_xLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( SvxBorderLineStyle::DOTTED ), SvxBorderLineStyle::DOTTED ); diff --git a/svx/source/xoutdev/xattr2.cxx b/svx/source/xoutdev/xattr2.cxx index 7528f9a61ca4..cd18bd4b8818 100644 --- a/svx/source/xoutdev/xattr2.cxx +++ b/svx/source/xoutdev/xattr2.cxx @@ -47,6 +47,8 @@ #include #include +#include + #include XLineTransparenceItem::XLineTransparenceItem(sal_uInt16 nLineTransparence) : @@ -107,7 +109,7 @@ bool XLineJointItem::GetPresentation( SfxItemPresentation /*ePres*/, MapUnit /*e { case css::drawing::LineJoint::LineJoint_MAKE_FIXED_SIZE: case css::drawing::LineJoint_NONE: - pId = RID_SVXSTR_NONE; + pId = comphelper::LibreOfficeKit::isActive() ? RID_SVXSTR_INVISIBLE : RID_SVXSTR_NONE; break; case css::drawing::LineJoint_MIDDLE: diff --git a/svx/source/xoutdev/xtabdash.cxx b/svx/source/xoutdev/xtabdash.cxx index 60a14965bc8d..896b3cbb496e 100644 --- a/svx/source/xoutdev/xtabdash.cxx +++ b/svx/source/xoutdev/xtabdash.cxx @@ -27,6 +27,8 @@ #include #include +#include + #include #include #include @@ -211,7 +213,8 @@ OUString const & XDashList::GetStringForUiNoLine() const { // formerly was RID_SVXSTR_INVISIBLE, but to make equal // everywhere, use RID_SVXSTR_NONE - const_cast< XDashList* >(this)->maStringNoLine = SvxResId(RID_SVXSTR_NONE); + const_cast< XDashList* >(this)->maStringNoLine = comphelper::LibreOfficeKit::isActive() ? SvxResId(RID_SVXSTR_INVISIBLE) : + SvxResId(RID_SVXSTR_NONE); } return maStringNoLine; -- 2.11.4.GIT