summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/misc
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 /dbaccess/source/ui/misc
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 'dbaccess/source/ui/misc')
-rw-r--r--dbaccess/source/ui/misc/DExport.cxx10
-rw-r--r--dbaccess/source/ui/misc/HtmlReader.cxx11
-rw-r--r--dbaccess/source/ui/misc/RowSetDrop.cxx10
-rw-r--r--dbaccess/source/ui/misc/RtfReader.cxx13
-rw-r--r--dbaccess/source/ui/misc/TableCopyHelper.cxx13
-rw-r--r--dbaccess/source/ui/misc/TokenWriter.cxx3
-rw-r--r--dbaccess/source/ui/misc/UITools.cxx25
-rw-r--r--dbaccess/source/ui/misc/WCPage.cxx19
-rw-r--r--dbaccess/source/ui/misc/WColumnSelect.cxx9
-rw-r--r--dbaccess/source/ui/misc/WCopyTable.cxx22
-rw-r--r--dbaccess/source/ui/misc/WNameMatch.cxx5
-rw-r--r--dbaccess/source/ui/misc/WTypeSelect.cxx9
-rw-r--r--dbaccess/source/ui/misc/WizardPages.src83
-rw-r--r--dbaccess/source/ui/misc/charsets.cxx17
-rw-r--r--dbaccess/source/ui/misc/databaseobjectview.cxx3
-rw-r--r--dbaccess/source/ui/misc/datasourceconnector.cxx10
-rw-r--r--dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx14
-rw-r--r--dbaccess/source/ui/misc/dbumiscres.src88
-rw-r--r--dbaccess/source/ui/misc/defaultobjectnamecheck.cxx7
-rw-r--r--dbaccess/source/ui/misc/imageprovider.cxx6
-rw-r--r--dbaccess/source/ui/misc/linkeddocuments.cxx16
-rw-r--r--dbaccess/source/ui/misc/moduledbu.cxx101
-rw-r--r--dbaccess/source/ui/misc/singledoccontroller.cxx11
23 files changed, 129 insertions, 376 deletions
diff --git a/dbaccess/source/ui/misc/DExport.cxx b/dbaccess/source/ui/misc/DExport.cxx
index 1e8cc8d585e7..7851fc23e46f 100644
--- a/dbaccess/source/ui/misc/DExport.cxx
+++ b/dbaccess/source/ui/misc/DExport.cxx
@@ -18,7 +18,7 @@
*/
#include "DExport.hxx"
-#include "moduledbu.hxx"
+#include "core_resource.hxx"
#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
#include <com/sun/star/sdbcx/XDataDescriptorFactory.hpp>
@@ -33,8 +33,10 @@
#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/util/NumberFormat.hpp>
#include <com/sun/star/util/XNumberFormatTypes.hpp>
-#include "dbustrings.hrc"
-#include "dbu_misc.hrc"
+#include "core_resource.hxx"
+#include "stringconstants.hxx"
+#include "strings.hrc"
+#include "strings.hxx"
#include <connectivity/dbconversion.hxx>
#include <osl/thread.h>
#include <sfx2/sfxhtml.hxx>
@@ -746,7 +748,7 @@ void ODatabaseExport::showErrorDialog(const css::sdbc::SQLException& e)
{
OUString aMsg = e.Message
+ "\n"
- + OUString(ModuleRes( STR_QRY_CONTINUE ));
+ + DBA_RES( STR_QRY_CONTINUE );
ScopedVclPtrInstance< OSQLWarningBox > aBox( nullptr, aMsg, WB_YES_NO | WB_DEF_NO );
if (aBox->Execute() == RET_YES)
diff --git a/dbaccess/source/ui/misc/HtmlReader.cxx b/dbaccess/source/ui/misc/HtmlReader.cxx
index fc14c73d3775..e7fa222acbe8 100644
--- a/dbaccess/source/ui/misc/HtmlReader.cxx
+++ b/dbaccess/source/ui/misc/HtmlReader.cxx
@@ -25,11 +25,11 @@
#include <tools/tenccvt.hxx>
#include <comphelper/extract.hxx>
#include <comphelper/string.hxx>
-#include "dbu_misc.hrc"
-#include "dbustrings.hrc"
+#include "strings.hrc"
+#include "stringconstants.hxx"
#include <sfx2/sfxhtml.hxx>
#include <osl/diagnose.h>
-#include "moduledbu.hxx"
+#include "core_resource.hxx"
#include <com/sun/star/sdbcx/XDataDescriptorFactory.hpp>
#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
#include <com/sun/star/sdbcx/XAppend.hpp>
@@ -52,6 +52,7 @@
#include "QEnumTypes.hxx"
#include "WCPage.hxx"
#include <rtl/tencinfo.h>
+#include "core_resource.hxx"
#include "UITools.hxx"
#include <vcl/svapp.hxx>
#include <vcl/settings.hxx>
@@ -390,7 +391,7 @@ sal_Int16 OHTMLReader::GetWidthPixel( const HTMLOption& rOption )
bool OHTMLReader::CreateTable(HtmlTokenId nToken)
{
- OUString aTempName(ModuleRes(STR_TBL_TITLE));
+ OUString aTempName(DBA_RES(STR_TBL_TITLE));
aTempName = aTempName.getToken(0,' ');
aTempName = ::dbtools::createUniqueName(m_xTables, aTempName);
@@ -429,7 +430,7 @@ bool OHTMLReader::CreateTable(HtmlTokenId nToken)
{
aColumnName = comphelper::string::strip(aColumnName, ' ' );
if (aColumnName.isEmpty() || m_bAppendFirstLine )
- aColumnName = ModuleRes(STR_COLUMN_NAME);
+ aColumnName = DBA_RES(STR_COLUMN_NAME);
else if ( !m_sCurrent.isEmpty() )
aColumnName = m_sCurrent;
diff --git a/dbaccess/source/ui/misc/RowSetDrop.cxx b/dbaccess/source/ui/misc/RowSetDrop.cxx
index 10915243142d..94f6b2182b35 100644
--- a/dbaccess/source/ui/misc/RowSetDrop.cxx
+++ b/dbaccess/source/ui/misc/RowSetDrop.cxx
@@ -21,10 +21,12 @@
#include "TokenWriter.hxx"
#include <com/sun/star/sdbc/XColumnLocate.hpp>
#include <com/sun/star/sdbc/XResultSetMetaDataSupplier.hpp>
-#include "dbu_misc.hrc"
+#include "core_resource.hxx"
+#include "strings.hrc"
+#include "strings.hxx"
#include "sqlmessage.hxx"
#include <vcl/msgbox.hxx>
-#include "dbustrings.hrc"
+#include "stringconstants.hxx"
#include <com/sun/star/sdbc/XRowUpdate.hpp>
#include <functional>
@@ -61,7 +63,7 @@ void ORowSetImportExport::initialize()
m_xTargetResultSetMetaData = Reference<XResultSetMetaDataSupplier>(m_xTargetResultSetUpdate,UNO_QUERY)->getMetaData();
if(!m_xTargetResultSetMetaData.is() || !xColumnLocate.is() || !m_xResultSetMetaData.is() )
- throw SQLException(ModuleRes(STR_UNEXPECTED_ERROR),*this,"S1000",0,Any());
+ throw SQLException(DBA_RES(STR_UNEXPECTED_ERROR),*this,"S1000",0,Any());
sal_Int32 nCount = m_xTargetResultSetMetaData->getColumnCount();
m_aColumnMapping.reserve(nCount);
@@ -236,7 +238,7 @@ bool ORowSetImportExport::insertNewRow()
{
if(!m_bAlreadyAsked)
{
- OUString sAskIfContinue = ModuleRes(STR_ERROR_OCCURRED_WHILE_COPYING);
+ OUString sAskIfContinue = DBA_RES(STR_ERROR_OCCURRED_WHILE_COPYING);
ScopedVclPtrInstance< OSQLWarningBox > aDlg( m_pParent, sAskIfContinue, WB_YES_NO | WB_DEF_YES );
if(aDlg->Execute() == RET_YES)
m_bAlreadyAsked = true;
diff --git a/dbaccess/source/ui/misc/RtfReader.cxx b/dbaccess/source/ui/misc/RtfReader.cxx
index 613af226b697..1cf32f7846f5 100644
--- a/dbaccess/source/ui/misc/RtfReader.cxx
+++ b/dbaccess/source/ui/misc/RtfReader.cxx
@@ -31,10 +31,11 @@
#include <com/sun/star/awt/FontUnderline.hpp>
#include <com/sun/star/util/NumberFormat.hpp>
#include <com/sun/star/util/XNumberFormatTypes.hpp>
-#include "dbustrings.hrc"
+#include "core_resource.hxx"
+#include "stringconstants.hxx"
#include <svtools/rtftoken.h>
#include <toolkit/helper/vclunohelper.hxx>
-#include "dbu_misc.hrc"
+#include "strings.hrc"
#include <vcl/msgbox.hxx>
#include <connectivity/dbconversion.hxx>
#include <connectivity/dbtools.hxx>
@@ -42,7 +43,7 @@
#include <comphelper/string.hxx>
#include <tools/color.hxx>
#include "WExtendPages.hxx"
-#include "moduledbu.hxx"
+#include "core_resource.hxx"
#include "QEnumTypes.hxx"
#include "UITools.hxx"
#include <vcl/svapp.hxx>
@@ -243,7 +244,7 @@ void ORTFReader::NextToken( int nToken )
bool ORTFReader::CreateTable(int nToken)
{
- OUString aTableName(ModuleRes(STR_TBL_TITLE));
+ OUString aTableName(DBA_RES(STR_TBL_TITLE));
aTableName = aTableName.getToken(0,' ');
aTableName = ::dbtools::createUniqueName(m_xTables, aTableName);
@@ -274,7 +275,7 @@ bool ORTFReader::CreateTable(int nToken)
{
aColumnName = comphelper::string::strip(aColumnName, ' ');
if (aColumnName.isEmpty() || m_bAppendFirstLine )
- aColumnName = ModuleRes(STR_COLUMN_NAME);
+ aColumnName = DBA_RES(STR_COLUMN_NAME);
CreateDefaultColumn(aColumnName);
aColumnName.clear();
@@ -305,7 +306,7 @@ bool ORTFReader::CreateTable(int nToken)
if ( !aColumnName.isEmpty() )
{
if ( m_bAppendFirstLine )
- aColumnName = ModuleRes(STR_COLUMN_NAME);
+ aColumnName = DBA_RES(STR_COLUMN_NAME);
CreateDefaultColumn(aColumnName);
}
diff --git a/dbaccess/source/ui/misc/TableCopyHelper.cxx b/dbaccess/source/ui/misc/TableCopyHelper.cxx
index a52e7c8176ab..9fc346f5440e 100644
--- a/dbaccess/source/ui/misc/TableCopyHelper.cxx
+++ b/dbaccess/source/ui/misc/TableCopyHelper.cxx
@@ -18,7 +18,10 @@
*/
#include "TableCopyHelper.hxx"
-#include "dbustrings.hrc"
+#include "core_resource.hxx"
+#include "stringconstants.hxx"
+#include "strings.hrc"
+#include "strings.hxx"
#include "sqlmessage.hxx"
#include <vcl/msgbox.hxx>
#include "WCopyTable.hxx"
@@ -35,7 +38,7 @@
#include "TokenWriter.hxx"
#include "UITools.hxx"
#include <dbaccess/dataview.hxx>
-#include "dbu_resource.hrc"
+#include "dbu_pageids.hxx"
#include <unotools/ucbhelper.hxx>
#include <tools/urlobj.hxx>
#include <tools/diagnose_ex.h>
@@ -204,7 +207,7 @@ void OTableCopyHelper::pasteTable( SotClipboardFormatId _nFormatId
aTrans.bHtml = SotClipboardFormatId::HTML == _nFormatId;
aTrans.sDefaultTableName = GetTableNameForAppend();
if ( !bOk || !copyTagTable(aTrans,false,_xConnection) )
- m_pController->showError(SQLException(ModuleRes(STR_NO_TABLE_FORMAT_INSIDE), *m_pController, "S1000", 0, Any()));
+ m_pController->showError(SQLException(DBA_RES(STR_NO_TABLE_FORMAT_INSIDE), *m_pController, "S1000", 0, Any()));
}
catch(const SQLException&)
{
@@ -216,7 +219,7 @@ void OTableCopyHelper::pasteTable( SotClipboardFormatId _nFormatId
}
}
else
- m_pController->showError(SQLException(ModuleRes(STR_NO_TABLE_FORMAT_INSIDE), *m_pController, "S1000", 0, Any()));
+ m_pController->showError(SQLException(DBA_RES(STR_NO_TABLE_FORMAT_INSIDE), *m_pController, "S1000", 0, Any()));
}
void OTableCopyHelper::pasteTable( const TransferableDataHelper& _rTransData
@@ -313,7 +316,7 @@ void OTableCopyHelper::asyncCopyTagTable( DropDescriptor& _rDesc
else if ( !_rDesc.bError )
pasteTable(_rDesc.aDroppedData,i_rDestDataSource,_xConnection);
else
- m_pController->showError(SQLException(ModuleRes(STR_NO_TABLE_FORMAT_INSIDE), *m_pController, "S1000", 0, Any()));
+ m_pController->showError(SQLException(DBA_RES(STR_NO_TABLE_FORMAT_INSIDE), *m_pController, "S1000", 0, Any()));
}
} // namespace dbaui
diff --git a/dbaccess/source/ui/misc/TokenWriter.cxx b/dbaccess/source/ui/misc/TokenWriter.cxx
index 83da3ae851a0..8bbf60e1eb56 100644
--- a/dbaccess/source/ui/misc/TokenWriter.cxx
+++ b/dbaccess/source/ui/misc/TokenWriter.cxx
@@ -24,7 +24,8 @@
#include <osl/diagnose.h>
#include "RtfReader.hxx"
#include "HtmlReader.hxx"
-#include "dbustrings.hrc"
+#include "stringconstants.hxx"
+#include "strings.hxx"
#include <comphelper/processfactory.hxx>
#include <comphelper/string.hxx>
#include <comphelper/types.hxx>
diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx
index 7881de2c27df..671be050b77c 100644
--- a/dbaccess/source/ui/misc/UITools.cxx
+++ b/dbaccess/source/ui/misc/UITools.cxx
@@ -20,8 +20,9 @@
#include "UITools.hxx"
#include <sfx2/docfilt.hxx>
#include "callbacks.hxx"
-#include "dbustrings.hrc"
-#include "dbu_resource.hrc"
+#include "core_resource.hxx"
+#include "stringconstants.hxx"
+#include "dbu_pageids.hxx"
#include "dlgsave.hxx"
#include "dbtreelistbox.hxx"
#include "defaultobjectnamecheck.hxx"
@@ -87,7 +88,7 @@
#include <com/sun/star/util/NumberFormatter.hpp>
#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
#include <com/sun/star/util/XNumberFormatter.hpp>
-#include "dbu_misc.hrc"
+#include "strings.hrc"
#include "sqlmessage.hxx"
#include <com/sun/star/util/NumberFormat.hpp>
#include <com/sun/star/util/URL.hpp>
@@ -227,7 +228,7 @@ Reference< XDataSource > getDataSourceByName( const OUString& _rDataSourceName,
)
)
{
- OUString sErrorMessage( ModuleRes( STR_FILE_DOES_NOT_EXIST ) );
+ OUString sErrorMessage( DBA_RES( STR_FILE_DOES_NOT_EXIST ) );
OFileNotation aTransformer( e.Message );
sErrorMessage = sErrorMessage.replaceFirst( "$file$", aTransformer.get( OFileNotation::N_SYSTEM ) );
aSQLError = SQLExceptionInfo( sErrorMessage ).get();
@@ -933,7 +934,7 @@ bool appendToFilter(const Reference<XConnection>& _xConnection,
{
if(! ::dbaui::checkDataSourceAvailable(::comphelper::getString(xProp->getPropertyValue(PROPERTY_NAME)),_rxContext))
{
- OUString aMessage(ModuleRes(STR_TABLEDESIGN_DATASOURCE_DELETED));
+ OUString aMessage(DBA_RES(STR_TABLEDESIGN_DATASOURCE_DELETED));
ScopedVclPtrInstance<OSQLWarningBox>(_pParent, aMessage)->Execute();
bRet = false;
}
@@ -1204,15 +1205,15 @@ TOTypeInfoSP queryTypeInfoByType(sal_Int32 _nDataType,const OTypeInfoMap& _rType
return pTypeInfo;
}
-sal_Int32 askForUserAction(vcl::Window* _pParent,sal_uInt16 _nTitle,sal_uInt16 _nText,bool _bAll,const OUString& _sName)
+sal_Int32 askForUserAction(vcl::Window* _pParent, const char* pTitle, const char* pText, bool _bAll, const OUString& _sName)
{
SolarMutexGuard aGuard;
- OUString aMsg = ModuleRes(_nText);
+ OUString aMsg = DBA_RES(pText);
aMsg = aMsg.replaceFirst("%1", _sName);
- ScopedVclPtrInstance< OSQLMessageBox > aAsk(_pParent, ModuleRes(_nTitle ), aMsg,WB_YES_NO | WB_DEF_YES,OSQLMessageBox::Query);
+ ScopedVclPtrInstance<OSQLMessageBox> aAsk(_pParent, DBA_RES(pTitle), aMsg,WB_YES_NO | WB_DEF_YES,OSQLMessageBox::Query);
if ( _bAll )
{
- aAsk->AddButton(ModuleRes(STR_BUTTON_TEXT_ALL), RET_ALL);
+ aAsk->AddButton(DBA_RES(STR_BUTTON_TEXT_ALL), RET_ALL);
aAsk->GetPushButton(RET_ALL)->SetHelpId(HID_CONFIRM_DROP_BUTTON_ALL);
}
return aAsk->Execute();
@@ -1346,8 +1347,8 @@ bool insertHierachyElement( vcl::Window* _pParent, const Reference< XComponentCo
if ( !sNewName.isEmpty() )
sTargetName = sNewName;
else
- sTargetName = ModuleRes( _bCollection ? STR_NEW_FOLDER : ((_bForm) ? RID_STR_FORM : RID_STR_REPORT));
- sLabel = ModuleRes( _bCollection ? STR_FOLDER_LABEL : ((_bForm) ? STR_FRM_LABEL : STR_RPT_LABEL));
+ sTargetName = DBA_RES( _bCollection ? STR_NEW_FOLDER : ((_bForm) ? RID_STR_FORM : RID_STR_REPORT));
+ sLabel = DBA_RES( _bCollection ? STR_FOLDER_LABEL : ((_bForm) ? STR_FRM_LABEL : STR_RPT_LABEL));
sTargetName = ::dbtools::createUniqueName(xNameAccess,sTargetName);
// here we have everything needed to create a new query object ...
@@ -1369,7 +1370,7 @@ bool insertHierachyElement( vcl::Window* _pParent, const Reference< XComponentCo
}
else if ( xNameAccess->hasByName(sNewName) )
{
- OUString sError(ModuleRes(STR_NAME_ALREADY_EXISTS));
+ OUString sError(DBA_RES(STR_NAME_ALREADY_EXISTS));
sError = sError.replaceFirst("#",sNewName);
throw SQLException(sError,nullptr,"S1000",0,Any());
}
diff --git a/dbaccess/source/ui/misc/WCPage.cxx b/dbaccess/source/ui/misc/WCPage.cxx
index 14918971caaf..e76ba60e5c64 100644
--- a/dbaccess/source/ui/misc/WCPage.cxx
+++ b/dbaccess/source/ui/misc/WCPage.cxx
@@ -24,7 +24,8 @@
#include "defaultobjectnamecheck.hxx"
#include "dbaccess_helpid.hrc"
-#include "dbu_misc.hrc"
+#include "strings.hrc"
+#include "core_resource.hxx"
#include <com/sun/star/sdbc/XResultSet.hpp>
#include <com/sun/star/sdb/CommandType.hpp>
#include <com/sun/star/sdbc/XRow.hpp>
@@ -35,7 +36,7 @@
#include <connectivity/dbexception.hxx>
#include <connectivity/dbtools.hxx>
#include "UITools.hxx"
-#include "moduledbu.hxx"
+#include "core_resource.hxx"
#include <cppuhelper/exc_hlp.hxx>
using namespace ::dbaui;
@@ -95,7 +96,7 @@ OCopyTable::OCopyTable(vcl::Window * pParent)
m_pEdKeyName->SetMaxTextLen(nMaxLen ? nMaxLen : EDIT_NOLIMIT);
}
- SetText(ModuleRes(STR_COPYTABLE_TITLE_COPY));
+ SetText(DBA_RES(STR_COPYTABLE_TITLE_COPY));
}
OCopyTable::~OCopyTable()
@@ -169,7 +170,7 @@ bool OCopyTable::LeavePage()
SQLExceptionInfo aErrorInfo;
if ( !aNameCheck.isNameValid( m_pEdTableName->GetText(), aErrorInfo ) )
{
- aErrorInfo.append( SQLExceptionInfo::TYPE::SQLContext, ModuleRes( STR_SUGGEST_APPEND_TABLE_DATA ) );
+ aErrorInfo.append( SQLExceptionInfo::TYPE::SQLContext, DBA_RES( STR_SUGGEST_APPEND_TABLE_DATA ) );
m_pParent->showError(aErrorInfo.get());
return false;
@@ -189,7 +190,7 @@ bool OCopyTable::LeavePage()
sal_Int32 nMaxLength = xMeta->getMaxTableNameLength();
if ( nMaxLength && sTable.getLength() > nMaxLength )
{
- m_pParent->showError(ModuleRes(STR_INVALID_TABLE_NAME_LENGTH));
+ m_pParent->showError(DBA_RES(STR_INVALID_TABLE_NAME_LENGTH));
return false;
}
@@ -197,7 +198,7 @@ bool OCopyTable::LeavePage()
if ( m_pParent->m_bCreatePrimaryKeyColumn
&& m_pParent->m_aKeyName != m_pParent->createUniqueName(m_pParent->m_aKeyName) )
{
- m_pParent->showError(OUString(ModuleRes(STR_WIZ_NAME_ALREADY_DEFINED)) + " " + m_pParent->m_aKeyName);
+ m_pParent->showError(DBA_RES(STR_WIZ_NAME_ALREADY_DEFINED) + " " + m_pParent->m_aKeyName);
return false;
}
}
@@ -228,7 +229,7 @@ bool OCopyTable::LeavePage()
if(m_pParent->m_sName.isEmpty())
{
- m_pParent->showError(ModuleRes(STR_INVALID_TABLE_NAME));
+ m_pParent->showError(DBA_RES(STR_INVALID_TABLE_NAME));
return false;
}
@@ -245,7 +246,7 @@ void OCopyTable::ActivatePage()
OUString OCopyTable::GetTitle() const
{
- return ModuleRes(STR_WIZ_TABLE_COPY);
+ return DBA_RES(STR_WIZ_TABLE_COPY);
}
void OCopyTable::Reset()
@@ -301,7 +302,7 @@ bool OCopyTable::checkAppendData()
if ( !xTable.is() )
{
- m_pParent->showError(ModuleRes(STR_INVALID_TABLE_NAME));
+ m_pParent->showError(DBA_RES(STR_INVALID_TABLE_NAME));
return false;
}
return true;
diff --git a/dbaccess/source/ui/misc/WColumnSelect.cxx b/dbaccess/source/ui/misc/WColumnSelect.cxx
index 127d6ffee4ef..f9fcff3e4f1f 100644
--- a/dbaccess/source/ui/misc/WColumnSelect.cxx
+++ b/dbaccess/source/ui/misc/WColumnSelect.cxx
@@ -18,17 +18,18 @@
*/
#include "WColumnSelect.hxx"
-#include "dbu_misc.hrc"
+#include "strings.hrc"
#include <osl/diagnose.h>
#include "WCopyTable.hxx"
#include <com/sun/star/sdbcx/XDataDescriptorFactory.hpp>
#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
#include <com/sun/star/sdbcx/XAppend.hpp>
-#include "moduledbu.hxx"
+#include "core_resource.hxx"
#include <com/sun/star/sdbc/DataType.hpp>
#include <com/sun/star/sdbc/ColumnValue.hpp>
#include <com/sun/star/sdb/application/CopyTableOperation.hpp>
-#include "dbustrings.hrc"
+#include "core_resource.hxx"
+#include "stringconstants.hxx"
#include <functional>
using namespace ::com::sun::star::uno;
@@ -40,7 +41,7 @@ using namespace dbaui;
namespace CopyTableOperation = ::com::sun::star::sdb::application::CopyTableOperation;
-OUString OWizColumnSelect::GetTitle() const { return ModuleRes(STR_WIZ_COLUMN_SELECT_TITEL); }
+OUString OWizColumnSelect::GetTitle() const { return DBA_RES(STR_WIZ_COLUMN_SELECT_TITEL); }
OWizardPage::OWizardPage(vcl::Window* pParent, const OString& rID, const OUString& rUIXMLDescription)
: TabPage(pParent, rID, rUIXMLDescription)
diff --git a/dbaccess/source/ui/misc/WCopyTable.cxx b/dbaccess/source/ui/misc/WCopyTable.cxx
index 196da5dfbd3f..40c7b42119ba 100644
--- a/dbaccess/source/ui/misc/WCopyTable.cxx
+++ b/dbaccess/source/ui/misc/WCopyTable.cxx
@@ -17,9 +17,11 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include "dbu_misc.hrc"
-#include "dbustrings.hrc"
-#include "moduledbu.hxx"
+#include "strings.hrc"
+#include "strings.hxx"
+#include "stringconstants.hxx"
+#include "core_resource.hxx"
+#include "core_resource.hxx"
#include "sqlmessage.hxx"
#include "UITools.hxx"
#include "WColumnSelect.hxx"
@@ -509,7 +511,7 @@ OCopyTableWizard::OCopyTableWizard( vcl::Window * pParent, const OUString& _rDef
,m_xFormatter( getNumberFormatter( _xConnection, _rxContext ) )
,m_xContext(_rxContext)
,m_xInteractionHandler(_xInteractionHandler)
- ,m_sTypeNames(ModuleRes(STR_TABLEDESIGN_DBFIELDTYPES))
+ ,m_sTypeNames(DBA_RES(STR_TABLEDESIGN_DBFIELDTYPES))
,m_nPageCount(0)
,m_bDeleteSourceColumns(true)
,m_bInterConnectionCopy( _xSourceConnection != _xConnection )
@@ -601,7 +603,7 @@ OCopyTableWizard::OCopyTableWizard( vcl::Window* pParent, const OUString& _rDefa
,m_rSourceObject( DummyCopySource::Instance() )
,m_xFormatter(_xFormatter)
,m_xContext(_rxContext)
- ,m_sTypeNames(ModuleRes(STR_TABLEDESIGN_DBFIELDTYPES))
+ ,m_sTypeNames(DBA_RES(STR_TABLEDESIGN_DBFIELDTYPES))
,m_nPageCount(0)
,m_bDeleteSourceColumns(false)
,m_bInterConnectionCopy( false )
@@ -651,9 +653,9 @@ void OCopyTableWizard::construct()
m_pbNext->SetSizePixel( LogicToPixel( Size( 50, 14 ), MapUnit::MapAppFont ) );
m_pbFinish->SetSizePixel( LogicToPixel( Size( 50, 14 ), MapUnit::MapAppFont ) );
- m_pbPrev->SetText(ModuleRes(STR_WIZ_PB_PREV));
- m_pbNext->SetText(ModuleRes(STR_WIZ_PB_NEXT));
- m_pbFinish->SetText(ModuleRes(STR_WIZ_PB_OK));
+ m_pbPrev->SetText(DBA_RES(STR_WIZ_PB_PREV));
+ m_pbNext->SetText(DBA_RES(STR_WIZ_PB_NEXT));
+ m_pbFinish->SetText(DBA_RES(STR_WIZ_PB_OK));
m_pbHelp->Show();
m_pbCancel->Show();
@@ -878,7 +880,7 @@ IMPL_LINK_NOARG(OCopyTableWizard, ImplOKHdl, Button*, void)
if ( aFind == m_vDestColumns.end() && m_xInteractionHandler.is() )
{
- OUString sMsg(ModuleRes(STR_TABLEDESIGN_NO_PRIM_KEY));
+ OUString sMsg(DBA_RES(STR_TABLEDESIGN_NO_PRIM_KEY));
SQLContext aError;
aError.Message = sMsg;
::rtl::Reference< ::comphelper::OInteractionRequest > xRequest( new ::comphelper::OInteractionRequest( makeAny( aError ) ) );
@@ -1543,7 +1545,7 @@ OUString OCopyTableWizard::createUniqueName(const OUString& _sName)
void OCopyTableWizard::showColumnTypeNotSupported(const OUString& _rColumnName)
{
- OUString sMessage( ModuleRes( STR_UNKNOWN_TYPE_FOUND ) );
+ OUString sMessage( DBA_RES( STR_UNKNOWN_TYPE_FOUND ) );
sMessage = sMessage.replaceFirst("#1",_rColumnName);
showError(sMessage);
}
diff --git a/dbaccess/source/ui/misc/WNameMatch.cxx b/dbaccess/source/ui/misc/WNameMatch.cxx
index 1a5938d3914e..f06388a5e9a9 100644
--- a/dbaccess/source/ui/misc/WNameMatch.cxx
+++ b/dbaccess/source/ui/misc/WNameMatch.cxx
@@ -22,7 +22,8 @@
#include "FieldDescriptions.hxx"
#include "WCopyTable.hxx"
#include "dbaccess_helpid.hrc"
-#include "dbu_misc.hrc"
+#include "core_resource.hxx"
+#include "strings.hrc"
#include "bitmaps.hlst"
#include <vcl/scrbar.hxx>
#include <vcl/settings.hxx>
@@ -201,7 +202,7 @@ bool OWizNameMatching::LeavePage()
return true;
}
-OUString OWizNameMatching::GetTitle() const { return ModuleRes(STR_WIZ_NAME_MATCHING_TITEL); }
+OUString OWizNameMatching::GetTitle() const { return DBA_RES(STR_WIZ_NAME_MATCHING_TITEL); }
IMPL_LINK( OWizNameMatching, ButtonClickHdl, Button *, pButton, void )
{
diff --git a/dbaccess/source/ui/misc/WTypeSelect.cxx b/dbaccess/source/ui/misc/WTypeSelect.cxx
index 31c58ed4a6c7..f10fcd592d62 100644
--- a/dbaccess/source/ui/misc/WTypeSelect.cxx
+++ b/dbaccess/source/ui/misc/WTypeSelect.cxx
@@ -18,17 +18,18 @@
*/
#include "WTypeSelect.hxx"
-#include "dbustrings.hrc"
+#include "stringconstants.hxx"
#include "bitmaps.hlst"
#include <tools/diagnose_ex.h>
#include <osl/diagnose.h>
#include "FieldDescriptions.hxx"
#include "WCopyTable.hxx"
#include "dbaccess_helpid.hrc"
-#include "dbu_misc.hrc"
+#include "strings.hrc"
#include <tools/stream.hxx>
#include <svtools/svparser.hxx>
#include "UITools.hxx"
+#include "core_resource.hxx"
#include "sqlmessage.hxx"
#include "FieldControls.hxx"
#include <vcl/layout.hxx>
@@ -138,7 +139,7 @@ void OWizTypeSelectControl::CellModified(long nRow, sal_uInt16 nColId )
if ( bDoubleName )
{
- OUString strMessage = ModuleRes(STR_TABLEDESIGN_DUPLICATE_NAME);
+ OUString strMessage = DBA_RES(STR_TABLEDESIGN_DUPLICATE_NAME);
strMessage = strMessage.replaceFirst("$column$", sNewName);
pWiz->showError(strMessage);
pCurFieldDescr->SetName(sName);
@@ -274,7 +275,7 @@ void OWizTypeSelect::dispose()
OUString OWizTypeSelect::GetTitle() const
{
- return ModuleRes(STR_WIZ_TYPE_SELECT_TITEL);
+ return DBA_RES(STR_WIZ_TYPE_SELECT_TITEL);
}
IMPL_LINK_NOARG( OWizTypeSelect, ColumnSelectHdl, ListBox&, void )
diff --git a/dbaccess/source/ui/misc/WizardPages.src b/dbaccess/source/ui/misc/WizardPages.src
deleted file mode 100644
index 5f1b15426ee4..000000000000
--- a/dbaccess/source/ui/misc/WizardPages.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 "dbu_misc.hrc"
-#include "dbaccess_helpid.hrc"
-#include "dbaccess_slotid.hrc"
-
-String STR_WIZ_COLUMN_SELECT_TITEL
-{
- Text [ en-US ] = "Apply columns";
-};
-
-String STR_WIZ_TYPE_SELECT_TITEL
-{
- Text [ en-US ] = "Type formatting";
-};
-
-String STR_WIZ_NAME_ALREADY_DEFINED
-{
- Text [ en-US ] = "Enter a unique name for the new primary key data field.\nThe following name is already in use:";
-};
-
-String STR_WIZ_NAME_MATCHING_TITEL
-{
- Text [ en-US ] = "Assign columns" ;
-};
-
-String STR_WIZ_PB_PREV
-{
- Text [ en-US ] = "< ~Back";
-};
-
-String STR_WIZ_PB_NEXT
-{
- Text [ en-US ] = "~Next>";
-};
-
-String STR_WIZ_PB_OK
-{
- Text [ en-US ] = "C~reate";
-};
-
-String STR_WIZ_TABLE_COPY
-{
- Text [ en-US ] = "Copy table" ;
-};
-
-String STR_COPYTABLE_TITLE_COPY
-{
- Text [ en-US ] = "Copy table" ;
-};
-
-String STR_INVALID_TABLE_NAME
-{
- Text [ en-US ] = "This table name is not valid in the current database.";
-};
-String STR_SUGGEST_APPEND_TABLE_DATA
-{
- Text [ en-US ] = "Choose the option 'Append data' on the first page to append data to an existing table.";
-};
-
-String STR_INVALID_TABLE_NAME_LENGTH
-{
- Text [ en-US ] = "Please change the table name. It is too long.";
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/charsets.cxx b/dbaccess/source/ui/misc/charsets.cxx
index fd5801a5cad7..78f60be945bd 100644
--- a/dbaccess/source/ui/misc/charsets.cxx
+++ b/dbaccess/source/ui/misc/charsets.cxx
@@ -18,11 +18,11 @@
*/
#include "charsets.hxx"
+#include "core_resource.hxx"
#include <osl/diagnose.h>
-#include "dbu_misc.hrc"
+#include "strings.hrc"
#include <rtl/tencinfo.h>
-#include <tools/rcid.h>
-#include "moduledbu.hxx"
+#include "core_resource.hxx"
namespace dbaui
{
@@ -30,9 +30,8 @@ namespace dbaui
// OCharsetDisplay
OCharsetDisplay::OCharsetDisplay()
- :OCharsetMap()
- ,SvxTextEncodingTable()
- , m_aSystemDisplayName(ModuleRes( STR_RSC_CHARSETS ))
+ : OCharsetMap()
+ , m_aSystemDisplayName(DBA_RES( STR_RSC_CHARSETS ))
{
}
@@ -44,7 +43,7 @@ namespace dbaui
if ( RTL_TEXTENCODING_DONTKNOW == _eEncoding )
return true;
- return !GetTextString(_eEncoding).isEmpty();
+ return !SvxTextEncodingTable::GetTextString(_eEncoding).isEmpty();
}
OCharsetDisplay::const_iterator OCharsetDisplay::begin() const
@@ -74,7 +73,7 @@ namespace dbaui
rtl_TextEncoding eEncoding = RTL_TEXTENCODING_DONTKNOW;
if ( _rDisplayName != m_aSystemDisplayName )
{
- eEncoding = GetTextEncoding( _rDisplayName );
+ eEncoding = SvxTextEncodingTable::GetTextEncoding(_rDisplayName);
OSL_ENSURE( RTL_TEXTENCODING_DONTKNOW != eEncoding,
"OCharsetDisplay::find: non-empty display name, but DONTKNOW!" );
}
@@ -116,7 +115,7 @@ namespace dbaui
rtl_TextEncoding eEncoding = (*m_aPosition).getEncoding();
return CharsetDisplayDerefHelper(
*m_aPosition,
- RTL_TEXTENCODING_DONTKNOW == eEncoding ? m_pContainer->m_aSystemDisplayName : m_pContainer->GetTextString( eEncoding )
+ RTL_TEXTENCODING_DONTKNOW == eEncoding ? m_pContainer->m_aSystemDisplayName : SvxTextEncodingTable::GetTextString(eEncoding)
);
}
diff --git a/dbaccess/source/ui/misc/databaseobjectview.cxx b/dbaccess/source/ui/misc/databaseobjectview.cxx
index d92e9b244a81..745d31adc9a5 100644
--- a/dbaccess/source/ui/misc/databaseobjectview.cxx
+++ b/dbaccess/source/ui/misc/databaseobjectview.cxx
@@ -18,7 +18,8 @@
*/
#include "databaseobjectview.hxx"
-#include "dbustrings.hrc"
+#include "stringconstants.hxx"
+#include "strings.hxx"
#include "asyncmodaldialog.hxx"
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
diff --git a/dbaccess/source/ui/misc/datasourceconnector.cxx b/dbaccess/source/ui/misc/datasourceconnector.cxx
index 174e92c72d86..e0992eb01a15 100644
--- a/dbaccess/source/ui/misc/datasourceconnector.cxx
+++ b/dbaccess/source/ui/misc/datasourceconnector.cxx
@@ -17,9 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include "core_resource.hxx"
#include "datasourceconnector.hxx"
#include <osl/diagnose.h>
-#include "dbustrings.hrc"
+#include "stringconstants.hxx"
#include <com/sun/star/sdbc/XWarningsSupplier.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/sdb/XCompletedConnection.hpp>
@@ -39,8 +40,9 @@
#include <svl/filenotation.hxx>
#include <tools/diagnose_ex.h>
#include <cppuhelper/exc_hlp.hxx>
-#include "dbu_misc.hrc"
-#include "moduledbu.hxx"
+#include "strings.hrc"
+#include "strings.hxx"
+#include "core_resource.hxx"
namespace dbaui
{
@@ -159,7 +161,7 @@ namespace dbaui
Any aWarnings( xConnectionWarnings->getWarnings() );
if ( aWarnings.hasValue() )
{
- OUString sMessage( ModuleRes( STR_WARNINGS_DURING_CONNECT ) );
+ OUString sMessage( DBA_RES( STR_WARNINGS_DURING_CONNECT ) );
sMessage = sMessage.replaceFirst( "$buttontext$", Button::GetStandardText( StandardButtonType::More ) );
sMessage = OutputDevice::GetNonMnemonicString( sMessage );
diff --git a/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx b/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
index 2e780c7a0b2a..6ef9d424d536 100644
--- a/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
+++ b/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
@@ -19,10 +19,12 @@
#include "browserids.hxx"
#include "commontypes.hxx"
+#include "core_resource.hxx"
#include <dbaccess/dataview.hxx>
-#include "dbu_misc.hrc"
-#include "dbustrings.hrc"
-#include "moduledbu.hxx"
+#include "strings.hrc"
+#include "strings.hxx"
+#include "stringconstants.hxx"
+#include "core_resource.hxx"
#include <dbaccess/dbsubcomponentcontroller.hxx>
#include <com/sun/star/frame/XUntitledNumbers.hpp>
@@ -124,7 +126,7 @@ namespace dbaui
::boost::optional< bool > m_aDocScriptSupport;
public:
- OModuleClient m_aModuleClient;
+ dbaccess::OModuleClient m_aModuleClient;
::dbtools::SQLExceptionInfo m_aCurrentError;
::comphelper::OInterfaceContainerHelper2
@@ -303,7 +305,7 @@ namespace dbaui
bool bReConnect = true;
if ( _bUI )
{
- ScopedVclPtrInstance< MessageDialog > aQuery(getView(), ModuleRes(STR_QUERY_CONNECTION_LOST), VclMessageType::Question, VclButtonsType::YesNo);
+ ScopedVclPtrInstance< MessageDialog > aQuery(getView(), DBA_RES(STR_QUERY_CONNECTION_LOST), VclMessageType::Question, VclButtonsType::YesNo);
bReConnect = ( RET_YES == aQuery->Execute() );
}
@@ -444,7 +446,7 @@ namespace dbaui
}
void DBSubComponentController::connectionLostMessage() const
{
- OUString aMessage(ModuleRes(RID_STR_CONNECTION_LOST));
+ OUString aMessage(DBA_RES(RID_STR_CONNECTION_LOST));
Reference< XWindow > xWindow = getTopMostContainerWindow();
vcl::Window* pWin = nullptr;
if ( xWindow.is() )
diff --git a/dbaccess/source/ui/misc/dbumiscres.src b/dbaccess/source/ui/misc/dbumiscres.src
deleted file mode 100644
index 5a4e1c9dd688..000000000000
--- a/dbaccess/source/ui/misc/dbumiscres.src
+++ /dev/null
@@ -1,88 +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 "dbu_misc.hrc"
-
-String STR_RSC_CHARSETS
-{
- Text [ en-US ] = "System";
-};
-
-String STR_ERROR_DURING_CREATION
-{
- Text [ en-US ] = "Error during creation";
-};
-
-String STR_UNEXPECTED_ERROR
-{
- Text [ en-US ] = "An unexpected error occurred. The operation could not be performed.";
-};
-
-String STR_COULDNOTOPEN_LINKEDDOC
-{
- Text [ en-US ] = "The document \"$file$\" could not be opened.";
-};
-
-String STR_MISSING_TABLES_XDROP
-{
- Text [ en-US ] = "The table cannot be deleted because the database connection does not support this.";
-};
-
-String STR_BUTTON_TEXT_ALL
-{
- Text [ en-US ] = "~All";
-};
-
-String STR_UNDO_COLON
-{
- Text [ en-US ] = "Undo:";
-};
-
-String STR_REDO_COLON
-{
- Text [ en-US ] = "Redo:";
-};
-
-String STR_UNKNOWN_TYPE_FOUND
-{
- Text [ en-US ] = "No corresponding column type could be found for column '#1'." ;
-};
-
-String STR_FILE_DOES_NOT_EXIST
-{
- Text[ en-US ] = "The file \"$file$\" does not exist.";
-};
-
-String STR_WARNINGS_DURING_CONNECT
-{
- Text [ en-US ] = "Warnings were encountered while connecting to the data source. Press \"$buttontext$\" to view them.";
-};
-
-String STR_NAMED_OBJECT_ALREADY_EXISTS
-{
- Text [ en-US ] = "The name '$#$' already exists.\nPlease enter another name." ;
-};
-
-String RID_STR_EXTENSION_NOT_PRESENT
-{
- // #i96130# use hard coded name
- Text [ en-US ] = "The report, \"$file$\", requires the Oracle Report Builder feature.";
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/defaultobjectnamecheck.cxx b/dbaccess/source/ui/misc/defaultobjectnamecheck.cxx
index 59f10c042cba..d4325e99090a 100644
--- a/dbaccess/source/ui/misc/defaultobjectnamecheck.cxx
+++ b/dbaccess/source/ui/misc/defaultobjectnamecheck.cxx
@@ -17,11 +17,12 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include "core_resource.hxx"
#include "defaultobjectnamecheck.hxx"
-#include "dbu_misc.hrc"
+#include "strings.hrc"
-#include "moduledbu.hxx"
+#include "core_resource.hxx"
#include <com/sun/star/lang/IllegalArgumentException.hpp>
#include <com/sun/star/sdb/CommandType.hpp>
@@ -61,7 +62,7 @@ namespace dbaui
void lcl_fillNameExistsError( const OUString& _rObjectName, SQLExceptionInfo& _out_rErrorToDisplay )
{
SQLException aError;
- OUString sErrorMessage = ModuleRes(STR_NAMED_OBJECT_ALREADY_EXISTS);
+ OUString sErrorMessage = DBA_RES(STR_NAMED_OBJECT_ALREADY_EXISTS);
aError.Message = sErrorMessage.replaceAll("$#$", _rObjectName);
_out_rErrorToDisplay = aError;
}
diff --git a/dbaccess/source/ui/misc/imageprovider.cxx b/dbaccess/source/ui/misc/imageprovider.cxx
index 80ceaa47f7e5..cc9de382e17d 100644
--- a/dbaccess/source/ui/misc/imageprovider.cxx
+++ b/dbaccess/source/ui/misc/imageprovider.cxx
@@ -18,9 +18,9 @@
*/
#include "imageprovider.hxx"
-#include "dbu_resource.hrc"
-#include "moduledbu.hxx"
-#include "dbustrings.hrc"
+#include "dbu_pageids.hxx"
+#include "core_resource.hxx"
+#include "stringconstants.hxx"
#include "bitmaps.hlst"
#include <com/sun/star/graphic/XGraphic.hpp>
diff --git a/dbaccess/source/ui/misc/linkeddocuments.cxx b/dbaccess/source/ui/misc/linkeddocuments.cxx
index 0e006a5a95ef..3c70c3f10c8d 100644
--- a/dbaccess/source/ui/misc/linkeddocuments.cxx
+++ b/dbaccess/source/ui/misc/linkeddocuments.cxx
@@ -17,11 +17,12 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include "core_resource.hxx"
#include "linkeddocuments.hxx"
#include <osl/diagnose.h>
#include <tools/diagnose_ex.h>
#include <unotools/confignode.hxx>
-#include "dbustrings.hrc"
+#include "stringconstants.hxx"
#include <comphelper/classids.hxx>
#include <comphelper/namedvaluecollection.hxx>
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
@@ -36,11 +37,12 @@
#include <comphelper/types.hxx>
#include <vcl/msgbox.hxx>
#include <ucbhelper/content.hxx>
-#include "dbu_misc.hrc"
+#include "strings.hrc"
+#include "strings.hxx"
#include <svl/filenotation.hxx>
#include "browserids.hxx"
#include <sfx2/new.hxx>
-#include "moduledbu.hxx"
+#include "core_resource.hxx"
#include <sfx2/app.hxx>
#include <basic/sbx.hxx>
#include <basic/sbuno.hxx>
@@ -319,7 +321,7 @@ namespace dbaui
xRet = impl_open( _rLinkName, _xDefinition, _eOpenMode, _rAdditionalArgs );
if ( !xRet.is() )
{
- OUString sMessage = ModuleRes(STR_COULDNOTOPEN_LINKEDDOC);
+ OUString sMessage = DBA_RES(STR_COULDNOTOPEN_LINKEDDOC);
sMessage = sMessage.replaceFirst("$file$",_rLinkName);
css::sdbc::SQLException aSQLException;
@@ -336,11 +338,11 @@ namespace dbaui
aInfo = dbtools::SQLExceptionInfo(aSQLException);
// more like a hack, insert an empty message
- OUString sText( ModuleRes( RID_STR_EXTENSION_NOT_PRESENT ) );
+ OUString sText( DBA_RES( RID_STR_EXTENSION_NOT_PRESENT ) );
sText = sText.replaceFirst("$file$",_rLinkName);
aInfo.prepend(sText);
- OUString sMessage = ModuleRes(STR_COULDNOTOPEN_LINKEDDOC);
+ OUString sMessage = DBA_RES(STR_COULDNOTOPEN_LINKEDDOC);
sMessage = sMessage.replaceFirst("$file$",_rLinkName);
aInfo.prepend(sMessage);
}
@@ -358,7 +360,7 @@ namespace dbaui
// more like a hack, insert an empty message
aInfo.prepend(" \n");
- OUString sMessage = ModuleRes(STR_COULDNOTOPEN_LINKEDDOC);
+ OUString sMessage = DBA_RES(STR_COULDNOTOPEN_LINKEDDOC);
sMessage = sMessage.replaceFirst("$file$",_rLinkName);
aInfo.prepend(sMessage);
}
diff --git a/dbaccess/source/ui/misc/moduledbu.cxx b/dbaccess/source/ui/misc/moduledbu.cxx
deleted file mode 100644
index 340990a2c39e..000000000000
--- a/dbaccess/source/ui/misc/moduledbu.cxx
+++ /dev/null
@@ -1,101 +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 <memory>
-#include "moduledbu.hxx"
-
-#include <tools/resmgr.hxx>
-#include <svl/solar.hrc>
-
-#define ENTER_MOD_METHOD() \
- ::osl::MutexGuard aGuard(s_aMutex); \
- ensureImpl()
-
-namespace dbaui
-{
-
-// OModuleImpl
-/** implementation for <type>OModule</type>. not threadsafe, has to be guarded by its owner
-*/
-class OModuleImpl
-{
- std::unique_ptr<ResMgr> m_pResources;
-
-public:
- /// ctor
- OModuleImpl();
-
- /// get the manager for the resources of the module
- ResMgr* getResManager();
-};
-
-OModuleImpl::OModuleImpl()
- :m_pResources(nullptr)
-{
-
-}
-
-ResMgr* OModuleImpl::getResManager()
-{
- // note that this method is not threadsafe, which counts for the whole class !
-
- if (!m_pResources)
- {
- // create a manager with a fixed prefix
- m_pResources.reset( ResMgr::CreateResMgr("dbu") );
- }
- return m_pResources.get();
-}
-
-// OModule
-::osl::Mutex OModule::s_aMutex;
-sal_Int32 OModule::s_nClients = 0;
-OModuleImpl* OModule::s_pImpl = nullptr;
-ResMgr* OModule::getResManager()
-{
- ENTER_MOD_METHOD();
- return s_pImpl->getResManager();
-}
-
-void OModule::registerClient()
-{
- ::osl::MutexGuard aGuard(s_aMutex);
- ++s_nClients;
-}
-
-void OModule::revokeClient()
-{
- ::osl::MutexGuard aGuard(s_aMutex);
- if (!--s_nClients && s_pImpl)
- {
- delete s_pImpl;
- s_pImpl = nullptr;
- }
-}
-
-void OModule::ensureImpl()
-{
- if (s_pImpl)
- return;
- s_pImpl = new OModuleImpl();
-}
-
-} // namespace dbaui
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/singledoccontroller.cxx b/dbaccess/source/ui/misc/singledoccontroller.cxx
index a76c75343ada..4575f44872fe 100644
--- a/dbaccess/source/ui/misc/singledoccontroller.cxx
+++ b/dbaccess/source/ui/misc/singledoccontroller.cxx
@@ -19,11 +19,12 @@
#include <dbaccess/dbaundomanager.hxx>
#include <dbaccess/dataview.hxx>
+#include "core_resource.hxx"
#include "singledoccontroller.hxx"
#include "browserids.hxx"
-#include "dbu_misc.hrc"
-#include "dbustrings.hrc"
-#include "moduledbu.hxx"
+#include "strings.hrc"
+#include "stringconstants.hxx"
+#include "core_resource.hxx"
#include <svl/undo.hxx>
@@ -104,7 +105,7 @@ namespace dbaui
aReturn.bEnabled = isEditable() && GetUndoManager().GetUndoActionCount() != 0;
if ( aReturn.bEnabled )
{
- OUString sUndo(ModuleRes(STR_UNDO_COLON));
+ OUString sUndo(DBA_RES(STR_UNDO_COLON));
sUndo += " ";
sUndo += GetUndoManager().GetUndoActionComment();
aReturn.sTitle = sUndo;
@@ -115,7 +116,7 @@ namespace dbaui
aReturn.bEnabled = isEditable() && GetUndoManager().GetRedoActionCount() != 0;
if ( aReturn.bEnabled )
{
- OUString sRedo(ModuleRes(STR_REDO_COLON));
+ OUString sRedo(DBA_RES(STR_REDO_COLON));
sRedo += " ";
sRedo += GetUndoManager().GetRedoActionComment();
aReturn.sTitle = sRedo;