Change to use document locale for integers
This commit is contained in:
@@ -223,14 +223,6 @@ class ToOdt(Tokenizer):
|
||||
# Setters
|
||||
##
|
||||
|
||||
def setLanguage(self, language: str | None) -> None:
|
||||
"""Set language for the document."""
|
||||
if language:
|
||||
lang, _, country = language.partition("_")
|
||||
self._dLanguage = lang or self._dLanguage
|
||||
self._dCountry = country or self._dCountry
|
||||
return
|
||||
|
||||
def setPageLayout(
|
||||
self, width: float, height: float, top: float, bottom: float, left: float, right: float
|
||||
) -> None:
|
||||
@@ -264,6 +256,10 @@ class ToOdt(Tokenizer):
|
||||
fontWeight = str(intWeight)
|
||||
fontBold = str(min(intWeight + 300, 900))
|
||||
|
||||
lang, _, country = self._dLocale.name().partition("_")
|
||||
self._dLanguage = lang or self._dLanguage
|
||||
self._dCountry = country or self._dCountry
|
||||
|
||||
self._fontFamily = self._textFont.family()
|
||||
self._fontSize = self._textFont.pointSize()
|
||||
self._fontWeight = FONT_WEIGHT_MAP.get(fontWeight, fontWeight)
|
||||
|
||||
Reference in New Issue
Block a user