summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2021-11-02 18:14:48 +0200
committerTor Lillqvist <tml@collabora.com>2021-11-02 19:15:08 +0100
commitae6f7eecfc62442584473034853539706b03f7af (patch)
tree567a8a759ec3762050cadd52e8ffcdf5521c2206 /vcl
parentde9f8683234ea2187f650210b7c3e66818778e9f (diff)
Add comments to two arrays mentioning that they must match the enum Paper
At least I think they must. Also add a comment to the enum pointing at those arrays. There are now four different places in four files that must be manually kept in sync. Quite possibly more. This stinks. Change-Id: I7b5c721329c69a16b8cdf07390d481ec77c7b5ae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124610 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/inc/print.hrc3
-rw-r--r--vcl/source/gdi/print.cxx1
2 files changed, 4 insertions, 0 deletions
diff --git a/vcl/inc/print.hrc b/vcl/inc/print.hrc
index b654a77ec3b8..7e19c4c75004 100644
--- a/vcl/inc/print.hrc
+++ b/vcl/inc/print.hrc
@@ -27,6 +27,9 @@
const TranslateId RID_STR_PAPERNAMES[] =
{
// To translators: This is the first entry of a sequence of paper size names
+
+ // This array must (probably) match exactly the enum Paper in <i18nutil/paper.hxx>
+
NC_("RID_STR_PAPERNAMES", "A0"),
NC_("RID_STR_PAPERNAMES", "A1"),
NC_("RID_STR_PAPERNAMES", "A2"),
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index 1b7e4210e691..e728edf1dca3 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -1387,6 +1387,7 @@ OUString Printer::GetPaperName( Paper ePaper )
ImplSVData* pSVData = ImplGetSVData();
if( pSVData->maPaperNames.empty() )
{
+ // This array must (probably) match exactly the enum Paper in <i18nutil/paper.hxx>
static const int PaperIndex[] =
{
PAPER_A0, PAPER_A1, PAPER_A2, PAPER_A3, PAPER_A4, PAPER_A5, PAPER_B4_ISO, PAPER_B5_ISO,