summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2016-12-13 23:57:55 +0100
committerEike Rathke <erack@redhat.com>2016-12-13 23:58:00 +0100
commitb8ae49a315923eecf11b1186924fbccdae78fe78 (patch)
tree2451ca03b6ea37aa035989cffc175f4ae9b4cf03 /cui
parent5965a4ae5eacb874102af6c4ebdb5147e1544ef6 (diff)
load numbering types strings from RID_SVXSTRARY_NUMBERINGTYPE
... instead of numberingoptionspage.ui So now we have one central place where those are defined and translated. Change-Id: If5edac4e3e3f1cac64015b2a73ab59abffce8ecf
Diffstat (limited to 'cui')
-rw-r--r--cui/source/tabpages/numpages.cxx10
-rw-r--r--cui/uiconfig/ui/numberingoptionspage.ui123
2 files changed, 10 insertions, 123 deletions
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index 343470b6ec64..790d4a2571fa 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -62,6 +62,7 @@
#include <com/sun/star/text/XNumberingTypeInfo.hpp>
#include <svx/dialmgr.hxx>
#include <svx/dialogs.hrc>
+#include <tools/resary.hxx>
#include <algorithm>
#include <vector>
@@ -1172,6 +1173,15 @@ SvxNumOptionsTabPage::SvxNumOptionsTabPage(vcl::Window* pParent,
eCoreUnit = rSet.GetPool()->GetMetric(rSet.GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE));
+ // Fill ListBox with predefined / translated numbering types.
+ ResStringArray aNames( SVX_RES( RID_SVXSTRARY_NUMBERINGTYPE ));
+ sal_uInt32 nCount = aNames.Count();
+ for (sal_uInt32 i = 0; i < nCount; ++i)
+ {
+ sal_Int32 nPos = m_pFmtLB->InsertEntry( aNames.GetString(i));
+ m_pFmtLB->SetEntryData( nPos, reinterpret_cast<void*>(static_cast<sal_uIntPtr>(aNames.GetValue(i))));
+ }
+
// Get advanced numbering types from the component.
// Watch out for the ugly
// 136 == 0x88 == SVX_NUM_BITMAP|0x80 == SVX_NUM_BITMAP|LINK_TOKEN
diff --git a/cui/uiconfig/ui/numberingoptionspage.ui b/cui/uiconfig/ui/numberingoptionspage.ui
index 6ad166f31fbc..ae7266071b41 100644
--- a/cui/uiconfig/ui/numberingoptionspage.ui
+++ b/cui/uiconfig/ui/numberingoptionspage.ui
@@ -48,128 +48,6 @@
</object>
</child>
</object>
- <object class="GtkListStore" id="liststore1">
- <columns>
- <!-- column-name gchararray1 -->
- <column type="gchararray"/>
- <!-- column-name gint1 -->
- <column type="gint"/>
- </columns>
- <data>
- <row>
- <col id="0" translatable="yes">None</col>
- <col id="1">5</col>
- </row>
- <row>
- <col id="0" translatable="yes">Bullet</col>
- <col id="1">6</col>
- </row>
- <row>
- <col id="0" translatable="yes">Graphics</col>
- <col id="1">8</col>
- </row>
- <row>
- <col id="0" translatable="yes">Linked graphics</col>
- <col id="1">136</col>
- </row>
- <row>
- <col id="0" translatable="yes">1, 2, 3, ...</col>
- <col id="1">4</col>
- </row>
- <row>
- <col id="0" translatable="yes">A, B, C, ...</col>
- <col id="1">0</col>
- </row>
- <row>
- <col id="0" translatable="yes">a, b, c, ...</col>
- <col id="1">1</col>
- </row>
- <row>
- <col id="0" translatable="yes">I, II, III, ...</col>
- <col id="1">2</col>
- </row>
- <row>
- <col id="0" translatable="yes">i, ii, iii, ...</col>
- <col id="1">3</col>
- </row>
- <row>
- <col id="0" translatable="yes">A, .., AA, .., AAA, ...</col>
- <col id="1">9</col>
- </row>
- <row>
- <col id="0" translatable="yes">a, .., aa, .., aaa, ...</col>
- <col id="1">10</col>
- </row>
- <row>
- <col id="0" translatable="yes">Native Numbering</col>
- <col id="1">12</col>
- </row>
- <row>
- <col id="0" translatable="yes">А, Б, .., Аа, Аб, ... (Bulgarian)</col>
- <col id="1">38</col>
- </row>
- <row>
- <col id="0" translatable="yes">а, б, .., аа, аб, ... (Bulgarian)</col>
- <col id="1">39</col>
- </row>
- <row>
- <col id="0" translatable="yes">А, Б, .., Аа, Бб, ... (Bulgarian)</col>
- <col id="1">40</col>
- </row>
- <row>
- <col id="0" translatable="yes">а, б, .., аа, бб, ... (Bulgarian)</col>
- <col id="1">41</col>
- </row>
- <row>
- <col id="0" translatable="yes">А, Б, .., Аа, Аб, ... (Russian)</col>
- <col id="1">42</col>
- </row>
- <row>
- <col id="0" translatable="yes">а, б, .., аа, аб, ... (Russian)</col>
- <col id="1">43</col>
- </row>
- <row>
- <col id="0" translatable="yes">А, Б, .., Аа, Бб, ... (Russian)</col>
- <col id="1">44</col>
- </row>
- <row>
- <col id="0" translatable="yes">а, б, .., аа, бб, ... (Russian)</col>
- <col id="1">45</col>
- </row>
- <row>
- <col id="0" translatable="yes">А, Б, .., Аа, Аб, ... (Serbian)</col>
- <col id="1">48</col>
- </row>
- <row>
- <col id="0" translatable="yes">а, б, .., аа, аб, ... (Serbian)</col>
- <col id="1">49</col>
- </row>
- <row>
- <col id="0" translatable="yes">А, Б, .., Аа, Бб, ... (Serbian)</col>
- <col id="1">50</col>
- </row>
- <row>
- <col id="0" translatable="yes">а, б, .., аа, бб, ... (Serbian)</col>
- <col id="1">51</col>
- </row>
- <row>
- <col id="0" translatable="yes">Α, Β, Γ, ... (Greek Upper Letter)</col>
- <col id="1">52</col>
- </row>
- <row>
- <col id="0" translatable="yes">α, β, γ, ... (Greek Lower Letter)</col>
- <col id="1">53</col>
- </row>
- <row>
- <col id="0" translatable="yes">א...י, יא...כ, ...</col>
- <col id="1">56</col>
- </row>
- <row>
- <col id="0" translatable="yes">א...ת, אא...תת, ...</col>
- <col id="1">33</col>
- </row>
- </data>
- </object>
<object class="GtkBox" id="NumberingOptionsPage">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -341,7 +219,6 @@
<object class="GtkComboBox" id="numfmtlb">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="model">liststore1</property>
</object>
<packing>
<property name="left_attach">1</property>