summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2016-12-13 18:44:34 +0100
committerEike Rathke <erack@redhat.com>2016-12-13 18:45:37 +0100
commitb845be872cd3fc6b4dc0e6175675a9b31ef7fc42 (patch)
treec0efed52356fffb3c42a2ba49f147850fca0a893 /svx
parent9dba49471f289f68853ee6a5a7301cdc2cdf78a8 (diff)
use RID_SVXSTRARY_PAGE_NUMBERING StringArray also in Writer
... and add the two missing extra strings from sw/source/ui/misc/numberingtypelistbox.src to svx/source/dialog/pagenumbering.src and filter them out for the page number dialog, so later we can get rid of yet a 3rd place where those strings are to be translated and maintained. Change-Id: If7d124692c752f341d4ea11a8914b099f711fa10
Diffstat (limited to 'svx')
-rw-r--r--svx/source/dialog/pagenumbering.src4
-rw-r--r--svx/source/dialog/pagenumberlistbox.cxx18
2 files changed, 18 insertions, 4 deletions
diff --git a/svx/source/dialog/pagenumbering.src b/svx/source/dialog/pagenumbering.src
index c3b8852904e0..2c3a001912a5 100644
--- a/svx/source/dialog/pagenumbering.src
+++ b/svx/source/dialog/pagenumbering.src
@@ -23,12 +23,14 @@ StringArray RID_SVXSTRARY_PAGE_NUMBERING
{
ItemList [ en-US ] =
{
+ < "None" ; 5/*SVX_NUM_NUMBER_NONE */; > ;
+ < "Bullet" ; 6/*SVX_NUM_CHAR_SPECIAL */; > ;
+ < "Graphics" ; 8/*SVX_NUM_BITMAP */; > ;
< "1, 2, 3, ..." ; 4/*SVX_NUM_ARABIC */; > ;
< "A, B, C, ..." ; 0/*SVX_NUM_CHARS_UPPER_LETTER */; > ;
< "a, b, c, ..." ; 1/*SVX_NUM_CHARS_LOWER_LETTER */; > ;
< "I, II, III, ..." ; 2/*SVX_NUM_ROMAN_UPPER */; > ;
< "i, ii, iii, ..." ; 3/*SVX_NUM_ROMAN_LOWER */; > ;
- < "None" ; 5/*SVX_NUM_NUMBER_NONE */; > ;
< "A, .., AA, .., AAA, ..." ; 9/*SVX_NUM_CHARS_UPPER_LETTER_N*/; > ;
< "a, .., aa, .., aaa, ..." ; 10/*SVX_NUM_CHARS_LOWER_LETTER_N*/; > ;
< "Native Numbering" ; 12 /*NATIVE_NUMBERING */; > ;
diff --git a/svx/source/dialog/pagenumberlistbox.cxx b/svx/source/dialog/pagenumberlistbox.cxx
index d02767afa4a6..94a95854f0cd 100644
--- a/svx/source/dialog/pagenumberlistbox.cxx
+++ b/svx/source/dialog/pagenumberlistbox.cxx
@@ -21,6 +21,7 @@
#include <svx/pagenumberlistbox.hxx>
#include <tools/resary.hxx>
#include <vcl/builderfactory.hxx>
+#include <com/sun/star/style/NumberingType.hpp>
PageNumberListBox::PageNumberListBox(vcl::Window* pParent)
: ListBox( pParent, WB_BORDER | WB_DROPDOWN)
@@ -30,10 +31,21 @@ PageNumberListBox::PageNumberListBox(vcl::Window* pParent)
for ( sal_uInt32 i = 0; i < nCnt; ++i )
{
- OUString aStr = aPaperAry.GetString(i);
sal_uInt16 nData = aPaperAry.GetValue(i);
- sal_Int32 nPos = InsertEntry( aStr );
- SetEntryData( nPos, reinterpret_cast<void*>((sal_uLong)nData) );
+ switch (nData)
+ {
+ // String list array is also used in Writer and contains strings
+ // for Bullet and Graphics, ignore those here.
+ case css::style::NumberingType::CHAR_SPECIAL:
+ case css::style::NumberingType::BITMAP:
+ break;
+ default:
+ {
+ OUString aStr = aPaperAry.GetString(i);
+ sal_Int32 nPos = InsertEntry( aStr );
+ SetEntryData( nPos, reinterpret_cast<void*>((sal_uLong)nData) );
+ }
+ }
}
SetDropDownLineCount(6);
}