Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip paper name detection for Android #59

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

knyipab
Copy link

@knyipab knyipab commented Sep 20, 2024

Android's bionic (langinfo.h) never define or provide _NL_PAPER_WIDTH and _NL_PAPER_HEIGHT at all, so there is no such thing nl_langinfo(_NL_PAPER_WIDTH). Libreoffice's paper.cxx basically skip that part of locale paper size detection with && !defined(ANDROID). See:
https://github.com/LibreOffice/core/blob/7db1150b2c4a9adb993084d2dceedb450781b1dc/i18nutil/source/utility/paper.cxx#L308-L317

Note; libreoffice's ANDROID is probably configured by their makefile and will not work for your project libpaper, so I patch that to !defined(__ANDROID__) and it is a correct one (https://android.googlesource.com/platform/bionic/+/HEAD/docs/defines.md)

It is recognized by Termux devs (resembling a linux distro on Android) at termux/termux-packages#21510

@rrthomas
Copy link
Owner

Thanks for the report. I'd rather use feature detection than simply make this Android-specific. I've pushed a fix to master; please could you test it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants