diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-06-11 20:56:30 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-07-21 08:20:50 +0100 |
commit | 00657aef09d854c74fb426a935a3e8b1fc390bb0 (patch) | |
tree | fd1a9bb264fe15dcc129498e62060ecd256b1ee7 /include/vcl/vclenum.hxx | |
parent | fa987cbb813cfd729fe490f2f1258b7c8d7fb174 (diff) |
migrate to boost::gettext
* all .ui files go from <interface> to <interface domain="MODULE"> e.g. vcl
* all .src files go away and the english source strings folded into the .hrc as NC_("context", "source string")
* ResMgr is dropped in favour of std::locale imbued by boost::locale::generator pointed at matching
MODULE .mo files
* UIConfig translations are folded into the module .mo, so e.g. UIConfig_cui
goes from l10n target to normal one, so the res/lang.zips of UI files go away
* translation via Translation::get(hrc-define-key, imbued-std::locale)
* python can now be translated with its inbuilt gettext support (we keep the name strings.hrc there
to keep finding the .hrc file uniform) so magic numbers can go away there
* java and starbasic components can be translated via the pre-existing css.resource.StringResourceWithLocation
mechanism
* en-US res files go away, their strings are now the .hrc keys in the source code
* remaining .res files are replaced by .mo files
* in .res/.ui-lang-zip files, the old scheme missing translations of strings
results in inserting the english original so something can be found, now the
standard fallback of using the english original from the source key is used, so
partial translations shrink dramatically in size
* extract .hrc strings with hrcex which backs onto
xgettext -C --add-comments --keyword=NC_:1c,2 --from-code=UTF-8 --no-wrap
* extract .ui strings with uiex which backs onto
xgettext --add-comments --no-wrap
* qtz for gettext translations is generated at runtime as ascii-ified crc32 of
content + "|" + msgid
* [API CHANGE] remove deprecated binary .res resouce loader related uno apis
com::sun::star::resource::OfficeResourceLoader
com::sun::star::resource::XResourceBundleLoader
com::sun::star::resource::XResourceBundle
when translating strings via uno apis
com.sun.star.resource.StringResourceWithLocation
can continue to be used
Change-Id: Ia2594a2672b7301d9c3421fdf31b6cfe7f3f8d0a
Diffstat (limited to 'include/vcl/vclenum.hxx')
-rw-r--r-- | include/vcl/vclenum.hxx | 114 |
1 files changed, 113 insertions, 1 deletions
diff --git a/include/vcl/vclenum.hxx b/include/vcl/vclenum.hxx index 10e97df02f3c..95e977c696dd 100644 --- a/include/vcl/vclenum.hxx +++ b/include/vcl/vclenum.hxx @@ -20,10 +20,122 @@ #ifndef INCLUDED_VCL_VCLENUM_HXX #define INCLUDED_VCL_VCLENUM_HXX -#include <rsc/rsc-vcl-shared-types.hxx> #include <sal/types.h> #include <tools/fontenum.hxx> +enum class TimeFieldFormat : sal_Int32 { F_NONE, F_SEC, F_SEC_CS }; + +enum class KeyFuncType : sal_Int32 { DONTKNOW, NEW, OPEN, SAVE, + SAVEAS, PRINT, CLOSE, QUIT, + CUT, COPY, PASTE, UNDO, + REDO, DELETE, REPEAT, FIND, + FINDBACKWARD, PROPERTIES, FRONT }; + +enum class MenuItemType { DONTKNOW, STRING, IMAGE, STRINGIMAGE, SEPARATOR }; + +enum class MenuItemBits : sal_Int16 +{ + NONE = 0x0000, + CHECKABLE = 0x0001, + RADIOCHECK = 0x0002, + AUTOCHECK = 0x0004, + ABOUT = 0x0008, + HELP = 0x0010, + POPUPSELECT = 0x0020, + // These have been said to be a preliminary (sic) solution since 2007 + NOSELECT = 0x0040, + ICON = 0x0080, + TEXT = 0x0100, +}; +namespace o3tl +{ + template<> struct typed_flags<MenuItemBits> : is_typed_flags<MenuItemBits, 0x1ff> {}; +} + +enum class ToolBoxItemBits +{ + NONE = 0x0000, + CHECKABLE = 0x0001, + RADIOCHECK = 0x0002, + AUTOCHECK = 0x0004, + LEFT = 0x0008, + AUTOSIZE = 0x0010, + DROPDOWN = 0x0020, + REPEAT = 0x0040, + DROPDOWNONLY = 0x00a0, // 0x0080 | DROPDOWN + TEXT_ONLY = 0x0100, + ICON_ONLY = 0x0200 +}; +namespace o3tl +{ + template<> struct typed_flags<ToolBoxItemBits> : is_typed_flags<ToolBoxItemBits, 0x3ff> {}; +} + +enum class ToolBoxItemType { DONTKNOW, BUTTON, SPACE, SEPARATOR, BREAK }; + +enum class ButtonType { SYMBOLONLY, TEXT, SYMBOLTEXT }; + +enum class SymbolType : sal_uInt16 +{ + DONTKNOW = 0, + IMAGE = 1, + ARROW_UP = 2, + ARROW_DOWN = 3, + ARROW_LEFT = 4, + ARROW_RIGHT = 5, + SPIN_UP = 6, + SPIN_DOWN = 7, + SPIN_LEFT = 8, + SPIN_RIGHT = 9, + FIRST = 10, + LAST = 11, + PREV = 12, + NEXT = 13, + PAGEUP = 14, + PAGEDOWN = 15, + PLAY = 16, + STOP = 19, + CLOSE = 25, + ROLLUP = 26, + ROLLDOWN = 27, + CHECKMARK = 28, + RADIOCHECKMARK = 29, + FLOAT = 31, + DOCK = 32, + HIDE = 33, + HELP = 34, + PLUS = 35, + MENU = SymbolType::SPIN_DOWN +}; + + +// Border styles for SetBorder() +enum class WindowBorderStyle : sal_Int16 +{ + NONE = 0x0000, + NORMAL = 0x0001, + MONO = 0x0002, + MENU = 0x0010, + NWF = 0x0020, + NOBORDER = 0x1000, + REMOVEBORDER = 0x2000 +}; +namespace o3tl +{ + template<> struct typed_flags<WindowBorderStyle> : is_typed_flags<WindowBorderStyle, 0x3033> {}; +} + +#define KEY_CODE_MASK ((sal_uInt16)0x0FFF) + +// Modifier keys +#define KEY_SHIFT ((sal_uInt16)0x1000) +#define KEY_MOD1 ((sal_uInt16)0x2000) +#define KEY_MOD2 ((sal_uInt16)0x4000) +#define KEY_MOD3 ((sal_uInt16)0x8000) +#define KEY_MODIFIERS_MASK ((sal_uInt16)0xF000) + + + enum class ExtTimeFieldFormat { Short24H, Long24H |