[Libreoffice-commits] .: Branch 'libreoffice-3-3-1' - patches/dev300

Katarina Machalkova bubli at kemper.freedesktop.org
Thu Mar 10 03:37:01 PST 2011


 patches/dev300/apply                                         |    6 
 patches/dev300/calc-negative-number-format-fix-2.diff        |   99 +++++++
 patches/dev300/calc-negative-number-format-fix.diff          |  138 +++++++++++
 patches/dev300/svx-fix-font-color-toolbar-inconsistency.diff |   13 +
 4 files changed, 256 insertions(+)

New commits:
commit 2536f47c65b4805ea88307f1ee86e282b8aff2ad
Author: Katarina Machalkova <kmachalkova at suse.cz>
Date:   Thu Mar 10 12:31:00 2011 +0100

    Patches with L3 fixes: bnc#652214, bnc#659993

diff --git a/patches/dev300/apply b/patches/dev300/apply
index afc6c9a..e22fd8e 100755
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -2353,6 +2353,12 @@ build-sled10-ixion-with-internal-boost.diff
 [ NovellHotFixes ]
 # occasional blank first slide in presentation
 sd-blank-first-slide.diff, fdo#34533, michael
+# '-N => (N)' number format for en_* locale 
+calc-negative-number-format-fix.diff, bnc#659993, bubli
+# handling of '-N => (N)' number format inside svl
+calc-negative-number-format-fix-2.diff, bnc#659993, bubli
+# font color toolbar not always appearing as a pop-up in Calc
+svx-fix-font-color-toolbar-inconsistency.diff, bnc#652214, bubli
 
 [ Fixes ]
 svx-ppt-bullet-offset-fix.diff, n#593609, rodo
diff --git a/patches/dev300/calc-negative-number-format-fix-2.diff b/patches/dev300/calc-negative-number-format-fix-2.diff
new file mode 100644
index 0000000..0f1466a
--- /dev/null
+++ b/patches/dev300/calc-negative-number-format-fix-2.diff
@@ -0,0 +1,99 @@
+diff --git svl/inc/svl/zformat.hxx svl/inc/svl/zformat.hxx
+index dd91ceb..779fcfe 100644
+--- svl/inc/svl/zformat.hxx
++++ svl/inc/svl/zformat.hxx
+@@ -334,6 +334,10 @@ public:
+     // Whether the negative format is without a sign or not
+     BOOL IsNegativeWithoutSign() const;
+ 
++    BOOL IsNegativeInBracket() const;
++
++    BOOL HasPositiveBracketPlaceholder() const;
++
+     // Whether a new SYMBOLTYPE_CURRENCY is contained in the format
+     BOOL HasNewCurrency() const;
+ 
+diff --git svl/source/numbers/zforlist.cxx svl/source/numbers/zforlist.cxx
+index 5e2031d..3125dc5 100644
+--- svl/source/numbers/zforlist.cxx
++++ svl/source/numbers/zforlist.cxx
+@@ -2744,6 +2744,10 @@ void SvNumberFormatter::GenerateFormat(String& sString,
+     utl::DigitGroupingIterator aGrouping( xLocaleData->getDigitGrouping());
+     const xub_StrLen nDigitsInFirstGroup = static_cast<xub_StrLen>(aGrouping.get());
+     const String& rThSep = GetNumThousandSep();
++
++    SvNumberformat* pFormat = (SvNumberformat*) aFTable.Get(nIndex);
++    BOOL insertBrackets = pFormat->IsNegativeInBracket();
++
+     if (nAnzLeading == 0)
+     {
+         if (!bThousand)
+@@ -2836,15 +2840,35 @@ void SvNumberFormatter::GenerateFormat(String& sString,
+             sString += ';';
+         sString += sNegStr;
+     }
+-    if (IsRed && eType != NUMBERFORMAT_CURRENCY)
++    if ( (IsRed || insertBrackets ) && eType != NUMBERFORMAT_CURRENCY)
+     {
+         String sTmpStr = sString;
++
++        if ( pFormat->HasPositiveBracketPlaceholder() )
++        {
++             sTmpStr += '_';
++             sTmpStr += ')';
++        }
+         sTmpStr += ';';
+-        sTmpStr += '[';
+-        sTmpStr += pFormatScanner->GetRedString();
+-        sTmpStr += ']';
+-        sTmpStr += '-';
+-        sTmpStr +=sString;
++
++        if (IsRed)
++        {
++            sTmpStr += '[';
++            sTmpStr += pFormatScanner->GetRedString();
++            sTmpStr += ']';
++        }
++
++        if (insertBrackets)
++        {
++            sTmpStr += '(';
++            sTmpStr += sString;
++            sTmpStr += ')';
++        }
++        else
++        {
++            sTmpStr += '-';
++            sTmpStr +=sString;
++        }
+         sString = sTmpStr;
+     }
+ }
+diff --git svl/source/numbers/zformat.cxx svl/source/numbers/zformat.cxx
+index 48a6dcf..39c5a0e 100644
+--- svl/source/numbers/zformat.cxx
++++ svl/source/numbers/zformat.cxx
+@@ -4114,6 +4114,22 @@ BOOL SvNumberformat::IsNegativeWithoutSign() const
+     return FALSE;
+ }
+ 
++BOOL SvNumberformat::IsNegativeInBracket() const
++{
++    USHORT nAnz = NumFor[1].GetCount();
++    if (!nAnz)
++         return FALSE;
++
++    String *tmpStr = NumFor[1].Info().sStrArray;
++    return (tmpStr[0] == '(' && tmpStr[nAnz-1] == ')' );
++}
++
++BOOL SvNumberformat::HasPositiveBracketPlaceholder() const
++{
++    USHORT nAnz = NumFor[0].GetCount();
++    String *tmpStr = NumFor[0].Info().sStrArray;
++    return (tmpStr[nAnz-1].EqualsAscii( "_)" ));
++}
+ 
+ DateFormat SvNumberformat::GetDateOrder() const
+ {
diff --git a/patches/dev300/calc-negative-number-format-fix.diff b/patches/dev300/calc-negative-number-format-fix.diff
new file mode 100644
index 0000000..35f1aa1
--- /dev/null
+++ b/patches/dev300/calc-negative-number-format-fix.diff
@@ -0,0 +1,138 @@
+diff --git i18npool/source/localedata/data/en_AU.xml i18npool/source/localedata/data/en_AU.xml
+index 6206988..806915e 100644
+--- i18npool/source/localedata/data/en_AU.xml
++++ i18npool/source/localedata/data/en_AU.xml
+@@ -53,6 +53,12 @@
+     <FormatElement msgid="FixedFormatskey6" default="false" type="medium" usage="FIXED_NUMBER" formatindex="5">
+       <FormatCode>#,###.00</FormatCode>
+     </FormatElement>
++    <FormatElement msgid="FixedFormatskey7" default="false" type="short" usage="FIXED_NUMBER" formatindex="70">
++      <FormatCode>#,##0_);(#,##0)</FormatCode>
++    </FormatElement>
++    <FormatElement msgid="FixedFormatskey8" default="false" type="medium" usage="FIXED_NUMBER" formatindex="71">
++      <FormatCode>#,##0.00_);(#,##0.00)</FormatCode>
++    </FormatElement>
+     <FormatElement msgid="ScientificFormatskey1" default="true" type="medium" usage="SCIENTIFIC_NUMBER" formatindex="6">
+       <FormatCode>0.00E+000</FormatCode>
+     </FormatElement>
+diff --git i18npool/source/localedata/data/en_CA.xml i18npool/source/localedata/data/en_CA.xml
+index 121de11..c654cf7 100644
+--- i18npool/source/localedata/data/en_CA.xml
++++ i18npool/source/localedata/data/en_CA.xml
+@@ -53,6 +53,12 @@
+     <FormatElement msgid="FixedFormatskey6" default="false" type="medium" usage="FIXED_NUMBER" formatindex="5">
+       <FormatCode>#,###.00</FormatCode>
+     </FormatElement>
++    <FormatElement msgid="FixedFormatskey7" default="false" type="short" usage="FIXED_NUMBER" formatindex="70">
++      <FormatCode>#,##0_);(#,##0)</FormatCode>
++    </FormatElement>
++    <FormatElement msgid="FixedFormatskey8" default="false" type="medium" usage="FIXED_NUMBER" formatindex="71">
++      <FormatCode>#,##0.00_);(#,##0.00)</FormatCode>
++    </FormatElement>
+     <FormatElement msgid="ScientificFormatskey1" default="true" type="medium" usage="SCIENTIFIC_NUMBER" formatindex="6">
+       <FormatCode>0.00E+000</FormatCode>
+     </FormatElement>
+diff --git i18npool/source/localedata/data/en_GB.xml i18npool/source/localedata/data/en_GB.xml
+index f920af8..326ac34 100644
+--- i18npool/source/localedata/data/en_GB.xml
++++ i18npool/source/localedata/data/en_GB.xml
+@@ -179,6 +179,14 @@
+ <FormatCode>#,###.00</FormatCode>
+ <DefaultName></DefaultName>
+ </FormatElement>
++ <FormatElement msgid="FixedFormatskey7" default="false" type="short" usage="FIXED_NUMBER" formatindex="70">
++ <FormatCode>#,##0_);(#,##0)</FormatCode>
++ <DefaultName></DefaultName>
++ </FormatElement>
++ <FormatElement msgid="FixedFormatskey8" default="false" type="medium" usage="FIXED_NUMBER" formatindex="71">
++ <FormatCode>#,##0.00_);(#,##0.00)</FormatCode>
++ <DefaultName></DefaultName>
++ </FormatElement>
+ <FormatElement msgid="CurrencyFormatskey1" default="true" type="short" usage="CURRENCY"  formatindex="12">
+ <FormatCode>[CURRENCY]#,##0;-[CURRENCY]#,##0</FormatCode>
+ <DefaultName></DefaultName>
+diff --git i18npool/source/localedata/data/en_GH.xml i18npool/source/localedata/data/en_GH.xml
+index 3743746..8f1f6ea 100644
+--- i18npool/source/localedata/data/en_GH.xml
++++ i18npool/source/localedata/data/en_GH.xml
+@@ -53,6 +53,12 @@
+     <FormatElement msgid="FixedFormatskey6" default="false" type="medium" usage="FIXED_NUMBER" formatindex="5">
+       <FormatCode>#,###.00</FormatCode>
+     </FormatElement>
++    <FormatElement msgid="FixedFormatskey7" default="false" type="short" usage="FIXED_NUMBER" formatindex="70">
++      <FormatCode>#,##0_);(#,##0)</FormatCode>
++    </FormatElement>
++    <FormatElement msgid="FixedFormatskey8" default="false" type="medium" usage="FIXED_NUMBER" formatindex="71">
++      <FormatCode>#,##0.00_);(#,##0.00)</FormatCode>
++    </FormatElement>
+     <FormatElement msgid="ScientificFormatskey1" default="true" type="medium" usage="SCIENTIFIC_NUMBER" formatindex="6">
+       <FormatCode>0.00E+00</FormatCode>
+     </FormatElement>
+diff --git i18npool/source/localedata/data/en_JM.xml i18npool/source/localedata/data/en_JM.xml
+index 186f8d4..780b20d 100644
+--- i18npool/source/localedata/data/en_JM.xml
++++ i18npool/source/localedata/data/en_JM.xml
+@@ -53,6 +53,12 @@
+     <FormatElement msgid="FixedFormatskey6" default="false" type="medium" usage="FIXED_NUMBER" formatindex="5">
+       <FormatCode>#,###.00</FormatCode>
+     </FormatElement>
++    <FormatElement msgid="FixedFormatskey7" default="false" type="short" usage="FIXED_NUMBER" formatindex="70">
++      <FormatCode>#,##0_);(#,##0)</FormatCode>
++    </FormatElement>
++    <FormatElement msgid="FixedFormatskey8" default="false" type="medium" usage="FIXED_NUMBER" formatindex="71">
++      <FormatCode>#,##0.00_);(#,##0.00)</FormatCode>
++    </FormatElement>
+     <FormatElement msgid="ScientificFormatskey1" default="true" type="medium" usage="SCIENTIFIC_NUMBER" formatindex="6">
+       <FormatCode>0.00E+000</FormatCode>
+     </FormatElement>
+diff --git i18npool/source/localedata/data/en_NA.xml i18npool/source/localedata/data/en_NA.xml
+index bec7059..255dcbf 100644
+--- i18npool/source/localedata/data/en_NA.xml
++++ i18npool/source/localedata/data/en_NA.xml
+@@ -53,6 +53,12 @@
+     <FormatElement msgid="FixedFormatskey6" default="false" type="medium" usage="FIXED_NUMBER" formatindex="5">
+       <FormatCode>#,###.00</FormatCode>
+     </FormatElement>
++    <FormatElement msgid="FixedFormatskey7" default="false" type="short" usage="FIXED_NUMBER" formatindex="70">
++      <FormatCode>#,##0_);(#,##0)</FormatCode>
++    </FormatElement>
++    <FormatElement msgid="FixedFormatskey8" default="false" type="medium" usage="FIXED_NUMBER" formatindex="71">
++      <FormatCode>#,##0.00_);(#,##0.00)</FormatCode>
++    </FormatElement>
+     <FormatElement msgid="ScientificFormatskey1" default="true" type="medium" usage="SCIENTIFIC_NUMBER" formatindex="6">
+       <FormatCode>0.00E+000</FormatCode>
+     </FormatElement>
+diff --git i18npool/source/localedata/data/en_US.xml i18npool/source/localedata/data/en_US.xml
+index 7029b7c..f6b771b 100644
+--- i18npool/source/localedata/data/en_US.xml
++++ i18npool/source/localedata/data/en_US.xml
+@@ -53,6 +53,12 @@
+     <FormatElement msgid="FixedFormatskey6" default="false" type="medium" usage="FIXED_NUMBER" formatindex="5">
+       <FormatCode>#,###.00</FormatCode>
+     </FormatElement>
++    <FormatElement msgid="FixedFormatskey7" default="false" type="short" usage="FIXED_NUMBER" formatindex="70">
++      <FormatCode>#,##0_);(#,##0)</FormatCode>
++    </FormatElement>
++    <FormatElement msgid="FixedFormatskey8" default="false" type="medium" usage="FIXED_NUMBER" formatindex="71">
++      <FormatCode>#,##0.00_);(#,##0.00)</FormatCode>
++    </FormatElement>
+     <FormatElement msgid="ScientificFormatskey1" default="true" type="medium" usage="SCIENTIFIC_NUMBER" formatindex="6">
+       <FormatCode>0.00E+000</FormatCode>
+     </FormatElement>
+diff --git i18npool/source/localedata/data/en_ZA.xml i18npool/source/localedata/data/en_ZA.xml
+index 4b3be48..c44810b 100644
+--- i18npool/source/localedata/data/en_ZA.xml
++++ i18npool/source/localedata/data/en_ZA.xml
+@@ -53,6 +53,12 @@
+     <FormatElement msgid="FixedFormatskey6" default="false" type="medium" usage="FIXED_NUMBER" formatindex="5">
+       <FormatCode>#,###.00</FormatCode>
+     </FormatElement>
++    <FormatElement msgid="FixedFormatskey7" default="false" type="short" usage="FIXED_NUMBER" formatindex="70">
++      <FormatCode>#,##0_);(#,##0)</FormatCode>
++    </FormatElement>
++    <FormatElement msgid="FixedFormatskey8" default="false" type="medium" usage="FIXED_NUMBER" formatindex="71">
++      <FormatCode>#,##0.00_);(#,##0.00)</FormatCode>
++    </FormatElement>
+     <FormatElement msgid="ScientificFormatskey1" default="true" type="medium" usage="SCIENTIFIC_NUMBER" formatindex="6">
+       <FormatCode>0.00E+000</FormatCode>
+     </FormatElement>
diff --git a/patches/dev300/svx-fix-font-color-toolbar-inconsistency.diff b/patches/dev300/svx-fix-font-color-toolbar-inconsistency.diff
new file mode 100644
index 0000000..f371a7c
--- /dev/null
+++ b/patches/dev300/svx-fix-font-color-toolbar-inconsistency.diff
@@ -0,0 +1,13 @@
+diff --git svx/source/tbxctrls/tbcontrl.cxx svx/source/tbxctrls/tbcontrl.cxx
+index fc53228..776fa4a 100644
+--- svx/source/tbxctrls/tbcontrl.cxx
++++ svx/source/tbxctrls/tbcontrl.cxx
+@@ -2335,7 +2335,7 @@ SvxFontColorToolBoxControl::SvxFontColorToolBoxControl(
+     pBtnUpdater( new ::svx::ToolboxButtonColorUpdater(
+                     nSlotId, nId, &GetToolBox(), TBX_UPDATER_MODE_CHAR_COLOR_NEW ))
+ {
+-    rTbx.SetItemBits( nId, TIB_DROPDOWN | rTbx.GetItemBits( nId ) );
++    rTbx.SetItemBits( nId, TIB_DROPDOWNONLY | rTbx.GetItemBits( nId ) );
+ }
+ 
+ // -----------------------------------------------------------------------


More information about the Libreoffice-commits mailing list