summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
Diffstat (limited to 'vcl')
-rw-r--r--vcl/AllLangMoTarget_vcl.mk11
-rw-r--r--vcl/AllLangResTarget_vcl.mk47
-rw-r--r--vcl/Library_vcl.mk3
-rw-r--r--vcl/Module_vcl.mk4
-rw-r--r--vcl/inc/pch/precompiled_vcl.hxx2
-rw-r--r--vcl/inc/print.hrc70
-rw-r--r--vcl/inc/printaccessoryview.hrc (renamed from vcl/source/src/menu.src)36
-rw-r--r--vcl/inc/strings.hrc143
-rw-r--r--vcl/inc/strings.hxx17
-rw-r--r--vcl/inc/svdata.hxx8
-rw-r--r--vcl/inc/svids.hrc140
-rw-r--r--vcl/inc/units.hrc58
-rw-r--r--vcl/osx/printaccessoryview.mm21
-rw-r--r--vcl/osx/salmenu.cxx186
-rw-r--r--vcl/osx/salsys.cxx2
-rw-r--r--vcl/qa/cppunit/builder/demo.ui2
-rw-r--r--vcl/source/app/stdtext.cxx5
-rw-r--r--vcl/source/app/svapp.cxx14
-rw-r--r--vcl/source/app/svdata.cxx53
-rw-r--r--vcl/source/app/svmain.cxx8
-rw-r--r--vcl/source/bitmap/BitmapTools.cxx1
-rw-r--r--vcl/source/control/button.cxx60
-rw-r--r--vcl/source/control/edit.cxx10
-rw-r--r--vcl/source/control/field.cxx2
-rw-r--r--vcl/source/control/imgctrl.cxx1
-rw-r--r--vcl/source/control/spinbtn.cxx1
-rw-r--r--vcl/source/control/tabctrl.cxx2
-rw-r--r--vcl/source/edit/textundo.cxx14
-rw-r--r--vcl/source/edit/textundo.hrc31
-rw-r--r--vcl/source/edit/textundo.src43
-rw-r--r--vcl/source/edit/vclmedit.cxx2
-rw-r--r--vcl/source/gdi/bitmapex.cxx1
-rw-r--r--vcl/source/gdi/print.cxx34
-rw-r--r--vcl/source/gdi/print3.cxx2
-rw-r--r--vcl/source/outdev/font.cxx14
-rw-r--r--vcl/source/src/app.src42
-rw-r--r--vcl/source/src/btntext.src194
-rw-r--r--vcl/source/src/fpicker.src117
-rw-r--r--vcl/source/src/helptext.src75
-rw-r--r--vcl/source/src/print.src113
-rw-r--r--vcl/source/src/stdtext.src82
-rw-r--r--vcl/source/src/units.src53
-rw-r--r--vcl/source/window/brdwin.cxx20
-rw-r--r--vcl/source/window/builder.cxx242
-rw-r--r--vcl/source/window/layout.cxx2
-rw-r--r--vcl/source/window/menu.cxx24
-rw-r--r--vcl/source/window/menubarwindow.cxx35
-rw-r--r--vcl/source/window/menuitemlist.hxx2
-rw-r--r--vcl/source/window/msgbox.cxx34
-rw-r--r--vcl/source/window/printdlg.cxx5
-rw-r--r--vcl/source/window/scrwnd.cxx2
-rw-r--r--vcl/source/window/splitwin.cxx18
-rw-r--r--vcl/source/window/taskpanelist.cxx2
-rw-r--r--vcl/uiconfig/ui/cupspassworddialog.ui10
-rw-r--r--vcl/uiconfig/ui/editmenu.ui16
-rw-r--r--vcl/uiconfig/ui/errornocontentdialog.ui8
-rw-r--r--vcl/uiconfig/ui/errornoprinterdialog.ui8
-rw-r--r--vcl/uiconfig/ui/printdialog.ui132
-rw-r--r--vcl/uiconfig/ui/printerdevicepage.ui34
-rw-r--r--vcl/uiconfig/ui/printerpaperpage.ui14
-rw-r--r--vcl/uiconfig/ui/printerpropertiesdialog.ui8
-rw-r--r--vcl/uiconfig/ui/printprogressdialog.ui6
-rw-r--r--vcl/uiconfig/ui/querydialog.ui4
-rw-r--r--vcl/unx/generic/print/genprnpsp.cxx2
-rw-r--r--vcl/unx/generic/print/prtsetup.cxx2
-rw-r--r--vcl/unx/generic/window/salframe.cxx2
-rw-r--r--vcl/unx/gtk/fpicker/resourceprovider.cxx23
-rw-r--r--vcl/unx/gtk/gtksalframe.cxx16
-rw-r--r--vcl/unx/gtk/gtksalmenu.cxx2
-rw-r--r--vcl/unx/gtk3/gtk3gtkframe.cxx16
-rw-r--r--vcl/unx/kde4/KDE4FilePicker.cxx20
-rw-r--r--vcl/unx/kde4/KDE4FilePicker.hxx2
-rw-r--r--vcl/win/window/keynames.cxx2
73 files changed, 787 insertions, 1650 deletions
diff --git a/vcl/AllLangMoTarget_vcl.mk b/vcl/AllLangMoTarget_vcl.mk
new file mode 100644
index 000000000000..784cbe5cff39
--- /dev/null
+++ b/vcl/AllLangMoTarget_vcl.mk
@@ -0,0 +1,11 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+$(eval $(call gb_AllLangMoTarget_AllLangMoTarget,vcl))
+
+# vim: set noet sw=4 ts=4:
diff --git a/vcl/AllLangResTarget_vcl.mk b/vcl/AllLangResTarget_vcl.mk
deleted file mode 100644
index b12b29c9b1a5..000000000000
--- a/vcl/AllLangResTarget_vcl.mk
+++ /dev/null
@@ -1,47 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-# This file incorporates work covered by the following license notice:
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed
-# with this work for additional information regarding copyright
-# ownership. The ASF licenses this file to you under the Apache
-# License, Version 2.0 (the "License"); you may not use this file
-# except in compliance with the License. You may obtain a copy of
-# the License at http://www.apache.org/licenses/LICENSE-2.0 .
-#
-
-$(eval $(call gb_AllLangResTarget_AllLangResTarget,vcl))
-
-$(eval $(call gb_AllLangResTarget_set_reslocation,vcl,vcl))
-
-$(eval $(call gb_AllLangResTarget_add_srs,vcl,\
- vcl/source/src \
-))
-
-$(eval $(call gb_SrsTarget_SrsTarget,vcl/source/src))
-
-$(eval $(call gb_SrsTarget_set_include,vcl/source/src,\
- $$(INCLUDE) \
- -I$(SRCDIR)/vcl/inc \
-))
-
-$(eval $(call gb_SrsTarget_add_files,vcl/source/src,\
- vcl/source/src/app.src \
- vcl/source/src/btntext.src \
- vcl/source/src/helptext.src \
- vcl/source/src/menu.src \
- vcl/source/src/print.src \
- vcl/source/src/stdtext.src \
- vcl/source/src/units.src \
- vcl/source/src/fpicker.src \
- vcl/source/edit/textundo.src \
-))
-
-# vim: set noet sw=4 ts=4:
diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index 4ce2c5aab41b..6b40a48d8783 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -721,9 +721,6 @@ $(eval $(call gb_Library_use_system_win32_libs,vcl,\
$(eval $(call gb_Library_add_nativeres,vcl,vcl/salsrc))
endif
-# Runtime dependency for unit-tests
-$(eval $(call gb_Library_use_restarget,vcl,vcl))
-
ifeq ($(OS),WNT)
# HACK: dependency on icon themes so running unit tests don't
# prevent delivering these by having open file handles on WNT
diff --git a/vcl/Module_vcl.mk b/vcl/Module_vcl.mk
index eb5681278951..218cae68efc1 100644
--- a/vcl/Module_vcl.mk
+++ b/vcl/Module_vcl.mk
@@ -22,6 +22,7 @@ $(eval $(call gb_Module_Module,vcl))
$(eval $(call gb_Module_add_targets,vcl,\
Library_vcl \
Package_opengl \
+ UIConfig_vcl \
$(if $(filter WNT,$(OS)), \
Package_opengl_blacklist ) \
$(if $(filter DESKTOP,$(BUILD_TYPE)), \
@@ -51,8 +52,7 @@ $(eval $(call gb_Module_add_targets,vcl,\
endif
$(eval $(call gb_Module_add_l10n_targets,vcl,\
- AllLangResTarget_vcl \
- UIConfig_vcl \
+ AllLangMoTarget_vcl \
))
ifeq ($(USING_X11),TRUE)
diff --git a/vcl/inc/pch/precompiled_vcl.hxx b/vcl/inc/pch/precompiled_vcl.hxx
index f51afc873b91..e70c049faf0a 100644
--- a/vcl/inc/pch/precompiled_vcl.hxx
+++ b/vcl/inc/pch/precompiled_vcl.hxx
@@ -266,7 +266,6 @@
#include <opengl/texture.hxx>
#include <opengl/zone.hxx>
#include <outdata.hxx>
-#include <rsc/rsc-vcl-shared-types.hxx>
#include <svdata.hxx>
#include <svl/hint.hxx>
#include <svl/svldllapi.h>
@@ -282,7 +281,6 @@
#include <tools/link.hxx>
#include <tools/mapunit.hxx>
#include <tools/poly.hxx>
-#include <tools/resid.hxx>
#include <tools/solar.h>
#include <tools/stream.hxx>
#include <tools/time.hxx>
diff --git a/vcl/inc/print.hrc b/vcl/inc/print.hrc
new file mode 100644
index 000000000000..b1b3d47c7be3
--- /dev/null
+++ b/vcl/inc/print.hrc
@@ -0,0 +1,70 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_VCL_INC_PRINT_HRC
+#define INCLUDED_VCL_INC_PRINT_HRC
+
+#define NC_(Context, String) (Context "\004" u8##String)
+
+const char* RID_STR_PAPERNAMES[] =
+{
+ // To translators: This is the first entry of a sequence of paper size names
+ NC_("RID_STR_PAPERNAMES", "A0"),
+ NC_("RID_STR_PAPERNAMES", "A1"),
+ NC_("RID_STR_PAPERNAMES", "A2"),
+ NC_("RID_STR_PAPERNAMES", "A3"),
+ NC_("RID_STR_PAPERNAMES", "A4"),
+ NC_("RID_STR_PAPERNAMES", "A5"),
+ NC_("RID_STR_PAPERNAMES", "B4 (ISO)"),
+ NC_("RID_STR_PAPERNAMES", "B5 (ISO)"),
+ NC_("RID_STR_PAPERNAMES", "Letter"),
+ NC_("RID_STR_PAPERNAMES", "Legal"),
+ NC_("RID_STR_PAPERNAMES", "Tabloid"),
+ NC_("RID_STR_PAPERNAMES", "User Defined"),
+ NC_("RID_STR_PAPERNAMES", "B6 (ISO)"),
+ NC_("RID_STR_PAPERNAMES", "C4 Envelope"),
+ NC_("RID_STR_PAPERNAMES", "C5 Envelope"),
+ NC_("RID_STR_PAPERNAMES", "C6 Envelope"),
+ NC_("RID_STR_PAPERNAMES", "C6/5 Envelope"),
+ NC_("RID_STR_PAPERNAMES", "DL Envelope"),
+ NC_("RID_STR_PAPERNAMES", "Dia Slide"),
+ NC_("RID_STR_PAPERNAMES", "C"),
+ NC_("RID_STR_PAPERNAMES", "D"),
+ NC_("RID_STR_PAPERNAMES", "E"),
+ NC_("RID_STR_PAPERNAMES", "Executive"),
+ NC_("RID_STR_PAPERNAMES", "Long Bond"),
+ NC_("RID_STR_PAPERNAMES", "#8 (Monarch) Envelope"),
+ NC_("RID_STR_PAPERNAMES", "#6 3/4 (Personal) Envelope"),
+ NC_("RID_STR_PAPERNAMES", "#9 Envelope"),
+ NC_("RID_STR_PAPERNAMES", "#10 Envelope"),
+ NC_("RID_STR_PAPERNAMES", "#11 Envelope"),
+ NC_("RID_STR_PAPERNAMES", "#12 Envelope"),
+ NC_("RID_STR_PAPERNAMES", "16 Kai"),
+ NC_("RID_STR_PAPERNAMES", "32 Kai"),
+ NC_("RID_STR_PAPERNAMES", "Big 32 Kai"),
+ NC_("RID_STR_PAPERNAMES", "B4 (JIS)"),
+ NC_("RID_STR_PAPERNAMES", "B5 (JIS)"),
+ NC_("RID_STR_PAPERNAMES", "B6 (JIS)"),
+ // To translators: This is the last entry of the sequence of paper size names
+ NC_("RID_STR_PAPERNAMES", "Japanese Postcard")
+};
+
+#endif // INCLUDED_VCL_INC_PRINT_HRC
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/src/menu.src b/vcl/inc/printaccessoryview.hrc
index dd97a69590ed..e47ac03eb5cc 100644
--- a/vcl/source/src/menu.src
+++ b/vcl/inc/printaccessoryview.hrc
@@ -17,36 +17,20 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <svids.hrc>
+#ifndef INCLUDED_VCL_INC_PRINTACCESSORYVIEW_HRC
+#define INCLUDED_VCL_INC_PRINTACCESSORYVIEW_HRC
-String SV_RESID_STRING_NOSELECTIONPOSSIBLE
-{
- Text [ en-US ] = "<No selection possible>";
-};
+#define NC_(Context, String) (Context "\004" u8##String)
-String SV_MENU_MAC_SERVICES
+const char* SV_PRINT_NATIVE_STRINGS[] =
{
- Text [ en-US ] = "Services";
+ NC_("SV_PRINT_NATIVE_STRINGS", "Preview"),
+ NC_("SV_PRINT_NATIVE_STRINGS", "Page number"),
+ NC_("SV_PRINT_NATIVE_STRINGS", "Number of pages"),
+ NC_("SV_PRINT_NATIVE_STRINGS", "More"),
+ NC_("SV_PRINT_NATIVE_STRINGS", "Print selection only")
};
-String SV_MENU_MAC_HIDEAPP
-{
- Text [ en-US ] = "Hide %PRODUCTNAME";
-};
-
-String SV_MENU_MAC_HIDEALL
-{
- Text [ en-US ] = "Hide Others";
-};
-
-String SV_MENU_MAC_SHOWALL
-{
- Text [ en-US ] = "Show All";
-};
-
-String SV_MENU_MAC_QUITAPP
-{
- Text [ en-US ] = "Quit %PRODUCTNAME";
-};
+#endif // INCLUDED_VCL_INC_PRINTACCESSORYVIEW_HRC
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/strings.hrc b/vcl/inc/strings.hrc
new file mode 100644
index 000000000000..cd2f31c1da13
--- /dev/null
+++ b/vcl/inc/strings.hrc
@@ -0,0 +1,143 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_VCL_INC_STRINGS_HRC
+#define INCLUDED_VCL_INC_STRINGS_HRC
+
+#define NC_(Context, String) (Context "\004" u8##String)
+
+#define SV_RESID_STRING_NOSELECTIONPOSSIBLE NC_("SV_RESID_STRING_NOSELECTIONPOSSIBLE", "<No selection possible>")
+
+#define SV_MENU_MAC_SERVICES NC_("SV_MENU_MAC_SERVICES", "Services")
+#define SV_MENU_MAC_HIDEAPP NC_("SV_MENU_MAC_HIDEAPP", "Hide %PRODUCTNAME")
+#define SV_MENU_MAC_HIDEALL NC_("SV_MENU_MAC_HIDEALL", "Hide Others")
+#define SV_MENU_MAC_SHOWALL NC_("SV_MENU_MAC_SHOWALL", "Show All")
+#define SV_MENU_MAC_QUITAPP NC_("SV_MENU_MAC_QUITAPP", "Quit %PRODUCTNAME")
+
+#define SV_HELPTEXT_CLOSE NC_("SV_HELPTEXT_CLOSE", "Close")
+#define SV_HELPTEXT_MINIMIZE NC_("SV_HELPTEXT_MINIMIZE", "Minimize")
+#define SV_HELPTEXT_MAXIMIZE NC_("SV_HELPTEXT_MAXIMIZE", "Maximize")
+#define SV_HELPTEXT_RESTORE NC_("SV_HELPTEXT_RESTORE", "Restore")
+#define SV_HELPTEXT_ROLLDOWN NC_("SV_HELPTEXT_ROLLDOWN", "Drop down")
+#define SV_HELPTEXT_ROLLUP NC_("SV_HELPTEXT_ROLLUP", "Roll up")
+#define SV_HELPTEXT_HELP NC_("SV_HELPTEXT_HELP", "Help")
+#define SV_HELPTEXT_SCREENSHOT NC_("SV_HELPTEXT_SCREENSHOT", "Take and annotate a screenshot")
+#define SV_HELPTEXT_FADEIN NC_("SV_HELPTEXT_FADEIN", "Show")
+#define SV_HELPTEXT_FADEOUT NC_("SV_HELPTEXT_FADEOUT", "Hide")
+#define SV_HELPTEXT_CLOSEDOCUMENT NC_("SV_HELPTEXT_CLOSEDOCUMENT", "Close Document")
+
+// To translators: This is used on buttons for platforms other than windows, there should be a ~ mnemonic in this string
+#define SV_BUTTONTEXT_OK NC_("SV_BUTTONTEXT_OK", "~OK")
+// To translators: This is used on buttons for platforms other than windows, there should be a ~ mnemonic in this string
+#define SV_BUTTONTEXT_CANCEL NC_("SV_BUTTONTEXT_CANCEL", "~Cancel")
+// To translators: This is used on buttons for Windows, there should be no ~ mnemonic in this string
+#define SV_BUTTONTEXT_OK_NOMNEMONIC NC_("SV_BUTTONTEXT_OK_NOMNEMONIC", "OK")
+// To translators: This is used on buttons for Windows, there should be no ~ mnemonic in this string
+#define SV_BUTTONTEXT_CANCEL_NOMNEMONIC NC_("SV_BUTTONTEXT_CANCEL_NOMNEMONIC", "Cancel")
+#define SV_BUTTONTEXT_YES NC_("SV_BUTTONTEXT_YES", "~Yes")
+#define SV_BUTTONTEXT_NO NC_("SV_BUTTONTEXT_NO", "~No")
+#define SV_BUTTONTEXT_RETRY NC_("SV_BUTTONTEXT_RETRY", "~Retry")
+#define SV_BUTTONTEXT_HELP NC_("SV_BUTTONTEXT_HELP", "~Help")
+#define SV_BUTTONTEXT_CLOSE NC_("SV_BUTTONTEXT_CLOSE", "~Close")
+#define SV_BUTTONTEXT_MORE NC_("SV_BUTTONTEXT_MORE", "~More")
+#define SV_BUTTONTEXT_IGNORE NC_("SV_BUTTONTEXT_IGNORE", "~Ignore")
+#define SV_BUTTONTEXT_ABORT NC_("SV_BUTTONTEXT_ABORT", "~Abort")
+#define SV_BUTTONTEXT_LESS NC_("SV_BUTTONTEXT_LESS", "~Less")
+#define SV_BUTTONTEXT_RESET NC_("SV_BUTTONTEXT_RESET", "R~eset")
+#define SV_BUTTONTEXT_ADD NC_("SV_BUTTONTEXT_ADD", "~Add")
+#define SV_BUTTONTEXT_DELETE NC_("SV_BUTTONTEXT_DELETE", "~Delete")
+#define SV_BUTTONTEXT_REMOVE NC_("SV_BUTTONTEXT_REMOVE", "~Remove")
+#define SV_BUTTONTEXT_NEW NC_("SV_BUTTONTEXT_NEW", "~New")
+#define SV_BUTTONTEXT_EDIT NC_("SV_BUTTONTEXT_EDIT", "~Edit")
+#define SV_BUTTONTEXT_APPLY NC_("SV_BUTTONTEXT_APPLY", "~Apply")
+#define SV_BUTTONTEXT_SAVE NC_("SV_BUTTONTEXT_SAVE", "~Save")
+#define SV_BUTTONTEXT_UNDO NC_("SV_BUTTONTEXT_UNDO", "~Undo")
+#define SV_BUTTONTEXT_PASTE NC_("SV_BUTTONTEXT_PASTE", "~Paste")
+#define SV_BUTTONTEXT_NEXT NC_("SV_BUTTONTEXT_NEXT", "~Next")
+#define SV_BUTTONTEXT_GO_UP NC_("SV_BUTTONTEXT_GO_UP", "~Up")
+#define SV_BUTTONTEXT_GO_DOWN NC_("SV_BUTTONTEXT_GO_DOWN", "Do~wn")
+#define SV_BUTTONTEXT_CLEAR NC_("SV_BUTTONTEXT_CLEAR", "~Clear")
+#define SV_BUTTONTEXT_OPEN NC_("SV_BUTTONTEXT_OPEN", "~Open")
+#define SV_BUTTONTEXT_PLAY NC_("SV_BUTTONTEXT_PLAY", "~Play")
+#define SV_BUTTONTEXT_FIND NC_("SV_BUTTONTEXT_FIND", "~Find")
+#define SV_BUTTONTEXT_STOP NC_("SV_BUTTONTEXT_STOP", "~Stop")
+#define SV_BUTTONTEXT_CONNECT NC_("SV_BUTTONTEXT_CONNECT", "C~onnect")
+#define SV_BUTTONTEXT_SCREENSHOT NC_("SV_BUTTONTEXT_SCREENSHOT", "~Screenshot")
+
+#define SV_STDTEXT_SERVICENOTAVAILABLE NC_("SV_STDTEXT_SERVICENOTAVAILABLE", "The component (%s) could not be loaded.\nPlease start setup with the repair option.")
+
+#define SV_STDTEXT_DONTASKAGAIN NC_("SV_STDTEXT_DONTASKAGAIN", "Do not show this question again.")
+#define SV_STDTEXT_DONTWARNAGAIN NC_("SV_STDTEXT_DONTWARNAGAIN", "Do not show warning again.")
+
+#define SV_STDTEXT_ABOUT NC_("SV_STDTEXT_ABOUT", "About %PRODUCTNAME")
+#define SV_STDTEXT_PREFERENCES NC_("SV_STDTEXT_PREFERENCES", "Preferences...")
+#define SV_STDTEXT_ALLFILETYPES NC_("SV_STDTEXT_ALLFILETYPES", "Any type")
+
+#define STR_FPICKER_AUTO_EXTENSION NC_("STR_FPICKER_AUTO_EXTENSION", "~Automatic file name extension")
+#define STR_FPICKER_PASSWORD NC_("STR_FPICKER_PASSWORD", "Save with pass~word")
+#define STR_FPICKER_FILTER_OPTIONS NC_("STR_FPICKER_FILTER_OPTIONS", "~Edit filter settings")
+#define STR_FPICKER_READONLY NC_("STR_FPICKER_READONLY", "~Read-only")
+#define STR_FPICKER_INSERT_AS_LINK NC_("STR_FPICKER_INSERT_AS_LINK", "Insert as ~Link")
+#define STR_FPICKER_SHOW_PREVIEW NC_("STR_FPICKER_SHOW_PREVIEW", "Pr~eview")
+#define STR_FPICKER_PLAY NC_("STR_FPICKER_PLAY", "~Play")
+#define STR_FPICKER_VERSION NC_("STR_FPICKER_VERSION", "~Version:")
+#define STR_FPICKER_TEMPLATES NC_("STR_FPICKER_TEMPLATES", "S~tyles:")
+#define STR_FPICKER_IMAGE_TEMPLATE NC_("STR_FPICKER_IMAGE_TEMPLATE", "Frame Style: ")
+#define STR_FPICKER_SELECTION NC_("STR_FPICKER_SELECTION", "~Selection")
+#define STR_FPICKER_FOLDER_DEFAULT_TITLE NC_("STR_FPICKER_FOLDER_DEFAULT_TITLE", "Select Path")
+#define STR_FPICKER_FOLDER_DEFAULT_DESCRIPTION NC_("STR_FPICKER_FOLDER_DEFAULT_DESCRIPTION", "Please select a folder.")
+#define STR_FPICKER_ALREADYEXISTOVERWRITE_PRIMARY NC_("STR_FPICKER_ALREADYEXISTOVERWRITE_PRIMARY", "A file named \"$filename$\" already exists. Do you want to replace it?")
+#define STR_FPICKER_ALREADYEXISTOVERWRITE_SECONDARY NC_("STR_FPICKER_ALREADYEXISTOVERWRITE_SECONDARY", "The file already exists in \"$dirname$\". Replacing it will overwrite its contents.")
+#define STR_FPICKER_ALLFORMATS NC_("STR_FPICKER_ALLFORMATS", "All Formats")
+#define STR_FPICKER_OPEN NC_("STR_FPICKER_OPEN", "Open")
+#define STR_FPICKER_SAVE NC_("STR_FPICKER_SAVE", "Save")
+#define STR_FPICKER_TYPE NC_("STR_FPICKER_TYPE", "File ~type")
+
+#define SV_ACCESSERROR_NO_FONTS NC_("SV_ACCESSERROR_NO_FONTS", "No fonts could be found on the system.")
+
+#define SV_PRINT_NOPAGES NC_("SV_PRINT_NOPAGES", "No pages")
+#define SV_PRINT_TOFILE_TXT NC_("SV_PRINT_TOFILE_TXT", "Print to File...")
+#define SV_PRINT_DEFPRT_TXT NC_("SV_PRINT_DEFPRT_TXT", "Default printer")
+#define SV_PRINT_PRINTPREVIEW_TXT NC_("SV_PRINT_PRINTPREVIEW_TXT", "Print preview")
+#define SV_PRINT_QUERYFAXNUMBER_TXT NC_("SV_PRINT_QUERYFAXNUMBER_TXT", "Please enter the fax number")
+#define SV_PRINT_INVALID_TXT NC_("SV_PRINT_INVALID_TXT", "<ignore>")
+#define SV_PRINT_CUSTOM_TXT NC_("SV_PRINT_CUSTOM_TXT", "Custom")
+
+#define SV_EDIT_WARNING_STR NC_("SV_EDIT_WARNING_STR", "The inserted text exceeded the maximum length of this text field. The text was truncated.")
+
+#define SV_APP_CPUTHREADS NC_("SV_APP_CPUTHREADS", "CPU threads: ")
+#define SV_APP_OSVERSION NC_("SV_APP_OSVERSION", "OS: ")
+#define SV_APP_UIRENDER NC_("SV_APP_UIRENDER", "UI render: ")
+#define SV_APP_GL NC_("SV_APP_GL", "GL")
+#define SV_APP_DEFAULT NC_("SV_APP_DEFAULT", "default")
+
+#define SV_MSGBOX_INFO NC_("SV_MSGBOX_INFO", "Information")
+#define SV_MSGBOX_WARNING NC_("SV_MSGBOX_WARNING", "Warning")
+#define SV_MSGBOX_ERROR NC_("SV_MSGBOX_ERROR", "Error")
+#define SV_MSGBOX_QUERY NC_("SV_MSGBOX_QUERY", "Confirmation")
+
+#define STR_TEXTUNDO_DELPARA NC_("STR_TEXTUNDO_DELPARA", "delete line")
+#define STR_TEXTUNDO_CONNECTPARAS NC_("STR_TEXTUNDO_CONNECTPARAS", "delete multiple lines")
+#define STR_TEXTUNDO_SPLITPARA NC_("STR_TEXTUNDO_SPLITPARA", "insert multiple lines")
+#define STR_TEXTUNDO_INSERTCHARS NC_("STR_TEXTUNDO_INSERTCHARS", "insert '$1'")
+#define STR_TEXTUNDO_REMOVECHARS NC_("STR_TEXTUNDO_REMOVECHARS", "delete '$1'")
+
+#endif // INCLUDED_VCL_INC_STRINGS_HRC
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/strings.hxx b/vcl/inc/strings.hxx
new file mode 100644
index 000000000000..45e9b2af4310
--- /dev/null
+++ b/vcl/inc/strings.hxx
@@ -0,0 +1,17 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_VCL_INC_STRINGS_HXX
+#define INCLUDED_VCL_INC_STRINGS_HXX
+
+#define SV_APP_VCLBACKEND "VCL: "
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx
index 8c07cf9ffff1..3501d2c25d45 100644
--- a/vcl/inc/svdata.hxx
+++ b/vcl/inc/svdata.hxx
@@ -48,7 +48,6 @@ struct ImplHotKey;
struct ImplEventHook;
struct ImplSchedulerData;
class Point;
-class ResMgr;
class ImplAccelManager;
class PhysicalFontCollection;
class ImplFontCache;
@@ -337,7 +336,8 @@ struct ImplSVData
bool mbDeInit = false; // Is VCL deinitializing
SalI18NImeStatus* mpImeStatus = nullptr; // interface to ime status window
SalSystem* mpSalSystem = nullptr; // SalSystem interface
- ResMgr* mpResMgr = nullptr; // SV-Resource-Manager
+ bool mbResLocaleSet = false; // SV-Resource-Manager
+ std::locale maResLocale; // Resource locale
ImplSchedulerContext maSchedCtx; // indepen data for class Scheduler
ImplSVAppData maAppData; // indepen data for class Application
ImplSVGDIData maGDIData; // indepen data for Output classes
@@ -364,8 +364,8 @@ struct ImplSVData
void ImplDeInitSVData();
VCL_PLUGIN_PUBLIC vcl::Window* ImplGetDefaultWindow();
VCL_PLUGIN_PUBLIC vcl::Window* ImplGetDefaultContextWindow();
-VCL_PLUGIN_PUBLIC ResMgr* ImplGetResMgr();
-VCL_PLUGIN_PUBLIC ResId VclResId( sal_Int32 nId ); // throws std::bad_alloc if no res mgr
+VCL_PLUGIN_PUBLIC const std::locale& ImplGetResLocale();
+VCL_PLUGIN_PUBLIC OUString VclResId(const char* pId);
DockingManager* ImplGetDockingManager();
BlendFrameCache* ImplGetBlendFrameCache();
diff --git a/vcl/inc/svids.hrc b/vcl/inc/svids.hrc
deleted file mode 100644
index b4d4cca62529..000000000000
--- a/vcl/inc/svids.hrc
+++ /dev/null
@@ -1,140 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef INCLUDED_VCL_INC_SVIDS_HRC
-#define INCLUDED_VCL_INC_SVIDS_HRC
-
-#define RID_STR_PAPERNAMES 1080
-
-#define SV_RESID_STRING_NOSELECTIONPOSSIBLE 2001
-
-#define SV_MENU_MAC_SERVICES 2002
-#define SV_MENU_MAC_HIDEAPP 2003
-#define SV_MENU_MAC_HIDEALL 2004
-#define SV_MENU_MAC_SHOWALL 2005
-#define SV_MENU_MAC_QUITAPP 2006
-
-#define SV_PRINT_PRT_NUP_ORIENTATION_PORTRAIT 1
-#define SV_PRINT_PRT_NUP_ORIENTATION_LANDSCAPE 2
-
-#define SV_PRINT_NATIVE_STRINGS 2050
-
-#define SV_HELPTEXT_CLOSE 10000
-#define SV_HELPTEXT_MINIMIZE 10001
-#define SV_HELPTEXT_MAXIMIZE 10002
-#define SV_HELPTEXT_RESTORE 10003
-#define SV_HELPTEXT_ROLLDOWN 10004
-#define SV_HELPTEXT_ROLLUP 10005
-#define SV_HELPTEXT_HELP 10006
-#define SV_HELPTEXT_SCREENSHOT 10007
-#define SV_HELPTEXT_FADEIN 10008
-#define SV_HELPTEXT_FADEOUT 10009
-#define SV_HELPTEXT_CLOSEDOCUMENT 10012
-
-#define SV_BUTTONTEXT_OK 10100
-#define SV_BUTTONTEXT_CANCEL 10101
-#define SV_BUTTONTEXT_YES 10102
-#define SV_BUTTONTEXT_NO 10103
-#define SV_BUTTONTEXT_RETRY 10104
-#define SV_BUTTONTEXT_HELP 10105
-#define SV_BUTTONTEXT_CLOSE 10106
-#define SV_BUTTONTEXT_MORE 10107
-#define SV_BUTTONTEXT_IGNORE 10108
-#define SV_BUTTONTEXT_ABORT 10109
-#define SV_BUTTONTEXT_LESS 10110
-#define SV_BUTTONTEXT_RESET 10111
-#define SV_BUTTONTEXT_ADD 10112
-#define SV_BUTTONTEXT_DELETE 10113
-#define SV_BUTTONTEXT_REMOVE 10114
-#define SV_BUTTONTEXT_NEW 10115
-#define SV_BUTTONTEXT_EDIT 10116
-#define SV_BUTTONTEXT_APPLY 10117
-#define SV_BUTTONTEXT_SAVE 10118
-#define SV_BUTTONTEXT_OK_NOMNEMONIC 10119
-#define SV_BUTTONTEXT_CANCEL_NOMNEMONIC 10120
-#define SV_BUTTONTEXT_UNDO 10121
-#define SV_BUTTONTEXT_PASTE 10122
-#define SV_BUTTONTEXT_NEXT 10123
-#define SV_BUTTONTEXT_GO_UP 10124
-#define SV_BUTTONTEXT_GO_DOWN 10125
-#define SV_BUTTONTEXT_CLEAR 10126
-#define SV_BUTTONTEXT_OPEN 10127
-#define SV_BUTTONTEXT_PLAY 10128
-#define SV_BUTTONTEXT_FIND 10129
-#define SV_BUTTONTEXT_STOP 10130
-#define SV_BUTTONTEXT_CONNECT 10131
-#define SV_BUTTONTEXT_SCREENSHOT 10132
-
-#define SV_STDTEXT_SERVICENOTAVAILABLE 10210
-
-#define SV_STDTEXT_DONTASKAGAIN 10212
-#define SV_STDTEXT_DONTWARNAGAIN 10213
-#define SV_STDTEXT_ABOUT 10214
-#define SV_STDTEXT_PREFERENCES 10215
-#define SV_STDTEXT_ALLFILETYPES 10217
-
-#define STR_FPICKER_AUTO_EXTENSION 10300
-#define STR_FPICKER_PASSWORD 10301
-#define STR_FPICKER_FILTER_OPTIONS 10302
-#define STR_FPICKER_READONLY 10303
-#define STR_FPICKER_INSERT_AS_LINK 10304
-#define STR_FPICKER_SHOW_PREVIEW 10305
-#define STR_FPICKER_PLAY 10306
-#define STR_FPICKER_VERSION 10307
-#define STR_FPICKER_TEMPLATES 10308
-#define STR_FPICKER_IMAGE_TEMPLATE 10309
-#define STR_FPICKER_SELECTION 10310
-#define STR_FPICKER_FOLDER_DEFAULT_TITLE 10311
-#define STR_FPICKER_FOLDER_DEFAULT_DESCRIPTION 10312
-#define STR_FPICKER_ALREADYEXISTOVERWRITE_PRIMARY 10313
-#define STR_FPICKER_ALREADYEXISTOVERWRITE_SECONDARY 10314
-#define STR_FPICKER_ALLFORMATS 10315
-#define STR_FPICKER_OPEN 10316
-#define STR_FPICKER_SAVE 10317
-#define STR_FPICKER_TYPE 10318
-
-#define SV_ACCESSERROR_NO_FONTS 10510
-
-#define SV_PRINT_NOPAGES 10609
-#define SV_PRINT_TOFILE_TXT 10610
-#define SV_PRINT_DEFPRT_TXT 10611
-#define SV_PRINT_PRINTPREVIEW_TXT 10612
-#define SV_PRINT_QUERYFAXNUMBER_TXT 10615
-#define SV_PRINT_INVALID_TXT 10616
-#define SV_PRINT_CUSTOM_TXT 10617
-
-#define SV_EDIT_WARNING_STR 10650
-
-#define SV_FUNIT_STRINGS 10700
-
-#define SV_APP_CPUTHREADS 10800
-#define SV_APP_OSVERSION 10801
-#define SV_APP_UIRENDER 10802
-#define SV_APP_GL 10803
-#define SV_APP_DEFAULT 10804
-#define SV_APP_VCLBACKEND 10805
-
-#define SV_MSGBOX_INFO 10900
-#define SV_MSGBOX_WARNING 10901
-#define SV_MSGBOX_ERROR 10902
-#define SV_MSGBOX_QUERY 10903
-
-#endif // INCLUDED_VCL_INC_SVIDS_HRC
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/units.hrc b/vcl/inc/units.hrc
new file mode 100644
index 000000000000..3fc58eca0270
--- /dev/null
+++ b/vcl/inc/units.hrc
@@ -0,0 +1,58 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_VCL_INC_UNITS_HRC
+#define INCLUDED_VCL_INC_UNITS_HRC
+
+#define NC_(Context, String) (Context "\004" u8##String)
+
+std::pair<const char*, FieldUnit> SV_FUNIT_STRINGS[] =
+{
+ // To translators: This is the first entry of a sequence of measurement unit names
+ { NC_("SV_FUNIT_STRINGS", "mm"), FUNIT_MM },
+ { NC_("SV_FUNIT_STRINGS", "cm"), FUNIT_CM },
+ { NC_("SV_FUNIT_STRINGS", "m"), FUNIT_M },
+ { NC_("SV_FUNIT_STRINGS", "km"), FUNIT_KM },
+ { NC_("SV_FUNIT_STRINGS", "twips"), FUNIT_TWIP },
+ { NC_("SV_FUNIT_STRINGS", "twip"), FUNIT_TWIP },
+ { NC_("SV_FUNIT_STRINGS", "pt"), FUNIT_POINT },
+ { NC_("SV_FUNIT_STRINGS", "pc"), FUNIT_PICA },
+ { NC_("SV_FUNIT_STRINGS", "\""), FUNIT_INCH },
+ { NC_("SV_FUNIT_STRINGS", "in"), FUNIT_INCH },
+ { NC_("SV_FUNIT_STRINGS", "inch"), FUNIT_INCH },
+ { NC_("SV_FUNIT_STRINGS", "'"), FUNIT_FOOT },
+ { NC_("SV_FUNIT_STRINGS", "ft"), FUNIT_FOOT },
+ { NC_("SV_FUNIT_STRINGS", "foot"), FUNIT_FOOT },
+ { NC_("SV_FUNIT_STRINGS", "feet"), FUNIT_FOOT },
+ { NC_("SV_FUNIT_STRINGS", "miles"), FUNIT_MILE },
+ { NC_("SV_FUNIT_STRINGS", "mile"), FUNIT_MILE },
+ { NC_("SV_FUNIT_STRINGS", "ch"), FUNIT_CHAR },
+ { NC_("SV_FUNIT_STRINGS", "line"), FUNIT_LINE },
+ { NC_("SV_FUNIT_STRINGS", "pixels"), FUNIT_PIXEL },
+ { NC_("SV_FUNIT_STRINGS", "pixel"), FUNIT_PIXEL },
+ /* To translators: degree */
+ { NC_("SV_FUNIT_STRINGS", "°"), FUNIT_DEGREE },
+ { NC_("SV_FUNIT_STRINGS", "sec"), FUNIT_SECOND },
+ // To translators: This is the last entry of the sequence of measurement unit names
+ { NC_("SV_FUNIT_STRINGS", "ms"), FUNIT_MILLISECOND }
+};
+
+#endif // INCLUDED_VCL_INC_UNITS_HRC
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/osx/printaccessoryview.mm b/vcl/osx/printaccessoryview.mm
index 2e73957b4024..3cfe816ce704 100644
--- a/vcl/osx/printaccessoryview.mm
+++ b/vcl/osx/printaccessoryview.mm
@@ -19,8 +19,6 @@
#include "sal/config.h"
-#include "tools/resary.hxx"
-
#include <vcl/print.hxx>
#include <vcl/image.hxx>
#include <vcl/virdev.hxx>
@@ -33,7 +31,8 @@
#include "quartz/utils.h"
#include "svdata.hxx"
-#include "svids.hrc"
+#include "strings.hrc"
+#include "printaccessoryview.hrc"
#include "com/sun/star/i18n/XBreakIterator.hpp"
#include "com/sun/star/i18n/WordType.hpp"
@@ -156,31 +155,29 @@ class ControllerProperties
std::vector< NSObject* > maViews;
int mnNextTag;
sal_Int32 mnLastPageCount;
- ResStringArray maLocalizedStrings;
AquaPrintPanelAccessoryController* mpAccessoryController;
public:
ControllerProperties( AquaPrintPanelAccessoryController* i_pAccessoryController )
: mnNextTag( 0 )
, mnLastPageCount( [i_pAccessoryController printerController]->getFilteredPageCount() )
- , maLocalizedStrings( VclResId( SV_PRINT_NATIVE_STRINGS ) )
, mpAccessoryController( i_pAccessoryController )
{
- assert( maLocalizedStrings.Count() >= 5 && "resources not found" );
+ assert( SAL_N_ELEMENTS(SV_PRINT_NATIVE_STRINGS) >= 5 && "resources not found" );
}
rtl::OUString getMoreString()
{
- return maLocalizedStrings.Count() >= 4
- ? maLocalizedStrings.GetString( 3 )
- : OUString( "More" );
+ return SAL_N_ELEMENTS(SV_PRINT_NATIVE_STRINGS) >= 4
+ ? VclResId(SV_PRINT_NATIVE_STRINGS[3])
+ : OUString("More");
}
rtl::OUString getPrintSelectionString()
{
- return maLocalizedStrings.Count() >= 5
- ? maLocalizedStrings.GetString( 4 )
- : OUString( "Print selection only" );
+ return SAL_N_ELEMENTS(SV_PRINT_NATIVE_STRINGS) >= 5
+ ? VclResId(SV_PRINT_NATIVE_STRINGS[4])
+ : OUString("Print selection only");
}
int addNameTag( const rtl::OUString& i_rPropertyName )
diff --git a/vcl/osx/salmenu.cxx b/vcl/osx/salmenu.cxx
index d943c82064bc..abab89f1dee7 100644
--- a/vcl/osx/salmenu.cxx
+++ b/vcl/osx/salmenu.cxx
@@ -36,7 +36,7 @@
#include "osx/salframe.h"
#include "osx/a11ywrapper.h"
#include "quartz/utils.h"
-#include "svids.hrc"
+#include "strings.hrc"
#include "window.h"
namespace {
@@ -117,106 +117,102 @@ static void initAppMenu()
{
bOnce = false;
- ResMgr* pMgr = ImplGetResMgr();
- if( pMgr )
+ // get the main menu
+ NSMenu* pMainMenu = [NSApp mainMenu];
+ if( pMainMenu != nil )
{
- // get the main menu
- NSMenu* pMainMenu = [NSApp mainMenu];
- if( pMainMenu != nil )
+ // create the action selector
+ pMainMenuSelector = [[MainMenuSelector alloc] init];
+
+ // get the proper submenu
+ NSMenu* pAppMenu = [[pMainMenu itemAtIndex: 0] submenu];
+ if( pAppMenu )
{
- // create the action selector
- pMainMenuSelector = [[MainMenuSelector alloc] init];
+ // insert about entry
+ OUString aAbout(VclResId(SV_STDTEXT_ABOUT));
+ NSString* pString = CreateNSString( aAbout );
+ NSMenuItem* pNewItem = [pAppMenu insertItemWithTitle: pString
+ action: @selector(showAbout:)
+ keyEquivalent: @""
+ atIndex: 0];
+ if (pString)
+ [pString release];
+ if( pNewItem )
+ {
+ [pNewItem setTarget: pMainMenuSelector];
+ [pAppMenu insertItem: [NSMenuItem separatorItem] atIndex: 1];
+ }
- // get the proper submenu
- NSMenu* pAppMenu = [[pMainMenu itemAtIndex: 0] submenu];
- if( pAppMenu )
+ // insert preferences entry
+ OUString aPref(VclResId(SV_STDTEXT_PREFERENCES));
+ pString = CreateNSString( aPref );
+ pNewItem = [pAppMenu insertItemWithTitle: pString
+ action: @selector(showPreferences:)
+ keyEquivalent: @","
+ atIndex: 2];
+ if (pString)
+ [pString release];
+ if( pNewItem )
{
- // insert about entry
- OUString aAbout( ResId( SV_STDTEXT_ABOUT, *pMgr ) );
- NSString* pString = CreateNSString( aAbout );
- NSMenuItem* pNewItem = [pAppMenu insertItemWithTitle: pString
- action: @selector(showAbout:)
- keyEquivalent: @""
- atIndex: 0];
- if (pString)
- [pString release];
- if( pNewItem )
- {
- [pNewItem setTarget: pMainMenuSelector];
- [pAppMenu insertItem: [NSMenuItem separatorItem] atIndex: 1];
- }
-
- // insert preferences entry
- OUString aPref( ResId( SV_STDTEXT_PREFERENCES, *pMgr ) );
- pString = CreateNSString( aPref );
- pNewItem = [pAppMenu insertItemWithTitle: pString
- action: @selector(showPreferences:)
- keyEquivalent: @","
- atIndex: 2];
- if (pString)
- [pString release];
- if( pNewItem )
- {
SAL_WNODEPRECATED_DECLARATIONS_PUSH
- // 'NSCommandKeyMask' is deprecated: first deprecated in macOS 10.12
- [pNewItem setKeyEquivalentModifierMask: NSCommandKeyMask];
+// 'NSCommandKeyMask' is deprecated: first deprecated in macOS 10.12
+ [pNewItem setKeyEquivalentModifierMask: NSCommandKeyMask];
SAL_WNODEPRECATED_DECLARATIONS_POP
- [pNewItem setTarget: pMainMenuSelector];
- [pAppMenu insertItem: [NSMenuItem separatorItem] atIndex: 3];
- }
-
- // WARNING: ultra ugly code ahead
-
- // rename standard entries
- // rename "Services"
- pNewItem = [pAppMenu itemAtIndex: 4];
- if( pNewItem )
- {
- pString = CreateNSString( OUString( ResId( SV_MENU_MAC_SERVICES, *pMgr ) ) );
- [pNewItem setTitle: pString];
- if( pString )
- [pString release];
- }
-
- // rename "Hide NewApplication"
- pNewItem = [pAppMenu itemAtIndex: 6];
- if( pNewItem )
- {
- pString = CreateNSString( OUString( ResId( SV_MENU_MAC_HIDEAPP, *pMgr ) ) );
- [pNewItem setTitle: pString];
- if( pString )
- [pString release];
- }
-
- // rename "Hide Others"
- pNewItem = [pAppMenu itemAtIndex: 7];
- if( pNewItem )
- {
- pString = CreateNSString( OUString( ResId( SV_MENU_MAC_HIDEALL, *pMgr ) ) );
- [pNewItem setTitle: pString];
- if( pString )
- [pString release];
- }
-
- // rename "Show all"
- pNewItem = [pAppMenu itemAtIndex: 8];
- if( pNewItem )
- {
- pString = CreateNSString( OUString( ResId( SV_MENU_MAC_SHOWALL, *pMgr ) ) );
- [pNewItem setTitle: pString];
- if( pString )
- [pString release];
- }
-
- // rename "Quit NewApplication"
- pNewItem = [pAppMenu itemAtIndex: 10];
- if( pNewItem )
- {
- pString = CreateNSString( OUString( ResId( SV_MENU_MAC_QUITAPP, *pMgr ) ) );
- [pNewItem setTitle: pString];
- if( pString )
- [pString release];
- }
+ [pNewItem setTarget: pMainMenuSelector];
+ [pAppMenu insertItem: [NSMenuItem separatorItem] atIndex: 3];
+ }
+
+ // WARNING: ultra ugly code ahead
+
+ // rename standard entries
+ // rename "Services"
+ pNewItem = [pAppMenu itemAtIndex: 4];
+ if( pNewItem )
+ {
+ pString = CreateNSString(VclResId(SV_MENU_MAC_SERVICES));
+ [pNewItem setTitle: pString];
+ if( pString )
+ [pString release];
+ }
+
+ // rename "Hide NewApplication"
+ pNewItem = [pAppMenu itemAtIndex: 6];
+ if( pNewItem )
+ {
+ pString = CreateNSString(VclResId(SV_MENU_MAC_HIDEAPP));
+ [pNewItem setTitle: pString];
+ if( pString )
+ [pString release];
+ }
+
+ // rename "Hide Others"
+ pNewItem = [pAppMenu itemAtIndex: 7];
+ if( pNewItem )
+ {
+ pString = CreateNSString(VclResId(SV_MENU_MAC_HIDEALL));
+ [pNewItem setTitle: pString];
+ if( pString )
+ [pString release];
+ }
+
+ // rename "Show all"
+ pNewItem = [pAppMenu itemAtIndex: 8];
+ if( pNewItem )
+ {
+ pString = CreateNSString(VclResId(SV_MENU_MAC_SHOWALL));
+ [pNewItem setTitle: pString];
+ if( pString )
+ [pString release];
+ }
+
+ // rename "Quit NewApplication"
+ pNewItem = [pAppMenu itemAtIndex: 10];
+ if( pNewItem )
+ {
+ pString = CreateNSString(VclResId(SV_MENU_MAC_QUITAPP));
+ [pNewItem setTitle: pString];
+ if( pString )
+ [pString release];
}
}
}
diff --git a/vcl/osx/salsys.cxx b/vcl/osx/salsys.cxx
index e7870ef79bd3..7051aeedeb44 100644
--- a/vcl/osx/salsys.cxx
+++ b/vcl/osx/salsys.cxx
@@ -26,7 +26,7 @@
#include "osx/salinst.h"
#include "quartz/utils.h"
-#include "svids.hrc"
+#include "strings.hrc"
AquaSalSystem::~AquaSalSystem()
{
diff --git a/vcl/qa/cppunit/builder/demo.ui b/vcl/qa/cppunit/builder/demo.ui
index a75f5ddd89f2..20851b3e7b41 100644
--- a/vcl/qa/cppunit/builder/demo.ui
+++ b/vcl/qa/cppunit/builder/demo.ui
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<interface>
+<interface domain="vcl">
<!-- interface-requires gtk+ 3.0 -->
<object class="GtkDialog" id="dialog1">
<property name="can_focus">False</property>
diff --git a/vcl/source/app/stdtext.cxx b/vcl/source/app/stdtext.cxx
index fde6acb7264f..2e549e539db4 100644
--- a/vcl/source/app/stdtext.cxx
+++ b/vcl/source/app/stdtext.cxx
@@ -20,14 +20,13 @@
#include <vcl/layout.hxx>
#include <vcl/stdtext.hxx>
-#include <svids.hrc>
+#include <strings.hrc>
#include <svdata.hxx>
void ShowServiceNotAvailableError(vcl::Window* pParent,
const OUString& rServiceName, bool bError)
{
- OUString aText = OUString(VclResId(SV_STDTEXT_SERVICENOTAVAILABLE)).
- replaceAll("%s", rServiceName);
+ OUString aText = VclResId(SV_STDTEXT_SERVICENOTAVAILABLE).replaceAll("%s", rServiceName);
ScopedVclPtrInstance< MessageDialog > aBox( pParent, aText, bError ? VclMessageType::Error : VclMessageType::Warning );
aBox->Execute();
}
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index 5cd0594c684c..40a424169448 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -64,7 +64,8 @@
#include "displayconnectiondispatch.hxx"
#include "window.h"
#include "accmgr.hxx"
-#include "svids.hrc"
+#include "strings.hrc"
+#include "strings.hxx"
#if OSL_DEBUG_LEVEL > 0
#include "schedulerimpl.hxx"
#endif
@@ -675,18 +676,15 @@ void Application::SetSettings( const AllSettings& rSettings )
{
InitSettings(pSVData);
*pSVData->maAppData.mpSettings = rSettings;
- ResMgr::SetDefaultLocale( rSettings.GetUILanguageTag() );
}
else
{
AllSettings aOldSettings = *pSVData->maAppData.mpSettings;
- if( aOldSettings.GetUILanguageTag().getLanguageType() != rSettings.GetUILanguageTag().getLanguageType() &&
- pSVData->mpResMgr )
+ if (aOldSettings.GetUILanguageTag().getLanguageType() != rSettings.GetUILanguageTag().getLanguageType() &&
+ pSVData->mbResLocaleSet)
{
- delete pSVData->mpResMgr;
- pSVData->mpResMgr = nullptr;
+ pSVData->mbResLocaleSet = false;
}
- ResMgr::SetDefaultLocale( rSettings.GetUILanguageTag() );
*pSVData->maAppData.mpSettings = rSettings;
AllSettingsFlags nChangeFlags = aOldSettings.GetChangeFlags( *pSVData->maAppData.mpSettings );
if ( bool(nChangeFlags) )
@@ -1192,7 +1190,7 @@ OUString Application::GetHWOSConfInfo()
#ifdef LINUX
// Only linux has different backends, so don't show blank for others.
- aDetails.append( VclResId(SV_APP_VCLBACKEND) );
+ aDetails.append( SV_APP_VCLBACKEND );
aDetails.append( GetToolkitName() );
aDetails.append( "; " );
#endif
diff --git a/vcl/source/app/svdata.cxx b/vcl/source/app/svdata.cxx
index 6ea821411e36..9c1e119ded7a 100644
--- a/vcl/source/app/svdata.cxx
+++ b/vcl/source/app/svdata.cxx
@@ -22,8 +22,8 @@
#include <comphelper/processfactory.hxx>
#include <comphelper/string.hxx>
#include <rtl/process.h>
-#include <tools/resary.hxx>
#include <tools/gen.hxx>
+#include <tools/resmgr.hxx>
#include <uno/current_context.hxx>
#include <vcl/button.hxx>
@@ -46,12 +46,14 @@
#include "window.h"
#include "salimestatus.hxx"
#include "salsys.hxx"
-#include "svids.hrc"
+#include "strings.hrc"
+#include "units.hrc"
#include "com/sun/star/accessibility/MSAAService.hpp"
#include "officecfg/Office/Common.hxx"
+#include <config_folders.h>
#include <config_features.h>
#if HAVE_FEATURE_OPENGL
#include <vcl/opengl/OpenGLContext.hxx>
@@ -159,36 +161,20 @@ vcl::Window *ImplGetDefaultContextWindow()
return pSVData->mpDefaultWin;
}
-ResMgr* ImplGetResMgr()
+const std::locale& ImplGetResLocale()
{
ImplSVData* pSVData = ImplGetSVData();
- if ( !pSVData->mpResMgr )
+ if (!pSVData->mbResLocaleSet)
{
- LanguageTag aLocale( Application::GetSettings().GetUILanguageTag());
- pSVData->mpResMgr = ResMgr::SearchCreateResMgr( "vcl", aLocale );
-
- static bool bMessageOnce = false;
- if( !pSVData->mpResMgr && ! bMessageOnce )
- {
- bMessageOnce = true;
- const char pMsg[] =
- "Missing vcl resource. This indicates that files vital to localization are missing. "
- "You might have a corrupt installation.";
- SAL_WARN("vcl", "" << pMsg);
- ScopedVclPtrInstance< MessageDialog > aBox( nullptr, pMsg );
- aBox->Execute();
- }
+ pSVData->maResLocale = Translate::Create("vcl", Application::GetSettings().GetUILanguageTag());
+ pSVData->mbResLocaleSet = true;
}
- return pSVData->mpResMgr;
+ return pSVData->maResLocale;
}
-ResId VclResId( sal_Int32 nId )
+OUString VclResId(const char* pId)
{
- ResMgr* pMgr = ImplGetResMgr();
- if( ! pMgr )
- throw std::bad_alloc();
-
- return ResId( nId, *pMgr );
+ return Translate::get(pId, ImplGetResLocale());
}
FieldUnitStringList* ImplGetFieldUnits()
@@ -196,18 +182,13 @@ FieldUnitStringList* ImplGetFieldUnits()
ImplSVData* pSVData = ImplGetSVData();
if( ! pSVData->maCtrlData.mpFieldUnitStrings )
{
- ResMgr* pResMgr = ImplGetResMgr();
- if( pResMgr )
+ sal_uInt32 nUnits = SAL_N_ELEMENTS(SV_FUNIT_STRINGS);
+ pSVData->maCtrlData.mpFieldUnitStrings = new FieldUnitStringList;
+ pSVData->maCtrlData.mpFieldUnitStrings->reserve( nUnits );
+ for (sal_uInt32 i = 0; i < nUnits; i++)
{
- ResStringArray aUnits( ResId (SV_FUNIT_STRINGS, *pResMgr) );
- sal_uInt32 nUnits = aUnits.Count();
- pSVData->maCtrlData.mpFieldUnitStrings = new FieldUnitStringList;
- pSVData->maCtrlData.mpFieldUnitStrings->reserve( nUnits );
- for( sal_uInt32 i = 0; i < nUnits; i++ )
- {
- std::pair< OUString, FieldUnit > aElement( aUnits.GetString(i), static_cast<FieldUnit>(aUnits.GetValue(i)) );
- pSVData->maCtrlData.mpFieldUnitStrings->push_back( aElement );
- }
+ std::pair<OUString, FieldUnit> aElement(VclResId(SV_FUNIT_STRINGS[i].first), SV_FUNIT_STRINGS[i].second);
+ pSVData->maCtrlData.mpFieldUnitStrings->push_back( aElement );
}
}
return pSVData->maCtrlData.mpFieldUnitStrings;
diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx
index b51bfbe8870a..58a5260d4e6b 100644
--- a/vcl/source/app/svmain.cxx
+++ b/vcl/source/app/svmain.cxx
@@ -574,14 +574,6 @@ void DeInitVCL()
delete pSVData->maGDIData.mpScreenFontCache;
pSVData->maGDIData.mpScreenFontCache = nullptr;
- if ( pSVData->mpResMgr )
- {
- delete pSVData->mpResMgr;
- pSVData->mpResMgr = nullptr;
- }
-
- ResMgr::DestroyAllResMgr();
-
// destroy all Sal interfaces before destroying the instance
// and thereby unloading the plugin
delete pSVData->mpSalSystem;
diff --git a/vcl/source/bitmap/BitmapTools.cxx b/vcl/source/bitmap/BitmapTools.cxx
index d0b00e1d8b07..39a7d2fb1a3e 100644
--- a/vcl/source/bitmap/BitmapTools.cxx
+++ b/vcl/source/bitmap/BitmapTools.cxx
@@ -21,7 +21,6 @@
#include <com/sun/star/rendering/XIntegerReadOnlyBitmap.hpp>
-#include <tools/rcid.h>
#include <tools/resmgr.hxx>
#include <vcl/settings.hxx>
#include <vcl/svapp.hxx>
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index aed5ef25a4ef..bf0432c2e143 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -37,7 +37,7 @@
#include <vcl/vclstatuslistener.hxx>
#include <vcl/uitest/uiobject.hxx>
-#include <svids.hrc>
+#include <strings.hrc>
#include <bitmaps.hlst>
#include <svdata.hxx>
#include <window.h>
@@ -122,46 +122,32 @@ void Button::Click()
ImplCallEventListenersAndHandler( VclEventId::ButtonClick, [this] () { maClickHdl.Call(this); } );
}
-OUString Button::GetStandardText( StandardButtonType eButton )
+OUString Button::GetStandardText(StandardButtonType eButton)
{
- static struct
+ static const char* aResIdAry[static_cast<int>(StandardButtonType::Count)] =
{
- sal_uInt32 nResId;
- const char* pDefText;
- } aResIdAry[static_cast<int>(StandardButtonType::Count)] =
- {
- { SV_BUTTONTEXT_OK, "~OK" },
- { SV_BUTTONTEXT_CANCEL, "~Cancel" },
- { SV_BUTTONTEXT_YES, "~Yes" },
- { SV_BUTTONTEXT_NO, "~No" },
- { SV_BUTTONTEXT_RETRY, "~Retry" },
- { SV_BUTTONTEXT_HELP, "~Help" },
- { SV_BUTTONTEXT_CLOSE, "~Close" },
- { SV_BUTTONTEXT_MORE, "~More" },
- { SV_BUTTONTEXT_IGNORE, "~Ignore" },
- { SV_BUTTONTEXT_ABORT, "~Abort" },
- { SV_BUTTONTEXT_LESS, "~Less" }
- };
-
- ResMgr* pResMgr = ImplGetResMgr();
-
- if (!pResMgr)
- {
- OString aT( aResIdAry[(sal_uInt16)eButton].pDefText );
- return OStringToOUString(aT, RTL_TEXTENCODING_ASCII_US);
- }
-
- sal_uInt32 nResId = aResIdAry[(sal_uInt16)eButton].nResId;
+ // http://lists.freedesktop.org/archives/libreoffice/2013-January/044513.html
+ // Under windows we don't want accelerators on ok/cancel but do on other
+ // buttons
#ifdef _WIN32
- // http://lists.freedesktop.org/archives/libreoffice/2013-January/044513.html
- // Under windows we don't want accelerators on ok/cancel but do on other
- // buttons
- if (nResId == SV_BUTTONTEXT_OK)
- nResId = SV_BUTTONTEXT_OK_NOMNEMONIC;
- else if (nResId == SV_BUTTONTEXT_CANCEL)
- nResId = SV_BUTTONTEXT_CANCEL_NOMNEMONIC;
+ SV_BUTTONTEXT_OK_NOMNEMONIC,
+ SV_BUTTONTEXT_CANCEL_NOMNEMONIC,
+#else
+ SV_BUTTONTEXT_OK,
+ SV_BUTTONTEXT_CANCEL,
#endif
- return ResId(nResId, *pResMgr);
+ SV_BUTTONTEXT_YES,
+ SV_BUTTONTEXT_NO,
+ SV_BUTTONTEXT_RETRY,
+ SV_BUTTONTEXT_HELP,
+ SV_BUTTONTEXT_CLOSE,
+ SV_BUTTONTEXT_MORE,
+ SV_BUTTONTEXT_IGNORE,
+ SV_BUTTONTEXT_ABORT,
+ SV_BUTTONTEXT_LESS,
+ };
+
+ return VclResId(aResIdAry[(sal_uInt16)eButton]);
}
bool Button::SetModeImage( const Image& rImage )
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index dd289eff827f..69cc50abf549 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -30,7 +30,7 @@
#include <window.h>
#include <svdata.hxx>
-#include <svids.hrc>
+#include <strings.hrc>
#include <controldata.hxx>
#include <com/sun/star/i18n/BreakIterator.hpp>
@@ -775,12 +775,8 @@ uno::Reference < i18n::XExtendedInputSequenceChecker > const & Edit::ImplGetInpu
void Edit::ShowTruncationWarning( vcl::Window* pParent )
{
- ResMgr* pResMgr = ImplGetResMgr();
- if( pResMgr )
- {
- ScopedVclPtrInstance< MessageDialog > aBox( pParent, ResId(SV_EDIT_WARNING_STR, *pResMgr), VclMessageType::Warning );
- aBox->Execute();
- }
+ ScopedVclPtrInstance< MessageDialog > aBox(pParent, VclResId(SV_EDIT_WARNING_STR), VclMessageType::Warning);
+ aBox->Execute();
}
bool Edit::ImplTruncateToMaxLen( OUString& rStr, sal_Int32 nSelectionLen ) const
diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx
index c92d8b95c78d..1256472fb8de 100644
--- a/vcl/source/control/field.cxx
+++ b/vcl/source/control/field.cxx
@@ -29,7 +29,7 @@
#include <vcl/svapp.hxx>
#include <vcl/settings.hxx>
-#include "svids.hrc"
+#include "strings.hrc"
#include "svdata.hxx"
#include "i18nutil/unicode.hxx"
diff --git a/vcl/source/control/imgctrl.cxx b/vcl/source/control/imgctrl.cxx
index f3d1942eabd6..f1ff32a111ba 100644
--- a/vcl/source/control/imgctrl.cxx
+++ b/vcl/source/control/imgctrl.cxx
@@ -19,7 +19,6 @@
#include <vcl/event.hxx>
#include <vcl/imgctrl.hxx>
-#include <tools/rcid.h>
#include <com/sun/star/awt/ImageScaleMode.hpp>
diff --git a/vcl/source/control/spinbtn.cxx b/vcl/source/control/spinbtn.cxx
index 1899000f7d90..251ba7498343 100644
--- a/vcl/source/control/spinbtn.cxx
+++ b/vcl/source/control/spinbtn.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <tools/rcid.h>
#include <vcl/event.hxx>
#include <vcl/spin.hxx>
#include <vcl/settings.hxx>
diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx
index d35551011eaf..746c6c0acc4e 100644
--- a/vcl/source/control/tabctrl.cxx
+++ b/vcl/source/control/tabctrl.cxx
@@ -31,8 +31,8 @@
#include <vcl/settings.hxx>
#include <vcl/uitest/uiobject.hxx>
#include <vcl/builderfactory.hxx>
+#include <strings.hrc>
#include <bitmaps.hlst>
-#include <svids.hrc>
#include "controldata.hxx"
#include "svdata.hxx"
diff --git a/vcl/source/edit/textundo.cxx b/vcl/source/edit/textundo.cxx
index 191aa2954290..d8527af48095 100644
--- a/vcl/source/edit/textundo.cxx
+++ b/vcl/source/edit/textundo.cxx
@@ -19,7 +19,7 @@
#include "textundo.hxx"
#include "textund2.hxx"
-#include "textundo.hrc"
+#include "strings.hrc"
#include <vcl/texteng.hxx>
#include <vcl/textview.hxx>
@@ -27,8 +27,6 @@
#include <textdoc.hxx>
#include <textdat2.hxx>
#include <svdata.hxx>
-#include <tools/resid.hxx>
-
namespace
{
@@ -185,7 +183,7 @@ void TextUndoDelPara::Redo()
OUString TextUndoDelPara::GetComment () const
{
- return ResId(STR_TEXTUNDO_DELPARA, *ImplGetResMgr());
+ return VclResId(STR_TEXTUNDO_DELPARA);
}
TextUndoConnectParas::TextUndoConnectParas( TextEngine* pTextEngine, sal_uInt32 nPara, sal_Int32 nPos )
@@ -213,7 +211,7 @@ void TextUndoConnectParas::Redo()
OUString TextUndoConnectParas::GetComment () const
{
- return ResId(STR_TEXTUNDO_CONNECTPARAS, *ImplGetResMgr());
+ return VclResId(STR_TEXTUNDO_CONNECTPARAS);
}
TextUndoSplitPara::TextUndoSplitPara( TextEngine* pTextEngine, sal_uInt32 nPara, sal_Int32 nPos )
@@ -241,7 +239,7 @@ void TextUndoSplitPara::Redo()
OUString TextUndoSplitPara::GetComment () const
{
- return ResId(STR_TEXTUNDO_SPLITPARA, *ImplGetResMgr());
+ return VclResId(STR_TEXTUNDO_SPLITPARA);
}
TextUndoInsertChars::TextUndoInsertChars( TextEngine* pTextEngine, const TextPaM& rTextPaM, const OUString& rStr )
@@ -290,7 +288,7 @@ OUString TextUndoInsertChars::GetComment () const
// multiple lines?
OUString sText(maText);
Shorten(sText);
- return OUString(ResId(STR_TEXTUNDO_INSERTCHARS, *ImplGetResMgr())).replaceAll("$1", sText);
+ return VclResId(STR_TEXTUNDO_INSERTCHARS).replaceAll("$1", sText);
}
TextUndoRemoveChars::TextUndoRemoveChars( TextEngine* pTextEngine, const TextPaM& rTextPaM, const OUString& rStr )
@@ -320,7 +318,7 @@ OUString TextUndoRemoveChars::GetComment () const
// multiple lines?
OUString sText(maText);
Shorten(sText);
- return OUString(ResId(STR_TEXTUNDO_REMOVECHARS, *ImplGetResMgr())).replaceAll("$1", sText);
+ return VclResId(STR_TEXTUNDO_REMOVECHARS).replaceAll("$1", sText);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/edit/textundo.hrc b/vcl/source/edit/textundo.hrc
deleted file mode 100644
index ff67473b3612..000000000000
--- a/vcl/source/edit/textundo.hrc
+++ /dev/null
@@ -1,31 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef VCL_TEXTUNDO_HRC
-#define VCL_TEXTUNDO_HRC
-
-#define STR_TEXTUNDO_DELPARA 3000
-#define STR_TEXTUNDO_CONNECTPARAS 3001
-#define STR_TEXTUNDO_SPLITPARA 3002
-#define STR_TEXTUNDO_INSERTCHARS 3003
-#define STR_TEXTUNDO_REMOVECHARS 3004
-
-#endif // VCL_TEXTUNDO_HRC
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/edit/textundo.src b/vcl/source/edit/textundo.src
deleted file mode 100644
index 13c4ba89d010..000000000000
--- a/vcl/source/edit/textundo.src
+++ /dev/null
@@ -1,43 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include "textundo.hrc"
-
-String STR_TEXTUNDO_DELPARA
-{
- Text [en-US] = "delete line";
-};
-String STR_TEXTUNDO_CONNECTPARAS
-{
- Text [en-US] = "delete multiple lines";
-};
-String STR_TEXTUNDO_SPLITPARA
-{
- Text [en-US] = "insert multiple lines";
-};
-String STR_TEXTUNDO_INSERTCHARS
-{
- Text [en-US] = "insert '$1'";
-};
-String STR_TEXTUNDO_REMOVECHARS
-{
- Text [en-US] = "delete '$1'";
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/edit/vclmedit.cxx b/vcl/source/edit/vclmedit.cxx
index d699a74658aa..de47bad4b50e 100644
--- a/vcl/source/edit/vclmedit.cxx
+++ b/vcl/source/edit/vclmedit.cxx
@@ -27,7 +27,7 @@
#include <svl/undo.hxx>
#include <svl/lstner.hxx>
-#include <svids.hrc>
+#include <strings.hrc>
#include <vcl/scrbar.hxx>
#include <vcl/settings.hxx>
diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx
index a3bf2ad6d5b1..b72d10882e22 100644
--- a/vcl/source/gdi/bitmapex.cxx
+++ b/vcl/source/gdi/bitmapex.cxx
@@ -22,7 +22,6 @@
#include <o3tl/any.hxx>
#include <tools/debug.hxx>
-#include <tools/rcid.h>
#include <tools/resmgr.hxx>
#include <tools/stream.hxx>
#include <vcl/ImageTree.hxx>
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index 85c35dc3e0cb..5a3d1c2c4c70 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -19,7 +19,6 @@
#include <sal/types.h>
-#include <tools/resary.hxx>
#include <tools/helpers.hxx>
#include <vcl/virdev.hxx>
@@ -33,7 +32,8 @@
#include "salptype.hxx"
#include "salprn.hxx"
#include "svdata.hxx"
-#include "svids.hrc"
+#include "print.hrc"
+#include "strings.hrc"
#include "jobset.h"
#include "outdev.h"
#include "PhysicalFontCollection.hxx"
@@ -1496,24 +1496,20 @@ OUString Printer::GetPaperName( Paper ePaper )
if( ! pSVData->mpPaperNames )
{
pSVData->mpPaperNames = new std::unordered_map< int, OUString >;
- if( ImplGetResMgr() )
+ static const int PaperIndex[] =
{
- ResStringArray aPaperStrings( VclResId( RID_STR_PAPERNAMES ) );
- static const int PaperIndex[] =
- {
- PAPER_A0, PAPER_A1, PAPER_A2, PAPER_A3, PAPER_A4, PAPER_A5,
- PAPER_B4_ISO, PAPER_B5_ISO, PAPER_LETTER, PAPER_LEGAL, PAPER_TABLOID,
- PAPER_USER, PAPER_B6_ISO, PAPER_ENV_C4, PAPER_ENV_C5, PAPER_ENV_C6, PAPER_ENV_C65,
- PAPER_ENV_DL, PAPER_SLIDE_DIA, PAPER_C, PAPER_D, PAPER_E,
- PAPER_EXECUTIVE, PAPER_FANFOLD_LEGAL_DE, PAPER_ENV_MONARCH, PAPER_ENV_PERSONAL,
- PAPER_ENV_9, PAPER_ENV_10, PAPER_ENV_11, PAPER_ENV_12, PAPER_KAI16,
- PAPER_KAI32, PAPER_KAI32BIG, PAPER_B4_JIS, PAPER_B5_JIS, PAPER_B6_JIS,
- PAPER_POSTCARD_JP
- };
- OSL_ENSURE( sal_uInt32(SAL_N_ELEMENTS(PaperIndex)) == aPaperStrings.Count(), "localized paper name count wrong" );
- for( int i = 0; i < int(SAL_N_ELEMENTS(PaperIndex)); i++ )
- (*pSVData->mpPaperNames)[PaperIndex[i]] = aPaperStrings.GetString(i);
- }
+ PAPER_A0, PAPER_A1, PAPER_A2, PAPER_A3, PAPER_A4, PAPER_A5,
+ PAPER_B4_ISO, PAPER_B5_ISO, PAPER_LETTER, PAPER_LEGAL, PAPER_TABLOID,
+ PAPER_USER, PAPER_B6_ISO, PAPER_ENV_C4, PAPER_ENV_C5, PAPER_ENV_C6, PAPER_ENV_C65,
+ PAPER_ENV_DL, PAPER_SLIDE_DIA, PAPER_C, PAPER_D, PAPER_E,
+ PAPER_EXECUTIVE, PAPER_FANFOLD_LEGAL_DE, PAPER_ENV_MONARCH, PAPER_ENV_PERSONAL,
+ PAPER_ENV_9, PAPER_ENV_10, PAPER_ENV_11, PAPER_ENV_12, PAPER_KAI16,
+ PAPER_KAI32, PAPER_KAI32BIG, PAPER_B4_JIS, PAPER_B5_JIS, PAPER_B6_JIS,
+ PAPER_POSTCARD_JP
+ };
+ assert(SAL_N_ELEMENTS(PaperIndex) == SAL_N_ELEMENTS(RID_STR_PAPERNAMES) && "localized paper name count wrong");
+ for (size_t i = 0; i < SAL_N_ELEMENTS(PaperIndex); ++i)
+ (*pSVData->mpPaperNames)[PaperIndex[i]] = VclResId(RID_STR_PAPERNAMES[i]);
}
std::unordered_map<int,OUString>::const_iterator it = pSVData->mpPaperNames->find( (int)ePaper );
diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx
index aa28092c38bc..e70c4d02dd82 100644
--- a/vcl/source/gdi/print3.cxx
+++ b/vcl/source/gdi/print3.cxx
@@ -32,7 +32,7 @@
#include "svdata.hxx"
#include "salinst.hxx"
#include "salprn.hxx"
-#include "svids.hrc"
+#include "strings.hrc"
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/ui/dialogs/FilePicker.hpp>
diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx
index 9bcb8c26022f..01bacb88f443 100644
--- a/vcl/source/outdev/font.cxx
+++ b/vcl/source/outdev/font.cxx
@@ -34,7 +34,7 @@
#include "PhysicalFontCollection.hxx"
-#include "svids.hrc"
+#include "strings.hrc"
FontMetric OutputDevice::GetDevFont( int nDevFontIndex ) const
{
@@ -981,14 +981,10 @@ void OutputDevice::ImplInitFontList() const
if( !mpFontCollection->Count() )
{
OUString aError( "Application error: no fonts and no vcl resource found on your system" );
- ResMgr* pMgr = ImplGetResMgr();
- if( pMgr )
- {
- OUString aResStr(ResId(SV_ACCESSERROR_NO_FONTS, *pMgr));
- if( !aResStr.isEmpty() )
- aError = aResStr;
- }
- Application::Abort( aError );
+ OUString aResStr(VclResId(SV_ACCESSERROR_NO_FONTS));
+ if (!aResStr.isEmpty())
+ aError = aResStr;
+ Application::Abort(aError);
}
}
}
diff --git a/vcl/source/src/app.src b/vcl/source/src/app.src
deleted file mode 100644
index 9579dedb5489..000000000000
--- a/vcl/source/src/app.src
+++ /dev/null
@@ -1,42 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-
-#include "svids.hrc"
-
-String SV_APP_CPUTHREADS
-{
- Text [en-US] = "CPU threads: ";
-};
-
-String SV_APP_OSVERSION
-{
- Text [en-US] = "OS: ";
-};
-
-String SV_APP_UIRENDER
-{
- Text [en-US] = "UI render: ";
-};
-
-String SV_APP_GL
-{
- Text [en-US] = "GL";
-};
-
-String SV_APP_DEFAULT
-{
- Text [ en-US ] = "default";
-};
-
-String SV_APP_VCLBACKEND
-{
- Text [ en-US ] = "VCL: ";
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/src/btntext.src b/vcl/source/src/btntext.src
deleted file mode 100644
index 7d7cb4d11be5..000000000000
--- a/vcl/source/src/btntext.src
+++ /dev/null
@@ -1,194 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include <svids.hrc>
-
-//http://lists.freedesktop.org/archives/libreoffice/2013-January/044513.html
-//Special OK/Cancel handling
-
-String SV_BUTTONTEXT_OK
-{
- Text [ x-comment ] = "This is used on buttons for platforms other than windows, there should be a ~ mnemonic in this string";
- Text [ en-US ] = "~OK";
-};
-
-String SV_BUTTONTEXT_CANCEL
-{
- Text [ x-comment ] = "This is used on buttons for platforms other than windows, there should be a ~ mnemonic in this string";
- Text [ en-US ] = "~Cancel";
-};
-
-String SV_BUTTONTEXT_OK_NOMNEMONIC
-{
- Text [ x-comment ] = "This is used on buttons for Windows, there should be no ~ mnemonic in this string";
- Text [ en-US ] = "OK";
-};
-
-String SV_BUTTONTEXT_CANCEL_NOMNEMONIC
-{
- Text [ x-comment ] = "This is used on buttons for Windows, there should be no ~ mnemonic in this string";
- Text [ en-US ] = "Cancel";
-};
-
-String SV_BUTTONTEXT_YES
-{
- Text [ en-US ] = "~Yes";
-};
-
-String SV_BUTTONTEXT_NO
-{
- Text [ en-US ] = "~No";
-};
-
-String SV_BUTTONTEXT_RETRY
-{
- Text [ en-US ] = "~Retry";
-};
-
-String SV_BUTTONTEXT_HELP
-{
- Text [ en-US ] = "~Help";
-};
-
-String SV_BUTTONTEXT_CLOSE
-{
- Text [ en-US ] = "~Close";
-};
-
-String SV_BUTTONTEXT_MORE
-{
- Text [ en-US ] = "~More";
-};
-
-String SV_BUTTONTEXT_LESS
-{
- Text [ en-US ] = "~Less";
-};
-
-String SV_BUTTONTEXT_IGNORE
-{
- Text [ en-US ] = "~Ignore";
-};
-
-String SV_BUTTONTEXT_ABORT
-{
- Text [ en-US ] = "~Abort";
-};
-
-String SV_BUTTONTEXT_RESET
-{
- Text [ en-US ] = "R~eset";
-};
-
-String SV_BUTTONTEXT_ADD
-{
- Text [ en-US ] = "~Add";
-};
-
-String SV_BUTTONTEXT_DELETE
-{
- Text [ en-US ] = "~Delete";
-};
-
-String SV_BUTTONTEXT_REMOVE
-{
- Text [ en-US ] = "~Remove";
-};
-
-String SV_BUTTONTEXT_NEW
-{
- Text [ en-US ] = "~New";
-};
-
-String SV_BUTTONTEXT_EDIT
-{
- Text [ en-US ] = "~Edit";
-};
-
-String SV_BUTTONTEXT_APPLY
-{
- Text [ en-US ] = "~Apply";
-};
-
-String SV_BUTTONTEXT_SAVE
-{
- Text [ en-US ] = "~Save";
-};
-
-String SV_BUTTONTEXT_OPEN
-{
- Text [ en-US ] = "~Open";
-};
-
-String SV_BUTTONTEXT_UNDO
-{
- Text [ en-US ] = "~Undo" ;
-};
-
-String SV_BUTTONTEXT_PASTE
-{
- Text [ en-US ] = "~Paste" ;
-};
-
-String SV_BUTTONTEXT_NEXT
-{
- Text [ en-US ] = "~Next" ;
-};
-
-String SV_BUTTONTEXT_GO_UP
-{
- Text [ en-US ] = "~Up" ;
-};
-
-String SV_BUTTONTEXT_GO_DOWN
-{
- Text [ en-US ] = "Do~wn" ;
-};
-
-String SV_BUTTONTEXT_CLEAR
-{
- Text [ en-US ] = "~Clear" ;
-};
-
-String SV_BUTTONTEXT_PLAY
-{
- Text [ en-US ] = "~Play" ;
-};
-
-String SV_BUTTONTEXT_FIND
-{
- Text [ en-US ] = "~Find" ;
-};
-
-String SV_BUTTONTEXT_STOP
-{
- Text [ en-US ] = "~Stop" ;
-};
-
-String SV_BUTTONTEXT_CONNECT
-{
- Text [ en-US ] = "C~onnect" ;
-};
-
-String SV_BUTTONTEXT_SCREENSHOT
-{
- Text [ en-US ] = "~Screenshot" ;
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/src/fpicker.src b/vcl/source/src/fpicker.src
deleted file mode 100644
index 73e404c9e6c0..000000000000
--- a/vcl/source/src/fpicker.src
+++ /dev/null
@@ -1,117 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include <svids.hrc>
-
-String STR_FPICKER_AUTO_EXTENSION
-{
- Text [ en-US ] = "~Automatic file name extension" ;
-};
-
-String STR_FPICKER_PASSWORD
-{
- Text [ en-US ] = "Save with pass~word" ;
-};
-
-String STR_FPICKER_FILTER_OPTIONS
-{
- Text [ en-US ] = "~Edit filter settings";
-};
-
-String STR_FPICKER_READONLY
-{
- Text [ en-US ] = "~Read-only" ;
-};
-
-String STR_FPICKER_INSERT_AS_LINK
-{
- Text [ en-US ] = "Insert as ~Link" ;
-};
-
-String STR_FPICKER_SHOW_PREVIEW
-{
- Text [ en-US ] = "Pr~eview" ;
-};
-
-String STR_FPICKER_PLAY
-{
- Text [ en-US ] = "~Play" ;
-};
-
-String STR_FPICKER_VERSION
-{
- Text [ en-US ] = "~Version:";
-};
-
-String STR_FPICKER_TEMPLATES
-{
- Text [ en-US ] = "S~tyles:" ;
-};
-
-String STR_FPICKER_IMAGE_TEMPLATE
-{
- Text [ en-US ] = "Frame Style: ";
-};
-
-String STR_FPICKER_SELECTION
-{
- Text [ en-US ] = "~Selection" ;
-};
-
-String STR_FPICKER_FOLDER_DEFAULT_TITLE
-{
- Text [ en-US ] = "Select Path" ;
-};
-
-String STR_FPICKER_FOLDER_DEFAULT_DESCRIPTION
-{
- Text [ en-US ] = "Please select a folder.";
-};
-
-String STR_FPICKER_ALREADYEXISTOVERWRITE_PRIMARY
-{
- Text [ en-US ] = "A file named \"$filename$\" already exists. Do you want to replace it?" ;
-};
-
-String STR_FPICKER_ALREADYEXISTOVERWRITE_SECONDARY
-{
- Text [ en-US ] = "The file already exists in \"$dirname$\". Replacing it will overwrite its contents." ;
-};
-
-String STR_FPICKER_ALLFORMATS
-{
- Text [ en-US ] = "All Formats" ;
-};
-
-String STR_FPICKER_OPEN
-{
- Text [ en-US ] = "Open" ;
-};
-
-String STR_FPICKER_SAVE
-{
- Text [ en-US ] = "Save" ;
-};
-
-String STR_FPICKER_TYPE
-{
- Text [ en-US ] = "File ~type" ;
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/src/helptext.src b/vcl/source/src/helptext.src
deleted file mode 100644
index 2dcb27a4940c..000000000000
--- a/vcl/source/src/helptext.src
+++ /dev/null
@@ -1,75 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include <svids.hrc>
-
-String SV_HELPTEXT_CLOSE
-{
- Text [ en-US ] = "Close";
-};
-String SV_HELPTEXT_CLOSEDOCUMENT
-{
- Text [ en-US ] = "Close Document";
-};
-String SV_HELPTEXT_MINIMIZE
-{
- Text [ en-US ] = "Minimize";
-};
-
-String SV_HELPTEXT_MAXIMIZE
-{
- Text [ en-US ] = "Maximize";
-};
-
-String SV_HELPTEXT_RESTORE
-{
- Text [ en-US ] = "Restore";
-};
-
-String SV_HELPTEXT_ROLLDOWN
-{
- Text [ en-US ] = "Drop down";
-};
-
-String SV_HELPTEXT_ROLLUP
-{
- Text [ en-US ] = "Roll up";
-};
-
-String SV_HELPTEXT_HELP
-{
- Text [ en-US ] = "Help";
-};
-
-String SV_HELPTEXT_SCREENSHOT
-{
- Text [ en-US ] = "Take and annotate a screenshot";
-};
-
-String SV_HELPTEXT_FADEIN
-{
- Text [ en-US ] = "Show";
-};
-
-String SV_HELPTEXT_FADEOUT
-{
- Text [ en-US ] = "Hide";
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/src/print.src b/vcl/source/src/print.src
deleted file mode 100644
index 160602f6e72e..000000000000
--- a/vcl/source/src/print.src
+++ /dev/null
@@ -1,113 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include "svids.hrc"
-
-StringArray SV_PRINT_NATIVE_STRINGS
-{
- ItemList [en-US] =
- {
- < "Preview"; >;
- < "Page number"; >;
- < "Number of pages"; >;
- < "More"; >;
- < "Print selection only"; >;
- };
-};
-
-StringArray RID_STR_PAPERNAMES
-{
- ItemList [en-US] =
- {
- < "A0"; >;
- < "A1"; >;
- < "A2"; >;
- < "A3"; >;
- < "A4"; >;
- < "A5"; >;
- < "B4 (ISO)"; >;
- < "B5 (ISO)"; >;
- < "Letter"; >;
- < "Legal"; >;
- < "Tabloid"; >;
- < "User Defined"; >;
- < "B6 (ISO)"; >;
- < "C4 Envelope"; >;
- < "C5 Envelope"; >;
- < "C6 Envelope"; >;
- < "C6/5 Envelope"; >;
- < "DL Envelope"; >;
- < "Dia Slide"; >;
- < "C"; >;
- < "D"; >;
- < "E"; >;
- < "Executive"; >;
- < "Long Bond"; >;
- < "#8 (Monarch) Envelope"; >;
- < "#6 3/4 (Personal) Envelope"; >;
- < "#9 Envelope"; >;
- < "#10 Envelope"; >;
- < "#11 Envelope"; >;
- < "#12 Envelope"; >;
- < "16 Kai"; >;
- < "32 Kai"; >;
- < "Big 32 Kai"; >;
- < "B4 (JIS)"; >;
- < "B5 (JIS)"; >;
- < "B6 (JIS)"; >;
- < "Japanese Postcard"; >;
- };
-};
-
-String SV_PRINT_NOPAGES
-{
- Text [en-US] = "No pages";
-};
-
-String SV_PRINT_TOFILE_TXT
-{
- Text [en-US] = "Print to File...";
-};
-
-String SV_PRINT_DEFPRT_TXT
-{
- Text [en-US] = "Default printer";
-};
-
-String SV_PRINT_PRINTPREVIEW_TXT
-{
- Text [en-US] = "Print preview";
-};
-
-String SV_PRINT_QUERYFAXNUMBER_TXT
-{
- Text [ en-US ] = "Please enter the fax number";
-};
-
-String SV_PRINT_INVALID_TXT
-{
- Text [ en-US ] = "<ignore>";
-};
-
-String SV_PRINT_CUSTOM_TXT
-{
- Text [ en-US ] = "Custom";
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/src/stdtext.src b/vcl/source/src/stdtext.src
deleted file mode 100644
index d97c43ecc1eb..000000000000
--- a/vcl/source/src/stdtext.src
+++ /dev/null
@@ -1,82 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include <svids.hrc>
-
-String SV_STDTEXT_SERVICENOTAVAILABLE
-{
- Text [ en-US ] = "The component (%s) could not be loaded.\nPlease start setup with the repair option.";
-};
-
-String SV_STDTEXT_DONTASKAGAIN
-{
- Text [ en-US ] = "Do not show this question again.";
-};
-
-String SV_STDTEXT_DONTWARNAGAIN
-{
- Text [ en-US ] = "Do not show warning again.";
-};
-
-String SV_ACCESSERROR_NO_FONTS
-{
- Text [ en-US ] = "No fonts could be found on the system.";
-};
-
-String SV_STDTEXT_ABOUT
-{
- Text [ en-US ] = "About %PRODUCTNAME";
-};
-
-String SV_STDTEXT_PREFERENCES
-{
- Text [ en-US ] = "Preferences...";
-};
-
-String SV_EDIT_WARNING_STR
-{
- Text [en-US] = "The inserted text exceeded the maximum length of this text field. The text was truncated.";
-};
-
-String SV_STDTEXT_ALLFILETYPES
-{
- Text [en-US] = "Any type";
-};
-
-String SV_MSGBOX_INFO
-{
- Text [en-US] = "Information";
-};
-
-String SV_MSGBOX_WARNING
-{
- Text [en-US] = "Warning";
-};
-
-String SV_MSGBOX_ERROR
-{
- Text [en-US] = "Error";
-};
-
-String SV_MSGBOX_QUERY
-{
- Text [en-US] = "Confirmation";
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/src/units.src b/vcl/source/src/units.src
deleted file mode 100644
index 5de62091d2c4..000000000000
--- a/vcl/source/src/units.src
+++ /dev/null
@@ -1,53 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include <svids.hrc>
-
-StringArray SV_FUNIT_STRINGS
-{
- ItemList [ en-US ] =
- {
- < "mm" ; FUNIT_MM ; > ;
- < "cm" ; FUNIT_CM ; > ;
- < "m" ; FUNIT_M ; > ;
- < "km" ; FUNIT_KM ; > ;
- < "twips" ; FUNIT_TWIP ; > ;
- < "twip" ; FUNIT_TWIP ; > ;
- < "pt" ; FUNIT_POINT ; > ;
- < "pc" ; FUNIT_PICA ; > ;
- < "\"" ; FUNIT_INCH ; > ;
- < "in" ; FUNIT_INCH ; > ;
- < "inch" ; FUNIT_INCH ; > ;
- < "'" ; FUNIT_FOOT ; > ;
- < "ft" ; FUNIT_FOOT ; > ;
- < "foot" ; FUNIT_FOOT ; > ;
- < "feet" ; FUNIT_FOOT ; > ;
- < "miles" ; FUNIT_MILE ; > ;
- < "mile" ; FUNIT_MILE ; > ;
- < "ch" ; FUNIT_CHAR ; > ;
- < "line" ; FUNIT_LINE ; > ;
- < "pixels" ; FUNIT_PIXEL ; > ;
- < "pixel" ; FUNIT_PIXEL ; > ;
- < "°" ; FUNIT_DEGREE ; > ;
- < "sec" ; FUNIT_SECOND ; > ;
- < "ms" ; FUNIT_MILLISECOND ; > ;
- };
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx
index 7f48267a9499..ef11bca638a1 100644
--- a/vcl/source/window/brdwin.cxx
+++ b/vcl/source/window/brdwin.cxx
@@ -17,7 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <svids.hrc>
+#include <strings.hrc>
#include <svdata.hxx>
#include <brdwin.hxx>
#include <window.h>
@@ -293,37 +293,37 @@ OUString ImplBorderWindowView::ImplRequestHelp( ImplBorderFrameData const * pDat
const Point& rPos,
tools::Rectangle& rHelpRect )
{
- sal_uInt16 nHelpId = 0;
+ const char* pHelpId = nullptr;
OUString aHelpStr;
BorderWindowHitTest nHitTest = ImplHitTest( pData, rPos );
if ( nHitTest != BorderWindowHitTest::NONE )
{
if ( nHitTest & BorderWindowHitTest::Close )
{
- nHelpId = SV_HELPTEXT_CLOSE;
+ pHelpId = SV_HELPTEXT_CLOSE;
rHelpRect = pData->maCloseRect;
}
else if ( nHitTest & BorderWindowHitTest::Roll )
{
if ( pData->mpBorderWindow->mbRollUp )
- nHelpId = SV_HELPTEXT_ROLLDOWN;
+ pHelpId = SV_HELPTEXT_ROLLDOWN;
else
- nHelpId = SV_HELPTEXT_ROLLUP;
+ pHelpId = SV_HELPTEXT_ROLLUP;
rHelpRect = pData->maRollRect;
}
else if ( nHitTest & BorderWindowHitTest::Dock )
{
- nHelpId = SV_HELPTEXT_MAXIMIZE;
+ pHelpId = SV_HELPTEXT_MAXIMIZE;
rHelpRect = pData->maDockRect;
}
else if ( nHitTest & BorderWindowHitTest::Hide )
{
- nHelpId = SV_HELPTEXT_MINIMIZE;
+ pHelpId = SV_HELPTEXT_MINIMIZE;
rHelpRect = pData->maHideRect;
}
else if ( nHitTest & BorderWindowHitTest::Help )
{
- nHelpId = SV_HELPTEXT_HELP;
+ pHelpId = SV_HELPTEXT_HELP;
rHelpRect = pData->maHelpRect;
}
else if ( nHitTest & BorderWindowHitTest::Title )
@@ -341,8 +341,8 @@ OUString ImplBorderWindowView::ImplRequestHelp( ImplBorderFrameData const * pDat
}
}
- if( nHelpId && ImplGetResMgr() )
- aHelpStr = ResId(nHelpId, *ImplGetResMgr());
+ if (pHelpId)
+ aHelpStr = VclResId(pHelpId);
return aHelpStr;
}
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index e869039f666d..bc4b3047cfa0 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -13,7 +13,7 @@
#include <comphelper/processfactory.hxx>
#include <osl/module.hxx>
#include <sal/log.hxx>
-#include <unotools/configmgr.hxx>
+#include <tools/resmgr.hxx>
#include <vcl/builder.hxx>
#include <vcl/button.hxx>
#include <vcl/dialog.hxx>
@@ -39,10 +39,10 @@
#include <vcl/commandinfoprovider.hxx>
#include <svdata.hxx>
#include <bitmaps.hlst>
-#include <svids.hrc>
#include <window.h>
#include <xmlreader/xmlreader.hxx>
#include <desktop/crashreport.hxx>
+#include "strings.hrc"
#ifdef DISABLE_DYNLOADING
#include <dlfcn.h>
@@ -101,68 +101,6 @@ namespace
void setupFromActionName(Button *pButton, VclBuilder::stringmap &rMap, const css::uno::Reference<css::frame::XFrame>& rFrame);
}
-void VclBuilder::loadTranslations(const LanguageTag &rLanguageTag, const OUString& rUri)
-{
- /* FIXME-BCP47: support language tags with
- * LanguageTag::getFallbackStrings() ? */
- for (int i = rLanguageTag.getCountry().isEmpty() ? 1 : 0; i < 2; ++i)
- {
- OUStringBuffer aTransBuf;
- sal_Int32 nLastSlash = rUri.lastIndexOf('/');
- if (nLastSlash != -1)
- aTransBuf.append(rUri.copy(0, nLastSlash));
- else
- {
- aTransBuf.append('.');
- nLastSlash = 0;
- }
- aTransBuf.append("/res/");
- OUString sLang(rLanguageTag.getLanguage());
- switch (i)
- {
- case 0:
- sLang = sLang + "-" + rLanguageTag.getCountry();
- break;
- default:
- break;
- }
- aTransBuf.append(sLang);
- aTransBuf.append(".zip");
- sal_Int32 nEndName = rUri.lastIndexOf('.');
- if (nEndName == -1)
- nEndName = rUri.getLength();
- OUString sZippedFile(rUri.copy(nLastSlash + 1, nEndName - nLastSlash - 1) + "/" + sLang + ".ui");
- try
- {
- css::uno::Reference<css::packages::zip::XZipFileAccess2> xNameAccess =
- css::packages::zip::ZipFileAccess::createWithURL(
- comphelper::getProcessComponentContext(), aTransBuf.makeStringAndClear());
- if (!xNameAccess.is())
- continue;
- css::uno::Reference<css::io::XInputStream> xInputStream(xNameAccess->getByName(sZippedFile), css::uno::UNO_QUERY);
- if (!xInputStream.is())
- continue;
- OStringBuffer sStr;
- for (;;)
- {
- sal_Int32 const size = 2048;
- css::uno::Sequence< sal_Int8 > data(size);
- sal_Int32 n = xInputStream->readBytes(data, size);
- sStr.append(reinterpret_cast<const sal_Char *>(data.getConstArray()), n);
- if (n < size)
- break;
- }
-
- xmlreader::XmlReader reader(sStr.getStr(), sStr.getLength());
- handleTranslations(reader);
- break;
- }
- catch (const css::uno::Exception &)
- {
- }
- }
-}
-
#if defined SAL_LOG_WARN
namespace
{
@@ -183,7 +121,7 @@ namespace
VclBuilder::VclBuilder(vcl::Window *pParent, const OUString& sUIDir, const OUString& sUIFile, const OString& sID, const css::uno::Reference<css::frame::XFrame>& rFrame)
: m_sID(sID)
, m_sHelpRoot(OUStringToOString(sUIFile, RTL_TEXTENCODING_UTF8))
- , m_pStringReplace(ResMgr::GetReadStringHook())
+ , m_pStringReplace(Translate::GetReadStringHook())
, m_pParent(pParent)
, m_bToplevelParentFound(false)
, m_pParserState(new ParserState)
@@ -201,11 +139,6 @@ VclBuilder::VclBuilder(vcl::Window *pParent, const OUString& sUIDir, const OUStr
OUString sUri = sUIDir + sUIFile;
- const LanguageTag& rLanguageTag = Application::GetSettings().GetUILanguageTag();
- bool bEN_US = (rLanguageTag.getBcp47() == "en-US");
- if (!bEN_US)
- loadTranslations(rLanguageTag, sUri);
-
try
{
xmlreader::XmlReader reader(sUri);
@@ -544,55 +477,6 @@ void VclBuilder::disposeBuilder()
m_pParent.clear();
}
-void VclBuilder::handleTranslations(xmlreader::XmlReader &reader)
-{
- xmlreader::Span name;
- int nsId;
-
- OString sID, sProperty;
-
- while(true)
- {
- xmlreader::XmlReader::Result res = reader.nextItem(
- xmlreader::XmlReader::Text::Raw, &name, &nsId);
-
- if (res == xmlreader::XmlReader::Result::Begin)
- {
- if (name.equals("e"))
- {
- while (reader.nextAttribute(&nsId, &name))
- {
- if (name.equals("g"))
- {
- name = reader.getAttributeValue(false);
- sID = OString(name.begin, name.length);
- sal_Int32 nDelim = sID.indexOf(':');
- if (nDelim != -1)
- sID = sID.copy(nDelim);
- }
- else if (name.equals("i"))
- {
- name = reader.getAttributeValue(false);
- sProperty = OString(name.begin, name.length);
- }
- }
- }
- }
-
- if (res == xmlreader::XmlReader::Result::Text && !sID.isEmpty())
- {
- OString sTranslation(name.begin, name.length);
- m_pParserState->m_aTranslations[sID][sProperty] = sTranslation;
- }
-
- if (res == xmlreader::XmlReader::Result::End)
- sID.clear();
-
- if (res == xmlreader::XmlReader::Result::Done)
- break;
- }
-}
-
OUString VclBuilder::extractCustomProperty(VclBuilder::stringmap &rMap)
{
OUString sCustomProperty;
@@ -2186,6 +2070,19 @@ void VclBuilder::handleChild(vcl::Window *pParent, xmlreader::XmlReader &reader)
{
handlePacking(pCurrentChild, pParent, reader);
}
+ else if (name.equals("interface"))
+ {
+ while (reader.nextAttribute(&nsId, &name))
+ {
+ if (name.equals("domain"))
+ {
+ name = reader.getAttributeValue(false);
+ sType = OString(name.begin, name.length);
+ m_pParserState->m_aResLocale = Translate::Create(sType.getStr(), Application::GetSettings().GetUILanguageTag());
+ }
+ }
+ ++nLevel;
+ }
else
++nLevel;
}
@@ -2275,7 +2172,7 @@ void VclBuilder::collectAtkAttribute(xmlreader::XmlReader &reader, stringmap &rM
rMap[sProperty] = OUString::fromUtf8(sValue);
}
-void VclBuilder::handleRow(xmlreader::XmlReader &reader, const OString &rID, sal_Int32 nRowIndex)
+void VclBuilder::handleRow(xmlreader::XmlReader &reader, const OString &rID, sal_Int32 /*nRowIndex*/)
{
int nLevel = 1;
@@ -2298,8 +2195,8 @@ void VclBuilder::handleRow(xmlreader::XmlReader &reader, const OString &rID, sal
if (name.equals("col"))
{
bool bTranslated = false;
- OString sValue;
sal_uInt32 nId = 0;
+ OString sContext;
while (reader.nextAttribute(&nsId, &name))
{
@@ -2310,20 +2207,33 @@ void VclBuilder::handleRow(xmlreader::XmlReader &reader, const OString &rID, sal
}
else if (nId == 0 && name.equals("translatable") && reader.getAttributeValue(false).equals("yes"))
{
- sValue = getTranslation(rID, OString::number(nRowIndex));
- bTranslated = !sValue.isEmpty();
+ bTranslated = true;
+ }
+ else if (name.equals("context"))
+ {
+ name = reader.getAttributeValue(false);
+ sContext = OString(name.begin, name.length);
}
}
reader.nextItem(
xmlreader::XmlReader::Text::Raw, &name, &nsId);
- if (!bTranslated)
- sValue = OString(name.begin, name.length);
+ OString sValue = OString(name.begin, name.length);
+ OUString sFinalValue;
+ if (bTranslated)
+ {
+ if (!sContext.isEmpty())
+ sValue = sContext + "\004" + sValue;
+ sFinalValue = Translate::get(sValue.getStr(), m_pParserState->m_aResLocale);
+ }
+ else
+ sFinalValue = OUString::fromUtf8(sValue);
+
if (aRow.size() < nId+1)
aRow.resize(nId+1);
- aRow[nId] = OUString::fromUtf8(sValue);
+ aRow[nId] = sFinalValue;
}
}
@@ -2420,7 +2330,7 @@ void VclBuilder::handleAtkObject(xmlreader::XmlReader &reader, const OString &rI
}
}
-std::vector<OUString> VclBuilder::handleItems(xmlreader::XmlReader &reader, const OString & rID)
+std::vector<OUString> VclBuilder::handleItems(xmlreader::XmlReader &reader, const OString & /*rID*/)
{
int nLevel = 1;
@@ -2444,30 +2354,39 @@ std::vector<OUString> VclBuilder::handleItems(xmlreader::XmlReader &reader, cons
if (name.equals("item"))
{
bool bTranslated = false;
- OString sValue;
+ OString sContext;
while (reader.nextAttribute(&nsId, &name))
{
if (name.equals("translatable") && reader.getAttributeValue(false).equals("yes"))
{
- sValue = getTranslation(rID, OString::number(nItemIndex));
- bTranslated = !sValue.isEmpty();
+ bTranslated = true;
+ }
+ else if (name.equals("context"))
+ {
+ name = reader.getAttributeValue(false);
+ sContext = OString(name.begin, name.length);
}
}
reader.nextItem(
xmlreader::XmlReader::Text::Raw, &name, &nsId);
- if (!bTranslated)
- sValue = OString(name.begin, name.length);
-
- if (m_pStringReplace)
+ OString sValue = OString(name.begin, name.length);
+ OUString sFinalValue;
+ if (bTranslated)
{
- OUString sTmp = (*m_pStringReplace)(OStringToOUString(sValue, RTL_TEXTENCODING_UTF8));
- sValue = OUStringToOString(sTmp, RTL_TEXTENCODING_UTF8);
+ if (!sContext.isEmpty())
+ sValue = sContext + "\004" + sValue;
+ sFinalValue = Translate::get(sValue.getStr(), m_pParserState->m_aResLocale);
}
+ else
+ sFinalValue = OUString::fromUtf8(sValue);
- aItems.push_back(OUString::fromUtf8(sValue));
+ if (m_pStringReplace)
+ sFinalValue = (*m_pStringReplace)(sFinalValue);
+
+ aItems.push_back(sFinalValue);
++nItemIndex;
}
}
@@ -3184,26 +3103,12 @@ OString VclBuilder::getStyleClass(xmlreader::XmlReader &reader)
return aRet;
}
-OString VclBuilder::getTranslation(const OString &rID, const OString &rProperty) const
-{
- Translations::const_iterator aWidgetFind = m_pParserState->m_aTranslations.find(rID);
- if (aWidgetFind != m_pParserState->m_aTranslations.end())
- {
- const WidgetTranslations &rWidgetTranslations = aWidgetFind->second;
- WidgetTranslations::const_iterator aPropertyFind = rWidgetTranslations.find(rProperty);
- if (aPropertyFind != rWidgetTranslations.end())
- return aPropertyFind->second;
- }
- return OString();
-}
-
-void VclBuilder::collectProperty(xmlreader::XmlReader &reader, const OString &rID, stringmap &rMap)
+void VclBuilder::collectProperty(xmlreader::XmlReader &reader, const OString & /*rID*/, stringmap &rMap)
{
xmlreader::Span name;
int nsId;
- OString sProperty;
- OString sValue;
+ OString sProperty, sContext;
bool bTranslated = false;
@@ -3214,30 +3119,35 @@ void VclBuilder::collectProperty(xmlreader::XmlReader &reader, const OString &rI
name = reader.getAttributeValue(false);
sProperty = OString(name.begin, name.length);
}
+ else if (name.equals("context"))
+ {
+ name = reader.getAttributeValue(false);
+ sContext = OString(name.begin, name.length);
+ }
else if (name.equals("translatable") && reader.getAttributeValue(false).equals("yes"))
{
- sValue = getTranslation(rID, sProperty);
- bTranslated = !sValue.isEmpty();
+ bTranslated = true;
}
-
}
reader.nextItem(xmlreader::XmlReader::Text::Raw, &name, &nsId);
- if (!bTranslated)
- sValue = OString(name.begin, name.length);
+ OString sValue = OString(name.begin, name.length);
+ OUString sFinalValue;
+ if (bTranslated)
+ {
+ if (!sContext.isEmpty())
+ sValue = sContext + "\004" + sValue;
+ sFinalValue = Translate::get(sValue.getStr(), m_pParserState->m_aResLocale);
+ }
+ else
+ sFinalValue = OUString::fromUtf8(sValue);
if (!sProperty.isEmpty())
{
sProperty = sProperty.replace('_', '-');
if (m_pStringReplace)
- {
- OUString sTmp = (*m_pStringReplace)(OStringToOUString(sValue, RTL_TEXTENCODING_UTF8));
- rMap[sProperty] = sTmp;
- }
- else
- {
- rMap[sProperty] = OUString::fromUtf8(sValue);
- }
+ sFinalValue = (*m_pStringReplace)(sFinalValue);
+ rMap[sProperty] = sFinalValue;
}
}
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index 212dc4e4d600..af95cdcdd827 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -21,7 +21,7 @@
#include <vcl/abstdlg.hxx>
#include "svdata.hxx"
-#include <svids.hrc>
+#include <strings.hrc>
VclContainer::VclContainer(vcl::Window *pParent, WinBits nStyle)
: Window(WindowType::CONTAINER)
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index ad2c18a9cac0..4d87a2e37421 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -43,7 +43,7 @@
#include <salinst.hxx>
#include <svdata.hxx>
-#include <svids.hrc>
+#include <strings.hrc>
#include <window.h>
#include <salmenu.hxx>
#include <salframe.hxx>
@@ -2798,21 +2798,17 @@ sal_uInt16 PopupMenu::ImplExecute( const VclPtr<vcl::Window>& pW, const tools::R
sal_uInt16 nVisibleEntries = ImplGetVisibleItemCount();
if ( !nVisibleEntries )
{
- ResMgr* pResMgr = ImplGetResMgr();
- if( pResMgr )
- {
- OUString aTmpEntryText( ResId( SV_RESID_STRING_NOSELECTIONPOSSIBLE, *pResMgr ) );
+ OUString aTmpEntryText(VclResId(SV_RESID_STRING_NOSELECTIONPOSSIBLE));
- MenuItemData* pData = NbcInsertItem(0xFFFF, MenuItemBits::NONE, aTmpEntryText, nullptr, 0xFFFF, OString());
- size_t nPos = 0;
- pData = pItemList->GetData( pData->nId, nPos );
- assert(pData);
- if (pData)
- {
- pData->bIsTemporary = true;
- }
- ImplCallEventListeners(VclEventId::MenuSubmenuChanged, nPos);
+ MenuItemData* pData = NbcInsertItem(0xFFFF, MenuItemBits::NONE, aTmpEntryText, nullptr, 0xFFFF, OString());
+ size_t nPos = 0;
+ pData = pItemList->GetData( pData->nId, nPos );
+ assert(pData);
+ if (pData)
+ {
+ pData->bIsTemporary = true;
}
+ ImplCallEventListeners(VclEventId::MenuSubmenuChanged, nPos);
}
VclPtrInstance<MenuFloatingWindow> pWin( this, pW, WB_BORDER | WB_SYSTEMWINDOW );
diff --git a/vcl/source/window/menubarwindow.cxx b/vcl/source/window/menubarwindow.cxx
index 9daad8bee15d..58d97a1fba8f 100644
--- a/vcl/source/window/menubarwindow.cxx
+++ b/vcl/source/window/menubarwindow.cxx
@@ -28,7 +28,7 @@
#include <salframe.hxx>
#include <salmenu.hxx>
#include <svdata.hxx>
-#include <svids.hrc>
+#include <strings.hrc>
#include <bitmaps.hlst>
#include <window.h>
@@ -125,29 +125,24 @@ MenuBarWindow::MenuBarWindow( vcl::Window* pParent ) :
SetMBWHideAccel(true);
SetMBWMenuKey(false);
- ResMgr* pResMgr = ImplGetResMgr();
+ BitmapEx aBitmap(SV_RESID_BITMAP_CLOSEDOC);
+ aCloseBtn->maImage = Image(aBitmap);
- if(pResMgr)
- {
- BitmapEx aBitmap(SV_RESID_BITMAP_CLOSEDOC);
- aCloseBtn->maImage = Image(aBitmap);
-
- aCloseBtn->SetOutStyle(TOOLBOX_STYLE_FLAT);
- aCloseBtn->SetBackground();
- aCloseBtn->SetPaintTransparent(true);
- aCloseBtn->SetParentClipMode(ParentClipMode::NoClip);
+ aCloseBtn->SetOutStyle(TOOLBOX_STYLE_FLAT);
+ aCloseBtn->SetBackground();
+ aCloseBtn->SetPaintTransparent(true);
+ aCloseBtn->SetParentClipMode(ParentClipMode::NoClip);
- aCloseBtn->InsertItem(IID_DOCUMENTCLOSE, aCloseBtn->maImage);
- aCloseBtn->SetSelectHdl(LINK(this, MenuBarWindow, CloseHdl));
- aCloseBtn->AddEventListener(LINK(this, MenuBarWindow, ToolboxEventHdl));
- aCloseBtn->SetQuickHelpText(IID_DOCUMENTCLOSE, ResId(SV_HELPTEXT_CLOSEDOCUMENT, *pResMgr));
+ aCloseBtn->InsertItem(IID_DOCUMENTCLOSE, aCloseBtn->maImage);
+ aCloseBtn->SetSelectHdl(LINK(this, MenuBarWindow, CloseHdl));
+ aCloseBtn->AddEventListener(LINK(this, MenuBarWindow, ToolboxEventHdl));
+ aCloseBtn->SetQuickHelpText(IID_DOCUMENTCLOSE, VclResId(SV_HELPTEXT_CLOSEDOCUMENT));
- aFloatBtn->SetSymbol( SymbolType::FLOAT );
- aFloatBtn->SetQuickHelpText( ResId(SV_HELPTEXT_RESTORE, *pResMgr) );
+ aFloatBtn->SetSymbol( SymbolType::FLOAT );
+ aFloatBtn->SetQuickHelpText(VclResId(SV_HELPTEXT_RESTORE));
- aHideBtn->SetSymbol( SymbolType::HIDE );
- aHideBtn->SetQuickHelpText( ResId(SV_HELPTEXT_MINIMIZE, *pResMgr) );
- }
+ aHideBtn->SetSymbol( SymbolType::HIDE );
+ aHideBtn->SetQuickHelpText(VclResId(SV_HELPTEXT_MINIMIZE));
ImplInitStyleSettings();
diff --git a/vcl/source/window/menuitemlist.hxx b/vcl/source/window/menuitemlist.hxx
index 6fc2380b0361..cc344a433bda 100644
--- a/vcl/source/window/menuitemlist.hxx
+++ b/vcl/source/window/menuitemlist.hxx
@@ -17,7 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <rsc/rsc-vcl-shared-types.hxx>
+#include <vcl/vclenum.hxx>
#include <vcl/image.hxx>
#include <vcl/keycod.hxx>
#include <vcl/menu.hxx>
diff --git a/vcl/source/window/msgbox.cxx b/vcl/source/window/msgbox.cxx
index 297c06dd0c4e..e2bbde0e7c99 100644
--- a/vcl/source/window/msgbox.cxx
+++ b/vcl/source/window/msgbox.cxx
@@ -17,7 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <svids.hrc>
+#include <strings.hrc>
#include <bitmaps.hlst>
#include <svdata.hxx>
#include <brdwin.hxx>
@@ -394,11 +394,7 @@ Image InfoBox::GetStandardImage()
OUString InfoBox::GetStandardText()
{
- ResMgr* pResMgr = ImplGetResMgr();
- if( pResMgr )
- return ResId(SV_MSGBOX_INFO, *pResMgr);
-
- return Application::GetDisplayName();
+ return VclResId(SV_MSGBOX_INFO);
}
WarningBox::WarningBox( vcl::Window* pParent, WinBits nStyle,
@@ -414,9 +410,7 @@ WarningBox::WarningBox( vcl::Window* pParent, WinBits nStyle,
void WarningBox::SetDefaultCheckBoxText()
{
- ResMgr* pResMgr = ImplGetResMgr();
- if( pResMgr )
- maCheckBoxText = ResId(SV_STDTEXT_DONTWARNAGAIN, *pResMgr);
+ maCheckBoxText = VclResId(SV_STDTEXT_DONTWARNAGAIN);
}
Image WarningBox::GetStandardImage()
@@ -427,11 +421,7 @@ Image WarningBox::GetStandardImage()
OUString WarningBox::GetStandardText()
{
- ResMgr* pResMgr = ImplGetResMgr();
- if( pResMgr )
- return ResId(SV_MSGBOX_WARNING, *pResMgr);
-
- return Application::GetDisplayName();
+ return VclResId(SV_MSGBOX_WARNING);
}
ErrorBox::ErrorBox( vcl::Window* pParent, const OUString& rMessage ) :
@@ -472,11 +462,7 @@ Image ErrorBox::GetStandardImage()
OUString ErrorBox::GetStandardText()
{
- ResMgr* pResMgr = ImplGetResMgr();
- if( pResMgr )
- return ResId(SV_MSGBOX_ERROR, *pResMgr);
-
- return Application::GetDisplayName();
+ return VclResId(SV_MSGBOX_ERROR);
}
QueryBox::QueryBox( vcl::Window* pParent, WinBits nStyle, const OUString& rMessage ) :
@@ -491,9 +477,7 @@ QueryBox::QueryBox( vcl::Window* pParent, WinBits nStyle, const OUString& rMessa
void QueryBox::SetDefaultCheckBoxText()
{
- ResMgr* pResMgr = ImplGetResMgr();
- if( pResMgr )
- maCheckBoxText = ResId(SV_STDTEXT_DONTASKAGAIN, *pResMgr);
+ maCheckBoxText = VclResId(SV_STDTEXT_DONTASKAGAIN);
}
Image QueryBox::GetStandardImage()
@@ -504,11 +488,7 @@ Image QueryBox::GetStandardImage()
OUString QueryBox::GetStandardText()
{
- ResMgr* pResMgr = ImplGetResMgr();
- if( pResMgr )
- return ResId(SV_MSGBOX_QUERY, *pResMgr);
-
- return Application::GetDisplayName();
+ return VclResId(SV_MSGBOX_QUERY);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index c8c340343453..6c1d48550e92 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -19,7 +19,7 @@
#include "printdlg.hxx"
#include "svdata.hxx"
-#include "svids.hrc"
+#include "strings.hrc"
#include "bitmaps.hlst"
#include <vcl/print.hxx>
@@ -1464,6 +1464,9 @@ void PrintDialog::updateNupFromPages()
updateNup();
}
+#define SV_PRINT_PRT_NUP_ORIENTATION_PORTRAIT 1
+#define SV_PRINT_PRT_NUP_ORIENTATION_LANDSCAPE 2
+
void PrintDialog::updateNup()
{
int nRows = int(maNUpPage.mpNupRowsEdt->GetValue());
diff --git a/vcl/source/window/scrwnd.cxx b/vcl/source/window/scrwnd.cxx
index 04ac25328c07..f90e22b79d9e 100644
--- a/vcl/source/window/scrwnd.cxx
+++ b/vcl/source/window/scrwnd.cxx
@@ -20,7 +20,7 @@
#include <limits.h>
#include <tools/time.hxx>
-#include <svids.hrc>
+#include <strings.hrc>
#include <bitmaps.hlst>
#include <svdata.hxx>
#include <scrwnd.hxx>
diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx
index 18c82e76b782..4314a48d53b6 100644
--- a/vcl/source/window/splitwin.cxx
+++ b/vcl/source/window/splitwin.cxx
@@ -20,7 +20,6 @@
#include <string.h>
#include <tools/debug.hxx>
-#include <tools/rcid.h>
#include <vcl/event.hxx>
#include <vcl/wall.hxx>
@@ -31,10 +30,10 @@
#include <vcl/splitwin.hxx>
#include <vcl/settings.hxx>
-#include <rsc/rsc-vcl-shared-types.hxx>
+#include <vcl/vclenum.hxx>
#include <svdata.hxx>
-#include <svids.hrc>
+#include <strings.hrc>
#define SPLITWIN_SPLITSIZE 4
@@ -2325,20 +2324,20 @@ void SplitWindow::RequestHelp( const HelpEvent& rHEvt )
{
Point aMousePosPixel = ScreenToOutputPixel( rHEvt.GetMousePosPixel() );
tools::Rectangle aHelpRect;
- sal_uInt16 nHelpResId = 0;
+ const char* pHelpResId = nullptr;
ImplGetFadeInRect( aHelpRect, true );
if ( aHelpRect.IsInside( aMousePosPixel ) )
- nHelpResId = SV_HELPTEXT_FADEIN;
+ pHelpResId = SV_HELPTEXT_FADEIN;
else
{
ImplGetFadeOutRect( aHelpRect );
if ( aHelpRect.IsInside( aMousePosPixel ) )
- nHelpResId = SV_HELPTEXT_FADEOUT;
+ pHelpResId = SV_HELPTEXT_FADEOUT;
}
// get rectangle
- if ( nHelpResId )
+ if (pHelpResId)
{
Point aPt = OutputToScreenPixel( aHelpRect.TopLeft() );
aHelpRect.Left() = aPt.X();
@@ -2348,10 +2347,7 @@ void SplitWindow::RequestHelp( const HelpEvent& rHEvt )
aHelpRect.Bottom() = aPt.Y();
// get and draw text
- OUString aStr;
- ResMgr* pResMgr = ImplGetResMgr();
- if( pResMgr )
- aStr = ResId( nHelpResId, *pResMgr );
+ OUString aStr = VclResId(pHelpResId);
if ( rHEvt.GetMode() & HelpEventMode::BALLOON )
Help::ShowBalloon( this, aHelpRect.Center(), aHelpRect, aStr );
else
diff --git a/vcl/source/window/taskpanelist.cxx b/vcl/source/window/taskpanelist.cxx
index a11f8d78b826..d6825cf2b26c 100644
--- a/vcl/source/window/taskpanelist.cxx
+++ b/vcl/source/window/taskpanelist.cxx
@@ -17,8 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <tools/rcid.h>
-
#include <vcl/dockwin.hxx>
#include <vcl/taskpanelist.hxx>
diff --git a/vcl/uiconfig/ui/cupspassworddialog.ui b/vcl/uiconfig/ui/cupspassworddialog.ui
index 3e047a30bb39..f4fb757209bb 100644
--- a/vcl/uiconfig/ui/cupspassworddialog.ui
+++ b/vcl/uiconfig/ui/cupspassworddialog.ui
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.18.3 -->
-<interface>
+<interface domain="vcl">
<requires lib="gtk+" version="3.0"/>
<object class="GtkDialog" id="CUPSPasswordDialog">
<property name="can_focus">False</property>
<property name="border_width">6</property>
- <property name="title" translatable="yes">Authentication Request</property>
+ <property name="title" translatable="yes" context="cupspassworddialog|CUPSPasswordDialog">Authentication Request</property>
<property name="type_hint">normal</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
@@ -67,7 +67,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">1</property>
- <property name="label" translatable="yes">_User:</property>
+ <property name="label" translatable="yes" context="cupspassworddialog|label1">_User:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">user</property>
</object>
@@ -81,7 +81,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">1</property>
- <property name="label" translatable="yes">_Password:</property>
+ <property name="label" translatable="yes" context="cupspassworddialog|label2">_Password:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">pass</property>
</object>
@@ -95,7 +95,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes">Please enter your authentication data for server “%s”</property>
+ <property name="label" translatable="yes" context="cupspassworddialog|text">Please enter your authentication data for server “%s”</property>
<property name="use_underline">True</property>
<property name="wrap">True</property>
<property name="max_width_chars">56</property>
diff --git a/vcl/uiconfig/ui/editmenu.ui b/vcl/uiconfig/ui/editmenu.ui
index 9798605c8491..288a672555b2 100644
--- a/vcl/uiconfig/ui/editmenu.ui
+++ b/vcl/uiconfig/ui/editmenu.ui
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.20.0 -->
-<interface>
+<interface domain="vcl">
<requires lib="gtk+" version="3.10"/>
<object class="GtkMenu" id="menu">
<property name="visible">True</property>
@@ -9,7 +9,7 @@
<object class="GtkMenuItem" id="undo">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">_Undo</property>
+ <property name="label" translatable="yes" context="editmenu|undo">_Undo</property>
<property name="use_underline">True</property>
</object>
</child>
@@ -23,7 +23,7 @@
<object class="GtkMenuItem" id="cut">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Cu_t</property>
+ <property name="label" translatable="yes" context="editmenu|cut">Cu_t</property>
<property name="use_underline">True</property>
</object>
</child>
@@ -31,7 +31,7 @@
<object class="GtkMenuItem" id="copy">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">_Copy</property>
+ <property name="label" translatable="yes" context="editmenu|copy">_Copy</property>
<property name="use_underline">True</property>
</object>
</child>
@@ -39,7 +39,7 @@
<object class="GtkMenuItem" id="paste">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">_Paste</property>
+ <property name="label" translatable="yes" context="editmenu|paste">_Paste</property>
<property name="use_underline">True</property>
</object>
</child>
@@ -47,7 +47,7 @@
<object class="GtkMenuItem" id="delete">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">_Delete</property>
+ <property name="label" translatable="yes" context="editmenu|delete">_Delete</property>
<property name="use_underline">True</property>
</object>
</child>
@@ -61,7 +61,7 @@
<object class="GtkMenuItem" id="selectall">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Select _All</property>
+ <property name="label" translatable="yes" context="editmenu|selectall">Select _All</property>
<property name="use_underline">True</property>
<accelerator key="a" signal="activate" modifiers="GDK_CONTROL_MASK"/>
</object>
@@ -70,7 +70,7 @@
<object class="GtkMenuItem" id="specialchar">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">_Special Character...</property>
+ <property name="label" translatable="yes" context="editmenu|specialchar">_Special Character...</property>
<property name="use_underline">True</property>
<accelerator key="s" signal="activate" modifiers="GDK_SHIFT_MASK | GDK_CONTROL_MASK"/>
</object>
diff --git a/vcl/uiconfig/ui/errornocontentdialog.ui b/vcl/uiconfig/ui/errornocontentdialog.ui
index abe2be57400b..9dca59ed8f19 100644
--- a/vcl/uiconfig/ui/errornocontentdialog.ui
+++ b/vcl/uiconfig/ui/errornocontentdialog.ui
@@ -1,18 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.18.3 -->
-<interface>
+<interface domain="vcl">
<requires lib="gtk+" version="3.0"/>
<object class="GtkMessageDialog" id="ErrorNoContentDialog">
<property name="can_focus">False</property>
<property name="border_width">6</property>
- <property name="title" translatable="yes">%PRODUCTNAME</property>
+ <property name="title" translatable="yes" context="errornocontentdialog|ErrorNoContentDialog">%PRODUCTNAME</property>
<property name="resizable">False</property>
<property name="type_hint">dialog</property>
<property name="skip_taskbar_hint">True</property>
<property name="message_type">error</property>
<property name="buttons">ok</property>
- <property name="text" translatable="yes">There are no pages to be printed.</property>
- <property name="secondary_text" translatable="yes">Please check your document for ranges relevant to printing.</property>
+ <property name="text" translatable="yes" context="errornocontentdialog|ErrorNoContentDialog">There are no pages to be printed.</property>
+ <property name="secondary_text" translatable="yes" context="errornocontentdialog|ErrorNoContentDialog">Please check your document for ranges relevant to printing.</property>
<child internal-child="vbox">
<object class="GtkBox" id="messagedialog-vbox">
<property name="can_focus">False</property>
diff --git a/vcl/uiconfig/ui/errornoprinterdialog.ui b/vcl/uiconfig/ui/errornoprinterdialog.ui
index 207f62331b6a..9032b011bccf 100644
--- a/vcl/uiconfig/ui/errornoprinterdialog.ui
+++ b/vcl/uiconfig/ui/errornoprinterdialog.ui
@@ -1,18 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.18.3 -->
-<interface>
+<interface domain="vcl">
<requires lib="gtk+" version="3.0"/>
<object class="GtkMessageDialog" id="ErrorNoPrinterDialog">
<property name="can_focus">False</property>
<property name="border_width">6</property>
- <property name="title" translatable="yes">%PRODUCTNAME</property>
+ <property name="title" translatable="yes" context="errornoprinterdialog|ErrorNoPrinterDialog">%PRODUCTNAME</property>
<property name="resizable">False</property>
<property name="type_hint">dialog</property>
<property name="skip_taskbar_hint">True</property>
<property name="message_type">error</property>
<property name="buttons">ok</property>
- <property name="text" translatable="yes">No default printer found.</property>
- <property name="secondary_text" translatable="yes">Please choose a printer and try again.</property>
+ <property name="text" translatable="yes" context="errornoprinterdialog|ErrorNoPrinterDialog">No default printer found.</property>
+ <property name="secondary_text" translatable="yes" context="errornoprinterdialog|ErrorNoPrinterDialog">Please choose a printer and try again.</property>
<child internal-child="vbox">
<object class="GtkBox" id="messagedialog-vbox">
<property name="can_focus">False</property>
diff --git a/vcl/uiconfig/ui/printdialog.ui b/vcl/uiconfig/ui/printdialog.ui
index 50a86b55b658..3f216832c057 100644
--- a/vcl/uiconfig/ui/printdialog.ui
+++ b/vcl/uiconfig/ui/printdialog.ui
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.19.0 -->
-<interface>
+<!-- Generated with glade 3.20.0 -->
+<interface domain="vcl">
<requires lib="gtk+" version="3.0"/>
<requires lib="LibreOffice" version="1.0"/>
<object class="GtkAdjustment" id="adjustment1">
@@ -43,31 +43,31 @@
</columns>
<data>
<row>
- <col id="0" translatable="yes">1</col>
+ <col id="0" translatable="yes" context="printdialog|liststore1">1</col>
<col id="1">1</col>
</row>
<row>
- <col id="0" translatable="yes">2</col>
+ <col id="0" translatable="yes" context="printdialog|liststore1">2</col>
<col id="1">2</col>
</row>
<row>
- <col id="0" translatable="yes">4</col>
+ <col id="0" translatable="yes" context="printdialog|liststore1">4</col>
<col id="1">4</col>
</row>
<row>
- <col id="0" translatable="yes">6</col>
+ <col id="0" translatable="yes" context="printdialog|liststore1">6</col>
<col id="1">6</col>
</row>
<row>
- <col id="0" translatable="yes">9</col>
+ <col id="0" translatable="yes" context="printdialog|liststore1">9</col>
<col id="1">9</col>
</row>
<row>
- <col id="0" translatable="yes">16</col>
+ <col id="0" translatable="yes" context="printdialog|liststore1">16</col>
<col id="1">16</col>
</row>
<row>
- <col id="0" translatable="yes">Custom</col>
+ <col id="0" translatable="yes" context="printdialog|liststore1">Custom</col>
<col id="1">65535</col>
</row>
</data>
@@ -79,16 +79,16 @@
</columns>
<data>
<row>
- <col id="0" translatable="yes">left to right, then down</col>
+ <col id="0" translatable="yes" context="printdialog|liststore2">left to right, then down</col>
</row>
<row>
- <col id="0" translatable="yes">top to bottom, then right</col>
+ <col id="0" translatable="yes" context="printdialog|liststore2">top to bottom, then right</col>
</row>
<row>
- <col id="0" translatable="yes">top to bottom, then left</col>
+ <col id="0" translatable="yes" context="printdialog|liststore2">top to bottom, then left</col>
</row>
<row>
- <col id="0" translatable="yes">right to left, then down</col>
+ <col id="0" translatable="yes" context="printdialog|liststore2">right to left, then down</col>
</row>
</data>
</object>
@@ -99,20 +99,20 @@
</columns>
<data>
<row>
- <col id="0" translatable="yes">Automatic</col>
+ <col id="0" translatable="yes" context="printdialog|liststore3">Automatic</col>
</row>
<row>
- <col id="0" translatable="yes">Portrait</col>
+ <col id="0" translatable="yes" context="printdialog|liststore3">Portrait</col>
</row>
<row>
- <col id="0" translatable="yes">Landscape</col>
+ <col id="0" translatable="yes" context="printdialog|liststore3">Landscape</col>
</row>
</data>
</object>
<object class="GtkDialog" id="PrintDialog">
<property name="can_focus">False</property>
<property name="border_width">6</property>
- <property name="title" translatable="yes">Print</property>
+ <property name="title" translatable="yes" context="printdialog|PrintDialog">Print</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
@@ -230,7 +230,7 @@
<object class="GtkLabel" id="totalnumpages">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">/ %n</property>
+ <property name="label" translatable="yes" context="printdialog|totalnumpages">/ %n</property>
</object>
<packing>
<property name="expand">False</property>
@@ -329,8 +329,8 @@
<object class="GtkLabel" id="label7">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="label" translatable="yes" context="printdialog|label7">Status:</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes">Status:</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -341,8 +341,8 @@
<object class="GtkLabel" id="label8">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="label" translatable="yes" context="printdialog|label8">Location:</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes">Location:</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -353,8 +353,8 @@
<object class="GtkLabel" id="label9">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="label" translatable="yes" context="printdialog|label9">Comment:</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes">Comment:</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -365,8 +365,8 @@
<object class="GtkLabel" id="status">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="label" translatable="yes" context="printdialog|status">Default printer</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes">Default printer</property>
</object>
<packing>
<property name="left_attach">1</property>
@@ -377,8 +377,8 @@
<object class="GtkLabel" id="location">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="label" translatable="yes" context="printdialog|location">Place</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes">Place</property>
</object>
<packing>
<property name="left_attach">1</property>
@@ -389,8 +389,8 @@
<object class="GtkLabel" id="comment">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="label" translatable="yes" context="printdialog|comment">Long printer name</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes">Long printer name</property>
</object>
<packing>
<property name="left_attach">1</property>
@@ -403,7 +403,7 @@
<object class="GtkLabel" id="label6">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Details</property>
+ <property name="label" translatable="yes" context="printdialog|label6">Details</property>
</object>
</child>
</object>
@@ -414,7 +414,7 @@
</child>
<child>
<object class="GtkButton" id="setup">
- <property name="label" translatable="yes">Properties...</property>
+ <property name="label" translatable="yes" context="printdialog|setup">Properties...</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -450,7 +450,7 @@
<object class="GtkLabel" id="label5">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Printer</property>
+ <property name="label" translatable="yes" context="printdialog|label5">Printer</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
@@ -490,7 +490,7 @@
<object class="GtkLabel" id="label14">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Number of copies</property>
+ <property name="label" translatable="yes" context="printdialog|label14">Number of copies</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">copycount</property>
</object>
@@ -528,7 +528,7 @@
<property name="spacing">12</property>
<child>
<object class="GtkCheckButton" id="collate">
- <property name="label" translatable="yes">Collate</property>
+ <property name="label" translatable="yes" context="printdialog|collate">Collate</property>
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">True</property>
@@ -585,7 +585,7 @@
<property name="spacing">6</property>
<child>
<object class="GtkRadioButton" id="printallsheets">
- <property name="label" translatable="yes">All sheets</property>
+ <property name="label" translatable="yes" context="printdialog|printallsheets">All sheets</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="no_show_all">True</property>
@@ -602,7 +602,7 @@
</child>
<child>
<object class="GtkRadioButton" id="printselectedsheets">
- <property name="label" translatable="yes">Selected sheets</property>
+ <property name="label" translatable="yes" context="printdialog|printselectedsheets">Selected sheets</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="no_show_all">True</property>
@@ -618,7 +618,7 @@
</child>
<child>
<object class="GtkRadioButton" id="printselectedcells">
- <property name="label" translatable="yes">Selected cells</property>
+ <property name="label" translatable="yes" context="printdialog|printselectedcells">Selected cells</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="no_show_all">True</property>
@@ -643,8 +643,8 @@
<object class="GtkLabel" id="fromwhich">
<property name="can_focus">False</property>
<property name="no_show_all">True</property>
+ <property name="label" translatable="yes" context="printdialog|fromwhich">From which print</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes">From which print</property>
</object>
<packing>
<property name="expand">False</property>
@@ -661,7 +661,7 @@
<property name="spacing">6</property>
<child>
<object class="GtkRadioButton" id="printallpages">
- <property name="label" translatable="yes">All pages</property>
+ <property name="label" translatable="yes" context="printdialog|printallpages">All pages</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="no_show_all">True</property>
@@ -682,7 +682,7 @@
<property name="spacing">12</property>
<child>
<object class="GtkRadioButton" id="printpages">
- <property name="label" translatable="yes">Pages</property>
+ <property name="label" translatable="yes" context="printdialog|printpages">Pages</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="no_show_all">True</property>
@@ -717,7 +717,7 @@
</child>
<child>
<object class="GtkRadioButton" id="printselection">
- <property name="label" translatable="yes">Selection</property>
+ <property name="label" translatable="yes" context="printdialog|printselection">Selection</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="no_show_all">True</property>
@@ -733,7 +733,7 @@
</child>
<child>
<object class="GtkCheckButton" id="reverseorder">
- <property name="label" translatable="yes">Print in reverse page order</property>
+ <property name="label" translatable="yes" context="printdialog|reverseorder">Print in reverse page order</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
@@ -765,7 +765,7 @@
<object class="GtkLabel" id="label13">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Range and Copies</property>
+ <property name="label" translatable="yes" context="printdialog|label13">Range and Copies</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
@@ -798,7 +798,7 @@
<object class="GtkLabel" id="label16">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Comments</property>
+ <property name="label" translatable="yes" context="printdialog|label16">Comments</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">writercomments</property>
</object>
@@ -827,7 +827,7 @@
<object class="GtkLabel" id="label15">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Print</property>
+ <property name="label" translatable="yes" context="printdialog|label15">Print</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
@@ -866,7 +866,7 @@
<object class="GtkLabel" id="label10">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Document</property>
+ <property name="label" translatable="yes" context="printdialog|label10">Document</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">impressdocument</property>
</object>
@@ -903,7 +903,7 @@
<object class="GtkLabel" id="label12">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Slides per page</property>
+ <property name="label" translatable="yes" context="printdialog|label12">Slides per page</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">slidesperpage</property>
</object>
@@ -928,7 +928,7 @@
<object class="GtkLabel" id="label19">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Order</property>
+ <property name="label" translatable="yes" context="printdialog|label19">Order</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">slidesperpageorder</property>
</object>
@@ -964,7 +964,7 @@
<object class="GtkLabel" id="label11">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Print</property>
+ <property name="label" translatable="yes" context="printdialog|label11">Print</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
@@ -982,7 +982,7 @@
<child type="tab">
<object class="GtkLabel" id="label1">
<property name="can_focus">False</property>
- <property name="label" translatable="yes">General</property>
+ <property name="label" translatable="yes" context="printdialog|label1">General</property>
</object>
<packing>
<property name="tab_fill">False</property>
@@ -1006,7 +1006,7 @@
<object class="GtkLabel" id="customlabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">custom</property>
+ <property name="label" translatable="yes" context="printdialog|customlabel">custom</property>
</object>
<packing>
<property name="position">1</property>
@@ -1056,7 +1056,7 @@
<property name="can_focus">False</property>
<child>
<object class="GtkRadioButton" id="pagespersheetbtn">
- <property name="label" translatable="yes">Pages per sheet</property>
+ <property name="label" translatable="yes" context="printdialog|pagespersheetbtn">Pages per sheet</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
@@ -1089,7 +1089,7 @@
</child>
<child>
<object class="GtkRadioButton" id="brochure">
- <property name="label" translatable="yes">Brochure</property>
+ <property name="label" translatable="yes" context="printdialog|brochure">Brochure</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
@@ -1109,7 +1109,7 @@
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="margin_left">12</property>
- <property name="label" translatable="yes">Pages</property>
+ <property name="label" translatable="yes" context="printdialog|pagestxt">Pages</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">pagecols</property>
</object>
@@ -1124,7 +1124,7 @@
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="margin_left">12</property>
- <property name="label" translatable="yes">Margin</property>
+ <property name="label" translatable="yes" context="printdialog|sheetmargintxt1">Margin</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">sheetmarginsb:0mm</property>
</object>
@@ -1139,7 +1139,7 @@
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="margin_left">12</property>
- <property name="label" translatable="yes">Orientation</property>
+ <property name="label" translatable="yes" context="printdialog|orientationtxt">Orientation</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">orientationlb</property>
</object>
@@ -1154,7 +1154,7 @@
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="margin_left">12</property>
- <property name="label" translatable="yes">Distance</property>
+ <property name="label" translatable="yes" context="printdialog|pagemargintxt1">Distance</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">pagemarginsb:0mm</property>
</object>
@@ -1241,7 +1241,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
- <property name="label" translatable="yes">by</property>
+ <property name="label" translatable="yes" context="printdialog|by">by</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">pagerows</property>
</object>
@@ -1255,7 +1255,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
- <property name="label" translatable="yes">between pages</property>
+ <property name="label" translatable="yes" context="printdialog|pagemargintxt2">between pages</property>
</object>
<packing>
<property name="left_attach">2</property>
@@ -1268,7 +1268,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
- <property name="label" translatable="yes">to sheet border</property>
+ <property name="label" translatable="yes" context="printdialog|sheetmargintxt2">to sheet border</property>
</object>
<packing>
<property name="left_attach">2</property>
@@ -1278,7 +1278,7 @@
</child>
<child>
<object class="GtkCheckButton" id="bordercb">
- <property name="label" translatable="yes">Draw a border around each page</property>
+ <property name="label" translatable="yes" context="printdialog|bordercb">Draw a border around each page</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
@@ -1299,7 +1299,7 @@
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="margin_left">12</property>
- <property name="label" translatable="yes">Order</property>
+ <property name="label" translatable="yes" context="printdialog|ordertxt">Order</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">orderlb</property>
</object>
@@ -1338,7 +1338,7 @@
<object class="GtkLabel" id="label18">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Layout</property>
+ <property name="label" translatable="yes" context="printdialog|label18">Layout</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
@@ -1372,7 +1372,7 @@
<object class="GtkLabel" id="label17">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Include</property>
+ <property name="label" translatable="yes" context="printdialog|label17">Include</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">brochureinclude</property>
</object>
@@ -1401,7 +1401,7 @@
<object class="GtkLabel" id="label3">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Page Sides</property>
+ <property name="label" translatable="yes" context="printdialog|label3">Page Sides</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
@@ -1423,7 +1423,7 @@
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Page Layout</property>
+ <property name="label" translatable="yes" context="printdialog|label2">Page Layout</property>
</object>
<packing>
<property name="position">2</property>
@@ -1450,7 +1450,7 @@
<property name="row_spacing">6</property>
<child>
<object class="GtkCheckButton" id="singleprintjob">
- <property name="label" translatable="yes">Create single print jobs for collated output</property>
+ <property name="label" translatable="yes" context="printdialog|singleprintjob">Create single print jobs for collated output</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
@@ -1464,7 +1464,7 @@
</child>
<child>
<object class="GtkCheckButton" id="printpaperfromsetup">
- <property name="label" translatable="yes">Use only paper tray from printer preferences</property>
+ <property name="label" translatable="yes" context="printdialog|printpaperfromsetup">Use only paper tray from printer preferences</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="xalign">0</property>
@@ -1477,7 +1477,7 @@
</child>
<child>
<object class="GtkCheckButton" id="papersizefromsetup">
- <property name="label" translatable="yes">Use only paper size from printer preferences</property>
+ <property name="label" translatable="yes" context="printdialog|papersizefromsetup">Use only paper size from printer preferences</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
@@ -1498,7 +1498,7 @@
<object class="GtkLabel" id="label21">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Options</property>
+ <property name="label" translatable="yes" context="printdialog|label21">Options</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
@@ -1513,7 +1513,7 @@
<object class="GtkLabel" id="label20">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Options</property>
+ <property name="label" translatable="yes" context="printdialog|label20">Options</property>
</object>
<packing>
<property name="position">3</property>
diff --git a/vcl/uiconfig/ui/printerdevicepage.ui b/vcl/uiconfig/ui/printerdevicepage.ui
index 0670414c6958..5cc0732ec026 100644
--- a/vcl/uiconfig/ui/printerdevicepage.ui
+++ b/vcl/uiconfig/ui/printerdevicepage.ui
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.18.3 -->
-<interface>
+<interface domain="vcl">
<requires lib="gtk+" version="3.0"/>
<object class="GtkListStore" id="liststore1">
<columns>
@@ -11,27 +11,27 @@
</columns>
<data>
<row>
- <col id="0" translatable="yes">Automatic : %s</col>
+ <col id="0" translatable="yes" context="printerdevicepage|liststore1">Automatic : %s</col>
<col id="1">0</col>
</row>
<row>
- <col id="0" translatable="yes">PostScript (Level from driver)</col>
+ <col id="0" translatable="yes" context="printerdevicepage|liststore1">PostScript (Level from driver)</col>
<col id="1">1</col>
</row>
<row>
- <col id="0" translatable="yes">PostScript Level 1</col>
+ <col id="0" translatable="yes" context="printerdevicepage|liststore1">PostScript Level 1</col>
<col id="1">2</col>
</row>
<row>
- <col id="0" translatable="yes">PostScript Level 2</col>
+ <col id="0" translatable="yes" context="printerdevicepage|liststore1">PostScript Level 2</col>
<col id="1">3</col>
</row>
<row>
- <col id="0" translatable="yes">PostScript Level 3</col>
+ <col id="0" translatable="yes" context="printerdevicepage|liststore1">PostScript Level 3</col>
<col id="1">4</col>
</row>
<row>
- <col id="0" translatable="yes">PDF</col>
+ <col id="0" translatable="yes" context="printerdevicepage|liststore1">PDF</col>
<col id="1">10</col>
</row>
</data>
@@ -50,7 +50,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes">_Option:</property>
+ <property name="label" translatable="yes" context="printerdevicepage|label7">_Option:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">options:border</property>
</object>
@@ -64,7 +64,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes">Current _value:</property>
+ <property name="label" translatable="yes" context="printerdevicepage|label8">Current _value:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">values:border</property>
</object>
@@ -137,7 +137,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">1</property>
- <property name="label" translatable="yes">Color _depth:</property>
+ <property name="label" translatable="yes" context="printerdevicepage|label11">Color _depth:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">colordepth</property>
</object>
@@ -151,7 +151,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">1</property>
- <property name="label" translatable="yes">Co_lor:</property>
+ <property name="label" translatable="yes" context="printerdevicepage|label10">Co_lor:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">colorspace</property>
</object>
@@ -165,7 +165,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">1</property>
- <property name="label" translatable="yes">Printer language _type:</property>
+ <property name="label" translatable="yes" context="printerdevicepage|label9">Printer language _type:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">level</property>
</object>
@@ -191,9 +191,9 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<items>
- <item translatable="yes">From driver</item>
- <item translatable="yes">Color</item>
- <item translatable="yes">Grayscale</item>
+ <item translatable="yes" context="printerdevicepage|colorspace">From driver</item>
+ <item translatable="yes" context="printerdevicepage|colorspace">Color</item>
+ <item translatable="yes" context="printerdevicepage|colorspace">Grayscale</item>
</items>
</object>
<packing>
@@ -206,8 +206,8 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<items>
- <item translatable="yes">8 Bit</item>
- <item translatable="yes">24 Bit</item>
+ <item translatable="yes" context="printerdevicepage|colordepth">8 Bit</item>
+ <item translatable="yes" context="printerdevicepage|colordepth">24 Bit</item>
</items>
</object>
<packing>
diff --git a/vcl/uiconfig/ui/printerpaperpage.ui b/vcl/uiconfig/ui/printerpaperpage.ui
index dc6b044b006b..90d72859708d 100644
--- a/vcl/uiconfig/ui/printerpaperpage.ui
+++ b/vcl/uiconfig/ui/printerpaperpage.ui
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.18.3 -->
-<interface>
+<interface domain="vcl">
<requires lib="gtk+" version="3.0"/>
<object class="GtkGrid" id="PrinterPaperPage">
<property name="visible">True</property>
@@ -17,7 +17,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">1</property>
- <property name="label" translatable="yes">_Paper size:</property>
+ <property name="label" translatable="yes" context="printerpaperpage|paperft">_Paper size:</property>
<property name="use_underline">True</property>
</object>
<packing>
@@ -30,7 +30,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">1</property>
- <property name="label" translatable="yes">_Orientation:</property>
+ <property name="label" translatable="yes" context="printerpaperpage|label4">_Orientation:</property>
<property name="use_underline">True</property>
</object>
<packing>
@@ -43,7 +43,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">1</property>
- <property name="label" translatable="yes">_Duplex:</property>
+ <property name="label" translatable="yes" context="printerpaperpage|duplexft">_Duplex:</property>
<property name="use_underline">True</property>
</object>
<packing>
@@ -56,7 +56,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">1</property>
- <property name="label" translatable="yes">Paper tray:</property>
+ <property name="label" translatable="yes" context="printerpaperpage|slotft">Paper tray:</property>
<property name="use_underline">True</property>
</object>
<packing>
@@ -79,8 +79,8 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<items>
- <item translatable="yes">Portrait</item>
- <item translatable="yes">Landscape</item>
+ <item translatable="yes" context="printerpaperpage|orientlb">Portrait</item>
+ <item translatable="yes" context="printerpaperpage|orientlb">Landscape</item>
</items>
</object>
<packing>
diff --git a/vcl/uiconfig/ui/printerpropertiesdialog.ui b/vcl/uiconfig/ui/printerpropertiesdialog.ui
index bae99ac01813..a75e06278cb1 100644
--- a/vcl/uiconfig/ui/printerpropertiesdialog.ui
+++ b/vcl/uiconfig/ui/printerpropertiesdialog.ui
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.18.3 -->
-<interface>
+<interface domain="vcl">
<requires lib="gtk+" version="3.0"/>
<object class="GtkDialog" id="PrinterPropertiesDialog">
<property name="can_focus">False</property>
<property name="border_width">6</property>
- <property name="title" translatable="yes">Properties of %s</property>
+ <property name="title" translatable="yes" context="printerpropertiesdialog|PrinterPropertiesDialog">Properties of %s</property>
<property name="resizable">False</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
@@ -68,7 +68,7 @@
<object class="GtkLabel" id="paper">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Paper</property>
+ <property name="label" translatable="yes" context="printerpropertiesdialog|paper">Paper</property>
</object>
<packing>
<property name="position">1</property>
@@ -82,7 +82,7 @@
<object class="GtkLabel" id="device">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Device</property>
+ <property name="label" translatable="yes" context="printerpropertiesdialog|device">Device</property>
</object>
<packing>
<property name="position">2</property>
diff --git a/vcl/uiconfig/ui/printprogressdialog.ui b/vcl/uiconfig/ui/printprogressdialog.ui
index 4f60fefdb689..3490b3a2c969 100644
--- a/vcl/uiconfig/ui/printprogressdialog.ui
+++ b/vcl/uiconfig/ui/printprogressdialog.ui
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.18.3 -->
-<interface>
+<interface domain="vcl">
<requires lib="gtk+" version="3.0"/>
<object class="GtkDialog" id="PrintProgressDialog">
<property name="can_focus">False</property>
<property name="border_width">6</property>
- <property name="title" translatable="yes">Printing</property>
+ <property name="title" translatable="yes" context="printprogressdialog|PrintProgressDialog">Printing</property>
<property name="resizable">False</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
@@ -51,7 +51,7 @@
<object class="GtkLabel" id="label">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Page %p of %n</property>
+ <property name="label" translatable="yes" context="printprogressdialog|label">Page %p of %n</property>
</object>
<packing>
<property name="left_attach">0</property>
diff --git a/vcl/uiconfig/ui/querydialog.ui b/vcl/uiconfig/ui/querydialog.ui
index b86de6511972..a6e294002a83 100644
--- a/vcl/uiconfig/ui/querydialog.ui
+++ b/vcl/uiconfig/ui/querydialog.ui
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.18.3 -->
-<interface>
+<interface domain="vcl">
<requires lib="gtk+" version="3.0"/>
<object class="GtkDialog" id="QueryDialog">
<property name="can_focus">False</property>
<property name="border_width">6</property>
- <property name="title" translatable="yes">New Data Type</property>
+ <property name="title" translatable="yes" context="querydialog|QueryDialog">New Data Type</property>
<property name="type_hint">normal</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
diff --git a/vcl/unx/generic/print/genprnpsp.cxx b/vcl/unx/generic/print/genprnpsp.cxx
index 40a12e5e6aa1..d400e1d8178b 100644
--- a/vcl/unx/generic/print/genprnpsp.cxx
+++ b/vcl/unx/generic/print/genprnpsp.cxx
@@ -47,7 +47,7 @@
#include <vcl/pdfwriter.hxx>
#include "printerinfomanager.hxx"
#include <vcl/settings.hxx>
-#include "svids.hrc"
+#include "strings.hrc"
#include "saldatabasic.hxx"
#include "unx/genprn.h"
#include "unx/geninst.h"
diff --git a/vcl/unx/generic/print/prtsetup.cxx b/vcl/unx/generic/print/prtsetup.cxx
index 02684af1e765..4d24260e8fbd 100644
--- a/vcl/unx/generic/print/prtsetup.cxx
+++ b/vcl/unx/generic/print/prtsetup.cxx
@@ -19,7 +19,7 @@
#include "prtsetup.hxx"
#include "svdata.hxx"
-#include "svids.hrc"
+#include "strings.hrc"
#include "osl/thread.h"
diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx
index 8140019c7e27..e176045ddba2 100644
--- a/vcl/unx/generic/window/salframe.cxx
+++ b/vcl/unx/generic/window/salframe.cxx
@@ -66,7 +66,7 @@
#include <com/sun/star/uno/Exception.hpp>
#include "svdata.hxx"
-#include "svids.hrc"
+#include "strings.hrc"
#include "bitmaps.hlst"
#include "impbmp.hxx"
diff --git a/vcl/unx/gtk/fpicker/resourceprovider.cxx b/vcl/unx/gtk/fpicker/resourceprovider.cxx
index c4da0258b8c6..349247c9235a 100644
--- a/vcl/unx/gtk/fpicker/resourceprovider.cxx
+++ b/vcl/unx/gtk/fpicker/resourceprovider.cxx
@@ -22,7 +22,7 @@
#include <com/sun/star/ui/dialogs/CommonFilePickerElementIds.hpp>
#include <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp>
-#include "svids.hrc"
+#include "strings.hrc"
#include "svdata.hxx"
#include "gtk/fpicker/SalGtkPicker.hxx"
@@ -34,7 +34,7 @@ using namespace ::com::sun::star::ui::dialogs::CommonFilePickerElementIds;
static const struct
{
sal_Int32 ctrlId;
- sal_Int16 resId;
+ const char *resId;
} CtrlIdToResIdTable[] = {
{ CHECKBOX_AUTOEXTENSION, STR_FPICKER_AUTO_EXTENSION },
{ CHECKBOX_PASSWORD, STR_FPICKER_PASSWORD },
@@ -57,30 +57,23 @@ static const struct
{ FILE_PICKER_FILE_TYPE, STR_FPICKER_TYPE }
};
-static sal_Int16 CtrlIdToResId( sal_Int32 aControlId )
+static const char* CtrlIdToResId( sal_Int32 aControlId )
{
for (auto & i : CtrlIdToResIdTable)
{
if ( i.ctrlId == aControlId )
return i.resId;
}
- return -1;
+ return nullptr;
}
OUString SalGtkPicker::getResString( sal_Int32 aId )
{
OUString aResString;
- try
- {
- // translate the control id to a resource id
- sal_Int16 aResId = CtrlIdToResId( aId );
- if ( aResId > -1 )
- aResString = ResId(aResId, *ImplGetResMgr());
- }
- catch(...)
- {
- }
-
+ // translate the control id to a resource id
+ const char *pResId = CtrlIdToResId( aId );
+ if (pResId)
+ aResString = VclResId(pResId);
return aResString.replace('~', '_');
}
diff --git a/vcl/unx/gtk/gtksalframe.cxx b/vcl/unx/gtk/gtksalframe.cxx
index 0e2e572de0f3..e64f68266d01 100644
--- a/vcl/unx/gtk/gtksalframe.cxx
+++ b/vcl/unx/gtk/gtksalframe.cxx
@@ -56,7 +56,8 @@
#include <dlfcn.h>
#include <vcl/salbtype.hxx>
#include <impbmp.hxx>
-#include <svids.hrc>
+#include <strings.hrc>
+#include <bitmaps.hlst>
#include <sal/macros.h>
#include <basegfx/range/b2ibox.hxx>
@@ -633,15 +634,14 @@ gboolean ensure_dbus_setup( gpointer data )
gdk_x11_window_set_utf8_property( gdkWindow, "_GTK_APP_MENU_OBJECT_PATH", "/org/libreoffice/menus/appmenu" );
//app menu, to-do translations, block normal menus when active, honor use appmenu settings
- ResMgr* pMgr = ImplGetResMgr();
- if( pMgr && !bDesktopIsUnity )
+ if (!bDesktopIsUnity )
{
GMenu *menu = g_menu_new ();
GMenuItem* item;
GMenu *firstsubmenu = g_menu_new ();
- OString sNew(OUStringToOString(ResId(SV_BUTTONTEXT_NEW, *pMgr),
+ OString sNew(OUStringToOString(VclResId(SV_BUTTONTEXT_NEW),
RTL_TEXTENCODING_UTF8).replaceFirst("~", "_"));
item = g_menu_item_new(sNew.getStr(), "app.New");
@@ -653,7 +653,7 @@ gboolean ensure_dbus_setup( gpointer data )
GMenu *secondsubmenu = g_menu_new ();
- OString sPreferences(OUStringToOString(ResId(SV_STDTEXT_PREFERENCES, *pMgr),
+ OString sPreferences(OUStringToOString(VclResId(SV_STDTEXT_PREFERENCES),
RTL_TEXTENCODING_UTF8).replaceFirst("~", "_"));
item = g_menu_item_new(sPreferences.getStr(), "app.OptionsTreeDialog");
@@ -665,21 +665,21 @@ gboolean ensure_dbus_setup( gpointer data )
GMenu *thirdsubmenu = g_menu_new ();
- OString sHelp(OUStringToOString(ResId(SV_BUTTONTEXT_HELP, *pMgr),
+ OString sHelp(OUStringToOString(VclResId(SV_BUTTONTEXT_HELP),
RTL_TEXTENCODING_UTF8).replaceFirst("~", "_"));
item = g_menu_item_new(sHelp.getStr(), "app.HelpIndex");
g_menu_append_item( thirdsubmenu, item );
g_object_unref(item);
- OString sAbout(OUStringToOString(ResId(SV_STDTEXT_ABOUT, *pMgr),
+ OString sAbout(OUStringToOString(VclResId(SV_STDTEXT_ABOUT),
RTL_TEXTENCODING_UTF8).replaceFirst("~", "_"));
item = g_menu_item_new(sAbout.getStr(), "app.About");
g_menu_append_item( thirdsubmenu, item );
g_object_unref(item);
- OString sQuit(OUStringToOString(ResId(SV_MENU_MAC_QUITAPP, *pMgr),
+ OString sQuit(OUStringToOString(VclResId(SV_MENU_MAC_QUITAPP),
RTL_TEXTENCODING_UTF8).replaceFirst("~", "_"));
item = g_menu_item_new(sQuit.getStr(), "app.Quit");
diff --git a/vcl/unx/gtk/gtksalmenu.cxx b/vcl/unx/gtk/gtksalmenu.cxx
index 716be616af0b..6f16984ba6d0 100644
--- a/vcl/unx/gtk/gtksalmenu.cxx
+++ b/vcl/unx/gtk/gtksalmenu.cxx
@@ -23,7 +23,7 @@
#include <sal/log.hxx>
#include <window.h>
-#include <svids.hrc>
+#include <strings.hrc>
static bool bUnityMode = false;
diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
index 5b746b623aaa..a329001fe471 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -64,7 +64,8 @@
#include <dlfcn.h>
#include <vcl/salbtype.hxx>
#include <impbmp.hxx>
-#include <svids.hrc>
+#include <strings.hrc>
+#include <bitmaps.hlst>
#include <sal/macros.h>
#include <basegfx/range/b2ibox.hxx>
@@ -656,15 +657,14 @@ gboolean ensure_dbus_setup( gpointer data )
pSalFrame->m_nHudAwarenessId = hud_awareness_register( pSessionBus, aDBusMenubarPath, hud_activated, pSalFrame, nullptr, nullptr );
//app menu, to-do translations, block normal menus when active, honor use appmenu settings
- ResMgr* pMgr = ImplGetResMgr();
- if( pMgr && !bDesktopIsUnity )
+ if (!bDesktopIsUnity)
{
GMenu *menu = g_menu_new ();
GMenuItem* item;
GMenu *firstsubmenu = g_menu_new ();
- OString sNew(OUStringToOString(ResId(SV_BUTTONTEXT_NEW, *pMgr),
+ OString sNew(OUStringToOString(VclResId(SV_BUTTONTEXT_NEW),
RTL_TEXTENCODING_UTF8).replaceFirst("~", "_"));
item = g_menu_item_new(sNew.getStr(), "app.New");
@@ -676,7 +676,7 @@ gboolean ensure_dbus_setup( gpointer data )
GMenu *secondsubmenu = g_menu_new ();
- OString sPreferences(OUStringToOString(ResId(SV_STDTEXT_PREFERENCES, *pMgr),
+ OString sPreferences(OUStringToOString(VclResId(SV_STDTEXT_PREFERENCES),
RTL_TEXTENCODING_UTF8).replaceFirst("~", "_"));
item = g_menu_item_new(sPreferences.getStr(), "app.OptionsTreeDialog");
@@ -688,21 +688,21 @@ gboolean ensure_dbus_setup( gpointer data )
GMenu *thirdsubmenu = g_menu_new ();
- OString sHelp(OUStringToOString(ResId(SV_BUTTONTEXT_HELP, *pMgr),
+ OString sHelp(OUStringToOString(VclResId(SV_BUTTONTEXT_HELP),
RTL_TEXTENCODING_UTF8).replaceFirst("~", "_"));
item = g_menu_item_new(sHelp.getStr(), "app.HelpIndex");
g_menu_append_item( thirdsubmenu, item );
g_object_unref(item);
- OString sAbout(OUStringToOString(ResId(SV_STDTEXT_ABOUT, *pMgr),
+ OString sAbout(OUStringToOString(VclResId(SV_STDTEXT_ABOUT),
RTL_TEXTENCODING_UTF8).replaceFirst("~", "_"));
item = g_menu_item_new(sAbout.getStr(), "app.About");
g_menu_append_item( thirdsubmenu, item );
g_object_unref(item);
- OString sQuit(OUStringToOString(ResId(SV_MENU_MAC_QUITAPP, *pMgr),
+ OString sQuit(OUStringToOString(VclResId(SV_MENU_MAC_QUITAPP),
RTL_TEXTENCODING_UTF8).replaceFirst("~", "_"));
item = g_menu_item_new(sQuit.getStr(), "app.Quit");
diff --git a/vcl/unx/kde4/KDE4FilePicker.cxx b/vcl/unx/kde4/KDE4FilePicker.cxx
index 9d719bebe032..c43e559147bd 100644
--- a/vcl/unx/kde4/KDE4FilePicker.cxx
+++ b/vcl/unx/kde4/KDE4FilePicker.cxx
@@ -30,7 +30,7 @@
#include <com/sun/star/ui/dialogs/ControlActions.hpp>
#include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp>
-#include <vcl/fpicker.hrc>
+#include <fpicker/fpicker.hrc>
#include <vcl/svapp.hxx>
#include <vcl/sysdata.hxx>
#include <vcl/syswin.hxx>
@@ -58,7 +58,7 @@
#include "unx/geninst.h"
-#include "svids.hrc"
+#include "strings.hrc"
// The dialog should check whether LO also supports the protocol
// provided by KIO, and KFileWidget::dirOperator() is only 4.3+ .
@@ -508,20 +508,14 @@ OUString SAL_CALL KDE4FilePicker::getLabel(sal_Int16 controlId)
return toOUString(label);
}
-QString KDE4FilePicker::getResString( sal_Int16 aRedId )
+QString KDE4FilePicker::getResString(const char *pResId)
{
QString aResString;
- if( aRedId < 0 )
+ if (pResId == nullptr)
return aResString;
- try
- {
- aResString = toQString(ResId(aRedId, *ImplGetResMgr()));
- }
- catch(...)
- {
- }
+ aResString = toQString(VclResId(pResId));
return aResString.replace('~', '&');
}
@@ -529,7 +523,7 @@ QString KDE4FilePicker::getResString( sal_Int16 aRedId )
void KDE4FilePicker::addCustomControl(sal_Int16 controlId)
{
QWidget* widget = nullptr;
- sal_Int32 resId = -1;
+ const char* resId = nullptr;
switch (controlId)
{
@@ -723,7 +717,7 @@ void SAL_CALL KDE4FilePicker::initialize( const uno::Sequence<uno::Any> &args )
_dialog->setOperationMode( operationMode );
- sal_Int16 resId = -1;
+ const char *resId = nullptr;
switch (_dialog->operationMode())
{
case KFileDialog::Opening:
diff --git a/vcl/unx/kde4/KDE4FilePicker.hxx b/vcl/unx/kde4/KDE4FilePicker.hxx
index 96d94a9868e2..fb714a50b704 100644
--- a/vcl/unx/kde4/KDE4FilePicker.hxx
+++ b/vcl/unx/kde4/KDE4FilePicker.hxx
@@ -243,7 +243,7 @@ private:
//add a custom control widget to the file dialog
void addCustomControl(sal_Int16 controlId);
- static QString getResString( sal_Int16 aRedId );
+ static QString getResString(const char* pRedId);
private Q_SLOTS:
void cleanupProxy();
diff --git a/vcl/win/window/keynames.cxx b/vcl/win/window/keynames.cxx
index 89cbe02f581f..c6c41001c07e 100644
--- a/vcl/win/window/keynames.cxx
+++ b/vcl/win/window/keynames.cxx
@@ -26,7 +26,7 @@
#include <windows.h>
// Use unique ;) names to avoid clashes with the KEY_* (especially
-// KEY_SHIFT) from <rsc/rsc-vcl-shared-types.hxx>
+// KEY_SHIFT) from <vcl/vclenum.hxx>
#define PAPUGA_KEY_ESC 0x10000
#define PAPUGA_KEY_BACK 0xE0000