[PATCH] add EUR for Bulgaria/Lew
authorRene Engelhard <rene@rene-engelhard.de>
Sat, 9 Aug 2025 17:05:15 +0000 (19:05 +0200)
committerRene Engelhard <rene@debian.org>
Wed, 13 Aug 2025 20:27:02 +0000 (22:27 +0200)
Bulgaria will join Eurozone 2026-01-01 at which time around the default
needs to be switched

see https://www.ecb.europa.eu/press/pr/date/2025/html/ecb.pr250708~b9676a9fa8.de.html for the conversion rate

This is the < 26.2 version including the euro wizard (cf.
b1a2f727ca99ecd3402d4b051b99cbfd24266e59)

Change-Id: I840ddda4308549703c53f998812848888dd830f6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189279
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
Gbp-Pq: Name add-EUR-for-Bulgaria-Lew.diff

i18npool/source/localedata/data/bg_BG.xml
officecfg/registry/data/org/openoffice/Office/Calc.xcu
sc/source/core/tool/interpr2.cxx
wizards/source/euro/Init.xba
wizards/source/resources/resources_en_US.properties

index 55c63049089faaa046e9d02afe94f9efb3b5ca3d..ae295a38c7b9523d04db7a9df2e003b3d7144b59 100644 (file)
       <CurrencyName>BGL</CurrencyName>
       <DecimalPlaces>2</DecimalPlaces>
     </Currency>
+    <!-- TODO: switch defaults before 2026-01-01 -->
+    <Currency default="false" usedInCompatibleFormatCodes="false">
+      <CurrencyID>EUR</CurrencyID>
+      <CurrencySymbol>€</CurrencySymbol>
+      <BankSymbol>EUR</BankSymbol>
+      <CurrencyName>евро</CurrencyName>
+      <DecimalPlaces>2</DecimalPlaces>
+    </Currency>
   </LC_CURRENCY>
   <LC_TRANSLITERATION ref="en_US"/>
   <LC_MISC>
index eda60fe6c4340a1becced21942f7de88e89b7ac4..2b1e0e2bf5a328e0603aa9d243a9d30e73190fbc 100644 (file)
         <value>7.53450</value>
       </prop>
     </node>
+    <node oor:name="CR21" oor:op="replace">
+      <prop oor:name="FromUnit">
+        <value>EUR</value>
+      </prop>
+      <prop oor:name="ToUnit">
+        <value>BLN</value>
+      </prop>
+      <prop oor:name="Factor">
+        <value>1.95583</value>
+      </prop>
+    </node>
   </node>
   <node oor:name="Calculate">
     <node oor:name="Other">
index 81013d3ed0999b238b7bd93e01036be26b3998ba..19f54be5679248e74e46fb4487d58b39a907b7ad 100644 (file)
@@ -3312,7 +3312,8 @@ static bool lclConvertMoney( std::u16string_view aSearchUnit, double& rfRate, in
         { "EEK", 15.6466,  2 },
         { "LVL", 0.702804, 2 },
         { "LTL", 3.45280,  2 },
-        { "HRK", 7.53450,  2 }
+        { "HRK", 7.53450,  2 },
+        { "BLN", 1.95583,  2 }
     };
 
     for (const auto & i : aConvertTable)
index 9f56c503a347e24ecc801c5e979a7332d4252859..69a5d91ed02fda13655fe5b75b55deb8635b2d67 100644 (file)
@@ -90,6 +90,7 @@ Public sCurrESTONIAN as String
 Public sCurrLATVIAN as String
 Public sCurrLITHUANIAN as String
 Public sCurrCROATIAN as String
+Public sCurrBULGARIAN as String
 
 Public sPrgsRETRIEVAL as String
 Public sPrgsCONVERTING as String
@@ -216,6 +217,7 @@ Dim LocWorkPath as String
                sCurrLATVIAN = GetResText(&quot;CURRENCIES_17&quot;)
                sCurrLITHUANIAN = GetResText(&quot;CURRENCIES_18&quot;)
                sCurrCROATIAN = GetResText(&quot;CURRENCIES_19&quot;)
+               sCurrBULGARIAN = GetResText(&quot;CURRENCIES_20&quot;)
                .cmdCancel.Label =  sCANCEL
                .cmdHelp.Label =  sHELP
                .cmdBack.Label =  GetResText(&quot;STEP_ZERO_2&quot;)
@@ -400,6 +402,11 @@ Sub InitializeLanguages()
     LangIDValue(19,0,1) = &quot;HR&quot;
     LangIDValue(19,0,2) = &quot;-41A&quot;
 
+&apos; CURRENCIES_BULGARIAN
+    LangIDValue(20,0,0) = &quot;bg&quot;
+    LangIDValue(20,0,1) = &quot;BG&quot;
+    LangIDValue(20,0,2) = &quot;-402&quot;
+
 End Sub
 
 
@@ -588,6 +595,15 @@ Dim i as Integer
        CurrValue(19,4) = &quot;kn&quot;
        CurrValue(19,5) = &quot;HRK&quot;
 
+       CurrValue(20,0) = sCurrBULGARIAN
+       &apos; real conversion rate
+       CurrValue(20,1) = 1.95583
+       &apos; rounded conversion rate
+       CurrValue(20,2) = 2
+       CurrValue(20,3) = &quot;лв.&quot;
+       CurrValue(20,4) = &quot;лв.&quot;
+       CurrValue(20,5) = &quot;BLN&quot;
+
        i = -1
        CurrSymbolList(0) = &quot;&quot;
        CurrSymbolList(1) = &quot;&quot;
index d75cb03bdf05833d4ccb7a212fb38bc57376e44a..5ae6382ccafa2f38e752816bf57c8feebaee9571 100644 (file)
@@ -449,6 +449,7 @@ CURRENCIES_16=Estonian Kroon
 CURRENCIES_17=Latvian Lats
 CURRENCIES_18=Lithuanian Litas
 CURRENCIES_19=Croatian Kuna
+CURRENCIES_20=Bulgarian Lew
 STEP_LASTPAGE_0=Progress
 STEP_LASTPAGE_1=Retrieving the relevant documents...
 STEP_LASTPAGE_2=Converting the documents...