diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-06-11 20:56:30 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-07-21 08:20:50 +0100 |
commit | 00657aef09d854c74fb426a935a3e8b1fc390bb0 (patch) | |
tree | fd1a9bb264fe15dcc129498e62060ecd256b1ee7 /reportdesign/source/ui/report | |
parent | fa987cbb813cfd729fe490f2f1258b7c8d7fb174 (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 'reportdesign/source/ui/report')
-rw-r--r-- | reportdesign/source/ui/report/DesignView.cxx | 2 | ||||
-rw-r--r-- | reportdesign/source/ui/report/FixedTextColor.cxx | 2 | ||||
-rw-r--r-- | reportdesign/source/ui/report/FormattedFieldBeautifier.cxx | 2 | ||||
-rw-r--r-- | reportdesign/source/ui/report/ReportController.cxx | 66 | ||||
-rw-r--r-- | reportdesign/source/ui/report/ReportSection.cxx | 4 | ||||
-rw-r--r-- | reportdesign/source/ui/report/ReportWindow.cxx | 2 | ||||
-rw-r--r-- | reportdesign/source/ui/report/SectionView.cxx | 2 | ||||
-rw-r--r-- | reportdesign/source/ui/report/SectionWindow.cxx | 18 | ||||
-rw-r--r-- | reportdesign/source/ui/report/StartMarker.cxx | 3 | ||||
-rw-r--r-- | reportdesign/source/ui/report/ViewsWindow.cxx | 9 | ||||
-rw-r--r-- | reportdesign/source/ui/report/dlgedfac.cxx | 2 | ||||
-rw-r--r-- | reportdesign/source/ui/report/dlgedfunc.cxx | 2 | ||||
-rw-r--r-- | reportdesign/source/ui/report/propbrw.cxx | 37 | ||||
-rw-r--r-- | reportdesign/source/ui/report/report.src | 284 |
14 files changed, 75 insertions, 360 deletions
diff --git a/reportdesign/source/ui/report/DesignView.cxx b/reportdesign/source/ui/report/DesignView.cxx index fccb41abb983..83233bb7e67f 100644 --- a/reportdesign/source/ui/report/DesignView.cxx +++ b/reportdesign/source/ui/report/DesignView.cxx @@ -37,7 +37,7 @@ #include "ScrollHelper.hxx" #include "Navigator.hxx" #include "SectionWindow.hxx" -#include "RptResId.hrc" +#include "strings.hrc" #include <vcl/settings.hxx> #include <vcl/svapp.hxx> diff --git a/reportdesign/source/ui/report/FixedTextColor.cxx b/reportdesign/source/ui/report/FixedTextColor.cxx index de398d2aa1ab..51b1f3cb9f05 100644 --- a/reportdesign/source/ui/report/FixedTextColor.cxx +++ b/reportdesign/source/ui/report/FixedTextColor.cxx @@ -28,7 +28,7 @@ #include <ViewsWindow.hxx> #include <ReportSection.hxx> #include <ReportController.hxx> -#include <uistrings.hrc> +#include <strings.hxx> #include <reportformula.hxx> #include <toolkit/helper/property.hxx> diff --git a/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx b/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx index 54b7fbfc80f0..db79387e4701 100644 --- a/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx +++ b/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx @@ -29,7 +29,7 @@ #include <ViewsWindow.hxx> #include <ReportSection.hxx> #include <ReportController.hxx> -#include <uistrings.hrc> +#include <strings.hxx> #include <reportformula.hxx> #include <toolkit/helper/property.hxx> diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx index d23550f9de16..2e0a68235562 100644 --- a/reportdesign/source/ui/report/ReportController.cxx +++ b/reportdesign/source/ui/report/ReportController.cxx @@ -112,17 +112,17 @@ #include <svx/zoom_def.hxx> #include <svx/dialogs.hrc> +#include "core_resource.hxx" #include "DesignView.hxx" -#include "ModuleHelper.hxx" #include "RptObject.hxx" #include "RptUndo.hxx" -#include "uistrings.hrc" +#include "strings.hxx" #include "RptDef.hxx" #include "ReportSection.hxx" #include "SectionView.hxx" #include "UndoActions.hxx" #include "dlgpage.hxx" -#include "RptResId.hrc" +#include "strings.hrc" #include <svl/itempool.hxx> #include <svl/itemset.hxx> @@ -407,7 +407,7 @@ FeatureState OReportController::GetState(sal_uInt16 _nId) const case SID_REPORTHEADERFOOTER: { aReturn.bEnabled = isEditable(); - OUString sText = ModuleRes((m_xReportDefinition.is() && m_xReportDefinition->getReportHeaderOn()) ? RID_STR_REPORTHEADERFOOTER_DELETE : RID_STR_REPORTHEADERFOOTER_INSERT); + OUString sText = RptResId((m_xReportDefinition.is() && m_xReportDefinition->getReportHeaderOn()) ? RID_STR_REPORTHEADERFOOTER_DELETE : RID_STR_REPORTHEADERFOOTER_INSERT); aReturn.sTitle = sText; } break; @@ -416,7 +416,7 @@ FeatureState OReportController::GetState(sal_uInt16 _nId) const case SID_PAGEHEADERFOOTER: { aReturn.bEnabled = isEditable(); - OUString sText = ModuleRes((m_xReportDefinition.is() && m_xReportDefinition->getPageHeaderOn()) ? RID_STR_PAGEHEADERFOOTER_DELETE : RID_STR_PAGEHEADERFOOTER_INSERT); + OUString sText = RptResId((m_xReportDefinition.is() && m_xReportDefinition->getPageHeaderOn()) ? RID_STR_PAGEHEADERFOOTER_DELETE : RID_STR_PAGEHEADERFOOTER_INSERT); aReturn.sTitle = sText; } break; @@ -569,7 +569,7 @@ FeatureState OReportController::GetState(sal_uInt16 _nId) const aReturn.bEnabled = !pSectionWindow->getReportSection().isUiActive(); } { - OUString sText = ModuleRes(RID_STR_DELETE); + OUString sText = RptResId(RID_STR_DELETE); aReturn.sTitle = sText; } break; @@ -1153,7 +1153,7 @@ void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue > { uno::Reference< report::XFunctions> xFunctions(xFunction->getParent(),uno::UNO_QUERY_THROW); sal_Int32 nIndex = getPositionInIndexAccess(xFunctions.get(),xFunction); - const OUString sUndoAction = ModuleRes(RID_STR_UNDO_REMOVE_FUNCTION); + const OUString sUndoAction = RptResId(RID_STR_UNDO_REMOVE_FUNCTION); UndoContext aUndoContext( getUndoManager(), sUndoAction ); xFunctions->removeByIndex(nIndex); select(uno::makeAny(xFunctions->getParent())); @@ -1436,7 +1436,7 @@ void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue > ::std::vector< uno::Reference< uno::XInterface > > aControlsFormats; lcl_getReportControlFormat( aArgs, getDesignView(), xWindow, aControlsFormats ); - const OUString sUndoAction(ModuleRes(RID_STR_UNDO_CHANGEFONT)); + const OUString sUndoAction(RptResId(RID_STR_UNDO_CHANGEFONT)); UndoContext aUndoContext( getUndoManager(), sUndoAction ); ::std::vector< uno::Reference< uno::XInterface > >::const_iterator aIter = aControlsFormats.begin(); @@ -1513,7 +1513,7 @@ void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue > if ( !aControlsFormats.empty() ) { - const OUString sUndoAction( ModuleRes( RID_STR_UNDO_CHANGEFONT ) ); + const OUString sUndoAction( RptResId( RID_STR_UNDO_CHANGEFONT ) ); UndoContext aUndoContext( getUndoManager(), sUndoAction ); ::std::vector< uno::Reference< uno::XInterface > >::const_iterator aIter = aControlsFormats.begin(); @@ -2450,7 +2450,7 @@ void OReportController::openPageDialog(const uno::Reference<report::XSection>& _ else { uno::Reference< beans::XPropertySet> xProp(getUsedStyle(m_xReportDefinition),uno::UNO_QUERY_THROW); - const OUString sUndoAction(ModuleRes(RID_STR_UNDO_CHANGEPAGE)); + const OUString sUndoAction(RptResId(RID_STR_UNDO_CHANGEPAGE)); UndoContext aUndoContext( getUndoManager(), sUndoAction ); const SfxPoolItem* pItem = nullptr; if ( SfxItemState::SET == pSet->GetItemState( RPTUI_ID_SIZE,true,&pItem)) @@ -2575,17 +2575,17 @@ void OReportController::Notify(SfxBroadcaster & /* _rBc */, SfxHint const & _rHi } } -void OReportController::executeMethodWithUndo(sal_uInt16 _nUndoStrId,const ::std::mem_fun_t<void,ODesignView>& _pMemfun) +void OReportController::executeMethodWithUndo(const char* pUndoStrId,const ::std::mem_fun_t<void,ODesignView>& _pMemfun) { - const OUString sUndoAction = ModuleRes(_nUndoStrId); + const OUString sUndoAction = RptResId(pUndoStrId); UndoContext aUndoContext( getUndoManager(), sUndoAction ); _pMemfun( getDesignView() ); InvalidateFeature( SID_UNDO ); } -void OReportController::alignControlsWithUndo(sal_uInt16 _nUndoStrId, ControlModification _nControlModification, bool _bAlignAtSection) +void OReportController::alignControlsWithUndo(const char* pUndoStrId, ControlModification _nControlModification, bool _bAlignAtSection) { - const OUString sUndoAction = ModuleRes(_nUndoStrId); + const OUString sUndoAction = RptResId(pUndoStrId); UndoContext aUndoContext( getUndoManager(), sUndoAction ); getDesignView()->alignMarkedObjects(_nControlModification,_bAlignAtSection); InvalidateFeature( SID_UNDO ); @@ -2659,11 +2659,11 @@ void OReportController::shrinkSectionTop(const uno::Reference<report::XSection>& _xSection->setHeight(nNewSectionHeight); } -void OReportController::shrinkSection(sal_uInt16 _nUndoStrId, const uno::Reference<report::XSection>& _xSection, sal_Int32 _nSid) +void OReportController::shrinkSection(const char* pUndoStrId, const uno::Reference<report::XSection>& _xSection, sal_Int32 _nSid) { if ( _xSection.is() ) { - const OUString sUndoAction = ModuleRes(_nUndoStrId); + const OUString sUndoAction = RptResId(pUndoStrId); UndoContext aUndoContext( getUndoManager(), sUndoAction ); if (_nSid == SID_SECTION_SHRINK) @@ -2835,7 +2835,7 @@ uno::Reference<frame::XModel> OReportController::executeReport() uno::Reference<frame::XModel> xModel; if ( m_xReportDefinition.is() ) { - sal_uInt16 nErrorId = RID_ERR_NO_COMMAND; + const char* pErrorId = RID_ERR_NO_COMMAND; bool bEnabled = !m_xReportDefinition->getCommand().isEmpty(); if ( bEnabled ) { @@ -2848,20 +2848,20 @@ uno::Reference<frame::XModel> OReportController::executeReport() bEnabled = pPage->GetObjCount() != 0; } if ( !bEnabled ) - nErrorId = RID_ERR_NO_OBJECTS; + pErrorId = RID_ERR_NO_OBJECTS; } dbtools::SQLExceptionInfo aInfo; if ( !bEnabled ) { sdb::SQLContext aFirstMessage; - OUString sInfo = ModuleRes( nErrorId ); + OUString sInfo = RptResId( pErrorId ); aFirstMessage.Message = sInfo; aInfo = aFirstMessage; if ( isEditable() ) { sal_uInt16 nCommand = 0; - if ( nErrorId == RID_ERR_NO_COMMAND ) + if (!strcmp(pErrorId, RID_ERR_NO_COMMAND)) { if ( !m_bShowProperties ) executeUnChecked(SID_SHOW_PROPERTYBROWSER,uno::Sequence< beans::PropertyValue>()); @@ -2904,7 +2904,7 @@ uno::Reference<frame::XModel> OReportController::executeReport() // our first message says: we caught an exception sdb::SQLContext aFirstMessage; - OUString sInfo(ModuleRes(RID_STR_CAUGHT_FOREIGN_EXCEPTION)); + OUString sInfo(RptResId(RID_STR_CAUGHT_FOREIGN_EXCEPTION)); sInfo = sInfo.replaceAll("$type$", aCaughtException.getValueTypeName()); aFirstMessage.Message = sInfo; @@ -2930,7 +2930,7 @@ uno::Reference<frame::XModel> OReportController::executeReport() } if (aInfo.isValid()) { - const OUString suSQLContext = ModuleRes( RID_STR_COULD_NOT_CREATE_REPORT ); + const OUString suSQLContext = RptResId( RID_STR_COULD_NOT_CREATE_REPORT ); aInfo.prepend(suSQLContext); } m_bInGeneratePreview = false; @@ -2986,7 +2986,7 @@ uno::Reference< sdbc::XRowSet > const & OReportController::getRowSet() void OReportController::insertGraphic() { - const OUString sTitle(ModuleRes(RID_STR_IMPORT_GRAPHIC)); + const OUString sTitle(RptResId(RID_STR_IMPORT_GRAPHIC)); // build some arguments for the upcoming dialog try { @@ -3082,7 +3082,7 @@ void SAL_CALL OReportController::removeSelectionChangeListener( const Reference< void OReportController::createNewFunction(const uno::Any& _aValue) { uno::Reference< container::XIndexContainer> xFunctions(_aValue,uno::UNO_QUERY_THROW); - const OUString sNewName = ModuleRes(RID_STR_FUNCTION); + const OUString sNewName = RptResId(RID_STR_FUNCTION); uno::Reference< report::XFunction> xFunction(report::Function::create(m_xContext)); xFunction->setName(sNewName); // the call below will also create an undo action -> listener @@ -3217,7 +3217,7 @@ void OReportController::createDateTime(const Sequence< PropertyValue >& _aArgs) { getDesignView()->unmarkAllObjects(); - const OUString sUndoAction(ModuleRes(RID_STR_UNDO_INSERT_CONTROL)); + const OUString sUndoAction(RptResId(RID_STR_UNDO_INSERT_CONTROL)); UndoContext aUndoContext( getUndoManager(), sUndoAction ); SequenceAsHashMap aMap(_aArgs); @@ -3245,7 +3245,7 @@ void OReportController::createPageNumber(const Sequence< PropertyValue >& _aArgs { getDesignView()->unmarkAllObjects(); - const OUString sUndoAction(ModuleRes(RID_STR_UNDO_INSERT_CONTROL)); + const OUString sUndoAction(RptResId(RID_STR_UNDO_INSERT_CONTROL)); UndoContext aUndoContext( getUndoManager(), sUndoAction ); if ( !m_xReportDefinition->getPageHeaderOn() ) @@ -3257,12 +3257,12 @@ void OReportController::createPageNumber(const Sequence< PropertyValue >& _aArgs SequenceAsHashMap aMap(_aArgs); bool bStateOfPage = aMap.getUnpackedValueOrDefault(PROPERTY_STATE, false); - OUString sFunction( ModuleRes(STR_RPT_PN_PAGE) ); + OUString sFunction( RptResId(STR_RPT_PN_PAGE) ); sFunction = sFunction.replaceFirst("#PAGENUMBER#", "PageNumber()"); if ( bStateOfPage ) { - sFunction += ModuleRes(STR_RPT_PN_PAGE_OF); + sFunction += RptResId(STR_RPT_PN_PAGE_OF); sFunction = sFunction.replaceFirst("#PAGECOUNT#", "PageCount()"); } @@ -3288,7 +3288,7 @@ void OReportController::addPairControls(const Sequence< PropertyValue >& aArgs) } uno::Reference<report::XSection> xCurrentSection = getDesignView()->getCurrentSection(); - UndoContext aUndoContext( getUndoManager(), OUString( ModuleRes( RID_STR_UNDO_INSERT_CONTROL ) ) ); + UndoContext aUndoContext(getUndoManager(), RptResId(RID_STR_UNDO_INSERT_CONTROL)); try { @@ -3742,7 +3742,7 @@ void OReportController::switchReportSection(const sal_Int16 _nId) std::unique_ptr< UndoContext > pUndoContext; if ( SID_REPORTHEADERFOOTER == _nId ) { - const OUString sUndoAction(ModuleRes(bSwitchOn ? RID_STR_UNDO_ADD_REPORTHEADERFOOTER : RID_STR_UNDO_REMOVE_REPORTHEADERFOOTER)); + const OUString sUndoAction(RptResId(bSwitchOn ? RID_STR_UNDO_ADD_REPORTHEADERFOOTER : RID_STR_UNDO_REMOVE_REPORTHEADERFOOTER)); pUndoContext.reset( new UndoContext( getUndoManager(), sUndoAction ) ); addUndoAction(new OReportSectionUndo(*(m_aReportModel),SID_REPORTHEADER_WITHOUT_UNDO @@ -3789,7 +3789,7 @@ void OReportController::switchPageSection(const sal_Int16 _nId) std::unique_ptr< UndoContext > pUndoContext; if ( SID_PAGEHEADERFOOTER == _nId ) { - const OUString sUndoAction(ModuleRes(bSwitchOn ? RID_STR_UNDO_ADD_REPORTHEADERFOOTER : RID_STR_UNDO_REMOVE_REPORTHEADERFOOTER)); + const OUString sUndoAction(RptResId(bSwitchOn ? RID_STR_UNDO_ADD_REPORTHEADERFOOTER : RID_STR_UNDO_REMOVE_REPORTHEADERFOOTER)); pUndoContext.reset( new UndoContext( getUndoManager(), sUndoAction ) ); addUndoAction(new OReportSectionUndo(*m_aReportModel @@ -4127,14 +4127,14 @@ bool OReportController::isFormatCommandEnabled(sal_uInt16 _nCommand,const uno::R return bRet; } -bool OReportController::impl_setPropertyAtControls_throw(const sal_uInt16 _nUndoResId,const OUString& _sProperty,const uno::Any& _aValue,const Sequence< PropertyValue >& _aArgs) +bool OReportController::impl_setPropertyAtControls_throw(const char* pUndoResId,const OUString& _sProperty,const uno::Any& _aValue,const Sequence< PropertyValue >& _aArgs) { ::std::vector< uno::Reference< uno::XInterface > > aSelection; uno::Reference< awt::XWindow> xWindow; lcl_getReportControlFormat( _aArgs, getDesignView(), xWindow, aSelection ); ::std::vector< uno::Reference< uno::XInterface > >::const_iterator aIter = aSelection.begin(); - const OUString sUndoAction = ModuleRes( _nUndoResId ); + const OUString sUndoAction = RptResId( pUndoResId ); UndoContext aUndoContext( getUndoManager(), sUndoAction ); for(; aIter != aSelection.end();++aIter) diff --git a/reportdesign/source/ui/report/ReportSection.cxx b/reportdesign/source/ui/report/ReportSection.cxx index 544dfb203638..7363f3eaaf9d 100644 --- a/reportdesign/source/ui/report/ReportSection.cxx +++ b/reportdesign/source/ui/report/ReportSection.cxx @@ -20,7 +20,7 @@ #include "ReportSection.hxx" #include "ReportWindow.hxx" #include "DesignView.hxx" -#include "uistrings.hrc" +#include "strings.hxx" #include "RptObject.hxx" #include "RptModel.hxx" #include "SectionView.hxx" @@ -50,7 +50,7 @@ #include "RptDef.hxx" #include "SectionWindow.hxx" #include "helpids.hrc" -#include "RptResId.hrc" +#include "strings.hrc" #include "dlgedclip.hxx" #include "UndoActions.hxx" #include "rptui_slotid.hrc" diff --git a/reportdesign/source/ui/report/ReportWindow.cxx b/reportdesign/source/ui/report/ReportWindow.cxx index 8ac0e90fa598..6513c2cba02c 100644 --- a/reportdesign/source/ui/report/ReportWindow.cxx +++ b/reportdesign/source/ui/report/ReportWindow.cxx @@ -32,7 +32,7 @@ #include "RptDef.hxx" #include "dlgedfunc.hxx" #include "RptModel.hxx" -#include "uistrings.hrc" +#include "strings.hxx" #include "RptPage.hxx" #include "ReportController.hxx" #include "EndMarker.hxx" diff --git a/reportdesign/source/ui/report/SectionView.cxx b/reportdesign/source/ui/report/SectionView.cxx index d94fe0deb51d..b179abc92811 100644 --- a/reportdesign/source/ui/report/SectionView.cxx +++ b/reportdesign/source/ui/report/SectionView.cxx @@ -26,7 +26,7 @@ #include <vcl/scrbar.hxx> #include "ReportSection.hxx" #include "ReportWindow.hxx" -#include "uistrings.hrc" +#include "strings.hxx" #include <tools/debug.hxx> #include <tools/diagnose_ex.h> diff --git a/reportdesign/source/ui/report/SectionWindow.cxx b/reportdesign/source/ui/report/SectionWindow.cxx index 6e4a3fa386e6..ebcc09695dbb 100644 --- a/reportdesign/source/ui/report/SectionWindow.cxx +++ b/reportdesign/source/ui/report/SectionWindow.cxx @@ -24,9 +24,10 @@ #include "RptDef.hxx" #include "ReportSection.hxx" #include "DesignView.hxx" -#include "uistrings.hrc" +#include "strings.hxx" +#include "core_resource.hxx" #include "helpids.hrc" -#include "RptResId.hrc" +#include "strings.hrc" #include "StartMarker.hxx" #include "EndMarker.hxx" #include "ViewsWindow.hxx" @@ -149,7 +150,7 @@ void OSectionWindow::_propertyChanged(const beans::PropertyChangeEvent& _rEvent) } else { - OUString sTitle = ModuleRes(RID_STR_DETAIL); + OUString sTitle = RptResId(RID_STR_DETAIL); m_aStartMarker->setTitle(sTitle); m_aStartMarker->Invalidate(InvalidateFlags::Children); } @@ -165,20 +166,20 @@ void OSectionWindow::_propertyChanged(const beans::PropertyChangeEvent& _rEvent) } } -bool OSectionWindow::setReportSectionTitle(const uno::Reference< report::XReportDefinition>& _xReport,sal_uInt16 _nResId,::std::mem_fun_t<uno::Reference<report::XSection> , OReportHelper> _pGetSection, const ::std::mem_fun_t<bool,OReportHelper>& _pIsSectionOn) +bool OSectionWindow::setReportSectionTitle(const uno::Reference< report::XReportDefinition>& _xReport,const char* pResId,::std::mem_fun_t<uno::Reference<report::XSection> , OReportHelper> _pGetSection, const ::std::mem_fun_t<bool,OReportHelper>& _pIsSectionOn) { OReportHelper aReportHelper(_xReport); const bool bRet = _pIsSectionOn(&aReportHelper) && _pGetSection(&aReportHelper) == m_aReportSection->getSection(); if ( bRet ) { - OUString sTitle = ModuleRes(_nResId); + OUString sTitle = RptResId(pResId); m_aStartMarker->setTitle(sTitle); m_aStartMarker->Invalidate(InvalidateFlags::Children); } return bRet; } -bool OSectionWindow::setGroupSectionTitle(const uno::Reference< report::XGroup>& _xGroup,sal_uInt16 _nResId,::std::mem_fun_t<uno::Reference<report::XSection> , OGroupHelper> _pGetSection, const ::std::mem_fun_t<bool,OGroupHelper>& _pIsSectionOn) +bool OSectionWindow::setGroupSectionTitle(const uno::Reference< report::XGroup>& _xGroup,const char* pResId,::std::mem_fun_t<uno::Reference<report::XSection> , OGroupHelper> _pGetSection, const ::std::mem_fun_t<bool,OGroupHelper>& _pIsSectionOn) { OGroupHelper aGroupHelper(_xGroup); const bool bRet = _pIsSectionOn(&aGroupHelper) && _pGetSection(&aGroupHelper) == m_aReportSection->getSection() ; @@ -191,8 +192,7 @@ bool OSectionWindow::setGroupSectionTitle(const uno::Reference< report::XGroup>& sExpression = sLabel; } - ModuleRes aRes(_nResId); - OUString sTitle(aRes); + OUString sTitle(RptResId(pResId)); sTitle = sTitle.replaceFirst("#", sExpression); m_aStartMarker->setTitle( sTitle ); m_aStartMarker->Invalidate(InvalidateFlags::Children); @@ -317,7 +317,7 @@ void OSectionWindow::zoom(const Fraction& _aZoom) IMPL_LINK_NOARG( OSectionWindow, StartSplitHdl, Splitter*, void) { - const OUString sUndoAction( ModuleRes( RID_STR_UNDO_CHANGE_SIZE ) ); + const OUString sUndoAction( RptResId( RID_STR_UNDO_CHANGE_SIZE ) ); getViewsWindow()->getView()->getReportView()->getController().getUndoManager().EnterListAction( sUndoAction, OUString(), 0, ViewShellId(-1) ); } diff --git a/reportdesign/source/ui/report/StartMarker.cxx b/reportdesign/source/ui/report/StartMarker.cxx index 5e070d8076f7..ac3c7b5a6221 100644 --- a/reportdesign/source/ui/report/StartMarker.cxx +++ b/reportdesign/source/ui/report/StartMarker.cxx @@ -19,9 +19,8 @@ #include "StartMarker.hxx" #include <vcl/image.hxx> #include <vcl/svapp.hxx> -#include "RptResId.hrc" +#include "strings.hrc" #include "bitmaps.hlst" -#include "ModuleHelper.hxx" #include "ColorChanger.hxx" #include "ReportDefines.hxx" #include "SectionWindow.hxx" diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx b/reportdesign/source/ui/report/ViewsWindow.cxx index a8c1f9d021ee..b97a72d1efa2 100644 --- a/reportdesign/source/ui/report/ViewsWindow.cxx +++ b/reportdesign/source/ui/report/ViewsWindow.cxx @@ -26,21 +26,20 @@ #include "ReportController.hxx" #include "UITools.hxx" #include "RptDef.hxx" -#include "RptResId.hrc" +#include "strings.hrc" #include "SectionView.hxx" #include "ReportSection.hxx" -#include "uistrings.hrc" +#include "strings.hxx" #include "rptui_slotid.hrc" #include "dlgedclip.hxx" #include "ColorChanger.hxx" #include "RptObject.hxx" -#include "ModuleHelper.hxx" #include "EndMarker.hxx" #include <svx/svdpagv.hxx> #include <svx/unoshape.hxx> #include <vcl/svapp.hxx> #include <vcl/settings.hxx> - +#include "core_resource.hxx" #include "helpids.hrc" #include <svx/svdundo.hxx> #include <toolkit/helper/convert.hxx> @@ -1234,7 +1233,7 @@ void OViewsWindow::EndDragObj_removeInvisibleObjects() void OViewsWindow::EndDragObj(bool _bControlKeyPressed, const OSectionView* _pSection, const Point& _aPnt) { - const OUString sUndoAction = ModuleRes(RID_STR_UNDO_CHANGEPOSITION); + const OUString sUndoAction = RptResId(RID_STR_UNDO_CHANGEPOSITION); const UndoContext aUndoContext( getView()->getReportView()->getController().getUndoManager(), sUndoAction ); Point aNewPos = _aPnt; diff --git a/reportdesign/source/ui/report/dlgedfac.cxx b/reportdesign/source/ui/report/dlgedfac.cxx index 0bc995800283..bc4e87011c39 100644 --- a/reportdesign/source/ui/report/dlgedfac.cxx +++ b/reportdesign/source/ui/report/dlgedfac.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ #include "dlgedfac.hxx" -#include "uistrings.hrc" +#include "strings.hxx" #include "RptObject.hxx" #include <RptDef.hxx> #include <com/sun/star/container/XNameContainer.hpp> diff --git a/reportdesign/source/ui/report/dlgedfunc.cxx b/reportdesign/source/ui/report/dlgedfunc.cxx index 62b8fe3fef35..a57d3eec9dc9 100644 --- a/reportdesign/source/ui/report/dlgedfunc.cxx +++ b/reportdesign/source/ui/report/dlgedfunc.cxx @@ -48,7 +48,7 @@ #include "ScrollHelper.hxx" #include "UITools.hxx" -#include <uistrings.hrc> +#include <strings.hxx> #include "UndoEnv.hxx" #include <RptModel.hxx> #include <comphelper/propertysequence.hxx> diff --git a/reportdesign/source/ui/report/propbrw.cxx b/reportdesign/source/ui/report/propbrw.cxx index 5e7316b7dcd3..7c0ffd2b9149 100644 --- a/reportdesign/source/ui/report/propbrw.cxx +++ b/reportdesign/source/ui/report/propbrw.cxx @@ -21,7 +21,7 @@ #include "RptObject.hxx" #include "ReportController.hxx" #include <cppuhelper/component_context.hxx> -#include <RptResId.hrc> +#include <strings.hrc> #include "rptui_slotid.hrc" #include <tools/debug.hxx> #include <tools/diagnose_ex.h> @@ -47,9 +47,10 @@ #include <comphelper/types.hxx> #include <comphelper/sequence.hxx> #include <comphelper/processfactory.hxx> +#include "core_resource.hxx" #include "SectionView.hxx" #include "ReportSection.hxx" -#include "uistrings.hrc" +#include "strings.hxx" #include "DesignView.hxx" #include "ViewsWindow.hxx" #include "UITools.hxx" @@ -332,52 +333,52 @@ OUString PropBrw::GetHeadlineName( const uno::Sequence< Reference<uno::XInterfac OUString aName; if ( !_aObjects.getLength() ) { - aName = ModuleRes(RID_STR_BRWTITLE_NO_PROPERTIES); + aName = RptResId(RID_STR_BRWTITLE_NO_PROPERTIES); } else if ( _aObjects.getLength() == 1 ) // single selection { - aName = ModuleRes(RID_STR_BRWTITLE_PROPERTIES); + aName = RptResId(RID_STR_BRWTITLE_PROPERTIES); uno::Reference< container::XNameContainer > xNameCont(_aObjects[0],uno::UNO_QUERY); Reference< lang::XServiceInfo > xServiceInfo( xNameCont->getByName("ReportComponent"), UNO_QUERY ); if ( xServiceInfo.is() ) { - sal_uInt16 nResId = 0; + const char* pResId = nullptr; if ( xServiceInfo->supportsService( SERVICE_FIXEDTEXT ) ) { - nResId = RID_STR_PROPTITLE_FIXEDTEXT; + pResId = RID_STR_PROPTITLE_FIXEDTEXT; } else if ( xServiceInfo->supportsService( SERVICE_IMAGECONTROL ) ) { - nResId = RID_STR_PROPTITLE_IMAGECONTROL; + pResId = RID_STR_PROPTITLE_IMAGECONTROL; } else if ( xServiceInfo->supportsService( SERVICE_FORMATTEDFIELD ) ) { - nResId = RID_STR_PROPTITLE_FORMATTED; + pResId = RID_STR_PROPTITLE_FORMATTED; } else if ( xServiceInfo->supportsService( SERVICE_SHAPE ) ) { - nResId = RID_STR_PROPTITLE_SHAPE; + pResId = RID_STR_PROPTITLE_SHAPE; } else if ( xServiceInfo->supportsService( SERVICE_REPORTDEFINITION ) ) { - nResId = RID_STR_PROPTITLE_REPORT; + pResId = RID_STR_PROPTITLE_REPORT; } else if ( xServiceInfo->supportsService( SERVICE_SECTION ) ) { - nResId = RID_STR_PROPTITLE_SECTION; + pResId = RID_STR_PROPTITLE_SECTION; } else if ( xServiceInfo->supportsService( SERVICE_FUNCTION ) ) { - nResId = RID_STR_PROPTITLE_FUNCTION; + pResId = RID_STR_PROPTITLE_FUNCTION; } else if ( xServiceInfo->supportsService( SERVICE_GROUP ) ) { - nResId = RID_STR_PROPTITLE_GROUP; + pResId = RID_STR_PROPTITLE_GROUP; } else if ( xServiceInfo->supportsService( SERVICE_FIXEDLINE ) ) { - nResId = RID_STR_PROPTITLE_FIXEDLINE; + pResId = RID_STR_PROPTITLE_FIXEDLINE; } else { @@ -386,16 +387,16 @@ OUString PropBrw::GetHeadlineName( const uno::Sequence< Reference<uno::XInterfac return aName; } - if (nResId) + if (pResId) { - aName += ModuleRes(nResId); + aName += RptResId(pResId); } } } else // multiselection { - aName = ModuleRes(RID_STR_BRWTITLE_PROPERTIES); - aName += ModuleRes(RID_STR_BRWTITLE_MULTISELECT); + aName = RptResId(RID_STR_BRWTITLE_PROPERTIES); + aName += RptResId(RID_STR_BRWTITLE_MULTISELECT); } return aName; diff --git a/reportdesign/source/ui/report/report.src b/reportdesign/source/ui/report/report.src deleted file mode 100644 index 55472688ab79..000000000000 --- a/reportdesign/source/ui/report/report.src +++ /dev/null @@ -1,284 +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 "RptResId.hrc" -#include "rptui_slotid.hrc" -#include <svx/svxids.hrc> -#include "helpids.hrc" - -// Property Browser Headline ---------------------------------------------------------------- - -String RID_STR_BRWTITLE_PROPERTIES -{ - Text [ en-US ] = "Properties: "; -}; -String RID_STR_BRWTITLE_NO_PROPERTIES -{ - Text [ en-US ] = "No Control marked"; -}; -String RID_STR_BRWTITLE_MULTISELECT -{ - Text [ en-US ] = "Multiselection"; -}; - -String RID_STR_PROPTITLE_IMAGECONTROL -{ - Text [ en-US ] = "Image Control" ; -}; -String RID_STR_PROPTITLE_FIXEDTEXT -{ - Text [ en-US ] = "Label field" ; -}; -String RID_STR_PROPTITLE_FIXEDLINE -{ - Text [ en-US ] = "Line" ; -}; -String RID_STR_PROPTITLE_FORMATTED -{ - Text [ en-US ] = "Formatted Field"; -}; -String RID_STR_PROPTITLE_SHAPE -{ - Text [ en-US ] = "Shape"; -}; -String RID_STR_PROPTITLE_REPORT -{ - Text [ en-US ] = "Report"; -}; -String RID_STR_PROPTITLE_SECTION -{ - Text [ en-US ] = "Section"; -}; -String RID_STR_PROPTITLE_FUNCTION -{ - Text [ en-US ] = "Function"; -}; -String RID_STR_PROPTITLE_GROUP -{ - Text [ en-US ] = "Group"; -}; - -String RID_STR_UNDO_CHANGEPOSITION -{ - Text [ en-US ] = "Change Object"; -}; -String RID_STR_UNDO_MOVE_GROUP -{ - Text [ en-US ] = "Move Group(s)"; -}; -String RID_STR_UNDO_CONDITIONAL_FORMATTING -{ - Text [ en-US ] = "Conditional Formatting"; -}; -String RID_STR_UNDO_REMOVE_REPORTHEADERFOOTER -{ - Text [ en-US ] = "Remove report header / report footer"; -}; - -String RID_STR_UNDO_ADD_REPORTHEADERFOOTER -{ - Text [ en-US ] = "Add report header / report footer"; -}; - -String RID_STR_UNDO_PROPERTY -{ - Text [ en-US ] = "Change property '#'"; - Text [ x-comment ] = "The # character is used for replacing"; -}; - -String RID_STR_UNDO_ADD_GROUP_HEADER -{ - Text [ en-US ] = "Add group header "; -}; - -String RID_STR_UNDO_REMOVE_GROUP_HEADER -{ - Text [ en-US ] = "Remove group header "; -}; - -String RID_STR_UNDO_ADD_GROUP_FOOTER -{ - Text [ en-US ] = "Add group footer "; -}; - -String RID_STR_UNDO_REMOVE_GROUP_FOOTER -{ - Text [ en-US ] = "Remove group footer "; -}; -String RID_STR_UNDO_ADDFUNCTION -{ - Text [ en-US ] = "Add function"; -}; - -String STR_RPT_LABEL -{ - Text [ en-US ] = "~Report name" ; -}; - -String RID_STR_UNDO_REMOVE_GROUP -{ - Text [ en-US ] = "Delete Group" ; -}; - -String RID_STR_UNDO_APPEND_GROUP -{ - Text [ en-US ] = "Add Group" ; -}; - -String RID_STR_UNDO_REMOVE_SELECTION -{ - Text [ en-US ] = "Delete Selection" ; -}; -String RID_STR_UNDO_REMOVE_FUNCTION -{ - Text [ en-US ] = "Delete Function" ; -}; - -String RID_STR_UNDO_CHANGE_SIZE -{ - Text [ en-US ] = "Change Size" ; -}; - -String RID_STR_UNDO_PASTE -{ - Text [ en-US ] = "Paste" ; -}; - -String RID_STR_UNDO_INSERT_CONTROL -{ - Text [ en-US ] = "Insert Control" ; -}; - -String RID_STR_UNDO_DELETE_CONTROL -{ - Text [ en-US ] = "Delete Control" ; -}; - -String RID_STR_GROUPHEADER -{ - Text [ en-US ] = "GroupHeader"; - Text [ x-comment ] = "Please try to avoid spaces in the name. It is used as a programmatic one."; -}; -String RID_STR_GROUPFOOTER -{ - Text [ en-US ] = "GroupFooter"; - Text [ x-comment ] = "Please try to avoid spaces in the name. It is used as a programmatic one."; -}; - -String RID_STR_FIELDSELECTION -{ - Text [ en-US ] = "Add field:"; -}; - -String RID_STR_FILTER -{ - Text [ en-US ] = "Filter" ; -}; - -String RID_STR_UNDO_ALIGNMENT -{ - Text [ en-US ] = "Change Alignment" ; -}; -String RID_STR_HEADER -{ - Text [ en-US ] = "# Header" ; - Text[ x-comment ] = "# will be replaced with a name."; -}; -String RID_STR_FOOTER -{ - Text [ en-US ] = "# Footer" ; - Text[ x-comment ] = "# will be replaced with a name."; -}; -String RID_STR_IMPORT_GRAPHIC -{ - Text [ en-US ] = "Insert graphics" ; -}; -String RID_STR_DELETE -{ - Text [ en-US ] = "Delete" ; -}; -String RID_STR_FUNCTION -{ - Text [ en-US ] = "Function" ; -}; - -String RID_STR_COULD_NOT_CREATE_REPORT -{ - Text [ en-US ] = "An error occurred while creating the report." ; -}; -String RID_STR_CAUGHT_FOREIGN_EXCEPTION -{ - Text [ en-US ] = "An exception of type $type$ was caught." ; -}; -String RID_STR_UNDO_CHANGEFONT -{ - Text [ en-US ] = "Change font"; -}; -String RID_STR_UNDO_CHANGEPAGE -{ - Text [ en-US ] = "Change page attributes"; -}; -String RID_STR_PAGEHEADERFOOTER_INSERT -{ - Text [ en-US ] = "Insert Page Header/Footer"; -}; -String RID_STR_PAGEHEADERFOOTER_DELETE -{ - Text [ en-US ] = "Delete Page Header/Footer"; -}; -String RID_STR_REPORTHEADERFOOTER_INSERT -{ - Text [ en-US ] = "Insert Report Header/Footer"; -}; -String RID_STR_REPORTHEADERFOOTER_DELETE -{ - Text [ en-US ] = "Delete Report Header/Footer"; -}; -String RID_ERR_NO_COMMAND -{ - Text [ en-US ] = "The report can not be executed unless it is bound to content."; -}; -String RID_ERR_NO_OBJECTS -{ - Text [ en-US ] = "The report can not be executed unless at least one object has been inserted."; -}; -String RID_STR_UNDO_SHRINK -{ - Text [ en-US ] = "Shrink Section"; -}; -String RID_STR_DETAIL -{ - Text [ en-US ] = "Detail"; -}; -String RID_STR_PAGE_HEADER -{ - Text [ en-US ] = "Page Header"; -}; -String RID_STR_PAGE_FOOTER -{ - Text [ en-US ] = "Page Footer"; -}; -String RID_STR_REPORT_HEADER -{ - Text [ en-US ] = "Report Header"; -}; -String RID_STR_REPORT_FOOTER -{ - Text [ en-US ] = "Report Footer"; -}; -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |