summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-06-11 20:56:30 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-07-21 08:20:50 +0100
commit00657aef09d854c74fb426a935a3e8b1fc390bb0 (patch)
treefd1a9bb264fe15dcc129498e62060ecd256b1ee7 /editeng
parentfa987cbb813cfd729fe490f2f1258b7c8d7fb174 (diff)
migrate to boost::gettext
* all .ui files go from <interface> to <interface domain="MODULE"> e.g. vcl * all .src files go away and the english source strings folded into the .hrc as NC_("context", "source string") * ResMgr is dropped in favour of std::locale imbued by boost::locale::generator pointed at matching MODULE .mo files * UIConfig translations are folded into the module .mo, so e.g. UIConfig_cui goes from l10n target to normal one, so the res/lang.zips of UI files go away * translation via Translation::get(hrc-define-key, imbued-std::locale) * python can now be translated with its inbuilt gettext support (we keep the name strings.hrc there to keep finding the .hrc file uniform) so magic numbers can go away there * java and starbasic components can be translated via the pre-existing css.resource.StringResourceWithLocation mechanism * en-US res files go away, their strings are now the .hrc keys in the source code * remaining .res files are replaced by .mo files * in .res/.ui-lang-zip files, the old scheme missing translations of strings results in inserting the english original so something can be found, now the standard fallback of using the english original from the source key is used, so partial translations shrink dramatically in size * extract .hrc strings with hrcex which backs onto xgettext -C --add-comments --keyword=NC_:1c,2 --from-code=UTF-8 --no-wrap * extract .ui strings with uiex which backs onto xgettext --add-comments --no-wrap * qtz for gettext translations is generated at runtime as ascii-ified crc32 of content + "|" + msgid * [API CHANGE] remove deprecated binary .res resouce loader related uno apis com::sun::star::resource::OfficeResourceLoader com::sun::star::resource::XResourceBundleLoader com::sun::star::resource::XResourceBundle when translating strings via uno apis com.sun.star.resource.StringResourceWithLocation can continue to be used Change-Id: Ia2594a2672b7301d9c3421fdf31b6cfe7f3f8d0a
Diffstat (limited to 'editeng')
-rw-r--r--editeng/AllLangMoTarget_editeng.mk11
-rw-r--r--editeng/AllLangResTarget_editeng.mk42
-rw-r--r--editeng/Library_editeng.mk3
-rw-r--r--editeng/Module_editeng.mk4
-rw-r--r--editeng/inc/editeng.hxx (renamed from editeng/inc/editeng.hrc)6
-rw-r--r--editeng/inc/pch/precompiled_editeng.hxx3
-rw-r--r--editeng/source/accessibility/AccessibleEditableTextPara.cxx2
-rw-r--r--editeng/source/accessibility/AccessibleImageBullet.cxx6
-rw-r--r--editeng/source/accessibility/accessibility.src37
-rw-r--r--editeng/source/editeng/editeng.cxx21
-rw-r--r--editeng/source/editeng/editeng.src83
-rw-r--r--editeng/source/editeng/editview.cxx7
-rw-r--r--editeng/source/editeng/eerdll.cxx14
-rw-r--r--editeng/source/items/borderline.cxx8
-rw-r--r--editeng/source/items/charhiddenitem.cxx6
-rw-r--r--editeng/source/items/frmitems.cxx177
-rw-r--r--editeng/source/items/itemtype.cxx52
-rw-r--r--editeng/source/items/justifyitem.cxx6
-rw-r--r--editeng/source/items/optitems.cxx5
-rw-r--r--editeng/source/items/page.src31
-rw-r--r--editeng/source/items/paraitem.cxx87
-rw-r--r--editeng/source/items/svxitems.src1028
-rw-r--r--editeng/source/items/textitem.cxx241
-rw-r--r--editeng/source/items/writingmodeitem.cxx4
-rw-r--r--editeng/source/misc/lingu.src43
-rw-r--r--editeng/source/misc/splwrap.cxx4
-rw-r--r--editeng/source/misc/unolingu.cxx10
-rw-r--r--editeng/source/outliner/outleeng.cxx10
-rw-r--r--editeng/source/outliner/outliner.src43
-rw-r--r--editeng/uiconfig/ui/spellmenu.ui14
30 files changed, 428 insertions, 1580 deletions
diff --git a/editeng/AllLangMoTarget_editeng.mk b/editeng/AllLangMoTarget_editeng.mk
new file mode 100644
index 000000000000..b2e00ba32c6c
--- /dev/null
+++ b/editeng/AllLangMoTarget_editeng.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,editeng))
+
+# vim: set noet sw=4 ts=4:
diff --git a/editeng/AllLangResTarget_editeng.mk b/editeng/AllLangResTarget_editeng.mk
deleted file mode 100644
index 881579cffe01..000000000000
--- a/editeng/AllLangResTarget_editeng.mk
+++ /dev/null
@@ -1,42 +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,editeng))
-
-$(eval $(call gb_AllLangResTarget_set_reslocation,editeng,svx))
-
-$(eval $(call gb_AllLangResTarget_add_srs,editeng, editeng/res))
-$(eval $(call gb_SrsTarget_SrsTarget,editeng/res))
-
-$(eval $(call gb_SrsTarget_set_include,editeng/res,\
- $$(INCLUDE) \
- -I$(SRCDIR)/editeng/inc \
-))
-
-# add src files here (complete path relative to repository root)
-$(eval $(call gb_SrsTarget_add_files,editeng/res,\
- editeng/source/accessibility/accessibility.src \
- editeng/source/editeng/editeng.src \
- editeng/source/items/page.src \
- editeng/source/items/svxitems.src \
- editeng/source/misc/lingu.src \
- editeng/source/outliner/outliner.src \
-))
-
-# vim: set noet sw=4 ts=4:
diff --git a/editeng/Library_editeng.mk b/editeng/Library_editeng.mk
index 81cbf9332255..7e5790e81339 100644
--- a/editeng/Library_editeng.mk
+++ b/editeng/Library_editeng.mk
@@ -157,7 +157,4 @@ $(eval $(call gb_Library_use_externals,editeng,\
libxml2 \
))
-# Runtime dependency for unit-tests
-$(eval $(call gb_Library_use_restarget,editeng,editeng))
-
# vim: set noet sw=4 ts=4:
diff --git a/editeng/Module_editeng.mk b/editeng/Module_editeng.mk
index 4bed89d70b1b..6fedbcb6043e 100644
--- a/editeng/Module_editeng.mk
+++ b/editeng/Module_editeng.mk
@@ -22,11 +22,11 @@ $(eval $(call gb_Module_Module,editeng))
$(eval $(call gb_Module_add_targets,editeng,\
CustomTarget_generated \
Library_editeng \
+ UIConfig_editeng \
))
$(eval $(call gb_Module_add_l10n_targets,editeng,\
- AllLangResTarget_editeng \
- UIConfig_editeng \
+ AllLangMoTarget_editeng \
))
$(eval $(call gb_Module_add_check_targets,editeng,\
diff --git a/editeng/inc/editeng.hrc b/editeng/inc/editeng.hxx
index 18c62082623e..6c59982d679e 100644
--- a/editeng/inc/editeng.hrc
+++ b/editeng/inc/editeng.hxx
@@ -16,10 +16,8 @@
* 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_EDITENG_INC_EDITENG_HRC
-#define INCLUDED_EDITENG_INC_EDITENG_HRC
-
-#include <editeng/editrids.hrc>
+#ifndef INCLUDED_EDITENG_INC_EDITENG_HXX
+#define INCLUDED_EDITENG_INC_EDITENG_HXX
#define MN_WORDLANGUAGE 998
#define MN_PARALANGUAGE 999
diff --git a/editeng/inc/pch/precompiled_editeng.hxx b/editeng/inc/pch/precompiled_editeng.hxx
index 7386631bfac4..a30afe4d008c 100644
--- a/editeng/inc/pch/precompiled_editeng.hxx
+++ b/editeng/inc/pch/precompiled_editeng.hxx
@@ -249,8 +249,6 @@
#include <linguistic/lngprops.hxx>
#include <o3tl/cow_wrapper.hxx>
#include <o3tl/typed_flags_set.hxx>
-#include <rsc/rsc-vcl-shared-types.hxx>
-#include <rsc/rscsfx.hxx>
#include <sot/formats.hxx>
#include <sot/sotdllapi.h>
#include <svl/cenumitm.hxx>
@@ -275,7 +273,6 @@
#include <tools/mapunit.hxx>
#include <tools/poly.hxx>
#include <tools/ref.hxx>
-#include <tools/resid.hxx>
#include <tools/resmgr.hxx>
#include <tools/solar.h>
#include <tools/stream.hxx>
diff --git a/editeng/source/accessibility/AccessibleEditableTextPara.cxx b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
index c1a5a5265c22..a23dfecff852 100644
--- a/editeng/source/accessibility/AccessibleEditableTextPara.cxx
+++ b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
@@ -66,7 +66,7 @@
#include <svtools/colorcfg.hxx>
using namespace std;
-#include "editeng.hrc"
+#include <editeng/editrids.hrc>
#include <editeng/eerdll.hxx>
#include <editeng/numitem.hxx>
#include <memory>
diff --git a/editeng/source/accessibility/AccessibleImageBullet.cxx b/editeng/source/accessibility/AccessibleImageBullet.cxx
index 2a6c50de1eaf..fe88afb6f37d 100644
--- a/editeng/source/accessibility/AccessibleImageBullet.cxx
+++ b/editeng/source/accessibility/AccessibleImageBullet.cxx
@@ -40,7 +40,7 @@
#include <editeng/editdata.hxx>
#include <editeng/editeng.hxx>
#include <editeng/outliner.hxx>
-#include "editeng.hrc"
+#include <editeng/editrids.hrc>
#include <svtools/colorcfg.hxx>
@@ -136,7 +136,7 @@ namespace accessibility
SolarMutexGuard aGuard;
// Get the string from the resource for the specified id.
- return EditResId::GetString(RID_SVXSTR_A11Y_IMAGEBULLET_DESCRIPTION);
+ return EditResId(RID_SVXSTR_A11Y_IMAGEBULLET_DESCRIPTION);
}
OUString SAL_CALL AccessibleImageBullet::getAccessibleName()
@@ -145,7 +145,7 @@ namespace accessibility
SolarMutexGuard aGuard;
// Get the string from the resource for the specified id.
- return EditResId::GetString(RID_SVXSTR_A11Y_IMAGEBULLET_NAME);
+ return EditResId(RID_SVXSTR_A11Y_IMAGEBULLET_NAME);
}
uno::Reference< XAccessibleRelationSet > SAL_CALL AccessibleImageBullet::getAccessibleRelationSet()
diff --git a/editeng/source/accessibility/accessibility.src b/editeng/source/accessibility/accessibility.src
deleted file mode 100644
index f1ff0daff47f..000000000000
--- a/editeng/source/accessibility/accessibility.src
+++ /dev/null
@@ -1,37 +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 "editeng.hrc"
-
-String RID_SVXSTR_A11Y_IMAGEBULLET_DESCRIPTION
-{
- Text [ en-US ] = "Image bullet in paragraph" ;
-};
-
-String RID_SVXSTR_A11Y_IMAGEBULLET_NAME
-{
- Text [ en-US ] = "Image bullet" ;
-};
-
-String RID_SVXSTR_A11Y_PARAGRAPH_DESCRIPTION
-{
- Text [ en-US ] = "Paragraph: $(ARG) " ;
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx
index e5727ee0ba9b..7828eb843b45 100644
--- a/editeng/source/editeng/editeng.cxx
+++ b/editeng/source/editeng/editeng.cxx
@@ -34,7 +34,8 @@
#include <editdbg.hxx>
#include <eerdll2.hxx>
#include <editeng/eerdll.hxx>
-#include <editeng.hrc>
+#include <editeng/editrids.hrc>
+#include <editeng.hxx>
#include <editeng/acorrcfg.hxx>
#include <editeng/flditem.hxx>
#include <editeng/txtrange.hxx>
@@ -2513,12 +2514,12 @@ OUString EditEngine::GetUndoComment( sal_uInt16 nId ) const
case EDITUNDO_DELCONTENT:
case EDITUNDO_DELETE:
case EDITUNDO_CUT:
- aComment = EditResId::GetString(RID_EDITUNDO_DEL);
+ aComment = EditResId(RID_EDITUNDO_DEL);
break;
case EDITUNDO_MOVEPARAGRAPHS:
case EDITUNDO_MOVEPARAS:
case EDITUNDO_DRAGANDDROP:
- aComment = EditResId::GetString(RID_EDITUNDO_MOVE);
+ aComment = EditResId(RID_EDITUNDO_MOVE);
break;
case EDITUNDO_INSERTFEATURE:
case EDITUNDO_SPLITPARA:
@@ -2526,27 +2527,27 @@ OUString EditEngine::GetUndoComment( sal_uInt16 nId ) const
case EDITUNDO_PASTE:
case EDITUNDO_INSERT:
case EDITUNDO_READ:
- aComment = EditResId::GetString(RID_EDITUNDO_INSERT);
+ aComment = EditResId(RID_EDITUNDO_INSERT);
break;
case EDITUNDO_REPLACEALL:
- aComment = EditResId::GetString(RID_EDITUNDO_REPLACE);
+ aComment = EditResId(RID_EDITUNDO_REPLACE);
break;
case EDITUNDO_ATTRIBS:
case EDITUNDO_PARAATTRIBS:
- aComment = EditResId::GetString(RID_EDITUNDO_SETATTRIBS);
+ aComment = EditResId(RID_EDITUNDO_SETATTRIBS);
break;
case EDITUNDO_RESETATTRIBS:
- aComment = EditResId::GetString(RID_EDITUNDO_RESETATTRIBS);
+ aComment = EditResId(RID_EDITUNDO_RESETATTRIBS);
break;
case EDITUNDO_STYLESHEET:
- aComment = EditResId::GetString(RID_EDITUNDO_SETSTYLE);
+ aComment = EditResId(RID_EDITUNDO_SETSTYLE);
break;
case EDITUNDO_TRANSLITERATE:
- aComment = EditResId::GetString(RID_EDITUNDO_TRANSLITERATE);
+ aComment = EditResId(RID_EDITUNDO_TRANSLITERATE);
break;
case EDITUNDO_INDENTBLOCK:
case EDITUNDO_UNINDENTBLOCK:
- aComment = EditResId::GetString(RID_EDITUNDO_INDENT);
+ aComment = EditResId(RID_EDITUNDO_INDENT);
break;
}
return aComment;
diff --git a/editeng/source/editeng/editeng.src b/editeng/source/editeng/editeng.src
deleted file mode 100644
index bcf45d9b8abc..000000000000
--- a/editeng/source/editeng/editeng.src
+++ /dev/null
@@ -1,83 +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 <editeng.hrc>
-#include <helpid.hrc>
-
-String RID_EDITUNDO_DEL
-{
- Text [ en-US ] = "Delete" ;
-};
-
-String RID_EDITUNDO_MOVE
-{
- Text [ en-US ] = "Move" ;
-};
-
-String RID_EDITUNDO_INSERT
-{
- Text [ en-US ] = "Insert" ;
-};
-
-String RID_EDITUNDO_REPLACE
-{
- Text [ en-US ] = "Replace" ;
-};
-
-String RID_EDITUNDO_SETATTRIBS
-{
- Text [ en-US ] = "Apply attributes" ;
-};
-
-String RID_EDITUNDO_RESETATTRIBS
-{
- Text [ en-US ] = "Reset attributes" ;
-};
-
-String RID_EDITUNDO_INDENT
-{
- Text [ en-US ] = "Indent" ;
-};
-
-String RID_EDITUNDO_SETSTYLE
-{
- Text [ en-US ] = "Apply Styles" ;
-};
-
-String RID_EDITUNDO_TRANSLITERATE
-{
- Text [ en-US ] = "Change Case";
-};
-
-String RID_STR_WORD
-{
- Text [ en-US ] = "Word is %x";
-};
-
-String RID_STR_PARAGRAPH
-{
- Text [ en-US ] = "Paragraph is %x";
-};
-
-String RID_SVXSTR_AUTOMATIC
-{
- Text [ en-US ] = "Automatic";
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx
index 77cabbec1123..11697dc95edd 100644
--- a/editeng/source/editeng/editview.cxx
+++ b/editeng/source/editeng/editview.cxx
@@ -47,7 +47,8 @@
#include <editeng/fhgtitem.hxx>
#include <editeng/eerdll.hxx>
#include <eerdll2.hxx>
-#include <editeng.hrc>
+#include <editeng/editrids.hrc>
+#include <editeng.hxx>
#include <helpid.hrc>
#include <i18nlangtag/lang.h>
#include <vcl/menu.hxx>
@@ -887,9 +888,9 @@ void EditView::ExecuteSpellPopup( const Point& rPosPixel, Link<SpellCallbackInfo
aPopupMenu->InsertSeparator();
OUString aTmpWord( SvtLanguageTable::GetLanguageString( nGuessLangWord ) );
OUString aTmpPara( SvtLanguageTable::GetLanguageString( nGuessLangPara ) );
- OUString aWordStr( EditResId::GetString( RID_STR_WORD ) );
+ OUString aWordStr( EditResId( RID_STR_WORD ) );
aWordStr = aWordStr.replaceFirst( "%x", aTmpWord );
- OUString aParaStr( EditResId::GetString( RID_STR_PARAGRAPH ) );
+ OUString aParaStr( EditResId( RID_STR_PARAGRAPH ) );
aParaStr = aParaStr.replaceFirst( "%x", aTmpPara );
aPopupMenu->InsertItem( MN_WORDLANGUAGE, aWordStr );
aPopupMenu->SetHelpId( MN_WORDLANGUAGE, HID_EDITENG_SPELLER_WORDLANGUAGE );
diff --git a/editeng/source/editeng/eerdll.cxx b/editeng/source/editeng/eerdll.cxx
index 2027cab81a50..d23885ea1fec 100644
--- a/editeng/source/editeng/eerdll.cxx
+++ b/editeng/source/editeng/eerdll.cxx
@@ -18,6 +18,7 @@
*/
+#include <tools/resmgr.hxx>
#include <vcl/wrkwin.hxx>
#include <vcl/dialog.hxx>
#include <vcl/msgbox.hxx>
@@ -192,9 +193,9 @@ uno::Reference< linguistic2::XLanguageGuessing > const & GlobalEditData::GetLang
return xLanguageGuesser;
}
-EditResId::EditResId(sal_uInt16 nId)
- : ResId(nId, *EditDLL::GetResMgr())
+OUString EditResId(const char *pId)
{
+ return Translate::get(pId, EditDLL::GetResLocale());
}
EditDLL::EditDLL()
@@ -206,13 +207,10 @@ EditDLL::~EditDLL()
{
}
-static ResMgr* pResMgr=nullptr;
-
-ResMgr* EditDLL::GetResMgr()
+std::locale& EditDLL::GetResLocale()
{
- if (!pResMgr)
- pResMgr = ResMgr::CreateResMgr("editeng", Application::GetSettings().GetUILanguageTag());
- return pResMgr;
+ static std::locale loc = Translate::Create("editeng", Application::GetSettings().GetUILanguageTag());
+ return loc;
}
diff --git a/editeng/source/items/borderline.cxx b/editeng/source/items/borderline.cxx
index 0cb38a0f445e..caa86bcce036 100644
--- a/editeng/source/items/borderline.cxx
+++ b/editeng/source/items/borderline.cxx
@@ -637,7 +637,7 @@ OUString SvxBorderLine::GetValueString(MapUnit eSrcUnit,
const IntlWrapper* pIntl,
bool bMetricStr) const
{
- static const sal_uInt16 aStyleIds[] =
+ static const char* aStyleIds[] =
{
RID_SOLID,
RID_DOTTED,
@@ -662,12 +662,12 @@ OUString SvxBorderLine::GetValueString(MapUnit eSrcUnit,
if ( (int)m_nStyle < int(SAL_N_ELEMENTS(aStyleIds)) )
{
- sal_uInt16 nResId = aStyleIds[(int)m_nStyle];
- aStr += EditResId::GetString(nResId);
+ const char* pResId = aStyleIds[(int)m_nStyle];
+ aStr += EditResId(pResId);
}
else
{
- OUString sMetric = EditResId::GetString(GetMetricId( eDestUnit ));
+ OUString sMetric = EditResId(GetMetricId( eDestUnit ));
aStr += GetMetricText( (long)GetInWidth(), eSrcUnit, eDestUnit, pIntl );
if ( bMetricStr )
aStr += sMetric;
diff --git a/editeng/source/items/charhiddenitem.cxx b/editeng/source/items/charhiddenitem.cxx
index 41e8e9b479d9..c27a188af5aa 100644
--- a/editeng/source/items/charhiddenitem.cxx
+++ b/editeng/source/items/charhiddenitem.cxx
@@ -41,11 +41,11 @@ bool SvxCharHiddenItem::GetPresentation
const IntlWrapper * /*pIntl*/
) const
{
- sal_uInt16 nId = RID_SVXITEMS_CHARHIDDEN_FALSE;
+ const char* pId = RID_SVXITEMS_CHARHIDDEN_FALSE;
if ( GetValue() )
- nId = RID_SVXITEMS_CHARHIDDEN_TRUE;
- rText = EditResId::GetString(nId);
+ pId = RID_SVXITEMS_CHARHIDDEN_TRUE;
+ rText = EditResId(pId);
return true;
}
diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx
index d14afbbcbe1b..0178499d1020 100644
--- a/editeng/source/items/frmitems.cxx
+++ b/editeng/source/items/frmitems.cxx
@@ -196,10 +196,10 @@ bool SvxPaperBinItem::GetPresentation
sal_uInt8 nValue = GetValue();
if ( PAPERBIN_PRINTER_SETTINGS == nValue )
- rText = EditResId::GetString(RID_SVXSTR_PAPERBIN_SETTINGS);
+ rText = EditResId(RID_SVXSTR_PAPERBIN_SETTINGS);
else
{
- rText = EditResId::GetString(RID_SVXSTR_PAPERBIN) + " " + OUString::number( nValue );
+ rText = EditResId(RID_SVXSTR_PAPERBIN) + " " + OUString::number( nValue );
}
return true;
}
@@ -333,13 +333,13 @@ bool SvxSizeItem::GetPresentation
return true;
case SfxItemPresentation::Complete:
- rText = EditResId::GetString(RID_SVXITEMS_SIZE_WIDTH) +
+ rText = EditResId(RID_SVXITEMS_SIZE_WIDTH) +
GetMetricText( aSize.Width(), eCoreUnit, ePresUnit, pIntl ) +
- " " + EditResId::GetString(GetMetricId(ePresUnit)) +
+ " " + EditResId(GetMetricId(ePresUnit)) +
cpDelimTmp +
- EditResId::GetString(RID_SVXITEMS_SIZE_HEIGHT) +
+ EditResId(RID_SVXITEMS_SIZE_HEIGHT) +
GetMetricText( aSize.Height(), eCoreUnit, ePresUnit, pIntl ) +
- " " + EditResId::GetString(GetMetricId(ePresUnit));
+ " " + EditResId(GetMetricId(ePresUnit));
return true;
// no break necessary
default: ; // prevent warning
@@ -631,7 +631,7 @@ bool SvxLRSpaceItem::GetPresentation
}
case SfxItemPresentation::Complete:
{
- rText = EditResId::GetString(RID_SVXITEMS_LRSPACE_LEFT);
+ rText = EditResId(RID_SVXITEMS_LRSPACE_LEFT);
if ( 100 != nPropLeftMargin )
rText += unicode::formatPercent(nPropLeftMargin,
Application::GetSettings().GetUILanguageTag());
@@ -639,12 +639,12 @@ bool SvxLRSpaceItem::GetPresentation
{
rText = rText +
GetMetricText( (long)nLeftMargin, eCoreUnit, ePresUnit, pIntl ) +
- " " + EditResId::GetString(GetMetricId(ePresUnit));
+ " " + EditResId(GetMetricId(ePresUnit));
}
rText += OUString(cpDelim);
if ( 100 != nPropFirstLineOfst || nFirstLineOfst )
{
- rText += EditResId::GetString(RID_SVXITEMS_LRSPACE_FLINE);
+ rText += EditResId(RID_SVXITEMS_LRSPACE_FLINE);
if ( 100 != nPropFirstLineOfst )
rText = rText + unicode::formatPercent(nPropFirstLineOfst,
Application::GetSettings().GetUILanguageTag());
@@ -653,11 +653,11 @@ bool SvxLRSpaceItem::GetPresentation
rText = rText +
GetMetricText( (long)nFirstLineOfst,
eCoreUnit, ePresUnit, pIntl ) +
- " " + EditResId::GetString(GetMetricId(ePresUnit));
+ " " + EditResId(GetMetricId(ePresUnit));
}
rText += OUString(cpDelim);
}
- rText += EditResId::GetString(RID_SVXITEMS_LRSPACE_RIGHT);
+ rText += EditResId(RID_SVXITEMS_LRSPACE_RIGHT);
if ( 100 != nPropRightMargin )
rText = rText + unicode::formatPercent(nPropRightMargin,
Application::GetSettings().GetUILanguageTag());
@@ -666,7 +666,7 @@ bool SvxLRSpaceItem::GetPresentation
rText = rText +
GetMetricText( (long)nRightMargin,
eCoreUnit, ePresUnit, pIntl ) +
- " " + EditResId::GetString(GetMetricId(ePresUnit));
+ " " + EditResId(GetMetricId(ePresUnit));
}
return true;
}
@@ -998,7 +998,7 @@ bool SvxULSpaceItem::GetPresentation
}
case SfxItemPresentation::Complete:
{
- rText = EditResId::GetString(RID_SVXITEMS_ULSPACE_UPPER);
+ rText = EditResId(RID_SVXITEMS_ULSPACE_UPPER);
if ( 100 != nPropUpper )
{
rText += unicode::formatPercent(nPropUpper,
@@ -1008,9 +1008,9 @@ bool SvxULSpaceItem::GetPresentation
{
rText = rText +
GetMetricText( (long)nUpper, eCoreUnit, ePresUnit, pIntl ) +
- " " + EditResId::GetString(GetMetricId(ePresUnit));
+ " " + EditResId(GetMetricId(ePresUnit));
}
- rText = rText + OUString(cpDelim) + EditResId::GetString(RID_SVXITEMS_ULSPACE_LOWER);
+ rText = rText + OUString(cpDelim) + EditResId(RID_SVXITEMS_ULSPACE_LOWER);
if ( 100 != nPropLower )
{
rText += unicode::formatPercent(nPropLower,
@@ -1020,7 +1020,7 @@ bool SvxULSpaceItem::GetPresentation
{
rText = rText +
GetMetricText( (long)nLower, eCoreUnit, ePresUnit, pIntl ) +
- " " + EditResId::GetString(GetMetricId(ePresUnit));
+ " " + EditResId(GetMetricId(ePresUnit));
}
return true;
}
@@ -1124,11 +1124,11 @@ bool SvxPrintItem::GetPresentation
OUString& rText, const IntlWrapper *
) const
{
- sal_uInt16 nId = RID_SVXITEMS_PRINT_FALSE;
+ const char* pId = RID_SVXITEMS_PRINT_FALSE;
if ( GetValue() )
- nId = RID_SVXITEMS_PRINT_TRUE;
- rText = EditResId::GetString(nId);
+ pId = RID_SVXITEMS_PRINT_TRUE;
+ rText = EditResId(pId);
return true;
}
@@ -1162,11 +1162,11 @@ bool SvxOpaqueItem::GetPresentation
OUString& rText, const IntlWrapper *
) const
{
- sal_uInt16 nId = RID_SVXITEMS_OPAQUE_FALSE;
+ const char* pId = RID_SVXITEMS_OPAQUE_FALSE;
if ( GetValue() )
- nId = RID_SVXITEMS_OPAQUE_TRUE;
- rText = EditResId::GetString(nId);
+ pId = RID_SVXITEMS_OPAQUE_TRUE;
+ rText = EditResId(pId);
return true;
}
@@ -1232,21 +1232,21 @@ bool SvxProtectItem::GetPresentation
OUString& rText, const IntlWrapper *
) const
{
- sal_uInt16 nId = RID_SVXITEMS_PROT_CONTENT_FALSE;
+ const char* pId = RID_SVXITEMS_PROT_CONTENT_FALSE;
if ( bCntnt )
- nId = RID_SVXITEMS_PROT_CONTENT_TRUE;
- rText = EditResId::GetString(nId) + OUString(cpDelim);
- nId = RID_SVXITEMS_PROT_SIZE_FALSE;
+ pId = RID_SVXITEMS_PROT_CONTENT_TRUE;
+ rText = EditResId(pId) + OUString(cpDelim);
+ pId = RID_SVXITEMS_PROT_SIZE_FALSE;
if ( bSize )
- nId = RID_SVXITEMS_PROT_SIZE_TRUE;
- rText = rText + EditResId::GetString(nId) + OUString(cpDelim);
- nId = RID_SVXITEMS_PROT_POS_FALSE;
+ pId = RID_SVXITEMS_PROT_SIZE_TRUE;
+ rText = rText + EditResId(pId) + OUString(cpDelim);
+ pId = RID_SVXITEMS_PROT_POS_FALSE;
if ( bPos )
- nId = RID_SVXITEMS_PROT_POS_TRUE;
- rText += EditResId::GetString(nId);
+ pId = RID_SVXITEMS_PROT_POS_TRUE;
+ rText += EditResId(pId);
return true;
}
@@ -1449,6 +1449,14 @@ sal_uInt16 SvxShadowItem::CalcShadowSpace( SvxShadowItemSide nShadow ) const
return nSpace;
}
+static const char* RID_SVXITEMS_SHADOW[] =
+{
+ RID_SVXITEMS_SHADOW_NONE,
+ RID_SVXITEMS_SHADOW_TOPLEFT,
+ RID_SVXITEMS_SHADOW_TOPRIGHT,
+ RID_SVXITEMS_SHADOW_BOTTOMLEFT,
+ RID_SVXITEMS_SHADOW_BOTTOMRIGHT
+};
bool SvxShadowItem::GetPresentation
(
@@ -1463,34 +1471,34 @@ bool SvxShadowItem::GetPresentation
case SfxItemPresentation::Nameless:
{
rText = ::GetColorString( aShadowColor ) + OUString(cpDelim);
- sal_uInt16 nId = RID_SVXITEMS_TRANSPARENT_FALSE;
+ const char* pId = RID_SVXITEMS_TRANSPARENT_FALSE;
if ( aShadowColor.GetTransparency() )
- nId = RID_SVXITEMS_TRANSPARENT_TRUE;
+ pId = RID_SVXITEMS_TRANSPARENT_TRUE;
rText = rText +
- EditResId::GetString(nId) +
+ EditResId(pId) +
OUString(cpDelim) +
GetMetricText( (long)nWidth, eCoreUnit, ePresUnit, pIntl ) +
OUString(cpDelim) +
- EditResId::GetString(RID_SVXITEMS_SHADOW_BEGIN + (int)eLocation);
+ EditResId(RID_SVXITEMS_SHADOW[(int)eLocation]);
return true;
}
case SfxItemPresentation::Complete:
{
- rText = EditResId::GetString(RID_SVXITEMS_SHADOW_COMPLETE) +
+ rText = EditResId(RID_SVXITEMS_SHADOW_COMPLETE) +
::GetColorString( aShadowColor ) +
OUString(cpDelim);
- sal_uInt16 nId = RID_SVXITEMS_TRANSPARENT_FALSE;
+ const char* pId = RID_SVXITEMS_TRANSPARENT_FALSE;
if ( aShadowColor.GetTransparency() )
- nId = RID_SVXITEMS_TRANSPARENT_TRUE;
+ pId = RID_SVXITEMS_TRANSPARENT_TRUE;
rText = rText +
- EditResId::GetString(nId) +
+ EditResId(pId) +
OUString(cpDelim) +
GetMetricText( (long)nWidth, eCoreUnit, ePresUnit, pIntl ) +
- " " + EditResId::GetString(GetMetricId(ePresUnit)) +
+ " " + EditResId(GetMetricId(ePresUnit)) +
OUString(cpDelim) +
- EditResId::GetString(RID_SVXITEMS_SHADOW_BEGIN + (int)eLocation);
+ EditResId(RID_SVXITEMS_SHADOW[(int)eLocation]);
return true;
}
default: ; // prevent warning
@@ -1545,14 +1553,13 @@ sal_uInt16 SvxShadowItem::GetValueCount() const
return (sal_uInt16)SvxShadowLocation::End; // SvxShadowLocation::BottomRight + 1
}
-
OUString SvxShadowItem::GetValueTextByPos( sal_uInt16 nPos ) const
{
- DBG_ASSERT( nPos < (sal_uInt16)SvxShadowLocation::End, "enum overflow!" );
- return EditResId::GetString(RID_SVXITEMS_SHADOW_BEGIN + nPos );
+ static_assert(SAL_N_ELEMENTS(RID_SVXITEMS_SHADOW) == (size_t)SvxShadowLocation::End, "unexpected size");
+ assert(nPos < (sal_uInt16)SvxShadowLocation::End && "enum overflow!");
+ return EditResId(RID_SVXITEMS_SHADOW[nPos]);
}
-
sal_uInt16 SvxShadowItem::GetEnumValue() const
{
return (sal_uInt16)GetLocation();
@@ -1571,7 +1578,7 @@ void SvxShadowItem::dumpAsXml(xmlTextWriterPtr pWriter) const
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("aShadowColor"), BAD_CAST(aShadowColor.AsRGBHexString().toUtf8().getStr()));
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("nWidth"), BAD_CAST(OString::number(nWidth).getStr()));
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("eLocation"), BAD_CAST(OString::number((int)eLocation).getStr()));
- xmlTextWriterWriteAttribute(pWriter, BAD_CAST("presentation"), BAD_CAST(EditResId::GetString(RID_SVXITEMS_SHADOW_BEGIN + (int)eLocation).toUtf8().getStr()));
+ xmlTextWriterWriteAttribute(pWriter, BAD_CAST("presentation"), BAD_CAST(EditResId(RID_SVXITEMS_SHADOW[(int)eLocation]).toUtf8().getStr()));
xmlTextWriterEndElement(pWriter);
}
@@ -2106,11 +2113,11 @@ bool SvxBoxItem::GetPresentation
{
if( !(pTop || pBottom || pLeft || pRight) )
{
- rText = EditResId::GetString(RID_SVXITEMS_BORDER_NONE) + cpDelimTmp;
+ rText = EditResId(RID_SVXITEMS_BORDER_NONE) + cpDelimTmp;
}
else
{
- rText = EditResId::GetString(RID_SVXITEMS_BORDER_COMPLETE);
+ rText = EditResId(RID_SVXITEMS_BORDER_COMPLETE);
if( pTop && pBottom && pLeft && pRight &&
*pTop == *pBottom && *pTop == *pLeft && *pTop == *pRight )
{
@@ -2121,65 +2128,65 @@ bool SvxBoxItem::GetPresentation
if ( pTop )
{
rText = rText +
- EditResId::GetString(RID_SVXITEMS_BORDER_TOP) +
+ EditResId(RID_SVXITEMS_BORDER_TOP) +
pTop->GetValueString( eCoreUnit, ePresUnit, pIntl, true ) +
cpDelimTmp;
}
if ( pBottom )
{
rText = rText +
- EditResId::GetString(RID_SVXITEMS_BORDER_BOTTOM) +
+ EditResId(RID_SVXITEMS_BORDER_BOTTOM) +
pBottom->GetValueString( eCoreUnit, ePresUnit, pIntl, true ) +
cpDelimTmp;
}
if ( pLeft )
{
rText = rText +
- EditResId::GetString(RID_SVXITEMS_BORDER_LEFT) +
+ EditResId(RID_SVXITEMS_BORDER_LEFT) +
pLeft->GetValueString( eCoreUnit, ePresUnit, pIntl, true ) +
cpDelimTmp;
}
if ( pRight )
{
rText = rText +
- EditResId::GetString(RID_SVXITEMS_BORDER_RIGHT) +
+ EditResId(RID_SVXITEMS_BORDER_RIGHT) +
pRight->GetValueString( eCoreUnit, ePresUnit, pIntl, true ) +
cpDelimTmp;
}
}
}
- rText += EditResId::GetString(RID_SVXITEMS_BORDER_DISTANCE);
+ rText += EditResId(RID_SVXITEMS_BORDER_DISTANCE);
if( nTopDist == nBottomDist && nTopDist == nLeftDist &&
nTopDist == nRightDist )
{
rText = rText +
GetMetricText( (long)nTopDist, eCoreUnit,
ePresUnit, pIntl ) +
- " " + EditResId::GetString(GetMetricId(ePresUnit));
+ " " + EditResId(GetMetricId(ePresUnit));
}
else
{
rText = rText +
- EditResId::GetString(RID_SVXITEMS_BORDER_TOP) +
+ EditResId(RID_SVXITEMS_BORDER_TOP) +
GetMetricText( (long)nTopDist, eCoreUnit,
ePresUnit, pIntl ) +
- " " + EditResId::GetString(GetMetricId(ePresUnit)) +
+ " " + EditResId(GetMetricId(ePresUnit)) +
cpDelimTmp +
- EditResId::GetString(RID_SVXITEMS_BORDER_BOTTOM) +
+ EditResId(RID_SVXITEMS_BORDER_BOTTOM) +
GetMetricText( (long)nBottomDist, eCoreUnit,
ePresUnit, pIntl ) +
- " " + EditResId::GetString(GetMetricId(ePresUnit)) +
+ " " + EditResId(GetMetricId(ePresUnit)) +
cpDelimTmp +
- EditResId::GetString(RID_SVXITEMS_BORDER_LEFT) +
+ EditResId(RID_SVXITEMS_BORDER_LEFT) +
GetMetricText( (long)nLeftDist, eCoreUnit,
ePresUnit, pIntl ) +
- " " + EditResId::GetString(GetMetricId(ePresUnit)) +
+ " " + EditResId(GetMetricId(ePresUnit)) +
cpDelimTmp +
- EditResId::GetString(RID_SVXITEMS_BORDER_RIGHT) +
+ EditResId(RID_SVXITEMS_BORDER_RIGHT) +
GetMetricText( (long)nRightDist, eCoreUnit,
ePresUnit, pIntl ) +
- " " + EditResId::GetString(GetMetricId(ePresUnit));
+ " " + EditResId(GetMetricId(ePresUnit));
}
return true;
}
@@ -2933,14 +2940,23 @@ bool SvxFormatBreakItem::GetPresentation
return true;
}
-
OUString SvxFormatBreakItem::GetValueTextByPos( sal_uInt16 nPos ) const
{
- DBG_ASSERT( nPos < (sal_uInt16)SvxBreak::End, "enum overflow!" );
- return EditResId::GetString(RID_SVXITEMS_BREAK_BEGIN + nPos);
+ static const char* RID_SVXITEMS_BREAK[] =
+ {
+ RID_SVXITEMS_BREAK_NONE,
+ RID_SVXITEMS_BREAK_COLUMN_BEFORE,
+ RID_SVXITEMS_BREAK_COLUMN_AFTER,
+ RID_SVXITEMS_BREAK_COLUMN_BOTH,
+ RID_SVXITEMS_BREAK_PAGE_BEFORE,
+ RID_SVXITEMS_BREAK_PAGE_AFTER,
+ RID_SVXITEMS_BREAK_PAGE_BOTH
+ };
+ static_assert(SAL_N_ELEMENTS(RID_SVXITEMS_BREAK) == (size_t)SvxBreak::End, "unexpected size");
+ assert(nPos < (sal_uInt16)SvxBreak::End && "enum overflow!");
+ return EditResId(RID_SVXITEMS_BREAK[nPos]);
}
-
bool SvxFormatBreakItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const
{
style::BreakType eBreak = style::BreakType_NONE;
@@ -3059,11 +3075,11 @@ bool SvxFormatKeepItem::GetPresentation
OUString& rText, const IntlWrapper *
) const
{
- sal_uInt16 nId = RID_SVXITEMS_FMTKEEP_FALSE;
+ const char* pId = RID_SVXITEMS_FMTKEEP_FALSE;
if ( GetValue() )
- nId = RID_SVXITEMS_FMTKEEP_TRUE;
- rText = EditResId::GetString(nId);
+ pId = RID_SVXITEMS_FMTKEEP_TRUE;
+ rText = EditResId(pId);
return true;
}
@@ -3662,15 +3678,15 @@ bool SvxBrushItem::GetPresentation
if ( GPOS_NONE == eGraphicPos )
{
rText = ::GetColorString( aColor ) + OUString(cpDelim);
- sal_uInt16 nId = RID_SVXITEMS_TRANSPARENT_FALSE;
+ const char* pId = RID_SVXITEMS_TRANSPARENT_FALSE;
if ( aColor.GetTransparency() )
- nId = RID_SVXITEMS_TRANSPARENT_TRUE;
- rText += EditResId::GetString(nId);
+ pId = RID_SVXITEMS_TRANSPARENT_TRUE;
+ rText += EditResId(pId);
}
else
{
- rText = EditResId::GetString(RID_SVXITEMS_GRAPHIC);
+ rText = EditResId(RID_SVXITEMS_GRAPHIC);
}
return true;
@@ -4010,6 +4026,18 @@ sal_uInt16 SvxFrameDirectionItem::GetVersion( sal_uInt16 nFVer ) const
return SOFFICE_FILEFORMAT_50 > nFVer ? USHRT_MAX : 0;
}
+const char* getFrmDirResId(size_t nIndex)
+{
+ const char* RID_SVXITEMS_FRMDIR[] =
+ {
+ RID_SVXITEMS_FRMDIR_HORI_LEFT_TOP,
+ RID_SVXITEMS_FRMDIR_HORI_RIGHT_TOP,
+ RID_SVXITEMS_FRMDIR_VERT_TOP_RIGHT,
+ RID_SVXITEMS_FRMDIR_VERT_TOP_LEFT,
+ RID_SVXITEMS_FRMDIR_ENVIRONMENT
+ };
+ return RID_SVXITEMS_FRMDIR[nIndex];
+}
bool SvxFrameDirectionItem::GetPresentation(
SfxItemPresentation /*ePres*/,
@@ -4017,11 +4045,10 @@ bool SvxFrameDirectionItem::GetPresentation(
MapUnit /*ePresUnit*/,
OUString& rText, const IntlWrapper *) const
{
- rText = EditResId::GetString( RID_SVXITEMS_FRMDIR_BEGIN + GetEnumValue() );
+ rText = EditResId(getFrmDirResId(GetEnumValue()));
return true;
}
-
bool SvxFrameDirectionItem::PutValue( const css::uno::Any& rVal,
sal_uInt8 )
{
diff --git a/editeng/source/items/itemtype.cxx b/editeng/source/items/itemtype.cxx
index 620cdadd8b7e..39126f065f1d 100644
--- a/editeng/source/items/itemtype.cxx
+++ b/editeng/source/items/itemtype.cxx
@@ -125,17 +125,15 @@ OUString GetMetricText( long nVal, MapUnit eSrcUnit, MapUnit eDestUnit, const In
return sRet.makeStringAndClear();
}
-
-OUString GetSvxString( sal_uInt16 nId )
+OUString GetSvxString(const char* pId)
{
- return EditResId::GetString( nId );
+ return EditResId(pId);
}
-
OUString GetColorString( const Color& rCol )
{
if (rCol.GetColor() == COL_AUTO)
- return EditResId::GetString(RID_SVXSTR_AUTOMATIC);
+ return EditResId(RID_SVXSTR_AUTOMATIC);
OUString sStr;
@@ -155,8 +153,30 @@ OUString GetColorString( const Color& rCol )
nColor += 1;
}
+ static const char* RID_SVXITEMS_COLORS[] =
+ {
+ RID_SVXITEMS_COLOR_BLACK,
+ RID_SVXITEMS_COLOR_BLUE,
+ RID_SVXITEMS_COLOR_GREEN,
+ RID_SVXITEMS_COLOR_CYAN,
+ RID_SVXITEMS_COLOR_RED,
+ RID_SVXITEMS_COLOR_MAGENTA,
+ RID_SVXITEMS_COLOR_BROWN,
+ RID_SVXITEMS_COLOR_GRAY,
+ RID_SVXITEMS_COLOR_LIGHTGRAY,
+ RID_SVXITEMS_COLOR_LIGHTBLUE,
+ RID_SVXITEMS_COLOR_LIGHTGREEN,
+ RID_SVXITEMS_COLOR_LIGHTCYAN,
+ RID_SVXITEMS_COLOR_LIGHTRED,
+ RID_SVXITEMS_COLOR_LIGHTMAGENTA,
+ RID_SVXITEMS_COLOR_YELLOW,
+ RID_SVXITEMS_COLOR_WHITE
+ };
+
+ static_assert(SAL_N_ELEMENTS(aColAry) == SAL_N_ELEMENTS(RID_SVXITEMS_COLORS), "must match");
+
if ( nColor < SAL_N_ELEMENTS(aColAry) )
- sStr = EditResId::GetString( RID_SVXITEMS_COLOR_BEGIN + nColor + 1 );
+ sStr = EditResId(RID_SVXITEMS_COLORS[nColor]);
if ( sStr.isEmpty() )
{
@@ -168,47 +188,45 @@ OUString GetColorString( const Color& rCol )
return sStr;
}
-
-sal_uInt16 GetMetricId( MapUnit eUnit )
+const char* GetMetricId( MapUnit eUnit )
{
- sal_uInt16 nId = RID_SVXITEMS_METRIC_MM;
+ const char* pId = RID_SVXITEMS_METRIC_MM;
switch ( eUnit )
{
case MapUnit::Map100thMM:
case MapUnit::Map10thMM:
case MapUnit::MapMM:
- nId = RID_SVXITEMS_METRIC_MM;
+ pId = RID_SVXITEMS_METRIC_MM;
break;
case MapUnit::MapCM:
- nId = RID_SVXITEMS_METRIC_CM;
+ pId = RID_SVXITEMS_METRIC_CM;
break;
case MapUnit::Map1000thInch:
case MapUnit::Map100thInch:
case MapUnit::Map10thInch:
case MapUnit::MapInch:
- nId = RID_SVXITEMS_METRIC_INCH;
+ pId = RID_SVXITEMS_METRIC_INCH;
break;
case MapUnit::MapPoint:
- nId = RID_SVXITEMS_METRIC_POINT;
+ pId = RID_SVXITEMS_METRIC_POINT;
break;
case MapUnit::MapTwip:
- nId = RID_SVXITEMS_METRIC_TWIP;
+ pId = RID_SVXITEMS_METRIC_TWIP;
break;
case MapUnit::MapPixel:
- nId = RID_SVXITEMS_METRIC_PIXEL;
+ pId = RID_SVXITEMS_METRIC_PIXEL;
break;
default:
OSL_FAIL( "not supported mapunit" );
}
- return nId;
+ return pId;
}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/editeng/source/items/justifyitem.cxx b/editeng/source/items/justifyitem.cxx
index b897fc5860d5..9d073ebda5c7 100644
--- a/editeng/source/items/justifyitem.cxx
+++ b/editeng/source/items/justifyitem.cxx
@@ -161,7 +161,7 @@ bool SvxHorJustifyItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
OUString SvxHorJustifyItem::GetValueText( sal_uInt16 nVal )
{
DBG_ASSERT( nVal <= (sal_uInt16)SvxCellHorJustify::Repeat, "enum overflow!" );
- return EditResId::GetString(RID_SVXITEMS_HORJUST_STANDARD + nVal);
+ return EditResId(RID_SVXITEMS_HORJUST_STANDARD + nVal);
}
@@ -297,7 +297,7 @@ bool SvxVerJustifyItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
OUString SvxVerJustifyItem::GetValueText( sal_uInt16 nVal )
{
DBG_ASSERT( nVal <= SVX_VER_JUSTIFY_BOTTOM, "enum overflow!" );
- return EditResId::GetString(RID_SVXITEMS_VERJUST_STANDARD + nVal);
+ return EditResId(RID_SVXITEMS_VERJUST_STANDARD + nVal);
}
@@ -379,7 +379,7 @@ bool SvxJustifyMethodItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId
OUString SvxJustifyMethodItem::GetValueText( sal_uInt16 nVal )
{
DBG_ASSERT( nVal <= SVX_VER_JUSTIFY_BOTTOM, "enum overflow!" );
- return EditResId::GetString(RID_SVXITEMS_JUSTMETHOD_AUTO + nVal);
+ return EditResId(RID_SVXITEMS_JUSTMETHOD_AUTO + nVal);
}
diff --git a/editeng/source/items/optitems.cxx b/editeng/source/items/optitems.cxx
index 819f1aed7454..1736b80e741c 100644
--- a/editeng/source/items/optitems.cxx
+++ b/editeng/source/items/optitems.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <tools/resid.hxx>
#include <tools/stream.hxx>
#include <com/sun/star/linguistic2/XSpellChecker1.hpp>
@@ -120,9 +119,9 @@ bool SfxHyphenRegionItem::GetPresentation
) const
{
rText = rText +
- EditResId::GetString(RID_SVXITEMS_HYPHEN_MINLEAD).replaceAll("%1", OUString::number(nMinLead)) +
+ EditResId(RID_SVXITEMS_HYPHEN_MINLEAD).replaceAll("%1", OUString::number(nMinLead)) +
"," +
- EditResId::GetString(RID_SVXITEMS_HYPHEN_MINTRAIL).replaceAll("%1", OUString::number(nMinTrail));
+ EditResId(RID_SVXITEMS_HYPHEN_MINTRAIL).replaceAll("%1", OUString::number(nMinTrail));
return true;
}
diff --git a/editeng/source/items/page.src b/editeng/source/items/page.src
deleted file mode 100644
index e58a618e753d..000000000000
--- a/editeng/source/items/page.src
+++ /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 .
- */
-
-#include <editeng/editrids.hrc>
-
-String RID_SVXSTR_PAPERBIN
-{
- Text [ en-US ] = "Paper tray" ;
-};
-String RID_SVXSTR_PAPERBIN_SETTINGS
-{
- Text [ en-US ] = "[From printer settings]" ;
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/editeng/source/items/paraitem.cxx b/editeng/source/items/paraitem.cxx
index 164b00a2d92c..eab2588de236 100644
--- a/editeng/source/items/paraitem.cxx
+++ b/editeng/source/items/paraitem.cxx
@@ -428,14 +428,21 @@ sal_uInt16 SvxAdjustItem::GetValueCount() const
return (sal_uInt16)SvxAdjust::End; // SvxAdjust::BlockLine + 1
}
-
OUString SvxAdjustItem::GetValueTextByPos( sal_uInt16 nPos ) const
{
- DBG_ASSERT( nPos <= (sal_uInt16)SvxAdjust::BlockLine, "enum overflow!" );
- return EditResId::GetString(RID_SVXITEMS_ADJUST_BEGIN + nPos);
+ static const char* RID_SVXITEMS_ADJUST[] =
+ {
+ RID_SVXITEMS_ADJUST_LEFT,
+ RID_SVXITEMS_ADJUST_RIGHT,
+ RID_SVXITEMS_ADJUST_BLOCK,
+ RID_SVXITEMS_ADJUST_CENTER,
+ RID_SVXITEMS_ADJUST_BLOCKLINE
+ };
+ static_assert(SAL_N_ELEMENTS(RID_SVXITEMS_ADJUST) - 1 == (size_t)SvxAdjust::BlockLine, "unexpected size");
+ assert(nPos <= (sal_uInt16)SvxAdjust::BlockLine && "enum overflow!");
+ return EditResId(RID_SVXITEMS_ADJUST[nPos]);
}
-
sal_uInt16 SvxAdjustItem::GetEnumValue() const
{
return (sal_uInt16)GetAdjust();
@@ -530,13 +537,13 @@ bool SvxWidowsItem::GetPresentation
{
case SfxItemPresentation::Nameless:
{
- rText = EditResId::GetString(RID_SVXITEMS_LINES);
+ rText = EditResId(RID_SVXITEMS_LINES);
break;
}
case SfxItemPresentation::Complete:
{
- rText = EditResId::GetString(RID_SVXITEMS_WIDOWS_COMPLETE) + " " + EditResId::GetString(RID_SVXITEMS_LINES);
+ rText = EditResId(RID_SVXITEMS_WIDOWS_COMPLETE) + " " + EditResId(RID_SVXITEMS_LINES);
break;
}
@@ -591,13 +598,13 @@ bool SvxOrphansItem::GetPresentation
{
case SfxItemPresentation::Nameless:
{
- rText = EditResId::GetString(RID_SVXITEMS_LINES);
+ rText = EditResId(RID_SVXITEMS_LINES);
break;
}
case SfxItemPresentation::Complete:
{
- rText = EditResId::GetString(RID_SVXITEMS_ORPHANS_COMPLETE) + " " + EditResId::GetString(RID_SVXITEMS_LINES);
+ rText = EditResId(RID_SVXITEMS_ORPHANS_COMPLETE) + " " + EditResId(RID_SVXITEMS_LINES);
break;
}
@@ -704,16 +711,16 @@ bool SvxHyphenZoneItem::GetPresentation
{
case SfxItemPresentation::Nameless:
{
- sal_uInt16 nId = RID_SVXITEMS_HYPHEN_FALSE;
+ const char* pId = RID_SVXITEMS_HYPHEN_FALSE;
if ( bHyphen )
- nId = RID_SVXITEMS_HYPHEN_TRUE;
- rText = EditResId::GetString(nId) + cpDelimTmp;
- nId = RID_SVXITEMS_PAGE_END_FALSE;
+ pId = RID_SVXITEMS_HYPHEN_TRUE;
+ rText = EditResId(pId) + cpDelimTmp;
+ pId = RID_SVXITEMS_PAGE_END_FALSE;
if ( bPageEnd )
- nId = RID_SVXITEMS_PAGE_END_TRUE;
- rText = rText + EditResId::GetString(nId) + cpDelimTmp +
+ pId = RID_SVXITEMS_PAGE_END_TRUE;
+ rText = rText + EditResId(pId) + cpDelimTmp +
OUString::number( nMinLead ) + cpDelimTmp +
OUString::number( nMinTrail ) + cpDelimTmp +
OUString::number( nMaxHyphens );
@@ -721,23 +728,23 @@ bool SvxHyphenZoneItem::GetPresentation
}
case SfxItemPresentation::Complete:
{
- sal_uInt16 nId = RID_SVXITEMS_HYPHEN_FALSE;
+ const char* pId = RID_SVXITEMS_HYPHEN_FALSE;
if ( bHyphen )
- nId = RID_SVXITEMS_HYPHEN_TRUE;
- rText = EditResId::GetString(nId) + cpDelimTmp;
- nId = RID_SVXITEMS_PAGE_END_FALSE;
+ pId = RID_SVXITEMS_HYPHEN_TRUE;
+ rText = EditResId(pId) + cpDelimTmp;
+ pId = RID_SVXITEMS_PAGE_END_FALSE;
if ( bPageEnd )
- nId = RID_SVXITEMS_PAGE_END_TRUE;
+ pId = RID_SVXITEMS_PAGE_END_TRUE;
rText = rText +
- EditResId::GetString(nId) +
+ EditResId(pId) +
cpDelimTmp +
- EditResId::GetString(RID_SVXITEMS_HYPHEN_MINLEAD).replaceAll("%1", OUString::number(nMinLead)) +
+ EditResId(RID_SVXITEMS_HYPHEN_MINLEAD).replaceAll("%1", OUString::number(nMinLead)) +
cpDelimTmp +
- EditResId::GetString(RID_SVXITEMS_HYPHEN_MINTRAIL).replaceAll("%1", OUString::number(nMinTrail)) +
+ EditResId(RID_SVXITEMS_HYPHEN_MINTRAIL).replaceAll("%1", OUString::number(nMinTrail)) +
cpDelimTmp +
- EditResId::GetString(RID_SVXITEMS_HYPHEN_MAX).replaceAll("%1", OUString::number(nMaxHyphens));
+ EditResId(RID_SVXITEMS_HYPHEN_MAX).replaceAll("%1", OUString::number(nMaxHyphens));
return true;
}
default: ;//prevent warning
@@ -1038,7 +1045,7 @@ bool SvxTabStopItem::GetPresentation
((*this)[i]).GetTabPos(), eCoreUnit, ePresUnit, pIntl );
if ( SfxItemPresentation::Complete == ePres )
{
- rText += " " + EditResId::GetString(GetMetricId(ePresUnit));
+ rText += " " + EditResId(GetMetricId(ePresUnit));
}
bComma = true;
}
@@ -1182,11 +1189,11 @@ bool SvxFormatSplitItem::GetPresentation
OUString& rText, const IntlWrapper *
) const
{
- sal_uInt16 nId = RID_SVXITEMS_FMTSPLIT_FALSE;
+ const char* pId = RID_SVXITEMS_FMTSPLIT_FALSE;
if ( GetValue() )
- nId = RID_SVXITEMS_FMTSPLIT_TRUE;
- rText = EditResId::GetString(nId);
+ pId = RID_SVXITEMS_FMTSPLIT_TRUE;
+ rText = EditResId(pId);
return true;
}
@@ -1255,7 +1262,7 @@ bool SvxPageModelItem::GetPresentation
case SfxItemPresentation::Complete:
if ( bSet )
{
- rText = EditResId::GetString(RID_SVXITEMS_PAGEMODEL_COMPLETE) + GetValue();
+ rText = EditResId(RID_SVXITEMS_PAGEMODEL_COMPLETE) + GetValue();
}
return true;
default: ;//prevent warning
@@ -1296,7 +1303,7 @@ bool SvxScriptSpaceItem::GetPresentation(
MapUnit /*eCoreMetric*/, MapUnit /*ePresMetric*/,
OUString &rText, const IntlWrapper* /*pIntl*/ ) const
{
- rText = EditResId::GetString( !GetValue()
+ rText = EditResId( !GetValue()
? RID_SVXITEMS_SCRPTSPC_OFF
: RID_SVXITEMS_SCRPTSPC_ON );
return true;
@@ -1336,7 +1343,7 @@ bool SvxHangingPunctuationItem::GetPresentation(
MapUnit /*eCoreMetric*/, MapUnit /*ePresMetric*/,
OUString &rText, const IntlWrapper* /*pIntl*/ ) const
{
- rText = EditResId::GetString( !GetValue()
+ rText = EditResId( !GetValue()
? RID_SVXITEMS_HNGPNCT_OFF
: RID_SVXITEMS_HNGPNCT_ON );
return true;
@@ -1376,7 +1383,7 @@ bool SvxForbiddenRuleItem::GetPresentation(
MapUnit /*eCoreMetric*/, MapUnit /*ePresMetric*/,
OUString &rText, const IntlWrapper* /*pIntl*/ ) const
{
- rText = EditResId::GetString( !GetValue()
+ rText = EditResId( !GetValue()
? RID_SVXITEMS_FORBIDDEN_RULE_OFF
: RID_SVXITEMS_FORBIDDEN_RULE_ON );
return true;
@@ -1420,16 +1427,16 @@ bool SvxParaVertAlignItem::GetPresentation(
MapUnit /*eCoreMetric*/, MapUnit /*ePresMetric*/,
OUString &rText, const IntlWrapper* ) const
{
- sal_uInt16 nTmp;
+ const char* pTmp;
switch( GetValue() )
{
- case Align::Automatic: nTmp = RID_SVXITEMS_PARAVERTALIGN_AUTO; break;
- case Align::Top: nTmp = RID_SVXITEMS_PARAVERTALIGN_TOP; break;
- case Align::Center: nTmp = RID_SVXITEMS_PARAVERTALIGN_CENTER; break;
- case Align::Bottom: nTmp = RID_SVXITEMS_PARAVERTALIGN_BOTTOM; break;
- default: nTmp = RID_SVXITEMS_PARAVERTALIGN_BASELINE; break;
+ case Align::Automatic: pTmp = RID_SVXITEMS_PARAVERTALIGN_AUTO; break;
+ case Align::Top: pTmp = RID_SVXITEMS_PARAVERTALIGN_TOP; break;
+ case Align::Center: pTmp = RID_SVXITEMS_PARAVERTALIGN_CENTER; break;
+ case Align::Bottom: pTmp = RID_SVXITEMS_PARAVERTALIGN_BOTTOM; break;
+ default: pTmp = RID_SVXITEMS_PARAVERTALIGN_BASELINE; break;
}
- rText = EditResId::GetString( nTmp );
+ rText = EditResId(pTmp);
return true;
}
@@ -1493,8 +1500,8 @@ bool SvxParaGridItem::GetPresentation(
OUString &rText, const IntlWrapper* /*pIntl*/ ) const
{
rText = GetValue() ?
- EditResId::GetString( RID_SVXITEMS_PARASNAPTOGRID_ON ) :
- EditResId::GetString( RID_SVXITEMS_PARASNAPTOGRID_OFF );
+ EditResId( RID_SVXITEMS_PARASNAPTOGRID_ON ) :
+ EditResId( RID_SVXITEMS_PARASNAPTOGRID_OFF );
return true;
}
diff --git a/editeng/source/items/svxitems.src b/editeng/source/items/svxitems.src
deleted file mode 100644
index 3cb496325d97..000000000000
--- a/editeng/source/items/svxitems.src
+++ /dev/null
@@ -1,1028 +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 <editeng/editrids.hrc>
-
- // enum SvxBreak ------------------------------------------------------------
-String RID_SVXITEMS_BREAK_NONE
-{
- Text [ en-US ] = "No break" ;
-};
-String RID_SVXITEMS_BREAK_COLUMN_BEFORE
-{
- Text [ en-US ] = "Break before new column" ;
-};
-String RID_SVXITEMS_BREAK_COLUMN_AFTER
-{
- Text [ en-US ] = "Break after new column" ;
-};
-String RID_SVXITEMS_BREAK_COLUMN_BOTH
-{
- Text [ en-US ] = "Break before and after new column" ;
-};
-String RID_SVXITEMS_BREAK_PAGE_BEFORE
-{
- Text [ en-US ] = "Break before new page" ;
-};
-String RID_SVXITEMS_BREAK_PAGE_AFTER
-{
- Text [ en-US ] = "Break after new page" ;
-};
-String RID_SVXITEMS_BREAK_PAGE_BOTH
-{
- Text [ en-US ] = "Break before and after new page" ;
-};
- // enum SvxShadowLocation ---------------------------------------------------
-String RID_SVXITEMS_SHADOW_NONE
-{
- Text [ en-US ] = "No Shadow" ;
-};
-String RID_SVXITEMS_SHADOW_TOPLEFT
-{
- Text [ en-US ] = "Shadow top left" ;
-};
-String RID_SVXITEMS_SHADOW_TOPRIGHT
-{
- Text [ en-US ] = "Shadow top right" ;
-};
-String RID_SVXITEMS_SHADOW_BOTTOMLEFT
-{
- Text [ en-US ] = "Shadow bottom left" ;
-};
-String RID_SVXITEMS_SHADOW_BOTTOMRIGHT
-{
- Text [ en-US ] = "Shadow bottom right" ;
-};
- // enum ColorName -----------------------------------------------------------
-String RID_SVXITEMS_COLOR
-{
- Text [ en-US ] = "Color " ;
-};
-String RID_SVXITEMS_COLOR_BLACK
-{
- Text [ en-US ] = "Black" ;
-};
-String RID_SVXITEMS_COLOR_BLUE
-{
- Text [ en-US ] = "Blue" ;
-};
-String RID_SVXITEMS_COLOR_GREEN
-{
- Text [ en-US ] = "Green" ;
-};
-String RID_SVXITEMS_COLOR_CYAN
-{
- Text [ en-US ] = "Cyan" ;
-};
-String RID_SVXITEMS_COLOR_RED
-{
- Text [ en-US ] = "Red" ;
-};
-String RID_SVXITEMS_COLOR_MAGENTA
-{
- Text [ en-US ] = "Magenta" ;
-};
-String RID_SVXITEMS_COLOR_BROWN
-{
- Text [ en-US ] = "Brown" ;
-};
-String RID_SVXITEMS_COLOR_GRAY
-{
- Text [ en-US ] = "Gray" ;
-};
-String RID_SVXITEMS_COLOR_LIGHTGRAY
-{
- Text [ en-US ] = "Light Gray" ;
-};
-String RID_SVXITEMS_COLOR_LIGHTBLUE
-{
- Text [ en-US ] = "Light Blue" ;
-};
-String RID_SVXITEMS_COLOR_LIGHTGREEN
-{
- Text [ en-US ] = "Light Green" ;
-};
-String RID_SVXITEMS_COLOR_LIGHTCYAN
-{
- Text [ en-US ] = "Light Cyan" ;
-};
-String RID_SVXITEMS_COLOR_LIGHTRED
-{
- Text [ en-US ] = "Light Red" ;
-};
-String RID_SVXITEMS_COLOR_LIGHTMAGENTA
-{
- Text [ en-US ] = "Light Magenta" ;
-};
-String RID_SVXITEMS_COLOR_YELLOW
-{
- Text [ en-US ] = "Yellow" ;
-};
-String RID_SVXITEMS_COLOR_WHITE
-{
- Text [ en-US ] = "White" ;
-};
-String RID_SVXITEMS_COLOR_MENUBAR
-{
- Text = "?" ;
-};
-String RID_SVXITEMS_COLOR_MENUBARTEXT
-{
- Text = "?" ;
-};
-String RID_SVXITEMS_COLOR_POPUPMENU
-{
- Text = "?" ;
-};
-String RID_SVXITEMS_COLOR_POPUPMENUTEXT
-{
- Text = "?" ;
-};
-String RID_SVXITEMS_COLOR_WINDOWTEXT
-{
- Text = "?" ;
-};
-String RID_SVXITEMS_COLOR_WINDOWWORKSPACE
-{
- Text = "?" ;
-};
-String RID_SVXITEMS_COLOR_HIGHLIGHT
-{
- Text = "?" ;
-};
-String RID_SVXITEMS_COLOR_HIGHLIGHTTEXT
-{
- Text = "?" ;
-};
-String RID_SVXITEMS_COLOR_3DTEXT
-{
- Text = "?" ;
-};
-String RID_SVXITEMS_COLOR_3DFACE
-{
- Text = "?" ;
-};
-String RID_SVXITEMS_COLOR_3DLIGHT
-{
- Text = "?" ;
-};
-String RID_SVXITEMS_COLOR_3DSHADOW
-{
- Text = "?" ;
-};
-String RID_SVXITEMS_COLOR_SCROLLBAR
-{
- Text = "?" ;
-};
-String RID_SVXITEMS_COLOR_FIELD
-{
- Text = "?" ;
-};
-String RID_SVXITEMS_COLOR_FIELDTEXT
-{
- Text = "?" ;
-};
- // enum FontItalic -------------------------------------------------------
-String RID_SVXITEMS_ITALIC_NONE
-{
- Text [ en-US ] = "Not Italic" ;
-};
-String RID_SVXITEMS_ITALIC_OBLIQUE
-{
- Text [ en-US ] = "Oblique italic" ;
-};
-String RID_SVXITEMS_ITALIC_NORMAL
-{
- Text [ en-US ] = "Italic" ;
-};
- // enum FontWeight -------------------------------------------------------
-String RID_SVXITEMS_WEIGHT_DONTKNOW
-{
- Text = "?" ;
-};
-String RID_SVXITEMS_WEIGHT_THIN
-{
- Text [ en-US ] = "thin" ;
-};
-String RID_SVXITEMS_WEIGHT_ULTRALIGHT
-{
- Text [ en-US ] = "ultra thin" ;
-};
-String RID_SVXITEMS_WEIGHT_LIGHT
-{
- Text [ en-US ] = "light" ;
-};
-String RID_SVXITEMS_WEIGHT_SEMILIGHT
-{
- Text [ en-US ] = "semi light" ;
-};
-String RID_SVXITEMS_WEIGHT_NORMAL
-{
- Text [ en-US ] = "normal" ;
-};
-String RID_SVXITEMS_WEIGHT_MEDIUM
-{
- Text [ en-US ] = "medium" ;
-};
-String RID_SVXITEMS_WEIGHT_SEMIBOLD
-{
- Text [ en-US ] = "semi bold" ;
-};
-String RID_SVXITEMS_WEIGHT_BOLD
-{
- Text [ en-US ] = "bold" ;
-};
-String RID_SVXITEMS_WEIGHT_ULTRABOLD
-{
- Text [ en-US ] = "ultra bold" ;
-};
-String RID_SVXITEMS_WEIGHT_BLACK
-{
- Text [ en-US ] = "black" ;
-};
- // enum FontUnderline - used for underline ------------------------------
-String RID_SVXITEMS_UL_NONE
-{
- Text [ en-US ] = "No underline" ;
-};
-String RID_SVXITEMS_UL_SINGLE
-{
- Text [ en-US ] = "Single underline" ;
-};
-String RID_SVXITEMS_UL_DOUBLE
-{
- Text [ en-US ] = "Double underline" ;
-};
-String RID_SVXITEMS_UL_DOTTED
-{
- Text [ en-US ] = "Dotted underline" ;
-};
-String RID_SVXITEMS_UL_DONTKNOW
-{
- Text [ en-US ] = "Underline";
-};
-String RID_SVXITEMS_UL_DASH
-{
- Text [ en-US ] = "Underline (dashes)";
-};
-String RID_SVXITEMS_UL_LONGDASH
-{
- Text [ en-US ] = "Underline (long dashes)";
-};
-String RID_SVXITEMS_UL_DASHDOT
-{
- Text [ en-US ] = "Underline (dot dash)";
-};
-String RID_SVXITEMS_UL_DASHDOTDOT
-{
- Text [ en-US ] = "Underline (dot dot dash)";
-};
-String RID_SVXITEMS_UL_SMALLWAVE
-{
- Text [ en-US ] = "Underline (small wave)";
-};
-String RID_SVXITEMS_UL_WAVE
-{
- Text [ en-US ] = "Underline (Wave)";
-};
-String RID_SVXITEMS_UL_DOUBLEWAVE
-{
- Text [ en-US ] = "Underline (Double wave)";
-};
-String RID_SVXITEMS_UL_BOLD
-{
- Text [ en-US ] = "Underlined (Bold)";
-};
-String RID_SVXITEMS_UL_BOLDDOTTED
-{
- Text [ en-US ] = "Dotted underline (Bold)";
-};
-String RID_SVXITEMS_UL_BOLDDASH
-{
- Text [ en-US ] = "Underline (Dash bold)";
-};
-String RID_SVXITEMS_UL_BOLDLONGDASH
-{
- Text [ en-US ] = "Underline (long dash, bold)";
-};
-String RID_SVXITEMS_UL_BOLDDASHDOT
-{
- Text [ en-US ] = "Underline (dot dash, bold)";
-};
-String RID_SVXITEMS_UL_BOLDDASHDOTDOT
-{
- Text [ en-US ] = "Underline (dot dot dash, bold)";
-};
-String RID_SVXITEMS_UL_BOLDWAVE
-{
- Text [ en-US ] = "Underline (wave, bold)";
-};
- // enum FontUnderline - used for overline -------------------------------
-String RID_SVXITEMS_OL_NONE
-{
- Text [ en-US ] = "No overline" ;
-};
-String RID_SVXITEMS_OL_SINGLE
-{
- Text [ en-US ] = "Single overline" ;
-};
-String RID_SVXITEMS_OL_DOUBLE
-{
- Text [ en-US ] = "Double overline" ;
-};
-String RID_SVXITEMS_OL_DOTTED
-{
- Text [ en-US ] = "Dotted overline" ;
-};
-String RID_SVXITEMS_OL_DONTKNOW
-{
- Text [ en-US ] = "Overline";
-};
-String RID_SVXITEMS_OL_DASH
-{
- Text [ en-US ] = "Overline (dashes)";
-};
-String RID_SVXITEMS_OL_LONGDASH
-{
- Text [ en-US ] = "Overline (long dashes)";
-};
-String RID_SVXITEMS_OL_DASHDOT
-{
- Text [ en-US ] = "Overline (dot dash)";
-};
-String RID_SVXITEMS_OL_DASHDOTDOT
-{
- Text [ en-US ] = "Overline (dot dot dash)";
-};
-String RID_SVXITEMS_OL_SMALLWAVE
-{
- Text [ en-US ] = "Overline (small wave)";
-};
-String RID_SVXITEMS_OL_WAVE
-{
- Text [ en-US ] = "Overline (Wave)";
-};
-String RID_SVXITEMS_OL_DOUBLEWAVE
-{
- Text [ en-US ] = "Overline (Double wave)";
-};
-String RID_SVXITEMS_OL_BOLD
-{
- Text [ en-US ] = "Overlined (Bold)";
-};
-String RID_SVXITEMS_OL_BOLDDOTTED
-{
- Text [ en-US ] = "Dotted overline (Bold)";
-};
-String RID_SVXITEMS_OL_BOLDDASH
-{
- Text [ en-US ] = "Overline (Dash bold)";
-};
-String RID_SVXITEMS_OL_BOLDLONGDASH
-{
- Text [ en-US ] = "Overline (long dash, bold)";
-};
-String RID_SVXITEMS_OL_BOLDDASHDOT
-{
- Text [ en-US ] = "Overline (dot dash, bold)";
-};
-String RID_SVXITEMS_OL_BOLDDASHDOTDOT
-{
- Text [ en-US ] = "Overline (dot dot dash, bold)";
-};
-String RID_SVXITEMS_OL_BOLDWAVE
-{
- Text [ en-US ] = "Overline (wave, bold)";
-};
- // enum FontStrikeout ----------------------------------------------------
-String RID_SVXITEMS_STRIKEOUT_NONE
-{
- Text [ en-US ] = "No strikethrough" ;
-};
-String RID_SVXITEMS_STRIKEOUT_SINGLE
-{
- Text [ en-US ] = "Single strikethrough" ;
-};
-String RID_SVXITEMS_STRIKEOUT_DOUBLE
-{
- Text [ en-US ] = "Double strikethrough" ;
-};
-String RID_SVXITEMS_STRIKEOUT_BOLD
-{
- Text [ en-US ] = "Bold strikethrough";
-};
-String RID_SVXITEMS_STRIKEOUT_SLASH
-{
- Text [ en-US ] = "Strike through with slash";
-};
-String RID_SVXITEMS_STRIKEOUT_X
-{
- Text [ en-US ] = "Strike through with Xes";
-};
- // enum CASEMAP ----------------------------------------------------------
-String RID_SVXITEMS_CASEMAP_NONE
-{
- Text [ en-US ] = "None" ;
-};
-String RID_SVXITEMS_CASEMAP_VERSALIEN
-{
- Text [ en-US ] = "Caps" ;
-};
-String RID_SVXITEMS_CASEMAP_GEMEINE
-{
- Text [ en-US ] = "Lowercase" ;
-};
-String RID_SVXITEMS_CASEMAP_TITEL
-{
- Text [ en-US ] = "Title" ;
-};
-String RID_SVXITEMS_CASEMAP_KAPITAELCHEN
-{
- Text [ en-US ] = "Small caps" ;
-};
- // enum ESCAPEMENT -------------------------------------------------------
-String RID_SVXITEMS_ESCAPEMENT_OFF
-{
- Text [ en-US ] = "Normal position" ;
-};
-String RID_SVXITEMS_ESCAPEMENT_SUPER
-{
- Text [ en-US ] = "Superscript " ;
-};
-String RID_SVXITEMS_ESCAPEMENT_SUB
-{
- Text [ en-US ] = "Subscript " ;
-};
-String RID_SVXITEMS_ESCAPEMENT_AUTO
-{
- Text [ en-US ] = "automatic" ;
-};
- // enum SvxAdjust -----------------------------------------------------------
-String RID_SVXITEMS_ADJUST_LEFT
-{
- Text [ en-US ] = "Align left" ;
-};
-String RID_SVXITEMS_ADJUST_RIGHT
-{
- Text [ en-US ] = "Align right" ;
-};
-String RID_SVXITEMS_ADJUST_BLOCK
-{
- Text [ en-US ] = "Justify" ;
-};
-String RID_SVXITEMS_ADJUST_CENTER
-{
- Text [ en-US ] = "Centered" ;
-};
-String RID_SVXITEMS_ADJUST_BLOCKLINE
-{
- Text [ en-US ] = "Justify" ;
-};
-String RID_SOLID
-{
- Text [ en-US ] = "Single, solid" ;
-};
-String RID_DOTTED
-{
- Text [ en-US ] = "Single, dotted" ;
-};
-String RID_DASHED
-{
- Text [ en-US ] = "Single, dashed" ;
-};
-String RID_DOUBLE
-{
- Text [ en-US ] = "Double" ;
-};
-String RID_THINTHICK_SMALLGAP
-{
- Text [ en-US ] = "Double, inside: fine, outside: thick, spacing: small";
-};
-String RID_THINTHICK_MEDIUMGAP
-{
- Text [ en-US ] = "Double, inside: fine, outside: thick, spacing: medium";
-};
-String RID_THINTHICK_LARGEGAP
-{
- Text [ en-US ] = "Double, inside: fine, outside: thick, spacing: large";
-};
-String RID_THICKTHIN_SMALLGAP
-{
- Text [ en-US ] = "Double, inside: thick, outside: fine, spacing: small";
-};
-String RID_THICKTHIN_MEDIUMGAP
-{
- Text [ en-US ] = "Double, inside: thick, outside: fine, spacing: medium";
-};
-String RID_THICKTHIN_LARGEGAP
-{
- Text [ en-US ] = "Double, inside: thick, outside: fine, spacing: large";
-};
-String RID_EMBOSSED
-{
- Text [ en-US ] = "3D embossed" ;
-};
-String RID_ENGRAVED
-{
- Text [ en-US ] = "3D engraved" ;
-};
-String RID_INSET
-{
- Text [ en-US ] = "Inset" ;
-};
-String RID_OUTSET
-{
- Text [ en-US ] = "Outset" ;
-};
-String RID_FINE_DASHED
-{
- Text [ en-US ] = "Single, fine dashed";
-};
-String RID_DOUBLE_THIN
-{
- Text [ en-US ] = "Double, fixed thin lines";
-};
-String RID_DASH_DOT
-{
- Text [ en-US ] = "Single, dash-dot";
-};
-String RID_DASH_DOT_DOT
-{
- Text [ en-US ] = "Single, dash-dot-dot";
-};
-String RID_SVXITEMS_METRIC_MM
-{
- Text [ en-US ] = "mm" ;
-};
-String RID_SVXITEMS_METRIC_CM
-{
- Text [ en-US ] = "cm" ;
-};
-String RID_SVXITEMS_METRIC_INCH
-{
- Text [ en-US ] = "inch" ;
-};
-String RID_SVXITEMS_METRIC_POINT
-{
- Text [ en-US ] = "pt" ;
-};
-String RID_SVXITEMS_METRIC_TWIP
-{
- Text [ en-US ] = "twip" ;
-};
-String RID_SVXITEMS_METRIC_PIXEL
-{
- Text [ en-US ] = "pixel" ;
-};
- // GetValueText of BoolItems
-String RID_SVXITEMS_SHADOWED_TRUE
-{
- Text [ en-US ] = "Shadowed" ;
-};
-String RID_SVXITEMS_SHADOWED_FALSE
-{
- Text [ en-US ] = "Not Shadowed" ;
-};
-String RID_SVXITEMS_BLINK_TRUE
-{
- Text [ en-US ] = "Blinking" ;
-};
-String RID_SVXITEMS_BLINK_FALSE
-{
- Text [ en-US ] = "Not Blinking" ;
-};
-String RID_SVXITEMS_AUTOKERN_TRUE
-{
- Text [ en-US ] = "Pair Kerning" ;
-};
-String RID_SVXITEMS_AUTOKERN_FALSE
-{
- Text [ en-US ] = "No pair kerning" ;
-};
-String RID_SVXITEMS_WORDLINE_TRUE
-{
- Text [ en-US ] = "Individual words" ;
-};
-String RID_SVXITEMS_WORDLINE_FALSE
-{
- Text [ en-US ] = "Not Words Only" ;
-};
-String RID_SVXITEMS_CONTOUR_TRUE
-{
- Text [ en-US ] = "Outline" ;
-};
-String RID_SVXITEMS_CONTOUR_FALSE
-{
- Text [ en-US ] = "No Outline" ;
-};
-String RID_SVXITEMS_PRINT_TRUE
-{
- Text [ en-US ] = "Print" ;
-};
-String RID_SVXITEMS_PRINT_FALSE
-{
- Text [ en-US ] = "Don't print" ;
-};
-String RID_SVXITEMS_OPAQUE_TRUE
-{
- Text [ en-US ] = "Opaque" ;
-};
-String RID_SVXITEMS_OPAQUE_FALSE
-{
- Text [ en-US ] = "Not Opaque" ;
-};
-String RID_SVXITEMS_FMTKEEP_TRUE
-{
- Text [ en-US ] = "Keep with next paragraph" ;
-};
-String RID_SVXITEMS_FMTKEEP_FALSE
-{
- Text [ en-US ] = "Don't Keep Paragraphs Together" ;
-};
-String RID_SVXITEMS_FMTSPLIT_TRUE
-{
- Text [ en-US ] = "Split paragraph" ;
-};
-String RID_SVXITEMS_FMTSPLIT_FALSE
-{
- Text [ en-US ] = "Don't split paragraph" ;
-};
-String RID_SVXITEMS_PROT_CONTENT_TRUE
-{
- Text [ en-US ] = "Contents protected" ;
-};
-String RID_SVXITEMS_PROT_CONTENT_FALSE
-{
- Text [ en-US ] = "Contents not protected" ;
-};
-String RID_SVXITEMS_PROT_SIZE_TRUE
-{
- Text [ en-US ] = "Size protected" ;
-};
-String RID_SVXITEMS_PROT_SIZE_FALSE
-{
- Text [ en-US ] = "Size not protected" ;
-};
-String RID_SVXITEMS_PROT_POS_TRUE
-{
- Text [ en-US ] = "Position protected" ;
-};
-String RID_SVXITEMS_PROT_POS_FALSE
-{
- Text [ en-US ] = "Position not protected" ;
-};
-String RID_SVXITEMS_TRANSPARENT_TRUE
-{
- Text [ en-US ] = "Transparent" ;
-};
-String RID_SVXITEMS_TRANSPARENT_FALSE
-{
- Text [ en-US ] = "Not Transparent" ;
-};
-String RID_SVXITEMS_HYPHEN_TRUE
-{
- Text [ en-US ] = "Hyphenation" ;
-};
-String RID_SVXITEMS_HYPHEN_FALSE
-{
- Text [ en-US ] = "No hyphenation" ;
-};
-String RID_SVXITEMS_PAGE_END_TRUE
-{
- Text [ en-US ] = "Page End" ;
-};
-String RID_SVXITEMS_PAGE_END_FALSE
-{
- Text [ en-US ] = "No Page End" ;
-};
-String RID_SVXITEMS_SIZE_WIDTH
-{
- Text [ en-US ] = "Width: " ;
-};
-String RID_SVXITEMS_SIZE_HEIGHT
-{
- Text [ en-US ] = "Height: " ;
-};
-String RID_SVXITEMS_LRSPACE_LEFT
-{
- Text [ en-US ] = "Indent left " ;
-};
-String RID_SVXITEMS_LRSPACE_FLINE
-{
- Text [ en-US ] = "First Line " ;
-};
-String RID_SVXITEMS_LRSPACE_RIGHT
-{
- Text [ en-US ] = "Indent right " ;
-};
-String RID_SVXITEMS_SHADOW_COMPLETE
-{
- Text [ en-US ] = "Shadow: " ;
-};
-String RID_SVXITEMS_BORDER_COMPLETE
-{
- Text [ en-US ] = "Borders " ;
-};
-String RID_SVXITEMS_BORDER_NONE
-{
- Text [ en-US ] = "No border";
-};
-String RID_SVXITEMS_BORDER_TOP
-{
- Text [ en-US ] = "top " ;
-};
-String RID_SVXITEMS_BORDER_BOTTOM
-{
- Text [ en-US ] = "bottom " ;
-};
-String RID_SVXITEMS_BORDER_LEFT
-{
- Text [ en-US ] = "left " ;
-};
-String RID_SVXITEMS_BORDER_RIGHT
-{
- Text [ en-US ] = "right " ;
-};
-String RID_SVXITEMS_BORDER_DISTANCE
-{
- Text [ en-US ] = "Spacing " ;
-};
-String RID_SVXITEMS_ULSPACE_UPPER
-{
- Text [ en-US ] = "From top " ;
-};
-String RID_SVXITEMS_ULSPACE_LOWER
-{
- Text [ en-US ] = "From bottom " ;
-};
-String RID_SVXITEMS_LINES
-{
- Text [ en-US ] = "%1 Lines" ;
- Text [ x-comment ] = "pb: %1 == will be replaced by the number of lines";
-};
-String RID_SVXITEMS_WIDOWS_COMPLETE
-{
- Text [ en-US ] = "Widow control" ;
-};
-String RID_SVXITEMS_ORPHANS_COMPLETE
-{
- Text [ en-US ] = "Orphan control" ;
-};
-String RID_SVXITEMS_HYPHEN_MINLEAD
-{
- Text [ en-US ] = "%1 characters at end of line" ;
-};
-String RID_SVXITEMS_HYPHEN_MINTRAIL
-{
- Text [ en-US ] = "%1 characters at beginning of line" ;
-};
-String RID_SVXITEMS_HYPHEN_MAX
-{
- Text [ en-US ] = "%1 hyphens" ;
-};
-String RID_SVXITEMS_PAGEMODEL_COMPLETE
-{
- Text [ en-US ] = "Page Style: " ;
-};
-String RID_SVXITEMS_KERNING_COMPLETE
-{
- Text [ en-US ] = "Kerning " ;
-};
-String RID_SVXITEMS_KERNING_EXPANDED
-{
- Text [ en-US ] = "locked " ;
-};
-String RID_SVXITEMS_KERNING_CONDENSED
-{
- Text [ en-US ] = "Condensed " ;
-};
-String RID_SVXITEMS_GRAPHIC
-{
- Text [ en-US ] = "Graphic" ;
-};
-String RID_SVXITEMS_EMPHASIS_NONE_STYLE
-{
- Text [ en-US ] = "none";
-};
-String RID_SVXITEMS_EMPHASIS_DOT_STYLE
-{
- Text [ en-US ] = "Dots ";
-};
-String RID_SVXITEMS_EMPHASIS_CIRCLE_STYLE
-{
- Text [ en-US ] = "Circle ";
-};
-String RID_SVXITEMS_EMPHASIS_DISC_STYLE
-{
-// ??? disc == filled ring
- Text [ en-US ] = "Filled circle ";
-};
-String RID_SVXITEMS_EMPHASIS_ACCENT_STYLE
-{
- Text [ en-US ] = "Accent ";
-};
-String RID_SVXITEMS_EMPHASIS_ABOVE_POS
-{
- Text [ en-US ] = "Above";
-};
-String RID_SVXITEMS_EMPHASIS_BELOW_POS
-{
- Text [ en-US ] = "Below";
-};
-String RID_SVXITEMS_TWOLINES_OFF
-{
- Text [ en-US ] = "Double-lined off";
-};
-String RID_SVXITEMS_TWOLINES
-{
- Text [ en-US ] = "Double-lined";
-};
-String RID_SVXITEMS_SCRPTSPC_OFF
-{
- Text [ en-US ] = "No automatic character spacing";
-};
-String RID_SVXITEMS_SCRPTSPC_ON
-{
- Text [ en-US ] = "No automatic character spacing";
-};
-String RID_SVXITEMS_HNGPNCT_OFF
-{
- Text [ en-US ] = "No hanging punctuation at line end";
-};
-String RID_SVXITEMS_HNGPNCT_ON
-{
- Text [ en-US ] = "Hanging punctuation at line end";
-};
-String RID_SVXITEMS_FORBIDDEN_RULE_OFF
-{
- Text [ en-US ] = "Apply list of forbidden characters to beginning and end of lines";
-};
-String RID_SVXITEMS_FORBIDDEN_RULE_ON
-{
- Text [ en-US ] = "Don't apply list of forbidden characters to beginning and end of lines";
-};
-String RID_SVXITEMS_CHARROTATE_OFF
-{
- Text [ en-US ] = "No rotated characters";
-};
-String RID_SVXITEMS_CHARROTATE
-{
- Text [ en-US ] = "Character rotated by $(ARG1)°";
-};
-String RID_SVXITEMS_CHARROTATE_FITLINE
-{
- Text [ en-US ] = "Fit to line";
-};
-String RID_SVXITEMS_TEXTROTATE_OFF
-{
- Text [ en-US ] = "Text is not rotated";
-};
-String RID_SVXITEMS_TEXTROTATE
-{
- Text [ en-US ] = "Text is rotated by $(ARG1)°";
-};
-String RID_SVXITEMS_CHARSCALE
-{
- Text [ en-US ] = "Characters scaled $(ARG1)%";
-};
-String RID_SVXITEMS_CHARSCALE_OFF
-{
- Text [ en-US ] = "No scaled characters";
-};
-String RID_SVXITEMS_RELIEF_NONE
-{
- Text [ en-US ] = "No relief";
-};
-String RID_SVXITEMS_RELIEF_EMBOSSED
-{
- Text [ en-US ] = "Relief";
-};
-String RID_SVXITEMS_RELIEF_ENGRAVED
-{
- Text [ en-US ] = "Engraved";
-};
-String RID_SVXITEMS_PARAVERTALIGN_AUTO
-{
- Text [ en-US ] = "Automatic text alignment";
-};
-String RID_SVXITEMS_PARAVERTALIGN_BASELINE
-{
- Text [ en-US ] = "Text aligned to base line";
-};
-String RID_SVXITEMS_PARAVERTALIGN_TOP
-{
- Text [ en-US ] = "Text aligned top";
-};
-String RID_SVXITEMS_PARAVERTALIGN_CENTER
-{
- Text [ en-US ] = "Text aligned middle";
-};
-String RID_SVXITEMS_PARAVERTALIGN_BOTTOM
-{
- Text [ en-US ] = "Text aligned bottom";
-};
-String RID_SVXITEMS_FRMDIR_HORI_LEFT_TOP
-{
- Text [ en-US ] = "Text direction left-to-right (horizontal)";
-};
-String RID_SVXITEMS_FRMDIR_HORI_RIGHT_TOP
-{
- Text [ en-US ] = "Text direction right-to-left (horizontal)";
-};
-String RID_SVXITEMS_FRMDIR_VERT_TOP_RIGHT
-{
- Text [ en-US ] = "Text direction right-to-left (vertical)";
-};
-String RID_SVXITEMS_FRMDIR_VERT_TOP_LEFT
-{
- Text [ en-US ] = "Text direction left-to-right (vertical)";
-};
-String RID_SVXITEMS_FRMDIR_ENVIRONMENT
-{
- Text [ en-US ] = "Use superordinate object text direction setting";
-};
-String RID_SVXITEMS_PARASNAPTOGRID_ON
-{
- Text[ en-US ] = "Paragraph snaps to text grid (if active)";
-};
-String RID_SVXITEMS_PARASNAPTOGRID_OFF
-{
- Text[ en-US ] = "Paragraph does not snap to text grid";
-};
-String RID_SVXITEMS_CHARHIDDEN_FALSE
-{
- Text [ en-US ] = "Not hidden";
-};
-String RID_SVXITEMS_CHARHIDDEN_TRUE
-{
- Text [ en-US ] = "Hidden";
-};
- // enum SvxCellHorJustify ----------------------------------------------------
-String RID_SVXITEMS_HORJUST_STANDARD
-{
- Text [ en-US ] = "Horizontal alignment default" ;
-};
-String RID_SVXITEMS_HORJUST_LEFT
-{
- Text [ en-US ] = "Align left" ;
-};
-String RID_SVXITEMS_HORJUST_CENTER
-{
- Text [ en-US ] = "Centered horizontally" ;
-};
-String RID_SVXITEMS_HORJUST_RIGHT
-{
- Text [ en-US ] = "Align right" ;
-};
-String RID_SVXITEMS_HORJUST_BLOCK
-{
- Text [ en-US ] = "Justify" ;
-};
-String RID_SVXITEMS_HORJUST_REPEAT
-{
- Text [ en-US ] = "Repeat alignment" ;
-};
- // enum SvxCellVerJustify ----------------------------------------------------
-String RID_SVXITEMS_VERJUST_STANDARD
-{
- Text [ en-US ] = "Vertical alignment default" ;
-};
-String RID_SVXITEMS_VERJUST_TOP
-{
- Text [ en-US ] = "Align to top" ;
-};
-String RID_SVXITEMS_VERJUST_CENTER
-{
- Text [ en-US ] = "Centered vertically" ;
-};
-String RID_SVXITEMS_VERJUST_BOTTOM
-{
- Text [ en-US ] = "Align to bottom" ;
-};
- // enum SvxCellJustifyMethod ----------------------------------------------------
-String RID_SVXITEMS_JUSTMETHOD_AUTO
-{
- Text [ en-US ] = "Automatic" ;
-};
-String RID_SVXITEMS_JUSTMETHOD_DISTRIBUTE
-{
- Text [ en-US ] = "Distributed" ;
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx
index aa1a478e887d..5821900f3902 100644
--- a/editeng/source/items/textitem.cxx
+++ b/editeng/source/items/textitem.cxx
@@ -490,17 +490,17 @@ OUString SvxPostureItem::GetValueTextByPos( sal_uInt16 nPos ) const
DBG_ASSERT( nPos <= (sal_uInt16)ITALIC_NORMAL, "enum overflow!" );
FontItalic eItalic = (FontItalic)nPos;
- sal_uInt16 nId = 0;
+ const char* pId = nullptr;
switch ( eItalic )
{
- case ITALIC_NONE: nId = RID_SVXITEMS_ITALIC_NONE; break;
- case ITALIC_OBLIQUE: nId = RID_SVXITEMS_ITALIC_OBLIQUE; break;
- case ITALIC_NORMAL: nId = RID_SVXITEMS_ITALIC_NORMAL; break;
+ case ITALIC_NONE: pId = RID_SVXITEMS_ITALIC_NONE; break;
+ case ITALIC_OBLIQUE: pId = RID_SVXITEMS_ITALIC_OBLIQUE; break;
+ case ITALIC_NORMAL: pId = RID_SVXITEMS_ITALIC_NORMAL; break;
default: ;//prevent warning
}
- return nId ? EditResId::GetString(nId) : OUString();
+ return pId ? EditResId(pId) : OUString();
}
bool SvxPostureItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
@@ -619,7 +619,6 @@ SfxPoolItem* SvxWeightItem::Create(SvStream& rStrm, sal_uInt16) const
return new SvxWeightItem( (FontWeight)nWeight, Which() );
}
-
bool SvxWeightItem::GetPresentation
(
SfxItemPresentation /*ePres*/,
@@ -632,11 +631,26 @@ bool SvxWeightItem::GetPresentation
return true;
}
-
OUString SvxWeightItem::GetValueTextByPos( sal_uInt16 nPos ) const
{
- DBG_ASSERT( nPos <= (sal_uInt16)WEIGHT_BLACK, "enum overflow!" );
- return EditResId::GetString(RID_SVXITEMS_WEIGHT_BEGIN + nPos);
+ static const char* RID_SVXITEMS_WEIGHTS[] =
+ {
+ RID_SVXITEMS_WEIGHT_DONTKNOW,
+ RID_SVXITEMS_WEIGHT_THIN,
+ RID_SVXITEMS_WEIGHT_ULTRALIGHT,
+ RID_SVXITEMS_WEIGHT_LIGHT,
+ RID_SVXITEMS_WEIGHT_SEMILIGHT,
+ RID_SVXITEMS_WEIGHT_NORMAL,
+ RID_SVXITEMS_WEIGHT_MEDIUM,
+ RID_SVXITEMS_WEIGHT_SEMIBOLD,
+ RID_SVXITEMS_WEIGHT_BOLD,
+ RID_SVXITEMS_WEIGHT_ULTRABOLD,
+ RID_SVXITEMS_WEIGHT_BLACK
+ };
+
+ static_assert(SAL_N_ELEMENTS(RID_SVXITEMS_WEIGHTS) - 1 == WEIGHT_BLACK, "must match");
+ assert(nPos <= (sal_uInt16)WEIGHT_BLACK && "enum overflow!" );
+ return EditResId(RID_SVXITEMS_WEIGHTS[nPos]);
}
bool SvxWeightItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
@@ -999,7 +1013,7 @@ bool SvxFontHeightItem::GetPresentation
if( MapUnit::MapRelative != ePropUnit )
{
rText = OUString::number( (short)nProp ) +
- " " + EditResId::GetString( GetMetricId( ePropUnit ) );
+ " " + EditResId( GetMetricId( ePropUnit ) );
if( 0 <= (short)nProp )
rText = "+" + rText;
}
@@ -1007,7 +1021,7 @@ bool SvxFontHeightItem::GetPresentation
{
rText = GetMetricText( (long)nHeight,
eCoreUnit, MapUnit::MapPoint, pIntl ) +
- " " + EditResId::GetString(GetMetricId(MapUnit::MapPoint));
+ " " + EditResId(GetMetricId(MapUnit::MapPoint));
}
else
rText = OUString::number( nProp ) + "%";
@@ -1185,7 +1199,7 @@ bool SvxFontWidthItem::GetPresentation
{
rText = GetMetricText( (long)nWidth,
eCoreUnit, MapUnit::MapPoint, pIntl ) +
- " " + EditResId::GetString(GetMetricId(MapUnit::MapPoint));
+ " " + EditResId(GetMetricId(MapUnit::MapPoint));
}
else
rText = OUString::number( nProp ) + "%";
@@ -1363,8 +1377,31 @@ SfxPoolItem* SvxUnderlineItem::Create(SvStream& rStrm, sal_uInt16) const
OUString SvxUnderlineItem::GetValueTextByPos( sal_uInt16 nPos ) const
{
- DBG_ASSERT( nPos <= (sal_uInt16)LINESTYLE_BOLDWAVE, "enum overflow!" );
- return EditResId::GetString(RID_SVXITEMS_UL_BEGIN + nPos);
+ static const char* RID_SVXITEMS_UL[] =
+ {
+ RID_SVXITEMS_UL_NONE,
+ RID_SVXITEMS_UL_SINGLE,
+ RID_SVXITEMS_UL_DOUBLE,
+ RID_SVXITEMS_UL_DOTTED,
+ RID_SVXITEMS_UL_DONTKNOW,
+ RID_SVXITEMS_UL_DASH,
+ RID_SVXITEMS_UL_LONGDASH,
+ RID_SVXITEMS_UL_DASHDOT,
+ RID_SVXITEMS_UL_DASHDOTDOT,
+ RID_SVXITEMS_UL_SMALLWAVE,
+ RID_SVXITEMS_UL_WAVE,
+ RID_SVXITEMS_UL_DOUBLEWAVE,
+ RID_SVXITEMS_UL_BOLD,
+ RID_SVXITEMS_UL_BOLDDOTTED,
+ RID_SVXITEMS_UL_BOLDDASH,
+ RID_SVXITEMS_UL_BOLDLONGDASH,
+ RID_SVXITEMS_UL_BOLDDASHDOT,
+ RID_SVXITEMS_UL_BOLDDASHDOTDOT,
+ RID_SVXITEMS_UL_BOLDWAVE
+ };
+ static_assert(SAL_N_ELEMENTS(RID_SVXITEMS_UL) - 1 == LINESTYLE_BOLDWAVE, "must match");
+ assert(nPos <= (sal_uInt16)LINESTYLE_BOLDWAVE && "enum overflow!");
+ return EditResId(RID_SVXITEMS_UL[nPos]);
}
// class SvxOverlineItem ------------------------------------------------
@@ -1393,8 +1430,31 @@ SfxPoolItem* SvxOverlineItem::Create(SvStream& rStrm, sal_uInt16) const
OUString SvxOverlineItem::GetValueTextByPos( sal_uInt16 nPos ) const
{
- DBG_ASSERT( nPos <= (sal_uInt16)LINESTYLE_BOLDWAVE, "enum overflow!" );
- return EditResId::GetString(RID_SVXITEMS_OL_BEGIN + nPos);
+ static const char* RID_SVXITEMS_OL[] =
+ {
+ RID_SVXITEMS_OL_NONE,
+ RID_SVXITEMS_OL_SINGLE,
+ RID_SVXITEMS_OL_DOUBLE,
+ RID_SVXITEMS_OL_DOTTED,
+ RID_SVXITEMS_OL_DONTKNOW,
+ RID_SVXITEMS_OL_DASH,
+ RID_SVXITEMS_OL_LONGDASH,
+ RID_SVXITEMS_OL_DASHDOT,
+ RID_SVXITEMS_OL_DASHDOTDOT,
+ RID_SVXITEMS_OL_SMALLWAVE,
+ RID_SVXITEMS_OL_WAVE,
+ RID_SVXITEMS_OL_DOUBLEWAVE,
+ RID_SVXITEMS_OL_BOLD,
+ RID_SVXITEMS_OL_BOLDDOTTED,
+ RID_SVXITEMS_OL_BOLDDASH,
+ RID_SVXITEMS_OL_BOLDLONGDASH,
+ RID_SVXITEMS_OL_BOLDDASHDOT,
+ RID_SVXITEMS_OL_BOLDDASHDOTDOT,
+ RID_SVXITEMS_OL_BOLDWAVE
+ };
+ static_assert(SAL_N_ELEMENTS(RID_SVXITEMS_OL) - 1 == LINESTYLE_BOLDWAVE, "must match");
+ assert(nPos <= (sal_uInt16)LINESTYLE_BOLDWAVE && "enum overflow!");
+ return EditResId(RID_SVXITEMS_OL[nPos]);
}
// class SvxCrossedOutItem -----------------------------------------------
@@ -1462,11 +1522,21 @@ bool SvxCrossedOutItem::GetPresentation
return true;
}
-
OUString SvxCrossedOutItem::GetValueTextByPos( sal_uInt16 nPos ) const
{
- DBG_ASSERT( nPos <= (sal_uInt16)STRIKEOUT_X, "enum overflow!" );
- return EditResId::GetString(RID_SVXITEMS_STRIKEOUT_BEGIN + nPos);
+ static const char* RID_SVXITEMS_STRIKEOUT[] =
+ {
+ RID_SVXITEMS_STRIKEOUT_NONE,
+ RID_SVXITEMS_STRIKEOUT_SINGLE,
+ RID_SVXITEMS_STRIKEOUT_DOUBLE,
+ RID_SVXITEMS_STRIKEOUT_DONTKNOW,
+ RID_SVXITEMS_STRIKEOUT_BOLD,
+ RID_SVXITEMS_STRIKEOUT_SLASH,
+ RID_SVXITEMS_STRIKEOUT_X
+ };
+ static_assert(SAL_N_ELEMENTS(RID_SVXITEMS_STRIKEOUT) - 1 == STRIKEOUT_X, "must match");
+ assert(nPos <= (sal_uInt16)STRIKEOUT_X && "enum overflow!");
+ return EditResId(RID_SVXITEMS_STRIKEOUT[nPos]);
}
bool SvxCrossedOutItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
@@ -1540,11 +1610,11 @@ bool SvxShadowedItem::GetPresentation
OUString& rText, const IntlWrapper * /*pIntl*/
) const
{
- sal_uInt16 nId = RID_SVXITEMS_SHADOWED_FALSE;
+ const char* pId = RID_SVXITEMS_SHADOWED_FALSE;
if ( GetValue() )
- nId = RID_SVXITEMS_SHADOWED_TRUE;
- rText = EditResId::GetString(nId);
+ pId = RID_SVXITEMS_SHADOWED_TRUE;
+ rText = EditResId(pId);
return true;
}
@@ -1585,11 +1655,11 @@ bool SvxAutoKernItem::GetPresentation
OUString& rText, const IntlWrapper * /*pIntl*/
) const
{
- sal_uInt16 nId = RID_SVXITEMS_AUTOKERN_FALSE;
+ const char* pId = RID_SVXITEMS_AUTOKERN_FALSE;
if ( GetValue() )
- nId = RID_SVXITEMS_AUTOKERN_TRUE;
- rText = EditResId::GetString(nId);
+ pId = RID_SVXITEMS_AUTOKERN_TRUE;
+ rText = EditResId(pId);
return true;
}
@@ -1631,11 +1701,11 @@ bool SvxWordLineModeItem::GetPresentation
OUString& rText, const IntlWrapper * /*pIntl*/
) const
{
- sal_uInt16 nId = RID_SVXITEMS_WORDLINE_FALSE;
+ const char* pId = RID_SVXITEMS_WORDLINE_FALSE;
if ( GetValue() )
- nId = RID_SVXITEMS_WORDLINE_TRUE;
- rText = EditResId::GetString(nId);
+ pId = RID_SVXITEMS_WORDLINE_TRUE;
+ rText = EditResId(pId);
return true;
}
@@ -1676,11 +1746,11 @@ bool SvxContourItem::GetPresentation
OUString& rText, const IntlWrapper * /*pIntl*/
) const
{
- sal_uInt16 nId = RID_SVXITEMS_CONTOUR_FALSE;
+ const char* pId = RID_SVXITEMS_CONTOUR_FALSE;
if ( GetValue() )
- nId = RID_SVXITEMS_CONTOUR_TRUE;
- rText = EditResId::GetString(nId);
+ pId = RID_SVXITEMS_CONTOUR_TRUE;
+ rText = EditResId(pId);
return true;
}
@@ -2024,23 +2094,23 @@ bool SvxKerningItem::GetPresentation
{
case SfxItemPresentation::Nameless:
rText = GetMetricText( (long)GetValue(), eCoreUnit, MapUnit::MapPoint, pIntl ) +
- " " + EditResId::GetString(GetMetricId(MapUnit::MapPoint));
+ " " + EditResId(GetMetricId(MapUnit::MapPoint));
return true;
case SfxItemPresentation::Complete:
{
- rText = EditResId::GetString(RID_SVXITEMS_KERNING_COMPLETE);
- sal_uInt16 nId = 0;
+ rText = EditResId(RID_SVXITEMS_KERNING_COMPLETE);
+ const char* pId = nullptr;
if ( GetValue() > 0 )
- nId = RID_SVXITEMS_KERNING_EXPANDED;
+ pId = RID_SVXITEMS_KERNING_EXPANDED;
else if ( GetValue() < 0 )
- nId = RID_SVXITEMS_KERNING_CONDENSED;
+ pId = RID_SVXITEMS_KERNING_CONDENSED;
- if ( nId )
- rText += EditResId::GetString(nId);
+ if (pId)
+ rText += EditResId(pId);
rText = rText +
GetMetricText( (long)GetValue(), eCoreUnit, MapUnit::MapPoint, pIntl ) +
- " " + EditResId::GetString(GetMetricId(MapUnit::MapPoint));
+ " " + EditResId(GetMetricId(MapUnit::MapPoint));
return true;
}
default: ; //prevent warning
@@ -2115,11 +2185,20 @@ bool SvxCaseMapItem::GetPresentation
return true;
}
-
OUString SvxCaseMapItem::GetValueTextByPos( sal_uInt16 nPos ) const
{
- DBG_ASSERT( nPos < (sal_uInt16)SvxCaseMap::End, "enum overflow!" );
- return EditResId::GetString(RID_SVXITEMS_CASEMAP_BEGIN + nPos);
+ static const char* RID_SVXITEMS_CASEMAP[] =
+ {
+ RID_SVXITEMS_CASEMAP_NONE,
+ RID_SVXITEMS_CASEMAP_VERSALIEN,
+ RID_SVXITEMS_CASEMAP_GEMEINE,
+ RID_SVXITEMS_CASEMAP_TITEL,
+ RID_SVXITEMS_CASEMAP_KAPITAELCHEN
+ };
+
+ static_assert(SAL_N_ELEMENTS(RID_SVXITEMS_CASEMAP) == (size_t)SvxCaseMap::End, "must match");
+ assert(nPos < (sal_uInt16)SvxCaseMap::End && "enum overflow!");
+ return EditResId(RID_SVXITEMS_CASEMAP[nPos]);
}
bool SvxCaseMapItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const
@@ -2248,20 +2327,26 @@ bool SvxEscapementItem::GetPresentation
if ( nEsc != 0 )
{
if( DFLT_ESC_AUTO_SUPER == nEsc || DFLT_ESC_AUTO_SUB == nEsc )
- rText += EditResId::GetString(RID_SVXITEMS_ESCAPEMENT_AUTO);
+ rText += EditResId(RID_SVXITEMS_ESCAPEMENT_AUTO);
else
rText = rText + OUString::number( nEsc ) + "%";
}
return true;
}
-
OUString SvxEscapementItem::GetValueTextByPos( sal_uInt16 nPos ) const
{
- DBG_ASSERT( nPos < (sal_uInt16)SvxEscapement::End, "enum overflow!" );
- return EditResId::GetString(RID_SVXITEMS_ESCAPEMENT_BEGIN + nPos);
-}
+ static const char* RID_SVXITEMS_ESCAPEMENT[] =
+ {
+ RID_SVXITEMS_ESCAPEMENT_OFF,
+ RID_SVXITEMS_ESCAPEMENT_SUPER,
+ RID_SVXITEMS_ESCAPEMENT_SUB
+ };
+ static_assert(SAL_N_ELEMENTS(RID_SVXITEMS_ESCAPEMENT) == (size_t)SvxEscapement::End, "must match");
+ assert(nPos < (sal_uInt16)SvxEscapement::End && "enum overflow!");
+ return EditResId(RID_SVXITEMS_ESCAPEMENT[nPos]);
+}
sal_uInt16 SvxEscapementItem::GetEnumValue() const
{
@@ -2559,11 +2644,11 @@ bool SvxBlinkItem::GetPresentation
OUString& rText, const IntlWrapper * /*pIntl*/
) const
{
- sal_uInt16 nId = RID_SVXITEMS_BLINK_FALSE;
+ const char* pId = RID_SVXITEMS_BLINK_FALSE;
if ( GetValue() )
- nId = RID_SVXITEMS_BLINK_TRUE;
- rText = EditResId::GetString(nId);
+ pId = RID_SVXITEMS_BLINK_TRUE;
+ rText = EditResId(pId);
return true;
}
@@ -2607,20 +2692,28 @@ bool SvxEmphasisMarkItem::GetPresentation
const IntlWrapper * /*pIntl*/
) const
{
+ static const char* RID_SVXITEMS_EMPHASIS[] =
+ {
+ RID_SVXITEMS_EMPHASIS_NONE_STYLE,
+ RID_SVXITEMS_EMPHASIS_DOT_STYLE,
+ RID_SVXITEMS_EMPHASIS_CIRCLE_STYLE,
+ RID_SVXITEMS_EMPHASIS_DISC_STYLE,
+ RID_SVXITEMS_EMPHASIS_ACCENT_STYLE
+ };
+
FontEmphasisMark nVal = GetEmphasisMark();
- rText = EditResId::GetString( RID_SVXITEMS_EMPHASIS_BEGIN_STYLE +
- (sal_uInt16)(FontEmphasisMark)( nVal & FontEmphasisMark::Style ));
- sal_uInt16 nId = ( FontEmphasisMark::PosAbove & nVal )
+ rText = EditResId(RID_SVXITEMS_EMPHASIS[
+ (sal_uInt16)(FontEmphasisMark)( nVal & FontEmphasisMark::Style )]);
+ const char* pId = ( FontEmphasisMark::PosAbove & nVal )
? RID_SVXITEMS_EMPHASIS_ABOVE_POS
: ( FontEmphasisMark::PosBelow & nVal )
? RID_SVXITEMS_EMPHASIS_BELOW_POS
- : 0;
- if( nId )
- rText += EditResId::GetString( nId );
+ : nullptr;
+ if( pId )
+ rText += EditResId( pId );
return true;
}
-
bool SvxEmphasisMarkItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
nMemberId &= ~CONVERT_TWIPS;
@@ -2793,10 +2886,10 @@ bool SvxTwoLinesItem::GetPresentation( SfxItemPresentation /*ePres*/,
OUString &rText, const IntlWrapper* /*pIntl*/ ) const
{
if( !GetValue() )
- rText = EditResId::GetString( RID_SVXITEMS_TWOLINES_OFF );
+ rText = EditResId( RID_SVXITEMS_TWOLINES_OFF );
else
{
- rText = EditResId::GetString( RID_SVXITEMS_TWOLINES );
+ rText = EditResId( RID_SVXITEMS_TWOLINES );
if( GetStartBracket() )
rText = OUStringLiteral1(GetStartBracket()) + rText;
if( GetEndBracket() )
@@ -2869,10 +2962,10 @@ bool SvxTextRotateItem::GetPresentation(
OUString &rText, const IntlWrapper*) const
{
if (!GetValue())
- rText = EditResId::GetString(RID_SVXITEMS_TEXTROTATE_OFF);
+ rText = EditResId(RID_SVXITEMS_TEXTROTATE_OFF);
else
{
- rText = EditResId::GetString(RID_SVXITEMS_TEXTROTATE);
+ rText = EditResId(RID_SVXITEMS_TEXTROTATE);
rText = rText.replaceFirst("$(ARG1)",
OUString::number(GetValue() / 10));
}
@@ -2974,14 +3067,14 @@ bool SvxCharRotateItem::GetPresentation(
OUString &rText, const IntlWrapper* ) const
{
if( !GetValue() )
- rText = EditResId::GetString( RID_SVXITEMS_CHARROTATE_OFF );
+ rText = EditResId( RID_SVXITEMS_CHARROTATE_OFF );
else
{
- rText = EditResId::GetString( RID_SVXITEMS_CHARROTATE );
+ rText = EditResId( RID_SVXITEMS_CHARROTATE );
rText = rText.replaceFirst( "$(ARG1)",
OUString::number( GetValue() / 10 ));
if( IsFitToLine() )
- rText += EditResId::GetString( RID_SVXITEMS_CHARROTATE_FITLINE );
+ rText += EditResId( RID_SVXITEMS_CHARROTATE_FITLINE );
}
return true;
}
@@ -3107,10 +3200,10 @@ bool SvxCharScaleWidthItem::GetPresentation(
OUString &rText, const IntlWrapper* ) const
{
if( !GetValue() )
- rText = EditResId::GetString( RID_SVXITEMS_CHARSCALE_OFF );
+ rText = EditResId( RID_SVXITEMS_CHARSCALE_OFF );
else
{
- rText = EditResId::GetString( RID_SVXITEMS_CHARSCALE );
+ rText = EditResId( RID_SVXITEMS_CHARSCALE );
rText = rText.replaceFirst( "$(ARG1)",
OUString::number( GetValue() ));
}
@@ -3174,16 +3267,22 @@ sal_uInt16 SvxCharReliefItem::GetVersion( sal_uInt16 nFFVer ) const
return SOFFICE_FILEFORMAT_50 > nFFVer ? USHRT_MAX : 0;
}
-OUString SvxCharReliefItem::GetValueTextByPos( sal_uInt16 nPos ) const
+static const char* RID_SVXITEMS_RELIEF[] =
+{
+ RID_SVXITEMS_RELIEF_NONE,
+ RID_SVXITEMS_RELIEF_EMBOSSED,
+ RID_SVXITEMS_RELIEF_ENGRAVED
+};
+
+OUString SvxCharReliefItem::GetValueTextByPos(sal_uInt16 nPos) const
{
- DBG_ASSERT( nPos < RID_SVXITEMS_RELIEF_ENGRAVED - RID_SVXITEMS_RELIEF_NONE,
- "enum overflow" );
- return EditResId::GetString(RID_SVXITEMS_RELIEF_BEGIN + nPos);
+ assert(nPos < SAL_N_ELEMENTS(RID_SVXITEMS_RELIEF) && "enum overflow");
+ return EditResId(RID_SVXITEMS_RELIEF[nPos]);
}
sal_uInt16 SvxCharReliefItem::GetValueCount() const
{
- return RID_SVXITEMS_RELIEF_ENGRAVED - RID_SVXITEMS_RELIEF_NONE;
+ return SAL_N_ELEMENTS(RID_SVXITEMS_RELIEF) - 1;
}
bool SvxCharReliefItem::GetPresentation
diff --git a/editeng/source/items/writingmodeitem.cxx b/editeng/source/items/writingmodeitem.cxx
index 57347f9dece7..fbac64aaba46 100644
--- a/editeng/source/items/writingmodeitem.cxx
+++ b/editeng/source/items/writingmodeitem.cxx
@@ -18,8 +18,10 @@
*/
#include <editeng/writingmodeitem.hxx>
+#include <editeng/frmdir.hxx>
#include <editeng/eerdll.hxx>
#include <editeng/editrids.hrc>
+#include <osl/diagnose.h>
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::text;
@@ -69,7 +71,7 @@ bool SvxWritingModeItem::GetPresentation( SfxItemPresentation /*ePres*/,
OUString &rText,
const IntlWrapper * ) const
{
- rText = EditResId::GetString(RID_SVXITEMS_FRMDIR_BEGIN + (int)GetValue());
+ rText = EditResId(getFrmDirResId((int)GetValue()));
return true;
}
diff --git a/editeng/source/misc/lingu.src b/editeng/source/misc/lingu.src
deleted file mode 100644
index f21f75f0dd66..000000000000
--- a/editeng/source/misc/lingu.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 <editeng/editrids.hrc>
-
-String RID_SVXSTR_QUERY_CONTINUE
-{
- Text [ en-US ] = "Continue checking at beginning of document?" ;
-};
-String RID_SVXSTR_QUERY_BW_CONTINUE
-{
- Text [ en-US ] = "Continue checking at end of document?" ;
-};
-String RID_SVXSTR_DIC_ERR_UNKNOWN
-{
- Text [ en-US ] = "Word cannot be added to dictionary\ndue to unknown reason.";
-};
-String RID_SVXSTR_DIC_ERR_FULL
-{
- Text [ en-US ] = "The dictionary is already full.";
-};
-String RID_SVXSTR_DIC_ERR_READONLY
-{
- Text [ en-US ] = "The dictionary is read-only.";
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/editeng/source/misc/splwrap.cxx b/editeng/source/misc/splwrap.cxx
index ca006a885549..a4db40002037 100644
--- a/editeng/source/misc/splwrap.cxx
+++ b/editeng/source/misc/splwrap.cxx
@@ -362,8 +362,8 @@ bool SvxSpellWrapper::SpellNext( )
// a BODY_area done, ask for the other BODY_area
WAIT_OFF();
- sal_uInt16 nResId = bReverse ? RID_SVXSTR_QUERY_BW_CONTINUE : RID_SVXSTR_QUERY_CONTINUE;
- ScopedVclPtrInstance< MessageDialog > aBox(pWin, EditResId(nResId), VclMessageType::Question, VclButtonsType::YesNo);
+ const char* pResId = bReverse ? RID_SVXSTR_QUERY_BW_CONTINUE : RID_SVXSTR_QUERY_CONTINUE;
+ ScopedVclPtrInstance< MessageDialog > aBox(pWin, EditResId(pResId), VclMessageType::Question, VclButtonsType::YesNo);
if ( aBox->Execute() != RET_YES )
{
// sacrifice the other area if necessary ask for special area
diff --git a/editeng/source/misc/unolingu.cxx b/editeng/source/misc/unolingu.cxx
index e21de08007d1..7cf530d78aed 100644
--- a/editeng/source/misc/unolingu.cxx
+++ b/editeng/source/misc/unolingu.cxx
@@ -732,16 +732,16 @@ short SvxDicError( vcl::Window *pParent, linguistic::DictionaryError nError )
short nRes = 0;
if (linguistic::DictionaryError::NONE != nError)
{
- int nRid;
+ const char* pRid;
switch (nError)
{
- case linguistic::DictionaryError::FULL : nRid = RID_SVXSTR_DIC_ERR_FULL; break;
- case linguistic::DictionaryError::READONLY : nRid = RID_SVXSTR_DIC_ERR_READONLY; break;
+ case linguistic::DictionaryError::FULL : pRid = RID_SVXSTR_DIC_ERR_FULL; break;
+ case linguistic::DictionaryError::READONLY : pRid = RID_SVXSTR_DIC_ERR_READONLY; break;
default:
- nRid = RID_SVXSTR_DIC_ERR_UNKNOWN;
+ pRid = RID_SVXSTR_DIC_ERR_UNKNOWN;
SAL_WARN("editeng", "unexpected case");
}
- nRes = ScopedVclPtrInstance<InfoBox>(pParent, EditResId::GetString(nRid))->Execute();
+ nRes = ScopedVclPtrInstance<InfoBox>(pParent, EditResId(pRid))->Execute();
}
return nRes;
}
diff --git a/editeng/source/outliner/outleeng.cxx b/editeng/source/outliner/outleeng.cxx
index f9333e0c6857..185bef339690 100644
--- a/editeng/source/outliner/outleeng.cxx
+++ b/editeng/source/outliner/outleeng.cxx
@@ -127,19 +127,19 @@ OUString OutlinerEditEng::GetUndoComment( sal_uInt16 nUndoId ) const
switch( nUndoId )
{
case OLUNDO_DEPTH:
- return EditResId::GetString(RID_OUTLUNDO_DEPTH);
+ return EditResId(RID_OUTLUNDO_DEPTH);
case OLUNDO_EXPAND:
- return EditResId::GetString(RID_OUTLUNDO_EXPAND);
+ return EditResId(RID_OUTLUNDO_EXPAND);
case OLUNDO_COLLAPSE:
- return EditResId::GetString(RID_OUTLUNDO_COLLAPSE);
+ return EditResId(RID_OUTLUNDO_COLLAPSE);
case OLUNDO_ATTR:
- return EditResId::GetString(RID_OUTLUNDO_ATTR);
+ return EditResId(RID_OUTLUNDO_ATTR);
case OLUNDO_INSERT:
- return EditResId::GetString(RID_OUTLUNDO_INSERT);
+ return EditResId(RID_OUTLUNDO_INSERT);
default:
return EditEngine::GetUndoComment( nUndoId );
diff --git a/editeng/source/outliner/outliner.src b/editeng/source/outliner/outliner.src
deleted file mode 100644
index b01b3828c230..000000000000
--- a/editeng/source/outliner/outliner.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 <editeng/editrids.hrc>
-
-String RID_OUTLUNDO_DEPTH
-{
- Text [ en-US ] = "Indent" ;
-};
-String RID_OUTLUNDO_EXPAND
-{
- Text [ en-US ] = "Show subpoints" ;
-};
-String RID_OUTLUNDO_COLLAPSE
-{
- Text [ en-US ] = "Collapse" ;
-};
-String RID_OUTLUNDO_ATTR
-{
- Text [ en-US ] = "Apply attributes" ;
-};
-String RID_OUTLUNDO_INSERT
-{
- Text [ en-US ] = "Insert" ;
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/editeng/uiconfig/ui/spellmenu.ui b/editeng/uiconfig/ui/spellmenu.ui
index 365de28b512f..07e964f42523 100644
--- a/editeng/uiconfig/ui/spellmenu.ui
+++ b/editeng/uiconfig/ui/spellmenu.ui
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.20.0 -->
-<interface>
+<interface domain="editeng">
<requires lib="gtk+" version="3.10"/>
<object class="GtkMenu" id="menu">
<property name="visible">True</property>
@@ -9,14 +9,14 @@
<object class="GtkMenuItem" id="ignore">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">I_gnore All</property>
+ <property name="label" translatable="yes" context="spellmenu|ignore">I_gnore All</property>
</object>
</child>
<child>
<object class="GtkMenuItem" id="insert">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">_Add to Dictionary</property>
+ <property name="label" translatable="yes" context="spellmenu|insert">_Add to Dictionary</property>
<property name="use_underline">True</property>
<child type="submenu">
<object class="GtkMenu">
@@ -30,7 +30,7 @@
<object class="GtkMenuItem" id="add">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">_Add to Dictionary</property>
+ <property name="label" translatable="yes" context="spellmenu|add">_Add to Dictionary</property>
<property name="use_underline">True</property>
</object>
</child>
@@ -38,7 +38,7 @@
<object class="GtkMenuItem" id="check">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">_Spellcheck...</property>
+ <property name="label" translatable="yes" context="spellmenu|check">_Spellcheck...</property>
<property name="use_underline">True</property>
</object>
</child>
@@ -52,7 +52,7 @@
<object class="GtkMenuItem" id="autocorrect">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">AutoCorrect _To</property>
+ <property name="label" translatable="yes" context="spellmenu|autocorrect">AutoCorrect _To</property>
<property name="use_underline">True</property>
<child type="submenu">
<object class="GtkMenu">
@@ -66,7 +66,7 @@
<object class="GtkMenuItem" id="autocorrectdlg">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Auto_Correct Options...</property>
+ <property name="label" translatable="yes" context="spellmenu|autocorrectdlg">Auto_Correct Options...</property>
<property name="use_underline">True</property>
</object>
</child>