Bugzilla – Attachment 63508 Details for
Bug 42558
FORMATTING: Missing Arabic Abjad numerals for page numbers
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
new Page Numbering
0001-the-Page-Numbering.patch (text/plain), 8.01 KB, created by
Faisal Menawer
on 2012-06-27 03:32:46 UTC
(
hide
)
Description:
new Page Numbering
Filename:
MIME Type:
Creator:
Faisal Menawer
Created:
2012-06-27 03:32:46 UTC
Size:
8.01 KB
patch
obsolete
>From ee97a4dd2fd88b7e1c81b3ee0e3148f67aa63a4c Mon Sep 17 00:00:00 2001 >From: "Faisal M. Al-Otaibi" <fmalotaibi@kacst.edu.sa> >Date: Mon, 25 Jun 2012 09:27:16 +0300 >Subject: [PATCH] the Page Numbering > >Change-Id: I3f62337d5824d59692af3e044141e5597d7e7d33 >--- > cui/source/tabpages/page.cxx | 78 ++++++++++++++++++++++++++++++++++++++--- > cui/source/tabpages/page.src | 28 ++++++++++++--- > 2 files changed, 94 insertions(+), 12 deletions(-) > >diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx >index b30d45d..7e3babd 100644 >--- a/cui/source/tabpages/page.cxx >+++ b/cui/source/tabpages/page.cxx >@@ -26,6 +26,10 @@ > * > ************************************************************************/ > >+#include <com/sun/star/style/NumberingType.hpp> >+#include <com/sun/star/text/XDefaultNumberingProvider.hpp> >+#include <com/sun/star/text/XNumberingTypeInfo.hpp> >+//------------------------------------------------------ > #include <sfx2/app.hxx> > #include <sfx2/objsh.hxx> > #include <tools/resary.hxx> >@@ -69,6 +73,12 @@ > #include <svl/aeitem.hxx> > #include <sfx2/request.hxx> > >+//Namespaces-------------------------------------------------------------- >+using namespace com::sun::star::uno; >+using namespace com::sun::star::text; >+using namespace com::sun::star::style; >+using rtl::OUString; >+ > // static ---------------------------------------------------------------- > > static const long MINBODY = 284; // 0,5 cm rounded up in twips >@@ -85,7 +95,6 @@ static sal_uInt16 pRanges[] = > SID_SWREGISTER_MODE, > 0 > }; >- > // ------- Mapping page layout ------------------------------------------ > > sal_uInt16 aArr[] = >@@ -361,6 +370,58 @@ SvxPageDescPage::SvxPageDescPage( Window* pParent, const SfxItemSet& rAttr ) : > > aPortraitBtn.SetAccessibleRelationMemberOf(&aOrientationFT); > aLandscapeBtn.SetAccessibleRelationMemberOf(&aOrientationFT); >+ >+// Get the CTL/Asian Language Numbering and added to list box >+ Reference<XDefaultNumberingProvider> lcl_GetNumberingProvider(); >+ Reference<XDefaultNumberingProvider> xDefNum = lcl_GetNumberingProvider(); >+ Reference<XNumberingTypeInfo> xInfo(xDefNum, UNO_QUERY); >+ sal_Int16 nPos; >+ const sal_uInt16 nDontRemove = 0xffff; >+ std::vector< sal_uInt16> aRemove( aNumberFormatBox.GetEntryCount(), nDontRemove); >+ for (size_t i=0; i<aRemove.size(); ++i) >+ { >+ sal_uInt16 nEntryData = (sal_uInt16)(sal_uLong)aNumberFormatBox.GetEntryData( >+ sal::static_int_cast< sal_uInt16 >(i)); >+ if (nEntryData > NumberingType::CHARS_LOWER_LETTER_N) >+ aRemove[i] = nEntryData; >+ } >+ if(xInfo.is()) >+ { >+ Sequence<sal_Int16> aTypes = xInfo->getSupportedNumberingTypes( ); >+ const sal_Int16* pTypes = aTypes.getConstArray(); >+ for(sal_Int32 nType = 0; nType < aTypes.getLength(); nType++) >+ { >+ sal_Int16 nCurrent = pTypes[nType]; >+ if(nCurrent > NumberingType::CHARS_LOWER_LETTER_N) >+ { >+ sal_Bool bInsert = sal_True; >+ for(sal_uInt16 nEntry = 0; nEntry < aNumberFormatBox.GetEntryCount(); nEntry++) >+ { >+ sal_uInt16 nEntryData = (sal_uInt16)(sal_uLong)aNumberFormatBox.GetEntryData(nEntry); >+ if(nEntryData == (sal_uInt16) nCurrent) >+ { >+ bInsert = sal_False; >+ aRemove[nEntry] = nDontRemove; >+ break; >+ } >+ } >+ if(bInsert) >+ { >+ OUString aIdent = xInfo->getNumberingIdentifier( nCurrent ); >+ nPos = aNumberFormatBox.InsertEntry(aIdent); >+ aNumberFormatBox.SetEntryData(nPos,(void*)(sal_uLong)nCurrent); >+ } >+ } >+ } >+ } >+ for (size_t i=0; i<aRemove.size(); ++i) >+ { >+ if (aRemove[i] != nDontRemove) >+ { >+ nPos = aNumberFormatBox.GetEntryPos( (void*)(sal_uLong)aRemove[i]); >+ aNumberFormatBox.RemoveEntry( nPos); >+ } >+ } > } > > // ----------------------------------------------------------------------- >@@ -468,8 +529,13 @@ void SvxPageDescPage::Reset( const SfxItemSet& rSet ) > aBspWin.SetUsage( nUse ); > LayoutHdl_Impl( 0 ); > >- // adjust numeration type of the page style >- aNumberFormatBox.SelectEntryPos( sal::static_int_cast< sal_uInt16 >(eNumType) ); >+ //adjust numeration type of the page style >+ //Get the Position of the saved NumType >+ for(int i=0; i<aNumberFormatBox.GetEntryCount(); i++) >+ if(eNumType == (sal_uInt16)(sal_uLong)aNumberFormatBox.GetEntryData(i)){ >+ aNumberFormatBox.SelectEntryPos( i ); >+ break; >+ } > > aPaperTrayBox.Clear(); > sal_uInt8 nPaperBin = PAPERBIN_PRINTER_SETTINGS; >@@ -804,12 +870,12 @@ sal_Bool SvxPageDescPage::FillItemSet( SfxItemSet& rSet ) > bMod |= sal_True; > } > >- >+ //Get the NumType value > nPos = aNumberFormatBox.GetSelectEntryPos(); >- >+ sal_uInt16 nEntryData = (sal_uInt16)(sal_uLong)aNumberFormatBox.GetEntryData(nPos); > if ( nPos != aNumberFormatBox.GetSavedValue() ) > { >- aPage.SetNumType( (SvxNumType)nPos ); >+ aPage.SetNumType( (SvxNumType)nEntryData ); > bMod |= sal_True; > } > >diff --git a/cui/source/tabpages/page.src b/cui/source/tabpages/page.src >index 367c98a..c1613af 100644 >--- a/cui/source/tabpages/page.src >+++ b/cui/source/tabpages/page.src >@@ -306,12 +306,28 @@ TabPage RID_SVXPAGE_PAGE > DropDown = TRUE ; > StringList [ en-US ] = > { >- < "A, B, C, ..." ; Default ; > ; >- < "a, b, c, ..." ; Default ; > ; >- < "I, II, III, ..." ; Default ; > ; >- < "i, ii, iii, ..." ; Default ; > ; >- < "1, 2, 3, ..." ; Default ; > ; >- < "None" ; Default ; > ; >+ < "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 */; > ; >+ < "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 */; > ; >+ < "Ð, Ð, .., Ðа, Ðб, ... (Bulgarian)" ; 38 /*CHARS_CYRILLIC_UPPER_LETTER_BG */; > ; >+ < "а, б, .., аа, аб, ... (Bulgarian)" ; 39 /*CHARS_CYRILLIC_LOWER_LETTER_BG */; > ; >+ < "Ð, Ð, .., Ðа, Ðб, ... (Bulgarian)" ; 40 /*CHARS_CYRILLIC_UPPER_LETTER_N_BG */; > ; >+ < "а, б, .., аа, бб, ... (Bulgarian)" ; 41 /*CHARS_CYRILLIC_LOWER_LETTER_N_BG */; > ; >+ < "Ð, Ð, .., Ðа, Ðб, ... (Russian)" ; 42 /*CHARS_CYRILLIC_UPPER_LETTER_RU */; > ; >+ < "а, б, .., аа, аб, ... (Russian)" ; 43 /*CHARS_CYRILLIC_LOWER_LETTER_RU */; > ; >+ < "Ð, Ð, .., Ðа, Ðб, ... (Russian)" ; 44 /*CHARS_CYRILLIC_UPPER_LETTER_N_RU */; > ; >+ < "а, б, .., аа, бб, ... (Russian)" ; 45 /*CHARS_CYRILLIC_LOWER_LETTER_N_RU */; > ; >+ < "Ð, Ð, .., Ðа, Ðб, ... (Serbian)" ; 48 /*CHARS_CYRILLIC_UPPER_LETTER_SR */; > ; >+ < "а, б, .., аа, аб, ... (Serbian)" ; 49 /*CHARS_CYRILLIC_LOWER_LETTER_SR */; > ; >+ < "Ð, Ð, .., Ðа, Ðб, ... (Serbian)" ; 50 /*CHARS_CYRILLIC_UPPER_LETTER_N_SR */; > ; >+ < "а, б, .., аа, бб, ... (Serbian)" ; 51 /*CHARS_CYRILLIC_LOWER_LETTER_N_SR */; > ; >+ < "Î, Î, Î, ... (Greek Upper Letter)"; 52 /*CHARS_GREEK_UPPER_LETTER */; > ; >+ < "α, β, γ, ... (Greek Lower Letter)"; 53 /*CHARS_GREEK_LOWER_LETTER */; > ; > }; > }; > FixedText FT_TBL_ALIGN >-- >1.7.7.6 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 42558
:
62955
| 63508 |
70051