from __future__ import annotations
from typing import Any, Protocol, runtime_checkable
from com.sun.star.uno import XInterface

@runtime_checkable
class XNumberFormats(XInterface, Protocol):
    def getByKey(self, nKey: int) -> XPropertySet: ...
    def queryKeys(self, nType: int, nLocale: Locale, bCreate: bool) -> list[int]: ...
    def queryKey(self, aFormat: str, nLocale: Locale, bScan: bool) -> int: ...
    def removeByKey(self, nKey: int) -> None: ...
    def generateFormat(self, nBaseKey: int, nLocale: Locale, bThousands: bool, bRed: bool, nDecimals: int, nLeading: int) -> str: ...
