Pass context and resource string down to boost::locale separately
because this is often on a hot path, and we can avoid the splitting and joining of strings like this. Change-Id: Ia36047209368ca53431178c2e8723a18cfe8260a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119220 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
parent
d924ce30e0
commit
14cfff500e
@ -19,7 +19,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
|
||||
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
|
||||
|
||||
#define AVMEDIA_STR_OPEN NC_("AVMEDIA_STR_OPEN", "Open")
|
||||
#define AVMEDIA_STR_INSERT NC_("AVMEDIA_STR_INSERT", "Apply")
|
||||
|
@ -35,7 +35,7 @@
|
||||
// Mime types
|
||||
#define AVMEDIA_MIMETYPE_COMMON "application/vnd.sun.star.media"
|
||||
|
||||
inline OUString AvmResId(std::string_view aId)
|
||||
inline OUString AvmResId(TranslateId aId)
|
||||
{
|
||||
return Translate::get(aId, Translate::Create("avmedia"));
|
||||
}
|
||||
|
@ -20,7 +20,7 @@
|
||||
#ifndef BASCTL_INC_BASIDESH_HRC
|
||||
#define BASCTL_INC_BASIDESH_HRC
|
||||
|
||||
#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
|
||||
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
|
||||
|
||||
#define RID_STR_FILTER_ALLFILES NC_("RID_STR_FILTER_ALLFILES", "<All>")
|
||||
#define RID_STR_NOMODULE NC_("RID_STR_NOMODULE", "< No Module >")
|
||||
|
@ -105,7 +105,7 @@ ExtraData* GetExtraData()
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
OUString IDEResId(std::string_view aId)
|
||||
OUString IDEResId(TranslateId aId)
|
||||
{
|
||||
return Translate::get(aId, SfxApplication::GetModule(SfxToolsModule::Basic)->GetResLocale());
|
||||
}
|
||||
|
@ -20,11 +20,11 @@
|
||||
#pragma once
|
||||
|
||||
#include <rtl/ustring.hxx>
|
||||
#include <string_view>
|
||||
#include <unotools/resmgr.hxx>
|
||||
|
||||
namespace basctl
|
||||
{
|
||||
OUString IDEResId(std::string_view aId);
|
||||
OUString IDEResId(TranslateId aId);
|
||||
|
||||
} // namespace basctl
|
||||
|
||||
|
@ -19,9 +19,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
|
||||
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
|
||||
|
||||
std::pair<const char*, ErrCode> const RID_BASIC_START[] =
|
||||
std::pair<TranslateId, ErrCode> const RID_BASIC_START[] =
|
||||
{
|
||||
{ NC_("RID_BASIC_START", "Syntax error."), ERRCODE_BASIC_SYNTAX },
|
||||
{ NC_("RID_BASIC_START", "Return without Gosub."), ERRCODE_BASIC_NO_GOSUB },
|
||||
@ -152,7 +152,7 @@ std::pair<const char*, ErrCode> const RID_BASIC_START[] =
|
||||
{ NC_("RID_BASIC_START", "Too many DLL application clients."), ERRCODE_BASIC_TOO_MANY_DLL },
|
||||
{ NC_("RID_BASIC_START", "For loop not initialized."), ERRCODE_BASIC_LOOP_NOT_INIT },
|
||||
{ NC_("RID_BASIC_START", "$(ARG1)"), ERRCODE_BASIC_COMPAT },
|
||||
{ nullptr, ERRCODE_NONE }
|
||||
{ {}, ERRCODE_NONE }
|
||||
};
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
|
||||
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
|
||||
|
||||
#define STR_BASICKEY_FORMAT_ON NC_("STR_BASICKEY_FORMAT_ON", "On")
|
||||
#define STR_BASICKEY_FORMAT_OFF NC_("STR_BASICKEY_FORMAT_OFF", "Off")
|
||||
|
@ -1543,8 +1543,8 @@ void StarBASIC::MakeErrorText( ErrCode nId, std::u16string_view aMsg )
|
||||
SolarMutexGuard aSolarGuard;
|
||||
sal_uInt16 nOldID = GetVBErrorCode( nId );
|
||||
|
||||
const char* pErrorMsg = nullptr;
|
||||
for (std::pair<const char *, ErrCode> const *pItem = RID_BASIC_START; pItem->second; ++pItem)
|
||||
TranslateId pErrorMsg;
|
||||
for (std::pair<TranslateId, ErrCode> const *pItem = RID_BASIC_START; pItem->second; ++pItem)
|
||||
{
|
||||
if (nId == pItem->second)
|
||||
{
|
||||
|
@ -591,7 +591,7 @@ std::locale BasResLocale()
|
||||
return Translate::Create("sb");
|
||||
}
|
||||
|
||||
OUString BasResId(std::string_view aId)
|
||||
OUString BasResId(TranslateId aId)
|
||||
{
|
||||
return Translate::get(aId, BasResLocale());
|
||||
}
|
||||
|
@ -9,9 +9,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
|
||||
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
|
||||
|
||||
const char* CHART_TYPE[] =
|
||||
const TranslateId CHART_TYPE[] =
|
||||
{
|
||||
NC_("tp_ChartType|liststore1", "Bar"),
|
||||
NC_("tp_ChartType|liststore1", "Cylinder"),
|
||||
|
@ -19,7 +19,7 @@
|
||||
#ifndef CHART_STRINGS_HRC
|
||||
#define CHART_STRINGS_HRC
|
||||
|
||||
#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
|
||||
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
|
||||
|
||||
#define STR_DLG_CHART_WIZARD NC_("STR_DLG_CHART_WIZARD", "Chart Wizard")
|
||||
#define STR_DLG_SMOOTH_LINE_PROPERTIES NC_("STR_DLG_SMOOTH_LINE_PROPERTIES", "Smooth Lines")
|
||||
|
@ -171,7 +171,7 @@ void CreationWizard::setValidPage(BuilderPage* pTabPage)
|
||||
|
||||
OUString CreationWizard::getStateDisplayName( WizardState nState ) const
|
||||
{
|
||||
const char* pResId = nullptr;
|
||||
TranslateId pResId;
|
||||
switch( nState )
|
||||
{
|
||||
case STATE_CHARTTYPE:
|
||||
|
@ -395,7 +395,7 @@ DeactivateRC ScaleTabPage::DeactivatePage(SfxItemSet* pItemSet)
|
||||
nStepFmt = 0;
|
||||
|
||||
weld::Widget* pControl = nullptr;
|
||||
const char* pErrStrId = nullptr;
|
||||
TranslateId pErrStrId;
|
||||
double fDummy;
|
||||
|
||||
fMax = m_xFmtFldMax->GetFormatter().GetValue();
|
||||
@ -583,9 +583,9 @@ void ScaleTabPage::ShowAxisOrigin( bool bShowOrigin )
|
||||
m_bShowAxisOrigin = true;
|
||||
}
|
||||
|
||||
bool ScaleTabPage::ShowWarning(const char* pResIdMessage, weld::Widget* pControl /* = nullptr */)
|
||||
bool ScaleTabPage::ShowWarning(TranslateId pResIdMessage, weld::Widget* pControl /* = nullptr */)
|
||||
{
|
||||
if (pResIdMessage == nullptr)
|
||||
if (!pResIdMessage)
|
||||
return false;
|
||||
|
||||
std::unique_ptr<weld::MessageDialog> xWarn(Application::CreateMessageDialog(GetFrameWeld(),
|
||||
|
@ -19,6 +19,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <sfx2/tabdlg.hxx>
|
||||
#include <unotools/resmgr.hxx>
|
||||
|
||||
namespace chart
|
||||
{
|
||||
@ -98,7 +99,7 @@ private:
|
||||
|
||||
@return false, if nResIdMessage was 0, true otherwise
|
||||
*/
|
||||
bool ShowWarning(const char* pResIdMessage, weld::Widget* pControl);
|
||||
bool ShowWarning(TranslateId pResIdMessage, weld::Widget* pControl);
|
||||
|
||||
void HideAllControls();
|
||||
};
|
||||
|
@ -725,7 +725,7 @@ bool ChartController::executeDispatch_Delete()
|
||||
ObjectIdentifier::getObjectPropertySet( aCID, getModel() ));
|
||||
if( xErrorBarProp.is())
|
||||
{
|
||||
const char* pId;
|
||||
TranslateId pId;
|
||||
|
||||
if ( aObjectType == OBJECTTYPE_DATA_ERRORS_X )
|
||||
pId = STR_OBJECT_ERROR_BARS_X;
|
||||
|
@ -73,7 +73,7 @@ bool DrawCommandDispatch::isFeatureSupported( const OUString& rCommandURL )
|
||||
return parseCommandURL( rCommandURL, &nFeatureId, &aBaseCommand, &aCustomShapeType );
|
||||
}
|
||||
|
||||
static ::basegfx::B2DPolyPolygon getPolygon(const char* pResId, const SdrModel& rModel)
|
||||
static ::basegfx::B2DPolyPolygon getPolygon(TranslateId pResId, const SdrModel& rModel)
|
||||
{
|
||||
::basegfx::B2DPolyPolygon aReturn;
|
||||
XLineEndListRef pLineEndList = rModel.GetLineEndList();
|
||||
|
@ -20,11 +20,11 @@
|
||||
|
||||
#include <rtl/ustring.hxx>
|
||||
#include "charttoolsdllapi.hxx"
|
||||
#include <string_view>
|
||||
#include <unotools/resmgr.hxx>
|
||||
|
||||
namespace chart
|
||||
{
|
||||
OUString OOO_DLLPUBLIC_CHARTTOOLS SchResId(std::string_view aId);
|
||||
OUString OOO_DLLPUBLIC_CHARTTOOLS SchResId(TranslateId aId);
|
||||
|
||||
} // namespace chart
|
||||
|
||||
|
@ -18,11 +18,10 @@
|
||||
*/
|
||||
|
||||
#include <ResId.hxx>
|
||||
#include <unotools/resmgr.hxx>
|
||||
|
||||
namespace chart
|
||||
{
|
||||
OUString SchResId(std::string_view aId)
|
||||
OUString SchResId(TranslateId aId)
|
||||
{
|
||||
return Translate::get(aId, Translate::Create("chart"));
|
||||
}
|
||||
|
@ -30,6 +30,7 @@ $(eval $(call gb_CppunitTest_use_libraries,connectivity_sharedresources, \
|
||||
dbtools \
|
||||
sal \
|
||||
test \
|
||||
utl \
|
||||
unotest \
|
||||
))
|
||||
|
||||
|
@ -42,6 +42,7 @@ $(eval $(call gb_Library_use_libraries,ado,\
|
||||
cppuhelper \
|
||||
sal \
|
||||
salhelper \
|
||||
utl \
|
||||
dbtools \
|
||||
comphelper \
|
||||
))
|
||||
|
@ -29,6 +29,7 @@ $(eval $(call gb_Library_use_libraries,mysql_jdbc,\
|
||||
cppuhelper \
|
||||
sal \
|
||||
salhelper \
|
||||
utl \
|
||||
dbtools \
|
||||
comphelper \
|
||||
))
|
||||
|
@ -41,6 +41,7 @@ $(eval $(call gb_Library_use_libraries,odbc,\
|
||||
dbtools \
|
||||
sal \
|
||||
salhelper \
|
||||
utl \
|
||||
))
|
||||
|
||||
$(eval $(call gb_Library_add_exception_objects,odbc,\
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
|
||||
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
|
||||
|
||||
// = common strings
|
||||
#define STR_NO_CONNECTION_GIVEN NC_("STR_NO_CONNECTION_GIVEN", "No connection to the database exists.")
|
||||
|
@ -75,7 +75,7 @@ Sequence< sal_Int8 > OMetaConnection::getUnoTunnelId()
|
||||
return s_aPropertyNameMap;
|
||||
}
|
||||
|
||||
void OMetaConnection::throwGenericSQLException(const char* pErrorResourceId, const Reference< XInterface>& _xContext )
|
||||
void OMetaConnection::throwGenericSQLException(TranslateId pErrorResourceId, const Reference< XInterface>& _xContext )
|
||||
{
|
||||
OUString sErrorMessage;
|
||||
if (pErrorResourceId)
|
||||
|
@ -103,7 +103,7 @@ namespace connectivity
|
||||
_rMessage = _rMessage.replaceAt( nIndex, nPlaceholderLen, *rParamValue );
|
||||
}
|
||||
|
||||
const char* lcl_getResourceErrorID(const ErrorCondition _eCondition)
|
||||
TranslateId lcl_getResourceErrorID(const ErrorCondition _eCondition)
|
||||
{
|
||||
switch (_eCondition)
|
||||
{
|
||||
@ -126,7 +126,7 @@ namespace connectivity
|
||||
case css::sdb::ErrorCondition::DATA_CANNOT_SELECT_UNFILTERED:
|
||||
return STR_DATA_CANNOT_SELECT_UNFILTERED;
|
||||
}
|
||||
return nullptr;
|
||||
return {};
|
||||
}
|
||||
|
||||
OUString lcl_getResourceState(const ErrorCondition _eCondition)
|
||||
|
@ -461,7 +461,7 @@ void ODbaseIndex::DropImpl()
|
||||
}
|
||||
}
|
||||
|
||||
void ODbaseIndex::impl_killFileAndthrowError_throw(const char* pErrorId, const OUString& _sFile)
|
||||
void ODbaseIndex::impl_killFileAndthrowError_throw(TranslateId pErrorId, const OUString& _sFile)
|
||||
{
|
||||
closeImpl();
|
||||
if(UCBContentHelper::Exists(_sFile))
|
||||
|
@ -1103,7 +1103,7 @@ bool ODbaseTable::CreateImpl()
|
||||
return true;
|
||||
}
|
||||
|
||||
void ODbaseTable::throwInvalidColumnType(const char* pErrorId, const OUString& _sColumnName)
|
||||
void ODbaseTable::throwInvalidColumnType(TranslateId pErrorId, const OUString& _sColumnName)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@ -57,7 +57,7 @@ using namespace com::sun::star::container;
|
||||
|
||||
namespace
|
||||
{
|
||||
void lcl_throwError(const char* pErrorId, const css::uno::Reference< css::uno::XInterface>& _xContext)
|
||||
void lcl_throwError(TranslateId pErrorId, const css::uno::Reference< css::uno::XInterface>& _xContext)
|
||||
{
|
||||
::connectivity::SharedResources aResources;
|
||||
const OUString sMessage = aResources.getResourceString(pErrorId);
|
||||
|
@ -47,7 +47,7 @@ using namespace com::sun::star::util;
|
||||
|
||||
namespace connectivity::macab
|
||||
{
|
||||
void impl_throwError(const char* pErrorId)
|
||||
void impl_throwError(TranslateId pErrorId)
|
||||
{
|
||||
::connectivity::SharedResources aResources;
|
||||
const OUString sError( aResources.getResourceString(pErrorId) );
|
||||
|
@ -21,6 +21,7 @@
|
||||
|
||||
#include <com/sun/star/util/DateTime.hpp>
|
||||
#include <com/sun/star/sdbc/DataType.hpp>
|
||||
#include <unotools/resmgr.hxx>
|
||||
|
||||
#include <time.h>
|
||||
#include <premac.h>
|
||||
@ -131,7 +132,7 @@ namespace connectivity::macab
|
||||
return dataType;
|
||||
}
|
||||
|
||||
void impl_throwError(const char* pErrorId);
|
||||
void impl_throwError(TranslateId pErrorId);
|
||||
}
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
@ -61,7 +61,7 @@ namespace connectivity
|
||||
rtl_TextEncoding getTextEncoding() const { return m_nTextEncoding; }
|
||||
const OUString& getURL() const { return m_sURL; }
|
||||
void setURL(const OUString& _rsUrl) { m_sURL = _rsUrl; }
|
||||
void throwGenericSQLException(const char* pErrorResourceId, const css::uno::Reference< css::uno::XInterface>& _xContext);
|
||||
void throwGenericSQLException(TranslateId pErrorResourceId, const css::uno::Reference< css::uno::XInterface>& _xContext);
|
||||
const SharedResources& getResources() const { return m_aResources;}
|
||||
|
||||
void setConnectionInfo(const css::uno::Sequence< css::beans::PropertyValue >& _aInfo) { m_aConnectionInfo = _aInfo; }
|
||||
|
@ -81,7 +81,7 @@ namespace connectivity::dbase
|
||||
OUString getCompletePath() const;
|
||||
void closeImpl();
|
||||
// Closes and kills the index file and throws an error
|
||||
void impl_killFileAndthrowError_throw(const char* pErrorId, const OUString& _sFile);
|
||||
void impl_killFileAndthrowError_throw(TranslateId pErrorId, const OUString& _sFile);
|
||||
protected:
|
||||
virtual ~ODbaseIndex() override;
|
||||
public:
|
||||
|
@ -130,7 +130,7 @@ namespace connectivity::dbase
|
||||
/// @throws css::container::ElementExistException
|
||||
/// @throws css::uno::RuntimeException
|
||||
void renameImpl( const OUString& newName );
|
||||
void throwInvalidColumnType(const char* pErrorId, const OUString& _sColumnName);
|
||||
void throwInvalidColumnType(TranslateId pErrorId, const OUString& _sColumnName);
|
||||
|
||||
protected:
|
||||
virtual void FileClose() override;
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include <rtl/ustring.hxx>
|
||||
#include <vector>
|
||||
#include <connectivity/dbtoolsdllapi.hxx>
|
||||
|
||||
#include <unotools/resmgr.hxx>
|
||||
|
||||
namespace connectivity
|
||||
{
|
||||
@ -47,7 +47,7 @@ namespace connectivity
|
||||
*/
|
||||
OUString
|
||||
getResourceString(
|
||||
const char* pResId
|
||||
TranslateId pResId
|
||||
) const;
|
||||
|
||||
/** loads a string from the shared resource file, and replaces
|
||||
@ -65,7 +65,7 @@ namespace connectivity
|
||||
*/
|
||||
OUString
|
||||
getResourceStringWithSubstitution(
|
||||
const char* pResId,
|
||||
TranslateId pResId,
|
||||
const char* _pAsciiPatternToReplace,
|
||||
const OUString& _rStringToSubstitute
|
||||
) const;
|
||||
@ -89,7 +89,7 @@ namespace connectivity
|
||||
*/
|
||||
OUString
|
||||
getResourceStringWithSubstitution(
|
||||
const char* pResId,
|
||||
TranslateId pResId,
|
||||
const char* _pAsciiPatternToReplace1,
|
||||
const OUString& _rStringToSubstitute1,
|
||||
const char* _pAsciiPatternToReplace2,
|
||||
@ -119,7 +119,7 @@ namespace connectivity
|
||||
*/
|
||||
OUString
|
||||
getResourceStringWithSubstitution(
|
||||
const char* pResId,
|
||||
TranslateId pResId,
|
||||
const char* _pAsciiPatternToReplace1,
|
||||
const OUString& _rStringToSubstitute1,
|
||||
const char* _pAsciiPatternToReplace2,
|
||||
@ -138,7 +138,7 @@ namespace connectivity
|
||||
@return
|
||||
the string from the resource file, with applied string substitution
|
||||
*/
|
||||
OUString getResourceStringWithSubstitution( const char* pResId,
|
||||
OUString getResourceStringWithSubstitution( TranslateId pResId,
|
||||
const std::vector< std::pair<const char* , OUString > >& _rStringToSubstitutes) const;
|
||||
};
|
||||
|
||||
|
@ -44,7 +44,7 @@ namespace connectivity
|
||||
static SharedResources_Impl&
|
||||
getInstance();
|
||||
|
||||
OUString getResourceString(const char* pId);
|
||||
OUString getResourceString(TranslateId pId);
|
||||
|
||||
private:
|
||||
SharedResources_Impl();
|
||||
@ -66,7 +66,7 @@ namespace connectivity
|
||||
{
|
||||
}
|
||||
|
||||
OUString SharedResources_Impl::getResourceString(const char* pId)
|
||||
OUString SharedResources_Impl::getResourceString(TranslateId pId)
|
||||
{
|
||||
return Translate::get(pId, m_aLocale);
|
||||
}
|
||||
@ -129,13 +129,13 @@ namespace connectivity
|
||||
}
|
||||
|
||||
|
||||
OUString SharedResources::getResourceString(const char* pResId) const
|
||||
OUString SharedResources::getResourceString(TranslateId pResId) const
|
||||
{
|
||||
return SharedResources_Impl::getInstance().getResourceString(pResId);
|
||||
}
|
||||
|
||||
|
||||
OUString SharedResources::getResourceStringWithSubstitution(const char* pResId,
|
||||
OUString SharedResources::getResourceStringWithSubstitution(TranslateId pResId,
|
||||
const char* _pAsciiPatternToReplace, const OUString& _rStringToSubstitute ) const
|
||||
{
|
||||
OUString sString( SharedResources_Impl::getInstance().getResourceString(pResId) );
|
||||
@ -145,7 +145,7 @@ namespace connectivity
|
||||
}
|
||||
|
||||
|
||||
OUString SharedResources::getResourceStringWithSubstitution(const char* pResId,
|
||||
OUString SharedResources::getResourceStringWithSubstitution(TranslateId pResId,
|
||||
const char* _pAsciiPatternToReplace1, const OUString& _rStringToSubstitute1,
|
||||
const char* _pAsciiPatternToReplace2, const OUString& _rStringToSubstitute2 ) const
|
||||
{
|
||||
@ -158,7 +158,7 @@ namespace connectivity
|
||||
}
|
||||
|
||||
|
||||
OUString SharedResources::getResourceStringWithSubstitution(const char* pResId,
|
||||
OUString SharedResources::getResourceStringWithSubstitution(TranslateId pResId,
|
||||
const char* _pAsciiPatternToReplace1, const OUString& _rStringToSubstitute1,
|
||||
const char* _pAsciiPatternToReplace2, const OUString& _rStringToSubstitute2,
|
||||
const char* _pAsciiPatternToReplace3, const OUString& _rStringToSubstitute3 ) const
|
||||
@ -173,7 +173,7 @@ namespace connectivity
|
||||
return sString;
|
||||
}
|
||||
|
||||
OUString SharedResources::getResourceStringWithSubstitution(const char* pResId,
|
||||
OUString SharedResources::getResourceStringWithSubstitution(TranslateId pResId,
|
||||
const std::vector< std::pair<const char* , OUString > >& _rStringToSubstitutes) const
|
||||
{
|
||||
OUString sString( SharedResources_Impl::getInstance().getResourceString(pResId) );
|
||||
|
@ -9,9 +9,11 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
|
||||
#include <unotools/resmgr.hxx>
|
||||
|
||||
const char* NUM_CATEGORIES[] =
|
||||
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
|
||||
|
||||
const TranslateId NUM_CATEGORIES[] =
|
||||
{
|
||||
NC_("numberingformatpage|liststore1", "All"),
|
||||
NC_("numberingformatpage|liststore1", "User-defined"),
|
||||
|
@ -18,7 +18,7 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
|
||||
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
|
||||
|
||||
#define RID_SVXSTR_KEY_CONFIG_DIR NC_("RID_SVXSTR_KEY_CONFIG_DIR", "Configuration")
|
||||
#define RID_SVXSTR_KEY_WORK_PATH NC_("RID_SVXSTR_KEY_WORK_PATH", "My Documents")
|
||||
|
@ -19,11 +19,12 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
|
||||
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
|
||||
|
||||
#include <rtl/ustring.hxx>
|
||||
#include <config_python.h>
|
||||
#include <tuple>
|
||||
#include <unotools/resmgr.hxx>
|
||||
|
||||
/*
|
||||
* std:tuple consists of <text, uri, image>
|
||||
@ -44,7 +45,7 @@
|
||||
* images are scaled to 150x150px; const ThumbSize() in tipoftheday.cxx
|
||||
*/
|
||||
|
||||
const std::tuple<const char*, OUString, OUString> TIPOFTHEDAY_STRINGARRAY[] =
|
||||
const std::tuple<TranslateId, OUString, OUString> TIPOFTHEDAY_STRINGARRAY[] =
|
||||
{
|
||||
{ NC_("RID_CUI_TIPOFTHEDAY", "%PRODUCTNAME offers a variety of user interface options to make you feel at home"), ".uno:ToolbarModeUI", "toolbarmode.png"},
|
||||
{ NC_("RID_CUI_TIPOFTHEDAY", "Need to allow changes to parts of a read-only document in Writer? Insert frames or sections that can authorize changes."), "https://help.libreoffice.org/%PRODUCTVERSION/%LANGUAGENAME/text/swriter/guide/section_edit.html", "tipoftheday_w.png"}, //local help missing
|
||||
|
@ -9,15 +9,16 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
|
||||
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
|
||||
|
||||
#include <rtl/ustring.hxx>
|
||||
#include <tuple>
|
||||
#include <unotools/resmgr.hxx>
|
||||
|
||||
/*
|
||||
Description, ui file name, preview file name
|
||||
*/
|
||||
const std::tuple<const char*, OUString, OUString> TOOLBARMODES_ARRAY[] =
|
||||
const std::tuple<TranslateId, OUString, OUString> TOOLBARMODES_ARRAY[] =
|
||||
{
|
||||
{ NC_("RID_CUI_TOOLBARMODES", "Standard user interface with menu, toolbar, and collapsed sidebar. Intended for users who are familiar with the classic interface."), "Default", "default.png" },
|
||||
{ NC_("RID_CUI_TOOLBARMODES", "The Tabbed user interface is the most similar to the Ribbons used in Microsoft Office. It organizes functions in tabs and makes the main menu obsolete."), "notebookbar.ui", "notebookbar.png" },
|
||||
|
@ -26,9 +26,9 @@
|
||||
|
||||
#include <utility>
|
||||
|
||||
#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
|
||||
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
|
||||
|
||||
const std::pair<const char*, sal_uInt16> SID_GENERAL_OPTIONS_RES[] =
|
||||
const std::pair<TranslateId, sal_uInt16> SID_GENERAL_OPTIONS_RES[] =
|
||||
{
|
||||
{ NC_("SID_GENERAL_OPTIONS_RES", "%PRODUCTNAME"), 0 },
|
||||
{ NC_("SID_GENERAL_OPTIONS_RES", "User Data"), RID_SFXPAGE_GENERAL },
|
||||
@ -47,7 +47,7 @@ const std::pair<const char*, sal_uInt16> SID_GENERAL_OPTIONS_RES[] =
|
||||
{ NC_("SID_GENERAL_OPTIONS_RES", "OpenCL"), RID_SVXPAGE_OPENCL }
|
||||
};
|
||||
|
||||
const std::pair<const char*, sal_uInt16> SID_LANGUAGE_OPTIONS_RES[] =
|
||||
const std::pair<TranslateId, sal_uInt16> SID_LANGUAGE_OPTIONS_RES[] =
|
||||
{
|
||||
{ NC_("SID_LANGUAGE_OPTIONS_RES", "Language Settings"), 0 },
|
||||
{ NC_("SID_LANGUAGE_OPTIONS_RES", "Languages"), OFA_TP_LANGUAGES },
|
||||
@ -57,14 +57,14 @@ const std::pair<const char*, sal_uInt16> SID_LANGUAGE_OPTIONS_RES[] =
|
||||
{ NC_("SID_LANGUAGE_OPTIONS_RES", "Complex Text Layout"), RID_SVXPAGE_OPTIONS_CTL }
|
||||
};
|
||||
|
||||
const std::pair<const char*, sal_uInt16> SID_INET_DLG_RES[] =
|
||||
const std::pair<TranslateId, sal_uInt16> SID_INET_DLG_RES[] =
|
||||
{
|
||||
{ NC_("SID_INET_DLG_RES", "Internet"), 0 },
|
||||
{ NC_("SID_INET_DLG_RES", "Proxy"), RID_SVXPAGE_INET_PROXY },
|
||||
{ NC_("SID_INET_DLG_RES", "Email"), RID_SVXPAGE_INET_MAIL }
|
||||
};
|
||||
|
||||
const std::pair<const char*, sal_uInt16> SID_SW_EDITOPTIONS_RES[] =
|
||||
const std::pair<TranslateId, sal_uInt16> SID_SW_EDITOPTIONS_RES[] =
|
||||
{
|
||||
{ NC_("SID_SW_EDITOPTIONS_RES", "%PRODUCTNAME Writer"), 0 },
|
||||
{ NC_("SID_SW_EDITOPTIONS_RES", "General"), RID_SW_TP_OPTLOAD_PAGE },
|
||||
@ -83,7 +83,7 @@ const std::pair<const char*, sal_uInt16> SID_SW_EDITOPTIONS_RES[] =
|
||||
{ NC_("SID_SW_EDITOPTIONS_RES", "Mail Merge Email"), RID_SW_TP_MAILCONFIG }
|
||||
};
|
||||
|
||||
const std::pair<const char*, sal_uInt16> SID_SW_ONLINEOPTIONS_RES[] =
|
||||
const std::pair<TranslateId, sal_uInt16> SID_SW_ONLINEOPTIONS_RES[] =
|
||||
{
|
||||
{ NC_("SID_SW_ONLINEOPTIONS_RES", "%PRODUCTNAME Writer/Web"), 0 },
|
||||
{ NC_("SID_SW_ONLINEOPTIONS_RES", "View"), RID_SW_TP_HTML_CONTENT_OPT },
|
||||
@ -94,13 +94,13 @@ const std::pair<const char*, sal_uInt16> SID_SW_ONLINEOPTIONS_RES[] =
|
||||
{ NC_("SID_SW_ONLINEOPTIONS_RES", "Background"), RID_SW_TP_BACKGROUND }
|
||||
};
|
||||
|
||||
const std::pair<const char*, sal_uInt16> SID_SM_EDITOPTIONS_RES[] =
|
||||
const std::pair<TranslateId, sal_uInt16> SID_SM_EDITOPTIONS_RES[] =
|
||||
{
|
||||
{ NC_("SID_SM_EDITOPTIONS_RES", "%PRODUCTNAME Math"), 0 },
|
||||
{ NC_("SID_SM_EDITOPTIONS_RES", "Settings"), SID_SM_TP_PRINTOPTIONS },
|
||||
};
|
||||
|
||||
const std::pair<const char*, sal_uInt16> SID_SC_EDITOPTIONS_RES[] =
|
||||
const std::pair<TranslateId, sal_uInt16> SID_SC_EDITOPTIONS_RES[] =
|
||||
{
|
||||
{ NC_("SID_SC_EDITOPTIONS_RES", "%PRODUCTNAME Calc"), 0 },
|
||||
{ NC_("SID_SC_EDITOPTIONS_RES", "General"), SID_SC_TP_LAYOUT },
|
||||
@ -115,7 +115,7 @@ const std::pair<const char*, sal_uInt16> SID_SC_EDITOPTIONS_RES[] =
|
||||
{ NC_("SID_SC_EDITOPTIONS_RES", "Print"), RID_SC_TP_PRINT }
|
||||
};
|
||||
|
||||
const std::pair<const char*, sal_uInt16> SID_SD_EDITOPTIONS_RES[] =
|
||||
const std::pair<TranslateId, sal_uInt16> SID_SD_EDITOPTIONS_RES[] =
|
||||
{
|
||||
{ NC_("SID_SD_EDITOPTIONS_RES", "%PRODUCTNAME Impress"), 0 },
|
||||
{ NC_("SID_SD_EDITOPTIONS_RES", "General"), SID_SI_TP_MISC },
|
||||
@ -124,7 +124,7 @@ const std::pair<const char*, sal_uInt16> SID_SD_EDITOPTIONS_RES[] =
|
||||
{ NC_("SID_SD_EDITOPTIONS_RES", "Print"), SID_SI_TP_PRINT }
|
||||
};
|
||||
|
||||
const std::pair<const char*, sal_uInt16> SID_SD_GRAPHIC_OPTIONS_RES[] =
|
||||
const std::pair<TranslateId, sal_uInt16> SID_SD_GRAPHIC_OPTIONS_RES[] =
|
||||
{
|
||||
{ NC_("SID_SD_GRAPHIC_OPTIONS_RES", "%PRODUCTNAME Draw"), 0 },
|
||||
{ NC_("SID_SD_GRAPHIC_OPTIONS_RES", "General"), SID_SD_TP_MISC },
|
||||
@ -133,13 +133,13 @@ const std::pair<const char*, sal_uInt16> SID_SD_GRAPHIC_OPTIONS_RES[] =
|
||||
{ NC_("SID_SD_GRAPHIC_OPTIONS_RES", "Print"), SID_SD_TP_PRINT }
|
||||
};
|
||||
|
||||
const std::pair<const char*, sal_uInt16> SID_SCH_EDITOPTIONS_RES[] =
|
||||
const std::pair<TranslateId, sal_uInt16> SID_SCH_EDITOPTIONS_RES[] =
|
||||
{
|
||||
{ NC_("SID_SCH_EDITOPTIONS_RES", "Charts"), 0 },
|
||||
{ NC_("SID_SCH_EDITOPTIONS_RES", "Default Colors"), RID_OPTPAGE_CHART_DEFCOLORS }
|
||||
};
|
||||
|
||||
const std::pair<const char*, sal_uInt16> SID_FILTER_DLG_RES[] =
|
||||
const std::pair<TranslateId, sal_uInt16> SID_FILTER_DLG_RES[] =
|
||||
{
|
||||
{ NC_("SID_FILTER_DLG_RES", "Load/Save"), 0 },
|
||||
{ NC_("SID_FILTER_DLG_RES", "General"), RID_SFXPAGE_SAVE },
|
||||
@ -148,7 +148,7 @@ const std::pair<const char*, sal_uInt16> SID_FILTER_DLG_RES[] =
|
||||
{ NC_("SID_FILTER_DLG_RES", "HTML Compatibility"), RID_OFAPAGE_HTMLOPT }
|
||||
};
|
||||
|
||||
const std::pair<const char*, sal_uInt16> SID_SB_STARBASEOPTIONS_RES[] =
|
||||
const std::pair<TranslateId, sal_uInt16> SID_SB_STARBASEOPTIONS_RES[] =
|
||||
{
|
||||
{ NC_("SID_SB_STARBASEOPTIONS_RES", "%PRODUCTNAME Base"), 0 },
|
||||
{ NC_("SID_SB_STARBASEOPTIONS_RES", "Connections"), SID_SB_CONNECTIONPOOLING },
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
#include <utility>
|
||||
|
||||
#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
|
||||
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
|
||||
|
||||
#define CHRDLG_ENCLOSE_NONE 0
|
||||
#define CHRDLG_ENCLOSE_ROUND 1
|
||||
@ -22,7 +22,7 @@
|
||||
#define CHRDLG_ENCLOSE_CURVED 4
|
||||
#define CHRDLG_ENCLOSE_SPECIAL_CHAR 5
|
||||
|
||||
const std::pair<const char*, sal_uInt16> TWOLINE_OPEN[] =
|
||||
const std::pair<TranslateId, sal_uInt16> TWOLINE_OPEN[] =
|
||||
{
|
||||
{ NC_("twolinespage|liststore1", "(None)"), CHRDLG_ENCLOSE_NONE },
|
||||
{ NC_("twolinespage|liststore1", "("), CHRDLG_ENCLOSE_ROUND },
|
||||
@ -32,7 +32,7 @@ const std::pair<const char*, sal_uInt16> TWOLINE_OPEN[] =
|
||||
{ NC_("twolinespage|liststore1", "Other Characters..."), CHRDLG_ENCLOSE_SPECIAL_CHAR }
|
||||
};
|
||||
|
||||
const std::pair<const char*, sal_uInt16> TWOLINE_CLOSE[] =
|
||||
const std::pair<TranslateId, sal_uInt16> TWOLINE_CLOSE[] =
|
||||
{
|
||||
{ NC_("twolinespage|liststore2", "(None)"), CHRDLG_ENCLOSE_NONE },
|
||||
{ NC_("twolinespage|liststore2", ")"), CHRDLG_ENCLOSE_ROUND },
|
||||
|
@ -146,7 +146,7 @@ bool AboutDialog::IsStringValidGitHash(const OUString &hash) {
|
||||
}
|
||||
|
||||
OUString AboutDialog::GetVersionString() {
|
||||
OUString sVersion = CuiResId("%ABOUTBOXPRODUCTVERSION%ABOUTBOXPRODUCTVERSIONSUFFIX");
|
||||
OUString sVersion = CuiResId(TranslateId(nullptr, "%ABOUTBOXPRODUCTVERSION%ABOUTBOXPRODUCTVERSIONSUFFIX"));
|
||||
|
||||
#ifdef _WIN64
|
||||
sVersion += " (x64)";
|
||||
|
@ -192,13 +192,13 @@ void FmSearchDialog::Init(const OUString& strVisibleFields, const OUString& sIni
|
||||
|
||||
// fill the listboxes
|
||||
// method of field comparison
|
||||
const char* const aResIds[] = {
|
||||
const TranslateId aResIds[] = {
|
||||
RID_STR_SEARCH_ANYWHERE,
|
||||
RID_STR_SEARCH_BEGINNING,
|
||||
RID_STR_SEARCH_END,
|
||||
RID_STR_SEARCH_WHOLE
|
||||
};
|
||||
for (auto pResId : aResIds)
|
||||
for (auto const & pResId : aResIds)
|
||||
m_plbPosition->append_text(CuiResId(pResId));
|
||||
m_plbPosition->set_active(MATCHING_ANYWHERE);
|
||||
|
||||
@ -600,7 +600,7 @@ IMPL_LINK(FmSearchDialog, OnSearchProgress, const FmSearchProgress*, pProgress,
|
||||
case FmSearchProgress::State::Error:
|
||||
case FmSearchProgress::State::NothingFound:
|
||||
{
|
||||
const char* pErrorId = (FmSearchProgress::State::Error == pProgress->aSearchState)
|
||||
TranslateId pErrorId = (FmSearchProgress::State::Error == pProgress->aSearchState)
|
||||
? RID_STR_SEARCH_GENERAL_ERROR
|
||||
: RID_STR_SEARCH_NORECORD;
|
||||
std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(m_xDialog.get(),
|
||||
|
@ -20,6 +20,6 @@
|
||||
#include <dialmgr.hxx>
|
||||
#include <unotools/resmgr.hxx>
|
||||
|
||||
OUString CuiResId(std::string_view aKey) { return Translate::get(aKey, Translate::Create("cui")); }
|
||||
OUString CuiResId(TranslateId aKey) { return Translate::get(aKey, Translate::Create("cui")); }
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include <svx/colorbox.hxx>
|
||||
#include <svx/frmsel.hxx>
|
||||
#include <svx/flagsdef.hxx>
|
||||
#include <unotools/resmgr.hxx>
|
||||
|
||||
#include <set>
|
||||
|
||||
@ -169,7 +170,7 @@ private:
|
||||
DECL_LINK(RemoveAdjacentCellBorderHdl_Impl, weld::Toggleable&, void);
|
||||
|
||||
sal_uInt16 GetPresetImageId(sal_uInt16 nValueSetIdx) const;
|
||||
const char* GetPresetStringId(sal_uInt16 nValueSetIdx) const;
|
||||
TranslateId GetPresetStringId(sal_uInt16 nValueSetIdx) const;
|
||||
|
||||
void FillPresetVS();
|
||||
void FillShadowVS();
|
||||
|
@ -20,7 +20,8 @@
|
||||
#pragma once
|
||||
|
||||
#include <rtl/ustring.hxx>
|
||||
#include <unotools/resmgr.hxx>
|
||||
|
||||
OUString CuiResId(std::string_view aKey);
|
||||
OUString CuiResId(TranslateId aKey);
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include <com/sun/star/util/XModifiable.hpp>
|
||||
#include <com/sun/star/uno/Reference.hxx>
|
||||
#include <rtl/ustring.hxx>
|
||||
#include <unotools/resmgr.hxx>
|
||||
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
@ -34,8 +35,8 @@ typedef std::unordered_map< OUString, std::pair< OUString, OUString > > EventsHa
|
||||
struct EventDisplayName
|
||||
{
|
||||
const char* pAsciiEventName;
|
||||
const char* pEventResourceID;
|
||||
EventDisplayName(const char* pAsciiName, const char* pResId)
|
||||
TranslateId pEventResourceID;
|
||||
EventDisplayName(const char* pAsciiName, TranslateId pResId)
|
||||
: pAsciiEventName(pAsciiName)
|
||||
, pEventResourceID(pResId)
|
||||
{
|
||||
|
@ -245,7 +245,7 @@ void SvxPathTabPage::Reset( const SfxItemSet* )
|
||||
&& !SvtModuleOptions().IsModuleInstalled( SvtModuleOptions::EModule::WRITER ) )
|
||||
continue;
|
||||
|
||||
const char* pId = nullptr;
|
||||
TranslateId pId;
|
||||
|
||||
switch (static_cast<SvtPathOptions::Paths>(i))
|
||||
{
|
||||
|
@ -29,6 +29,7 @@
|
||||
|
||||
#include <svx/dialogs.hrc>
|
||||
#include <svx/svxids.hrc>
|
||||
#include <unotools/resmgr.hxx>
|
||||
|
||||
#include <treeopt.hrc>
|
||||
#include <helpids.h>
|
||||
|
@ -1297,10 +1297,10 @@ sal_uInt16 SvxBorderTabPage::GetPresetImageId( sal_uInt16 nValueSetIdx ) const
|
||||
return ppnImgIds[ nLine ][ nValueSetIdx - 1 ];
|
||||
}
|
||||
|
||||
const char* SvxBorderTabPage::GetPresetStringId( sal_uInt16 nValueSetIdx ) const
|
||||
TranslateId SvxBorderTabPage::GetPresetStringId( sal_uInt16 nValueSetIdx ) const
|
||||
{
|
||||
// string resource IDs for each image (in order of the IID_PRE_* image IDs)
|
||||
static const char* pnStrIds[] =
|
||||
static const TranslateId pnStrIds[] =
|
||||
{
|
||||
RID_SVXSTR_TABLE_PRESET_NONE,
|
||||
RID_SVXSTR_PARA_PRESET_ALL,
|
||||
@ -1357,7 +1357,7 @@ void SvxBorderTabPage::FillShadowVS()
|
||||
m_xWndShadows->SetColCount( SVX_BORDER_SHADOW_COUNT );
|
||||
|
||||
// string resource IDs for each image
|
||||
static const char* pnStrIds[ SVX_BORDER_SHADOW_COUNT ] =
|
||||
static const TranslateId pnStrIds[ SVX_BORDER_SHADOW_COUNT ] =
|
||||
{ RID_SVXSTR_SHADOW_STYLE_NONE, RID_SVXSTR_SHADOW_STYLE_BOTTOMRIGHT, RID_SVXSTR_SHADOW_STYLE_TOPRIGHT, RID_SVXSTR_SHADOW_STYLE_BOTTOMLEFT, RID_SVXSTR_SHADOW_STYLE_TOPLEFT };
|
||||
|
||||
// insert images and help texts
|
||||
|
@ -22,6 +22,7 @@
|
||||
|
||||
#include <rtl/ustring.hxx>
|
||||
#include "dbadllapi.hxx"
|
||||
#include <unotools/resmgr.hxx>
|
||||
|
||||
#define DBA_RES( id ) ::dbaccess::ResourceManager::loadString( id )
|
||||
#define DBA_RES_PARAM( id, ascii, replace ) ::dbaccess::ResourceManager::loadString( id, ascii, replace )
|
||||
@ -40,7 +41,7 @@ namespace dbaccess
|
||||
public:
|
||||
/** loads the string with the specified resource id
|
||||
*/
|
||||
static OUString loadString(const char* pResId);
|
||||
static OUString loadString(TranslateId pResId);
|
||||
|
||||
/** loads a string from the resource file, substituting a placeholder with a given string
|
||||
|
||||
@ -52,7 +53,7 @@ namespace dbaccess
|
||||
the string which should substitute the placeholder
|
||||
*/
|
||||
static OUString loadString(
|
||||
const char* pResId,
|
||||
TranslateId pResId,
|
||||
const char* _pPlaceholderAscii,
|
||||
std::u16string_view _rReplace
|
||||
);
|
||||
@ -71,7 +72,7 @@ namespace dbaccess
|
||||
the string which should substitute the second placeholder
|
||||
*/
|
||||
static OUString loadString(
|
||||
const char* pResId,
|
||||
TranslateId pResId,
|
||||
const char* _pPlaceholderAscii1,
|
||||
std::u16string_view _rReplace1,
|
||||
const char* _pPlaceholderAscii2,
|
||||
|
@ -19,9 +19,9 @@
|
||||
#ifndef INCLUDED_VCL_INC_PRINTACCESSORYVIEW_HRC
|
||||
#define INCLUDED_VCL_INC_PRINTACCESSORYVIEW_HRC
|
||||
|
||||
#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
|
||||
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
|
||||
|
||||
const char* RSC_QUERY_OBJECT_TYPE[] =
|
||||
const TranslateId RSC_QUERY_OBJECT_TYPE[] =
|
||||
{
|
||||
NC_("RSC_QUERY_OBJECT_TYPE", "The table view"),
|
||||
NC_("RSC_QUERY_OBJECT_TYPE", "The query"),
|
||||
|
@ -19,7 +19,9 @@
|
||||
#ifndef INCLUDED_DBACCESS_SOURCE_CORE_INC_CORE_RESOURCE_HRC
|
||||
#define INCLUDED_DBACCESS_SOURCE_CORE_INC_CORE_RESOURCE_HRC
|
||||
|
||||
#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
|
||||
#include <unotools/resmgr.hxx>
|
||||
|
||||
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
|
||||
|
||||
#define RID_STR_CONNECTION_INVALID NC_("RID_STR_CONNECTION_INVALID", "No connection could be established.")
|
||||
#define RID_STR_TABLE_IS_FILTERED NC_("RID_STR_TABLE_IS_FILTERED", "The table $name$ already exists. It is not visible because it has been filtered out.")
|
||||
|
@ -20,8 +20,9 @@
|
||||
#pragma once
|
||||
|
||||
#include <utility>
|
||||
#include <unotools/resmgr.hxx>
|
||||
|
||||
#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
|
||||
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
|
||||
|
||||
#define DI_TITLE 1
|
||||
#define DI_FROM 2
|
||||
@ -36,7 +37,7 @@
|
||||
#define DI_THEME 11
|
||||
#define DI_SIZE 12
|
||||
|
||||
const std::pair<const char*, int> STRARY_SVT_DOCINFO[] =
|
||||
const std::pair<TranslateId, int> STRARY_SVT_DOCINFO[] =
|
||||
{
|
||||
{ NC_("STRARY_SVT_DOCINFO", "Title") , DI_TITLE },
|
||||
{ NC_("STRARY_SVT_DOCINFO", "By") , DI_FROM },
|
||||
|
@ -676,7 +676,7 @@ Reference< XConnection > ODatabaseSource::buildLowLevelConnection(const OUString
|
||||
sPwd = m_pImpl->m_aPassword;
|
||||
}
|
||||
|
||||
const char* pExceptionMessageId = RID_STR_COULDNOTCONNECT_UNSPECIFIED;
|
||||
TranslateId pExceptionMessageId = RID_STR_COULDNOTCONNECT_UNSPECIFIED;
|
||||
if (xManager.is())
|
||||
{
|
||||
sal_Int32 nAdditionalArgs(0);
|
||||
|
@ -33,18 +33,18 @@ namespace dbaccess
|
||||
struct theResourceManagerMutex : public rtl::Static< osl::Mutex, theResourceManagerMutex > {};
|
||||
}
|
||||
|
||||
OUString ResourceManager::loadString(const char* pResId)
|
||||
OUString ResourceManager::loadString(TranslateId pResId)
|
||||
{
|
||||
return Translate::get(pResId, Translate::Create("dba"));
|
||||
}
|
||||
|
||||
OUString ResourceManager::loadString(const char* pResId, const char* _pPlaceholderAscii, std::u16string_view _rReplace)
|
||||
OUString ResourceManager::loadString(TranslateId pResId, const char* _pPlaceholderAscii, std::u16string_view _rReplace)
|
||||
{
|
||||
OUString sString(loadString(pResId));
|
||||
return sString.replaceFirst( OUString::createFromAscii(_pPlaceholderAscii), _rReplace );
|
||||
}
|
||||
|
||||
OUString ResourceManager::loadString(const char* pResId, const char* _pPlaceholderAscii1, std::u16string_view _rReplace1,
|
||||
OUString ResourceManager::loadString(TranslateId pResId, const char* _pPlaceholderAscii1, std::u16string_view _rReplace1,
|
||||
const char* _pPlaceholderAscii2, std::u16string_view _rReplace2)
|
||||
{
|
||||
OUString sString(loadString(pResId));
|
||||
|
@ -50,7 +50,7 @@ using namespace ::com::sun::star::beans;
|
||||
using ::com::sun::star::util::URL;
|
||||
using ::com::sun::star::sdb::application::NamedDatabaseObject;
|
||||
|
||||
TaskEntry::TaskEntry( const char* _pAsciiUNOCommand, const char* _pHelpID, const char* pTitleResourceID, bool _bHideWhenDisabled )
|
||||
TaskEntry::TaskEntry( const char* _pAsciiUNOCommand, TranslateId _pHelpID, TranslateId pTitleResourceID, bool _bHideWhenDisabled )
|
||||
:sUNOCommand( OUString::createFromAscii( _pAsciiUNOCommand ) )
|
||||
,pHelpID( _pHelpID )
|
||||
,sTitle( DBA_RES(pTitleResourceID) )
|
||||
@ -60,7 +60,7 @@ TaskEntry::TaskEntry( const char* _pAsciiUNOCommand, const char* _pHelpID, const
|
||||
|
||||
void OTasksWindow::updateHelpText()
|
||||
{
|
||||
const char* pHelpTextId = nullptr;
|
||||
TranslateId pHelpTextId;
|
||||
int nCurEntry = m_xTreeView->get_selected_index();
|
||||
if (nCurEntry != -1)
|
||||
pHelpTextId = reinterpret_cast<TaskEntry*>(m_xTreeView->get_id(nCurEntry).toUInt64())->pHelpID;
|
||||
@ -135,7 +135,7 @@ OTasksWindow::~OTasksWindow()
|
||||
Clear();
|
||||
}
|
||||
|
||||
void OTasksWindow::setHelpText(const char* pId)
|
||||
void OTasksWindow::setHelpText(TranslateId pId)
|
||||
{
|
||||
if (pId)
|
||||
m_xHelpText->set_text(DBA_RES(pId));
|
||||
@ -208,7 +208,7 @@ OApplicationDetailView::OApplicationDetailView(weld::Container* pParent, OAppBor
|
||||
, m_xTasksParent(m_xBuilder->weld_container("tasks"))
|
||||
, m_xContainerParent(m_xBuilder->weld_container("container"))
|
||||
, m_xTasks(new dbaui::OTitleWindow(m_xTasksParent.get(), STR_TASKS))
|
||||
, m_xTitleContainer(new dbaui::OTitleWindow(m_xContainerParent.get(), nullptr))
|
||||
, m_xTitleContainer(new dbaui::OTitleWindow(m_xContainerParent.get(), TranslateId()))
|
||||
, m_rBorderWin(rBorder)
|
||||
{
|
||||
m_xControlHelper = std::make_shared<OAppDetailPageHelper>(m_xTitleContainer->getChildContainer(), m_rBorderWin, ePreviewMode);
|
||||
|
@ -40,14 +40,14 @@ namespace dbaui
|
||||
struct TaskEntry
|
||||
{
|
||||
OUString sUNOCommand;
|
||||
const char* pHelpID;
|
||||
TranslateId pHelpID;
|
||||
OUString sTitle;
|
||||
bool bHideWhenDisabled;
|
||||
// TODO: we should be consistent in the task pane and the menus/toolbars:
|
||||
// If an entry is disabled in the latter, it should also be disabled in the former.
|
||||
// If an entry is *hidden* in the former, it should also be hidden in the latter.
|
||||
|
||||
TaskEntry( const char* _pAsciiUNOCommand, const char* pHelpID, const char* pTitleResourceID, bool _bHideWhenDisabled = false );
|
||||
TaskEntry( const char* _pAsciiUNOCommand, TranslateId pHelpID, TranslateId pTitleResourceID, bool _bHideWhenDisabled = false );
|
||||
};
|
||||
typedef std::vector< TaskEntry > TaskEntryList;
|
||||
|
||||
@ -56,7 +56,7 @@ namespace dbaui
|
||||
/// the tasks available in the pane
|
||||
TaskEntryList aTasks;
|
||||
/// the resource ID for the title of the pane
|
||||
const char* pTitleId;
|
||||
TranslateId pTitleId;
|
||||
};
|
||||
|
||||
class OTasksWindow final : public OChildWindow
|
||||
@ -89,7 +89,7 @@ namespace dbaui
|
||||
void fillTaskEntryList( const TaskEntryList& _rList );
|
||||
|
||||
void Clear();
|
||||
void setHelpText(const char* pId);
|
||||
void setHelpText(TranslateId pId);
|
||||
};
|
||||
|
||||
class OApplicationDetailView final : public IClipboardTest
|
||||
|
@ -71,7 +71,7 @@ void OApplicationIconControl::Fill()
|
||||
{
|
||||
static const struct CategoryDescriptor
|
||||
{
|
||||
const char* pLabelResId;
|
||||
TranslateId pLabelResId;
|
||||
ElementType eType;
|
||||
const char* aImageResId;
|
||||
} aCategories[] = { { RID_STR_TABLES_CONTAINER, E_TABLE, BMP_TABLEFOLDER_TREE_L },
|
||||
|
@ -23,7 +23,7 @@
|
||||
|
||||
namespace dbaui
|
||||
{
|
||||
OTitleWindow::OTitleWindow(weld::Container* pParent, const char* pTitleId)
|
||||
OTitleWindow::OTitleWindow(weld::Container* pParent, TranslateId pTitleId)
|
||||
: m_xBuilder(Application::CreateBuilder(pParent, "dbaccess/ui/titlewindow.ui"))
|
||||
, m_xContainer(m_xBuilder->weld_container("TitleWindow"))
|
||||
, m_xTitleFrame(m_xBuilder->weld_container("titleparent"))
|
||||
@ -46,7 +46,7 @@ void OTitleWindow::setChildWindow(const std::shared_ptr<OChildWindow>& rChild)
|
||||
m_xChild = rChild;
|
||||
}
|
||||
|
||||
void OTitleWindow::setTitle(const char* pTitleId)
|
||||
void OTitleWindow::setTitle(TranslateId pTitleId)
|
||||
{
|
||||
if (!pTitleId)
|
||||
return;
|
||||
|
@ -19,6 +19,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <ChildWindow.hxx>
|
||||
#include <unotools/resmgr.hxx>
|
||||
|
||||
namespace dbaui
|
||||
{
|
||||
@ -32,7 +33,7 @@ namespace dbaui
|
||||
std::shared_ptr<OChildWindow> m_xChild;
|
||||
|
||||
public:
|
||||
OTitleWindow(weld::Container* pParent, const char* pTitleId);
|
||||
OTitleWindow(weld::Container* pParent, TranslateId pTitleId);
|
||||
~OTitleWindow();
|
||||
|
||||
void GrabFocus();
|
||||
@ -59,7 +60,7 @@ namespace dbaui
|
||||
@param pTitleId
|
||||
The resource id of the title text.
|
||||
*/
|
||||
void setTitle(const char* pTitleId);
|
||||
void setTitle(TranslateId pTitleId);
|
||||
};
|
||||
} // namespace dbaui
|
||||
|
||||
|
@ -25,7 +25,7 @@ namespace dbaui {
|
||||
|
||||
OPropColumnEditCtrl::OPropColumnEditCtrl(std::unique_ptr<weld::Entry> xEntry,
|
||||
OUString const & _rAllowedChars,
|
||||
const char* pHelpId,
|
||||
TranslateId pHelpId,
|
||||
short nPosition)
|
||||
: OSQLNameEntry(std::move(xEntry), _rAllowedChars)
|
||||
, m_nPos(nPosition)
|
||||
@ -33,7 +33,7 @@ OPropColumnEditCtrl::OPropColumnEditCtrl(std::unique_ptr<weld::Entry> xEntry,
|
||||
m_strHelpText = DBA_RES(pHelpId);
|
||||
}
|
||||
|
||||
OPropEditCtrl::OPropEditCtrl(std::unique_ptr<weld::Entry> xEntry, const char* pHelpId, short nPosition)
|
||||
OPropEditCtrl::OPropEditCtrl(std::unique_ptr<weld::Entry> xEntry, TranslateId pHelpId, short nPosition)
|
||||
: OWidgetBase(xEntry.get())
|
||||
, m_xEntry(std::move(xEntry))
|
||||
, m_nPos(nPosition)
|
||||
@ -41,7 +41,7 @@ OPropEditCtrl::OPropEditCtrl(std::unique_ptr<weld::Entry> xEntry, const char* pH
|
||||
m_strHelpText = DBA_RES(pHelpId);
|
||||
}
|
||||
|
||||
OPropNumericEditCtrl::OPropNumericEditCtrl(std::unique_ptr<weld::SpinButton> xSpinButton, const char* pHelpId, short nPosition)
|
||||
OPropNumericEditCtrl::OPropNumericEditCtrl(std::unique_ptr<weld::SpinButton> xSpinButton, TranslateId pHelpId, short nPosition)
|
||||
: OWidgetBase(xSpinButton.get())
|
||||
, m_xSpinButton(std::move(xSpinButton))
|
||||
, m_nPos(nPosition)
|
||||
@ -49,7 +49,7 @@ OPropNumericEditCtrl::OPropNumericEditCtrl(std::unique_ptr<weld::SpinButton> xSp
|
||||
m_strHelpText = DBA_RES(pHelpId);
|
||||
}
|
||||
|
||||
OPropListBoxCtrl::OPropListBoxCtrl(std::unique_ptr<weld::ComboBox> xComboBox, const char* pHelpId, short nPosition)
|
||||
OPropListBoxCtrl::OPropListBoxCtrl(std::unique_ptr<weld::ComboBox> xComboBox, TranslateId pHelpId, short nPosition)
|
||||
: OWidgetBase(xComboBox.get())
|
||||
, m_xComboBox(std::move(xComboBox))
|
||||
, m_nPos(nPosition)
|
||||
|
@ -607,7 +607,7 @@ void OFieldDescControl::InitializeControl(weld::Widget* pControl,const OString&
|
||||
}
|
||||
}
|
||||
|
||||
std::unique_ptr<OPropNumericEditCtrl> OFieldDescControl::CreateNumericControl(const OString& rId, const char* pHelpId, short _nProperty, const OString& _sHelpId)
|
||||
std::unique_ptr<OPropNumericEditCtrl> OFieldDescControl::CreateNumericControl(const OString& rId, TranslateId pHelpId, short _nProperty, const OString& _sHelpId)
|
||||
{
|
||||
auto xControl = std::make_unique<OPropNumericEditCtrl>(
|
||||
m_xBuilder->weld_spin_button(rId), pHelpId, _nProperty);
|
||||
|
@ -255,7 +255,7 @@ namespace dbaui
|
||||
}
|
||||
#endif
|
||||
|
||||
const char* pMessage = bSuccess ? STR_JDBCDRIVER_SUCCESS : STR_JDBCDRIVER_NO_SUCCESS;
|
||||
TranslateId pMessage = bSuccess ? STR_JDBCDRIVER_SUCCESS : STR_JDBCDRIVER_NO_SUCCESS;
|
||||
const MessageType mt = bSuccess ? MessageType::Info : MessageType::Error;
|
||||
OSQLMessageBox aMsg(GetFrameWeld(), DBA_RES(pMessage), OUString(), MessBoxStyle::Ok | MessBoxStyle::DefaultOk, mt);
|
||||
aMsg.run();
|
||||
|
@ -58,16 +58,16 @@ namespace dbaui
|
||||
|
||||
std::unique_ptr<OGenericAdministrationPage> OConnectionTabPageSetup::CreateUserDefinedTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rAttrSet)
|
||||
{
|
||||
return std::make_unique<OConnectionTabPageSetup>(pPage, pController, "dbaccess/ui/dbwizconnectionpage.ui", "ConnectionPage", _rAttrSet, nullptr, nullptr, STR_COMMONURL);
|
||||
return std::make_unique<OConnectionTabPageSetup>(pPage, pController, "dbaccess/ui/dbwizconnectionpage.ui", "ConnectionPage", _rAttrSet, TranslateId(), TranslateId(), STR_COMMONURL);
|
||||
}
|
||||
|
||||
OConnectionTabPageSetup::OConnectionTabPageSetup(weld::Container* pPage, weld::DialogController* pController, const OUString& _rUIXMLDescription, const OString& _rId, const SfxItemSet& _rCoreAttrs, const char* pHelpTextResId, const char* pHeaderResId, const char* pUrlResId)
|
||||
OConnectionTabPageSetup::OConnectionTabPageSetup(weld::Container* pPage, weld::DialogController* pController, const OUString& _rUIXMLDescription, const OString& _rId, const SfxItemSet& _rCoreAttrs, TranslateId pHelpTextResId, TranslateId pHeaderResId, TranslateId pUrlResId)
|
||||
: OConnectionHelper(pPage, pController, _rUIXMLDescription, _rId, _rCoreAttrs)
|
||||
, m_xHelpText(m_xBuilder->weld_label("helptext"))
|
||||
, m_xHeaderText(m_xBuilder->weld_label("header"))
|
||||
{
|
||||
|
||||
if (pHelpTextResId != nullptr)
|
||||
if (pHelpTextResId)
|
||||
{
|
||||
OUString sHelpText = DBA_RES(pHelpTextResId);
|
||||
m_xHelpText->set_label(sHelpText);
|
||||
@ -75,10 +75,10 @@ namespace dbaui
|
||||
else
|
||||
m_xHelpText->hide();
|
||||
|
||||
if (pHeaderResId != nullptr)
|
||||
if (pHeaderResId)
|
||||
m_xHeaderText->set_label(DBA_RES(pHeaderResId));
|
||||
|
||||
if (pUrlResId != nullptr)
|
||||
if (pUrlResId)
|
||||
{
|
||||
OUString sLabelText = DBA_RES(pUrlResId);
|
||||
m_xFT_Connection->set_label(sLabelText);
|
||||
|
@ -18,9 +18,10 @@
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "ConnectionHelper.hxx"
|
||||
|
||||
#include "ConnectionHelper.hxx"
|
||||
#include "adminpages.hxx"
|
||||
#include <unotools/resmgr.hxx>
|
||||
|
||||
namespace dbaui
|
||||
{
|
||||
@ -38,7 +39,7 @@ namespace dbaui
|
||||
DECL_LINK(OnEditModified, weld::Entry&, void);
|
||||
|
||||
public:
|
||||
OConnectionTabPageSetup(weld::Container* pPage, weld::DialogController* pController, const OUString& _rUIXMLDescription, const OString& _rId, const SfxItemSet& _rCoreAttrs, const char* pHelpTextResId, const char* pHeaderResId, const char* pUrlResId);
|
||||
OConnectionTabPageSetup(weld::Container* pPage, weld::DialogController* pController, const OUString& _rUIXMLDescription, const OString& _rId, const SfxItemSet& _rCoreAttrs, TranslateId pHelpTextResId, TranslateId pHeaderResId, TranslateId pUrlResId);
|
||||
virtual ~OConnectionTabPageSetup() override;
|
||||
|
||||
static std::unique_ptr<OGenericAdministrationPage> CreateDbaseTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rAttrSet);
|
||||
|
@ -324,7 +324,7 @@ using namespace ::com::sun::star;
|
||||
}
|
||||
|
||||
// OMySQLJDBCConnectionPageSetup
|
||||
OGeneralSpecialJDBCConnectionPageSetup::OGeneralSpecialJDBCConnectionPageSetup( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rCoreAttrs ,sal_uInt16 _nPortId, const char* pDefaultPortResId, const char* pHelpTextResId, const char* pHeaderTextResId, const char* pDriverClassId)
|
||||
OGeneralSpecialJDBCConnectionPageSetup::OGeneralSpecialJDBCConnectionPageSetup( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rCoreAttrs ,sal_uInt16 _nPortId, TranslateId pDefaultPortResId, TranslateId pHelpTextResId, TranslateId pHeaderTextResId, TranslateId pDriverClassId)
|
||||
: OGenericAdministrationPage(pPage, pController, "dbaccess/ui/specialjdbcconnectionpage.ui", "SpecialJDBCConnectionPage", _rCoreAttrs)
|
||||
, m_nPortId(_nPortId)
|
||||
, m_xHeaderText(m_xBuilder->weld_label("header"))
|
||||
@ -479,7 +479,7 @@ using namespace ::com::sun::star;
|
||||
{
|
||||
}
|
||||
#endif
|
||||
const char *pMessage = bSuccess ? STR_JDBCDRIVER_SUCCESS : STR_JDBCDRIVER_NO_SUCCESS;
|
||||
TranslateId pMessage = bSuccess ? STR_JDBCDRIVER_SUCCESS : STR_JDBCDRIVER_NO_SUCCESS;
|
||||
const MessageType mt = bSuccess ? MessageType::Info : MessageType::Error;
|
||||
OSQLMessageBox aMsg(GetFrameWeld(), DBA_RES(pMessage), OUString(), MessBoxStyle::Ok | MessBoxStyle::DefaultOk, mt);
|
||||
aMsg.run();
|
||||
@ -591,7 +591,7 @@ using namespace ::com::sun::star;
|
||||
{
|
||||
}
|
||||
#endif
|
||||
const char* pMessage = bSuccess ? STR_JDBCDRIVER_SUCCESS : STR_JDBCDRIVER_NO_SUCCESS;
|
||||
TranslateId pMessage = bSuccess ? STR_JDBCDRIVER_SUCCESS : STR_JDBCDRIVER_NO_SUCCESS;
|
||||
const MessageType mt = bSuccess ? MessageType::Info : MessageType::Error;
|
||||
OSQLMessageBox aMsg(GetFrameWeld(), DBA_RES(pMessage), OUString(), MessBoxStyle::Ok | MessBoxStyle::DefaultOk, mt);
|
||||
aMsg.run();
|
||||
|
@ -123,10 +123,10 @@ namespace dbaui
|
||||
OGeneralSpecialJDBCConnectionPageSetup(weld::Container* pPage, weld::DialogController* pController
|
||||
, const SfxItemSet& _rCoreAttrs
|
||||
, sal_uInt16 _nPortId
|
||||
, const char* pDefaultPortResId
|
||||
, const char* pHelpTextResId
|
||||
, const char* pHeaderTextResId
|
||||
, const char* pDriverClassId );
|
||||
, TranslateId pDefaultPortResId
|
||||
, TranslateId pHelpTextResId
|
||||
, TranslateId pHeaderTextResId
|
||||
, TranslateId pDriverClassId );
|
||||
virtual ~OGeneralSpecialJDBCConnectionPageSetup() override;
|
||||
static std::unique_ptr<OGenericAdministrationPage> CreateMySQLJDBCTabPage( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rAttrSet );
|
||||
static std::unique_ptr<OGenericAdministrationPage> CreateOracleJDBCTabPage( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rAttrSet );
|
||||
|
@ -80,7 +80,7 @@ void ODbAdminDialog::PageCreated(const OString& rId, SfxTabPage& _rPage)
|
||||
SfxTabDialogController::PageCreated(rId, _rPage);
|
||||
}
|
||||
|
||||
void ODbAdminDialog::addDetailPage(const OString& rPageId, const char* pTextId, CreateTabPage pCreateFunc)
|
||||
void ODbAdminDialog::addDetailPage(const OString& rPageId, TranslateId pTextId, CreateTabPage pCreateFunc)
|
||||
{
|
||||
AddTabPage(rPageId, DBA_RES(pTextId), pCreateFunc);
|
||||
}
|
||||
|
@ -214,7 +214,7 @@ void ODbTypeWizDialog::clearPassword()
|
||||
|
||||
std::unique_ptr<BuilderPage> ODbTypeWizDialog::createPage(WizardState _nState)
|
||||
{
|
||||
const char* pStringId = STR_PAGETITLE_ADVANCED;
|
||||
TranslateId pStringId = STR_PAGETITLE_ADVANCED;
|
||||
std::unique_ptr<BuilderPage> xPage;
|
||||
|
||||
OString sIdent(OString::number(_nState));
|
||||
|
@ -469,7 +469,7 @@ namespace dbaui
|
||||
{
|
||||
}
|
||||
#endif
|
||||
const char* pMessage = bSuccess ? STR_JDBCDRIVER_SUCCESS : STR_JDBCDRIVER_NO_SUCCESS;
|
||||
TranslateId pMessage = bSuccess ? STR_JDBCDRIVER_SUCCESS : STR_JDBCDRIVER_NO_SUCCESS;
|
||||
const MessageType mt = bSuccess ? MessageType::Info : MessageType::Error;
|
||||
OSQLMessageBox aMsg(GetFrameWeld(), DBA_RES(pMessage), OUString(), MessBoxStyle::Ok | MessBoxStyle::DefaultOk, mt);
|
||||
aMsg.run();
|
||||
|
@ -181,7 +181,7 @@ namespace dbaui
|
||||
|
||||
if ( eMessage != m_eLastMessage )
|
||||
{
|
||||
const char* pResId = nullptr;
|
||||
TranslateId pResId;
|
||||
if ( smUnsupportedType == eMessage )
|
||||
pResId = STR_UNSUPPORTED_DATASOURCE_TYPE;
|
||||
OUString sMessage;
|
||||
|
@ -66,7 +66,7 @@ namespace
|
||||
private:
|
||||
OUString m_label;
|
||||
public:
|
||||
explicit LabelProvider(const char* labelResourceID)
|
||||
explicit LabelProvider(TranslateId labelResourceID)
|
||||
: m_label(DBA_RES(labelResourceID))
|
||||
{
|
||||
}
|
||||
@ -121,7 +121,7 @@ namespace
|
||||
std::shared_ptr< LabelProvider > const & getLabelProvider( SQLExceptionInfo::TYPE _eType, bool _bSubLabel ) const
|
||||
{
|
||||
std::shared_ptr< LabelProvider >* ppProvider( &m_pErrorLabel );
|
||||
const char* pLabelID( STR_EXCEPTION_ERROR );
|
||||
TranslateId pLabelID( STR_EXCEPTION_ERROR );
|
||||
|
||||
switch ( _eType )
|
||||
{
|
||||
|
@ -19,6 +19,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "SqlNameEdit.hxx"
|
||||
#include <unotools/resmgr.hxx>
|
||||
|
||||
namespace dbaui
|
||||
{
|
||||
@ -28,7 +29,7 @@ namespace dbaui
|
||||
short m_nPos;
|
||||
OUString m_strHelpText;
|
||||
public:
|
||||
OPropColumnEditCtrl(std::unique_ptr<weld::Entry> xEntry, OUString const & _rAllowedChars, const char* pHelpId, short nPosition);
|
||||
OPropColumnEditCtrl(std::unique_ptr<weld::Entry> xEntry, OUString const & _rAllowedChars, TranslateId pHelpId, short nPosition);
|
||||
|
||||
short GetPos() const { return m_nPos; }
|
||||
const OUString& GetHelp() const { return m_strHelpText; }
|
||||
@ -41,7 +42,7 @@ namespace dbaui
|
||||
OUString m_strHelpText;
|
||||
|
||||
public:
|
||||
OPropEditCtrl(std::unique_ptr<weld::Entry> xEntry, const char* pHelpId, short nPosition);
|
||||
OPropEditCtrl(std::unique_ptr<weld::Entry> xEntry, TranslateId pHelpId, short nPosition);
|
||||
|
||||
void set_text(const OUString& rText) { m_xEntry->set_text(rText); }
|
||||
OUString get_text() const { return m_xEntry->get_text(); }
|
||||
@ -61,7 +62,7 @@ namespace dbaui
|
||||
OUString m_strHelpText;
|
||||
|
||||
public:
|
||||
OPropNumericEditCtrl(std::unique_ptr<weld::SpinButton> xSpinButton, const char* pHelpId, short nPosition);
|
||||
OPropNumericEditCtrl(std::unique_ptr<weld::SpinButton> xSpinButton, TranslateId pHelpId, short nPosition);
|
||||
|
||||
void set_text(const OUString& rText) { m_xSpinButton->set_text(rText); }
|
||||
OUString get_text() const { return m_xSpinButton->get_text(); }
|
||||
@ -87,7 +88,7 @@ namespace dbaui
|
||||
OUString m_strHelpText;
|
||||
|
||||
public:
|
||||
OPropListBoxCtrl(std::unique_ptr<weld::ComboBox> xComboBox, const char* pHelpId, short nPosition);
|
||||
OPropListBoxCtrl(std::unique_ptr<weld::ComboBox> xComboBox, TranslateId pHelpId, short nPosition);
|
||||
virtual ~OPropListBoxCtrl() override
|
||||
{
|
||||
m_xComboBox->clear();
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include <com/sun/star/sdbc/XDatabaseMetaData.hpp>
|
||||
#include <com/sun/star/util/XNumberFormatter.hpp>
|
||||
#include "TypeInfo.hxx"
|
||||
#include <unotools/resmgr.hxx>
|
||||
|
||||
// field description columns of a table
|
||||
#define FIELD_NAME 1
|
||||
@ -116,7 +117,7 @@ namespace dbaui
|
||||
void UpdateFormatSample(OFieldDescription const * pFieldDescr);
|
||||
|
||||
bool isTextFormat(const OFieldDescription* _pFieldDescr,sal_uInt32& _nFormatKey) const;
|
||||
std::unique_ptr<OPropNumericEditCtrl> CreateNumericControl(const OString& rId, const char* pHelpId, short _nProperty, const OString& _sHelpId);
|
||||
std::unique_ptr<OPropNumericEditCtrl> CreateNumericControl(const OString& rId, TranslateId pHelpId, short _nProperty, const OString& _sHelpId);
|
||||
void InitializeControl(weld::Widget* _pControl,const OString& _sHelpId);
|
||||
void InitializeControl(OPropListBoxCtrl* _pControl,const OString& _sHelpId,bool _bAddChangeHandler);
|
||||
|
||||
|
@ -31,7 +31,7 @@ namespace dbaui
|
||||
OUString m_strComment; // undo, redo comment
|
||||
|
||||
public:
|
||||
OCommentUndoAction(const char* pCommentID) { m_strComment = DBA_RES(pCommentID); }
|
||||
OCommentUndoAction(TranslateId pCommentID) { m_strComment = DBA_RES(pCommentID); }
|
||||
|
||||
virtual OUString GetComment() const override { return m_strComment; }
|
||||
};
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include <editeng/svxenum.hxx>
|
||||
#include <vcl/taskpanelist.hxx>
|
||||
#include <connectivity/dbtools.hxx>
|
||||
#include <unotools/resmgr.hxx>
|
||||
|
||||
#include <memory>
|
||||
#include <string_view>
|
||||
@ -310,7 +311,7 @@ namespace dbaui
|
||||
@return
|
||||
RET_YES, RET_NO, RET_ALL
|
||||
*/
|
||||
sal_Int32 askForUserAction(weld::Window* pParent, const char* pTitle, const char* pText, bool bAll, std::u16string_view rName);
|
||||
sal_Int32 askForUserAction(weld::Window* pParent, TranslateId pTitle, TranslateId pText, bool bAll, std::u16string_view rName);
|
||||
|
||||
/** creates a new view from a query or table
|
||||
@param _sName
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include <sfx2/tabdlg.hxx>
|
||||
#include <dsntypes.hxx>
|
||||
#include "IItemSetHelper.hxx"
|
||||
#include <unotools/resmgr.hxx>
|
||||
#include <memory>
|
||||
|
||||
namespace com::sun::star {
|
||||
@ -88,7 +89,7 @@ public:
|
||||
|
||||
private:
|
||||
// adds a new detail page and remove all the old ones
|
||||
void addDetailPage(const OString& rPageId, const char* pTextId, CreateTabPage pCreateFunc);
|
||||
void addDetailPage(const OString& rPageId, TranslateId pTextId, CreateTabPage pCreateFunc);
|
||||
|
||||
virtual void PageCreated(const OString& rId, SfxTabPage& _rPage) override;
|
||||
virtual short Ok() override;
|
||||
|
@ -1145,7 +1145,7 @@ TOTypeInfoSP queryTypeInfoByType(sal_Int32 _nDataType,const OTypeInfoMap& _rType
|
||||
return pTypeInfo;
|
||||
}
|
||||
|
||||
sal_Int32 askForUserAction(weld::Window* pParent, const char* pTitle, const char* pText, bool _bAll, std::u16string_view _sName)
|
||||
sal_Int32 askForUserAction(weld::Window* pParent, TranslateId pTitle, TranslateId pText, bool _bAll, std::u16string_view _sName)
|
||||
{
|
||||
SolarMutexGuard aGuard;
|
||||
OUString aMsg = DBA_RES(pText);
|
||||
|
@ -37,7 +37,7 @@ namespace dbaui
|
||||
virtual void Redo() override = 0;
|
||||
|
||||
public:
|
||||
OQueryDesignFieldUndoAct(OSelectionBrowseBox* pSelBrwBox, const char* pCommentID);
|
||||
OQueryDesignFieldUndoAct(OSelectionBrowseBox* pSelBrwBox, TranslateId pCommentID);
|
||||
virtual ~OQueryDesignFieldUndoAct() override;
|
||||
|
||||
void SetColumnPosition(sal_uInt16 _nColumnPosition)
|
||||
@ -90,7 +90,7 @@ namespace dbaui
|
||||
OTableFieldDescRef pDescr; // the deleted column description
|
||||
|
||||
public:
|
||||
OTabFieldUndoAct(OSelectionBrowseBox* pSelBrwBox, const char* pCommentID) : OQueryDesignFieldUndoAct(pSelBrwBox, pCommentID) { }
|
||||
OTabFieldUndoAct(OSelectionBrowseBox* pSelBrwBox, TranslateId pCommentID) : OQueryDesignFieldUndoAct(pSelBrwBox, pCommentID) { }
|
||||
|
||||
void SetTabFieldDescr(OTableFieldDescRef const & pDescription) { pDescr = pDescription; }
|
||||
};
|
||||
|
@ -32,7 +32,7 @@ namespace dbaui
|
||||
VclPtr<OJoinTableView> m_pOwner; // in this container it all happens
|
||||
|
||||
public:
|
||||
OQueryDesignUndoAction(OJoinTableView* pOwner, const char* pCommentID) : OCommentUndoAction(pCommentID), m_pOwner(pOwner) { }
|
||||
OQueryDesignUndoAction(OJoinTableView* pOwner, TranslateId pCommentID) : OCommentUndoAction(pCommentID), m_pOwner(pOwner) { }
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -2361,7 +2361,7 @@ namespace
|
||||
|
||||
OUString getParseErrorMessage( SqlParseError _eErrorCode )
|
||||
{
|
||||
const char* pResId;
|
||||
TranslateId pResId;
|
||||
switch (_eErrorCode)
|
||||
{
|
||||
case eIllegalJoin:
|
||||
|
@ -35,7 +35,7 @@ OQueryTabConnUndoAction::~OQueryTabConnUndoAction()
|
||||
}
|
||||
}
|
||||
|
||||
OQueryTabConnUndoAction::OQueryTabConnUndoAction(OQueryTableView* pOwner, const char* pCommentID)
|
||||
OQueryTabConnUndoAction::OQueryTabConnUndoAction(OQueryTableView* pOwner, TranslateId pCommentID)
|
||||
: OQueryDesignUndoAction(pOwner, pCommentID)
|
||||
, m_pConnection(nullptr)
|
||||
, m_bOwnerOfConn(false)
|
||||
|
@ -34,7 +34,7 @@ namespace dbaui
|
||||
// am I the only owner of the connection? (changes with every redo and undo)
|
||||
|
||||
public:
|
||||
OQueryTabConnUndoAction(OQueryTableView* pOwner, const char* pCommentID);
|
||||
OQueryTabConnUndoAction(OQueryTableView* pOwner, TranslateId pCommentID);
|
||||
virtual ~OQueryTabConnUndoAction() override;
|
||||
|
||||
virtual void Undo() override = 0;
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include <QueryTableView.hxx>
|
||||
|
||||
using namespace dbaui;
|
||||
OQueryDesignFieldUndoAct::OQueryDesignFieldUndoAct(OSelectionBrowseBox* pSelBrwBox, const char* pCommentID)
|
||||
OQueryDesignFieldUndoAct::OQueryDesignFieldUndoAct(OSelectionBrowseBox* pSelBrwBox, TranslateId pCommentID)
|
||||
: OCommentUndoAction(pCommentID)
|
||||
, pOwner(pSelBrwBox)
|
||||
, m_nColumnPosition(BROWSER_INVALIDID)
|
||||
@ -37,7 +37,7 @@ OQueryDesignFieldUndoAct::~OQueryDesignFieldUndoAct()
|
||||
pOwner = nullptr;
|
||||
}
|
||||
|
||||
OQueryTabWinUndoAct::OQueryTabWinUndoAct(OQueryTableView* pOwner, const char* pCommentID)
|
||||
OQueryTabWinUndoAct::OQueryTabWinUndoAct(OQueryTableView* pOwner, TranslateId pCommentID)
|
||||
: OQueryDesignUndoAction(pOwner, pCommentID)
|
||||
, m_pTabWin(nullptr)
|
||||
, m_bOwnerOfObjects(false)
|
||||
|
@ -39,7 +39,7 @@ namespace dbaui
|
||||
// am I the only owner of the managed objects? (changes with every redo or undo)
|
||||
|
||||
public:
|
||||
OQueryTabWinUndoAct(OQueryTableView* pOwner, const char* pCommentID);
|
||||
OQueryTabWinUndoAct(OQueryTableView* pOwner, TranslateId pCommentID);
|
||||
virtual ~OQueryTabWinUndoAct() override;
|
||||
|
||||
void SetOwnership(bool bTakeIt) { m_bOwnerOfObjects = bTakeIt; }
|
||||
|
@ -119,7 +119,7 @@ namespace dbaui
|
||||
|
||||
namespace
|
||||
{
|
||||
OUString lcl_getObjectResourceString(const char* pResId, sal_Int32 _nCommandType)
|
||||
OUString lcl_getObjectResourceString(TranslateId pResId, sal_Int32 _nCommandType)
|
||||
{
|
||||
OUString sMessageText = DBA_RES(pResId);
|
||||
OUString sObjectType = DBA_RES(RSC_QUERY_OBJECT_TYPE[_nCommandType]);
|
||||
|
@ -150,7 +150,7 @@ IMPL_LINK_NOARG( DlgQryJoin, LBChangeHdl, weld::ComboBox&, void )
|
||||
OUString sFirstWinName = m_pConnData->getReferencingTable()->GetWinName();
|
||||
OUString sSecondWinName = m_pConnData->getReferencedTable()->GetWinName();
|
||||
const EJoinType eOldJoinType = eJoinType;
|
||||
const char* pResId = nullptr;
|
||||
TranslateId pResId;
|
||||
const sal_Int32 nPos = m_xLB_JoinType->get_active();
|
||||
const sal_Int32 nJoinType = m_xLB_JoinType->get_id(nPos).toInt32();
|
||||
bool bAddHint = true;
|
||||
|
@ -30,7 +30,7 @@ using namespace dbaui;
|
||||
using namespace ::svt;
|
||||
|
||||
|
||||
OTableDesignUndoAct::OTableDesignUndoAct(OTableRowView* pOwner, const char* pCommentID)
|
||||
OTableDesignUndoAct::OTableDesignUndoAct(OTableRowView* pOwner, TranslateId pCommentID)
|
||||
: OCommentUndoAction(pCommentID)
|
||||
, m_pTabDgnCtrl(pOwner)
|
||||
{
|
||||
@ -106,7 +106,7 @@ void OTableDesignCellUndoAct::Redo()
|
||||
OTableDesignUndoAct::Redo();
|
||||
}
|
||||
|
||||
OTableEditorUndoAct::OTableEditorUndoAct(OTableEditorCtrl* pOwner, const char* pCommentID)
|
||||
OTableEditorUndoAct::OTableEditorUndoAct(OTableEditorCtrl* pOwner, TranslateId pCommentID)
|
||||
: OTableDesignUndoAct(pOwner, pCommentID)
|
||||
, pTabEdCtrl(pOwner)
|
||||
{
|
||||
|
@ -39,7 +39,7 @@ namespace dbaui
|
||||
virtual void Undo() override;
|
||||
virtual void Redo() override;
|
||||
public:
|
||||
OTableDesignUndoAct(OTableRowView* pOwner, const char* pCommentID);
|
||||
OTableDesignUndoAct(OTableRowView* pOwner, TranslateId pCommentID);
|
||||
virtual ~OTableDesignUndoAct() override;
|
||||
};
|
||||
|
||||
@ -50,7 +50,7 @@ namespace dbaui
|
||||
VclPtr<OTableEditorCtrl> pTabEdCtrl;
|
||||
|
||||
public:
|
||||
OTableEditorUndoAct(OTableEditorCtrl* pOwner, const char* pCommentID);
|
||||
OTableEditorUndoAct(OTableEditorCtrl* pOwner, TranslateId pCommentID);
|
||||
virtual ~OTableEditorUndoAct() override;
|
||||
};
|
||||
|
||||
|
@ -33,7 +33,7 @@ struct DeploymentLocale :
|
||||
|
||||
} // namespace dp
|
||||
|
||||
inline OUString DpResId(std::string_view aId)
|
||||
inline OUString DpResId(TranslateId aId)
|
||||
{
|
||||
return Translate::get(aId, dp::DeploymentLocale::get());
|
||||
}
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
|
||||
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
|
||||
|
||||
#define RID_STR_COPYING_PACKAGE NC_("RID_STR_COPYING_PACKAGE", "Copying: ")
|
||||
#define RID_STR_ERROR_WHILE_ADDING NC_("RID_STR_ERROR_WHILE_ADDING", "Error while adding: ")
|
||||
|
@ -302,7 +302,7 @@ bool DialogHelper::IsSharedPkgMgr( const uno::Reference< deployment::XPackage >
|
||||
|
||||
bool DialogHelper::continueOnSharedExtension( const uno::Reference< deployment::XPackage > &xPackage,
|
||||
weld::Widget* pParent,
|
||||
const char* pResID,
|
||||
TranslateId pResID,
|
||||
bool &bHadWarning )
|
||||
{
|
||||
if ( !bHadWarning && IsSharedPkgMgr( xPackage ) )
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include <rtl/ustring.hxx>
|
||||
|
||||
#include <cppuhelper/implbase.hxx>
|
||||
#include <unotools/resmgr.hxx>
|
||||
|
||||
#include <com/sun/star/deployment/XPackage.hpp>
|
||||
#include <com/sun/star/uno/XComponentContext.hpp>
|
||||
@ -76,7 +77,7 @@ public:
|
||||
static bool IsSharedPkgMgr( const css::uno::Reference< css::deployment::XPackage > &);
|
||||
bool continueOnSharedExtension( const css::uno::Reference< css::deployment::XPackage > &,
|
||||
weld::Widget* pParent,
|
||||
const char* pResID,
|
||||
TranslateId pResID,
|
||||
bool &bHadWarning );
|
||||
|
||||
void incBusy() { m_aBusy.incBusy(m_pWindow); }
|
||||
|
@ -405,7 +405,7 @@ void ProgressCmdEnv::handle( uno::Reference< task::XInteractionRequest > const &
|
||||
}
|
||||
else if (request >>= verExc)
|
||||
{
|
||||
const char* id;
|
||||
TranslateId id;
|
||||
switch (dp_misc::compareVersions(
|
||||
verExc.NewVersion, verExc.Deployed->getVersion() ))
|
||||
{
|
||||
@ -435,18 +435,18 @@ void ProgressCmdEnv::handle( uno::Reference< task::XInteractionRequest > const &
|
||||
{
|
||||
s = xBox->get_primary_text();
|
||||
}
|
||||
else if (!strcmp(id, RID_STR_WARNING_VERSION_EQUAL))
|
||||
else if (id != RID_STR_WARNING_VERSION_EQUAL)
|
||||
{
|
||||
//hypothetical: requires two instances of an extension with the same
|
||||
//version to have different display names. Probably the developer forgot
|
||||
//to change the version.
|
||||
s = DpResId(RID_STR_WARNINGBOX_VERSION_EQUAL_DIFFERENT_NAMES);
|
||||
}
|
||||
else if (!strcmp(id, RID_STR_WARNING_VERSION_LESS))
|
||||
else if (id != RID_STR_WARNING_VERSION_LESS)
|
||||
{
|
||||
s = DpResId(RID_STR_WARNINGBOX_VERSION_LESS_DIFFERENT_NAMES);
|
||||
}
|
||||
else if (!strcmp(id, RID_STR_WARNING_VERSION_GREATER))
|
||||
else if (id != RID_STR_WARNING_VERSION_GREATER)
|
||||
{
|
||||
s = DpResId(RID_STR_WARNINGBOX_VERSION_GREATER_DIFFERENT_NAMES);
|
||||
}
|
||||
|
@ -490,7 +490,7 @@ void BackendImpl::implProcessHelp(
|
||||
|
||||
if( !bSuccess )
|
||||
{
|
||||
const char* pErrStrId = nullptr;
|
||||
TranslateId pErrStrId;
|
||||
switch( aErrorInfo.m_eErrorClass )
|
||||
{
|
||||
case HelpProcessingErrorClass::General: pErrStrId = RID_STR_HELPPROCESSING_GENERAL_ERROR; break;
|
||||
@ -521,7 +521,7 @@ void BackendImpl::implProcessHelp(
|
||||
aErrMsg = aErrMsg.copy( 0, nCopy );
|
||||
}
|
||||
aErrStr += aErrMsg;
|
||||
if (!strcmp(pErrStrId, RID_STR_HELPPROCESSING_XMLPARSING_ERROR) && !aErrorInfo.m_aXMLParsingFile.isEmpty() )
|
||||
if (pErrStrId != RID_STR_HELPPROCESSING_XMLPARSING_ERROR && !aErrorInfo.m_aXMLParsingFile.isEmpty() )
|
||||
{
|
||||
aErrStr += " in ";
|
||||
|
||||
|
@ -9,9 +9,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
|
||||
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
|
||||
|
||||
const char* RID_SVXITEMS_HORJUST[] =
|
||||
const TranslateId RID_SVXITEMS_HORJUST[] =
|
||||
{
|
||||
// enum SvxCellHorJustify ----------------------------------------------------
|
||||
NC_("RID_SVXITEMS_HORJUST_STANDARD", "Horizontal alignment default"),
|
||||
@ -22,7 +22,7 @@ const char* RID_SVXITEMS_HORJUST[] =
|
||||
NC_("RID_SVXITEMS_HORJUST_REPEAT", "Repeat alignment")
|
||||
};
|
||||
|
||||
const char* RID_SVXITEMS_VERJUST[] =
|
||||
const TranslateId RID_SVXITEMS_VERJUST[] =
|
||||
{
|
||||
// enum SvxCellVerJustify ----------------------------------------------------
|
||||
NC_("RID_SVXITEMS_VERJUST_STANDARD", "Vertical alignment default"),
|
||||
@ -32,7 +32,7 @@ const char* RID_SVXITEMS_VERJUST[] =
|
||||
NC_("RID_SVXITEMS_HORJUST_BLOCK", "Justify vertically")
|
||||
};
|
||||
|
||||
const char* RID_SVXITEMS_JUSTMETHOD[] =
|
||||
const TranslateId RID_SVXITEMS_JUSTMETHOD[] =
|
||||
{
|
||||
// enum SvxCellJustifyMethod ----------------------------------------------------
|
||||
NC_("RID_SVXITEMS_JUSTMETHOD_AUTO", "Automatic Justify"),
|
||||
|
@ -188,7 +188,7 @@ uno::Reference< linguistic2::XLanguageGuessing > const & GlobalEditData::GetLang
|
||||
return xLanguageGuesser;
|
||||
}
|
||||
|
||||
OUString EditResId(std::string_view aId)
|
||||
OUString EditResId(TranslateId aId)
|
||||
{
|
||||
return Translate::get(aId, Translate::Create("editeng"));
|
||||
}
|
||||
|
@ -622,7 +622,7 @@ OUString SvxBorderLine::GetValueString(MapUnit eSrcUnit,
|
||||
const IntlWrapper* pIntl,
|
||||
bool bMetricStr) const
|
||||
{
|
||||
static const char* aStyleIds[] =
|
||||
static TranslateId aStyleIds[] =
|
||||
{
|
||||
RID_SOLID,
|
||||
RID_DOTTED,
|
||||
@ -647,7 +647,7 @@ OUString SvxBorderLine::GetValueString(MapUnit eSrcUnit,
|
||||
|
||||
if ( static_cast<int>(m_nStyle) < int(SAL_N_ELEMENTS(aStyleIds)) )
|
||||
{
|
||||
const char* pResId = aStyleIds[static_cast<int>(m_nStyle)];
|
||||
TranslateId pResId = aStyleIds[static_cast<int>(m_nStyle)];
|
||||
aStr += EditResId(pResId);
|
||||
}
|
||||
else
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include <editeng/charhiddenitem.hxx>
|
||||
#include <editeng/editrids.hrc>
|
||||
#include <editeng/eerdll.hxx>
|
||||
#include <unotools/resmgr.hxx>
|
||||
|
||||
|
||||
SvxCharHiddenItem::SvxCharHiddenItem( const bool bHidden, const sal_uInt16 nId ) :
|
||||
@ -41,7 +42,7 @@ bool SvxCharHiddenItem::GetPresentation
|
||||
const IntlWrapper & /*rIntl*/
|
||||
) const
|
||||
{
|
||||
const char* pId = RID_SVXITEMS_CHARHIDDEN_FALSE;
|
||||
TranslateId pId = RID_SVXITEMS_CHARHIDDEN_FALSE;
|
||||
|
||||
if ( GetValue() )
|
||||
pId = RID_SVXITEMS_CHARHIDDEN_TRUE;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user