[Libreoffice-commits] core.git: cui/source svx/source

Henry Castro (via logerrit) logerrit at kemper.freedesktop.org
Thu Mar 5 12:06:00 UTC 2020


 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(-)

New commits:
commit f75734ee0fa3ba75258a6e78846a7f5096502a99
Author:     Henry Castro <hcastro at collabora.com>
AuthorDate: Mon Feb 24 13:34:03 2020 -0400
Commit:     Henry Castro <hcastro at collabora.com>
CommitDate: Thu Mar 5 13:05:28 2020 +0100

    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 <hcastro at collabora.com>

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 <svx/strings.hrc>
 #include <cuitabarea.hxx>
 #include <svtools/unitconv.hxx>
+#include <comphelper/lok.hxx>
 
 #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 <svx/unoapi.hxx>
 #include <memory>
 
+#include <comphelper/lok.hxx>
+
 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<XLineEndEntry>(aNothing, SvxResId(RID_SVXSTR_NONE)));
+    mpLineEndList->Insert(std::make_unique<XLineEndEntry>(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 <unotools/collatorwrapper.hxx>
 #include <boost/property_tree/ptree.hpp>
 
+#include <comphelper/lok.hxx>
+
 #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 <vcl/svapp.hxx>
 #include <vcl/settings.hxx>
 
+#include <comphelper/lok.hxx>
+
 #include <libxml/xmlwriter.h>
 
 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 <svx/dialmgr.hxx>
 #include <svx/xtable.hxx>
 
+#include <comphelper/lok.hxx>
+
 #include <drawinglayer/attribute/lineattribute.hxx>
 #include <drawinglayer/attribute/strokeattribute.hxx>
 #include <drawinglayer/primitive2d/polygonprimitive2d.hxx>
@@ -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;


More information about the Libreoffice-commits mailing list