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

Maxim Monastirsky momonasmon at gmail.com
Sun Nov 9 02:24:47 PST 2014


 svx/source/sidebar/nbdtmg.cxx |   37 +++++--------------------------------
 1 file changed, 5 insertions(+), 32 deletions(-)

New commits:
commit 9a70e0a7f5e861065e63c3d30048a7d56abf1fed
Author: Maxim Monastirsky <momonasmon at gmail.com>
Date:   Sun Nov 9 12:18:25 2014 +0200

    Synchronize bullets lists
    
    The default bullets list is defined in two more places:
    svx/source/dialog/svxbmpnumvalueset.cxx
    cui/source/tabpages/numpages.cxx
    in both cases there is no separate RTL list. (And since we're
    using SvxNumValueSet also for the popup, we must sync it,
    so the shown bullet would be always the applied one.)
    
    There is lots of code similarity/duplication in this area
    (primarily introduced by the sidebar), and I hope to clean this
    at some point.
    
    Change-Id: Ifcc216101ed2f105a40fb483aa1b96a9e93d00e0

diff --git a/svx/source/sidebar/nbdtmg.cxx b/svx/source/sidebar/nbdtmg.cxx
index 0191f90..f77522c 100644
--- a/svx/source/sidebar/nbdtmg.cxx
+++ b/svx/source/sidebar/nbdtmg.cxx
@@ -92,18 +92,6 @@ static const sal_Unicode aDefaultBulletTypes[] =
     0x2714
 };
 
-static const sal_Unicode aDefaultRTLBulletTypes[] =
-{
-    0x2022,
-    0x25cf,
-    0xe00c,
-    0xe00a,
-    0x25c4,
-    0x272b,
-    0x2717,
-    0x2714
-};
-
 NumSettings_ImplPtr lcl_CreateNumberingSettingsPtr(const Sequence<PropertyValue>& rLevelProps)
 {
     const PropertyValue* pValues = rLevelProps.getConstArray();
@@ -285,27 +273,12 @@ void BulletsTypeMgr::Init()
 {
     vcl::Font& rActBulletFont = lcl_GetDefaultBulletFont();
 
-    if( Application::GetSettings().GetLayoutRTL() )
-    {
-        for (sal_uInt16 i=0;i<DEFAULT_BULLET_TYPES;i++)
-        {
-            pActualBullets[i] = new BulletsSettings_Impl(eNBType::BULLETS);
-            pActualBullets[i]->cBulletChar = aDefaultRTLBulletTypes[i];
-            pActualBullets[i]->aFont = rActBulletFont;
-            if (i==4 || i==5)
-                pActualBullets[i]->sDescription = SVX_RESSTR( RID_SVXSTR_BULLET_RTL_DESCRIPTION_4 - 4 + i );
-            else
-                pActualBullets[i]->sDescription = SVX_RESSTR( RID_SVXSTR_BULLET_DESCRIPTION_0 + i );
-        }
-    }else
+    for (sal_uInt16 i=0;i<DEFAULT_BULLET_TYPES;i++)
     {
-        for (sal_uInt16 i=0;i<DEFAULT_BULLET_TYPES;i++)
-        {
-            pActualBullets[i] = new BulletsSettings_Impl(eNBType::BULLETS);
-            pActualBullets[i]->cBulletChar = aDefaultBulletTypes[i];
-            pActualBullets[i]->aFont =rActBulletFont;
-            pActualBullets[i]->sDescription = SVX_RESSTR( RID_SVXSTR_BULLET_DESCRIPTION_0 + i );
-        }
+        pActualBullets[i] = new BulletsSettings_Impl(eNBType::BULLETS);
+        pActualBullets[i]->cBulletChar = aDefaultBulletTypes[i];
+        pActualBullets[i]->aFont =rActBulletFont;
+        pActualBullets[i]->sDescription = SVX_RESSTR( RID_SVXSTR_BULLET_DESCRIPTION_0 + i );
     }
 }
 sal_uInt16 BulletsTypeMgr::GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 mLevel,sal_uInt16 nFromIndex)


More information about the Libreoffice-commits mailing list