Kaydet (Commit) d1c74734 authored tarafından Zolnai Tamás's avatar Zolnai Tamás Kaydeden (comit) Zolnai Tamás

Transex3: NO_LOCALIZE_EXPORT

In the past, NO_LOCALIZE_EXPORT macro must be used to
skip uneeded parsing of src files which has no localizable content.
It is unsued by now and it is more effective to handle
this files on gmake level:
gb_SrsTarget_add_nonlocalizable_files
gb_SrsTarget_add_nonlocalizable_templates

Plus remove some empty src file.

Change-Id: I8fc9b2db0b5fd7a3379d3c5be970c4fc691f4c53
üst bbee5985
......@@ -27,14 +27,8 @@ $(eval $(call gb_SrsTarget_set_include,chart2/res,\
))
$(eval $(call gb_SrsTarget_add_files,chart2/res,\
chart2/source/controller/dialogs/Bitmaps.src \
chart2/source/controller/dialogs/dlg_ChartType.src \
chart2/source/controller/dialogs/dlg_CreationWizard.src \
chart2/source/controller/dialogs/dlg_DataEditor.src \
chart2/source/controller/dialogs/dlg_DataSource.src \
chart2/source/controller/dialogs/dlg_InsertDataLabel.src \
chart2/source/controller/dialogs/dlg_InsertErrorBars.src \
chart2/source/controller/dialogs/dlg_InsertLegend.src \
chart2/source/controller/dialogs/dlg_ShapeFont.src \
chart2/source/controller/dialogs/dlg_ShapeParagraph.src \
chart2/source/controller/dialogs/res_BarGeometry.src \
......@@ -44,16 +38,21 @@ $(eval $(call gb_SrsTarget_add_files,chart2/res,\
chart2/source/controller/dialogs/Strings_Scale.src \
chart2/source/controller/dialogs/Strings.src \
chart2/source/controller/dialogs/Strings_Statistic.src \
chart2/source/controller/dialogs/tp_AxisLabel.src \
chart2/source/controller/dialogs/tp_ChartType.src \
chart2/source/controller/dialogs/tp_DataSource.src \
chart2/source/controller/dialogs/tp_ErrorBars.src \
chart2/source/controller/dialogs/tp_PointGeometry.src \
chart2/source/controller/dialogs/tp_PolarOptions.src \
chart2/source/controller/dialogs/tp_RangeChooser.src \
))
$(eval $(call gb_SrsTarget_add_nonlocalized_files,chart2/res,\
$(eval $(call gb_SrsTarget_add_nonlocalizable_files,chart2/res,\
chart2/source/controller/dialogs/Bitmaps.src \
chart2/source/controller/dialogs/dlg_ChartType.src \
chart2/source/controller/dialogs/dlg_CreationWizard.src \
chart2/source/controller/dialogs/dlg_InsertDataLabel.src \
chart2/source/controller/dialogs/dlg_InsertErrorBars.src \
chart2/source/controller/dialogs/dlg_InsertLegend.src \
chart2/source/controller/dialogs/tp_ErrorBars.src \
chart2/source/controller/dialogs/tp_PointGeometry.src \
chart2/source/controller/menus/ShapeContextMenu.src \
chart2/source/controller/menus/ShapeEditContextMenu.src \
))
......
......@@ -20,7 +20,7 @@ $(eval $(call gb_SrsTarget_set_include,sdbcl/res,\
$$(INCLUDE) \
))
$(eval $(call gb_SrsTarget_add_files,sdbcl/res,\
$(eval $(call gb_SrsTarget_add_nonlocalizable_files,sdbcl/res,\
connectivity/source/resource/conn_log_res.src \
))
......
......@@ -55,7 +55,6 @@ $(eval $(call gb_SrsTarget_add_files,cui/res,\
cui/source/options/optlingu.src \
cui/source/options/optpath.src \
cui/source/options/treeopt.src \
cui/source/tabpages/align.src \
cui/source/tabpages/autocdlg.src \
cui/source/tabpages/border.src \
cui/source/tabpages/dstribut.src \
......@@ -67,4 +66,8 @@ $(eval $(call gb_SrsTarget_add_files,cui/res,\
cui/source/tabpages/strings.src \
))
$(eval $(call gb_SrsTarget_add_nonlocalizable_files,cui/res,\
cui/source/tabpages/align.src \
))
# vim: set noet sw=4 ts=4:
......@@ -69,7 +69,7 @@ $(eval $(call gb_SrsTarget_add_files,dbaccess/dbu,\
dbaccess/source/ui/uno/dbinteraction.src \
))
$(eval $(call gb_SrsTarget_add_nonlocalized_files,dbaccess/dbu,\
$(eval $(call gb_SrsTarget_add_nonlocalizable_files,dbaccess/dbu,\
dbaccess/source/ui/imagelists/dbimagelists.src \
))
......
......@@ -25,7 +25,6 @@ $(eval $(call gb_SrsTarget_set_include,deploymentgui/res,\
))
$(eval $(call gb_SrsTarget_add_files,deploymentgui/res,\
desktop/source/deployment/gui/dp_gui_backend.src \
desktop/source/deployment/gui/dp_gui_dependencydialog.src \
desktop/source/deployment/gui/dp_gui_dialog2.src \
desktop/source/deployment/gui/dp_gui_dialog.src \
......@@ -34,4 +33,8 @@ $(eval $(call gb_SrsTarget_add_files,deploymentgui/res,\
desktop/source/deployment/gui/dp_gui_versionboxes.src \
))
$(eval $(call gb_SrsTarget_add_nonlocaliable_files,deploymentgui/res,\
desktop/source/deployment/gui/dp_gui_backend.src \
))
# vim: set ts=4 sw=4 et:
......@@ -30,8 +30,11 @@ $(eval $(call gb_SrsTarget_add_files,pcr/res,\
extensions/source/propctrlr/pcrmiscres.src \
extensions/source/propctrlr/selectlabeldialog.src \
extensions/source/propctrlr/formlinkdialog.src \
extensions/source/propctrlr/listselectiondlg.src \
extensions/source/propctrlr/newdatatype.src \
))
$(eval $(call gb_SrsTarget_add_nonlocalizable_files,pcr/res,\
extensions/source/propctrlr/listselectiondlg.src \
))
# vim:set noet sw=4 ts=4:
......@@ -19,7 +19,7 @@ $(eval $(call gb_AllLangResTarget_add_srs,updchk,\
$(eval $(call gb_SrsTarget_SrsTarget,updchk/res))
$(eval $(call gb_SrsTarget_add_nonlocalized_files,updchk/res,\
$(eval $(call gb_SrsTarget_add_nonlocalizable_files,updchk/res,\
extensions/source/update/ui/updatecheckui.src \
))
......
......@@ -47,7 +47,7 @@ $(eval $(call gb_SrsTarget_set_include,fwe/fwk_services,\
-I$(SRCDIR)/framework/inc/services \
))
$(eval $(call gb_SrsTarget_add_files,fwe/fwk_services,\
$(eval $(call gb_SrsTarget_add_nonlocalizable_files,fwe/fwk_services,\
framework/source/services/fwk_services.src \
))
# vim: set noet sw=4 ts=4:
......@@ -171,7 +171,6 @@ private:
OString m_sListLang;
std::size_t nListIndex;
std::size_t nListLevel;
bool bSkipFile;
sal_Bool bMergeMode;
OString sMergeSrc;
sal_Bool bError; // any errors while export?
......
......@@ -180,7 +180,6 @@ Export::Export(const OString &rOutput)
nList( LIST_NON ),
nListIndex( 0 ),
nListLevel( 0 ),
bSkipFile( false ),
bMergeMode( false ),
bError( sal_False ),
bReadOver( sal_False ),
......@@ -205,7 +204,6 @@ Export::Export(
nList( LIST_NON ),
nListIndex( 0 ),
nListLevel( 0 ),
bSkipFile( false ),
bMergeMode( sal_True ),
sMergeSrc( rMergeSource ),
bError( sal_False ),
......@@ -304,14 +302,6 @@ int Export::Execute( int nToken, const char * pToken )
WriteToMerged( sOrig , false );
return 0;
}
// #define NO_LOCALIZE_EXPORT
if( bSkipFile ){
if ( bMergeMode ) {
WriteToMerged( sOrig , false );
}
return 1;
}
if ( bDefine ) {
if (( nToken != EMPTYLINE ) && ( nToken != LEVELDOWN ) && ( nToken != LEVELUP )) {
......@@ -361,24 +351,9 @@ int Export::Execute( int nToken, const char * pToken )
switch ( nToken ) {
case NORMDEFINE:
sToken = sToken.replace('\r', ' ').replace('\t', ' ');
for (;;) {
sal_Int32 n = 0;
sToken = sToken.replaceFirst(" ", " ", &n);
if (n == -1) {
break;
}
}
if( sToken.equalsIgnoreAsciiCase("#define NO_LOCALIZE_EXPORT") ){
bSkipFile = true;
return 0;
}
if ( bMergeMode )
WriteToMerged( sOrig , false );
return 0;
if ( bMergeMode )
WriteToMerged( sOrig , false );
return 0;
case RSCDEFINE:
bDefine = sal_True; // res. defined in macro
......
......@@ -33,7 +33,6 @@ $(eval $(call gb_SrsTarget_set_include,sc/res,\
))
$(eval $(call gb_SrsTarget_add_files,sc/res,\
sc/source/ui/src/iconsets.src \
sc/source/ui/src/popup.src \
sc/source/ui/src/autofmt.src \
sc/source/ui/src/globstr.src \
......@@ -42,7 +41,6 @@ $(eval $(call gb_SrsTarget_add_files,sc/res,\
sc/source/ui/src/scfuncs.src \
sc/source/ui/src/textdlgs.src \
sc/source/ui/src/sc.src \
sc/source/ui/src/pseudo.src \
sc/source/ui/src/hdrcont.src \
sc/source/ui/src/scerrors.src \
sc/source/ui/src/simpref.src \
......@@ -56,7 +54,6 @@ $(eval $(call gb_SrsTarget_add_files,sc/res,\
sc/source/ui/src/xmlsourcedlg.src \
sc/source/ui/cctrl/checklistmenu.src \
sc/source/ui/navipi/navipi.src \
sc/source/ui/pagedlg/pagedlg.src \
sc/source/ui/styleui/scstyles.src \
sc/source/ui/dbgui/pivot.src \
sc/source/ui/dbgui/dpgroupdlg.src \
......@@ -64,7 +61,6 @@ $(eval $(call gb_SrsTarget_add_files,sc/res,\
sc/source/ui/dbgui/dapitype.src \
sc/source/ui/dbgui/imoptdlg.src \
sc/source/ui/dbgui/scendlg.src \
sc/source/ui/dbgui/outline.src \
sc/source/ui/dbgui/validate.src \
sc/source/ui/drawfunc/drformsh.src \
sc/source/ui/drawfunc/objdraw.src \
......@@ -72,11 +68,16 @@ $(eval $(call gb_SrsTarget_add_files,sc/res,\
sc/source/ui/miscdlgs/highred.src \
sc/source/ui/miscdlgs/conflictsdlg.src \
sc/source/ui/miscdlgs/acredlin.src \
sc/source/ui/formdlg/formdlgs.src \
sc/source/ui/formdlg/dwfunctr.src \
sc/source/ui/sidebar/CellAppearancePropertyPanel.src \
sc/source/ui/StatisticsDialogs/StatisticsDialogs.src \
sc/source/core/src/compiler.src \
))
$(eval $(call gb_SrsTarget_add_nonlocalizable_files,sc/res,\
sc/source/ui/src/iconsets.src \
sc/source/ui/pagedlg/pagedlg.src \
sc/source/ui/dbgui/outline.src \
))
# vim: set noet sw=4 ts=4:
/* -*- 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 "sc.hrc"
//---------------------------------------------------------------------------
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- 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 <svx/svxids.hrc>
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -32,8 +32,11 @@ $(eval $(call gb_SrsTarget_set_include,scaddins/analysis,\
$(eval $(call gb_SrsTarget_add_files,scaddins/analysis,\
scaddins/source/analysis/analysis.src \
scaddins/source/analysis/analysis_deffuncnames.src \
scaddins/source/analysis/analysis_funcnames.src \
))
$(eval $(call gb_SrsTarget_add_nonlocalizable_files,scaddins/analysis,\
scaddins/source/analysis/analysis_deffuncnames.src \
))
# vim: set noet sw=4 ts=4:
......@@ -43,16 +43,15 @@ $(eval $(call gb_SrsTarget_add_files,sd/res,\
sd/source/ui/app/toolbox.src \
sd/source/ui/dlg/animobjs.src \
sd/source/ui/dlg/dlgass.src \
sd/source/ui/dlg/dlgfield.src \
sd/source/ui/dlg/LayerDialog.src \
sd/source/ui/dlg/navigatr.src \
sd/source/ui/dlg/PaneDockingWindow.src \
sd/source/ui/slideshow/slideshow.src \
sd/source/ui/view/DocumentRenderer.src \
))
$(eval $(call gb_SrsTarget_add_nonlocalized_files,sd/res,\
$(eval $(call gb_SrsTarget_add_nonlocaliable_files,sd/res,\
sd/source/ui/slidesorter/view/SlsResource.src \
sd/source/ui/dlg/LayerDialog.src \
))
$(eval $(call gb_SrsTarget_add_templates,sd/res,\
......@@ -60,6 +59,10 @@ $(eval $(call gb_SrsTarget_add_templates,sd/res,\
sd/source/ui/app/menuids_tmpl.src \
sd/source/ui/app/popup2_tmpl.src \
sd/source/ui/app/tbxids_tmpl.src \
))
$(eval $(call gb_SrsTarget_add_nonlocaliable_templates,sd/res,\
sd/source/ui/app/tbxids_tmpl.src \
sd/source/ui/app/toolbox2_tmpl.src \
))
......
......@@ -39,7 +39,6 @@ $(eval $(call gb_SrsTarget_add_files,sfx/res,\
sfx2/source/appl/dde.src \
sfx2/source/appl/newhelp.src \
sfx2/source/appl/sfx.src \
sfx2/source/bastyp/bastyp.src \
sfx2/source/bastyp/fltfnc.src \
sfx2/source/control/templateview.src \
sfx2/source/dialog/dialog.src \
......@@ -50,11 +49,9 @@ $(eval $(call gb_SrsTarget_add_files,sfx/res,\
sfx2/source/dialog/taskpane.src \
sfx2/source/dialog/templateinfodlg.src \
sfx2/source/dialog/templdlg.src \
sfx2/source/dialog/titledockwin.src \
sfx2/source/dialog/versdlg.src \
sfx2/source/doc/doc.src \
sfx2/source/doc/doctempl.src \
sfx2/source/doc/graphhelp.src \
sfx2/source/doc/new.src \
sfx2/source/doc/templatelocnames.src \
sfx2/source/doc/templatedlg.src \
......@@ -63,4 +60,10 @@ $(eval $(call gb_SrsTarget_add_files,sfx/res,\
sfx2/source/view/view.src \
))
$(eval $(call gb_SrsTarget_add_nonlocaliable_files,sfx/res,\
sfx2/source/bastyp/bastyp.src \
sfx2/source/dialog/titledockwin.src \
sfx2/source/doc/graphhelp.src \
))
# vim: set noet sw=4 ts=4:
......@@ -128,7 +128,7 @@ $(call gb_SrsTemplatePartTarget_get_target,$(1)) : $(call gb_SrsPartMergeTarget_
mkdir -p $$(dir $$@) && \
cp $$< $$@)
ifneq ($(strip $(gb_WITH_LANG)),)
$(call gb_SrsPartMergeTarget_SrsPartMergeTarget,$(1),$(true))
$(call gb_SrsPartMergeTarget_SrsPartMergeTarget,$(1),$(2))
endif
endef
......@@ -202,7 +202,7 @@ $(call gb_SrsTemplateTarget_get_clean_target,%) :
$(foreach part,$(PARTS),$(call gb_SrsPartMergeTarget_get_target,$(part))))
define gb_SrsTemplateTarget_add_file
$(call gb_SrsTemplatePartTarget_SrsTemplatePartTarget,$(2))
$(call gb_SrsTemplatePartTarget_SrsTemplatePartTarget,$(2),$(3))
$(call gb_SrsTemplateTarget_get_target,$(1)) : PARTS += $(2)
$(call gb_SrsTemplateTarget_get_clean_target,$(1)) : PARTS += $(2)
$(call gb_SrsTemplateTarget__get_target,$(1)) : $(call gb_SrsTemplatePartTarget_get_target,$(2))
......@@ -316,28 +316,24 @@ $(foreach file,$(2),$(call gb_SrsTarget_add_file,$(1),$(file)))
endef
# Add a srs file that does not have any localizable content.
# These files will be copied instead of parsing them with transex3.
#
# This only exists to allow dependencies on SDF files. It must be used
# if neither of the srs files in a directory have any localizable
# content, because in that case there is going to be no SDF generated
# for the directory. Therefore we must avoid depending on the SDF.
#
# gb_SrsTarget_add_nonlocalized_file srs file
define gb_SrsTarget_add_nonlocalized_file
# gb_SrsTarget_add_nonlocalizable_file srs file
define gb_SrsTarget_add_nonlocalizable_file
$(call gb_SrsTarget__add_file,$(1),$(2),$(false))
endef
# Add srs files that do not have any localizable content.
#
# gb_SrsTarget_add_nonlocalized_files srs file(s)
define gb_SrsTarget_add_nonlocalized_files
$(foreach file,$(2),$(call gb_SrsTarget_add_nonlocalized_file,$(1),$(file)))
# gb_SrsTarget_add_nonlocalizable_files srs file(s)
define gb_SrsTarget_add_nonlocalizable_files
$(foreach file,$(2),$(call gb_SrsTarget_add_nonlocalizable_file,$(1),$(file)))
endef
define gb_SrsTarget_add_template
$(call gb_SrsTemplateTarget_add_file,$(1),$(2))
$(call gb_SrsTemplateTarget_add_file,$(1),$(2),$(true))
endef
......@@ -346,6 +342,24 @@ $(foreach template,$(2),$(call gb_SrsTarget_add_template,$(1),$(template)))
endef
# Add a srs template that does not have any localizable content.
# These files will be copied instead of parsing them with transex3.
#
# gb_SrsTarget_add_nonlocalizable_template srs template
define gb_SrsTarget_add_nonlocalizable_template
$(call gb_SrsTemplateTarget_add_file,$(1),$(2),$(false))
endef
# Add srs templates that do not have any localizable content.
#
# gb_SrsTarget_add_nonlocalizable_templates srs template(s)
define gb_SrsTarget_add_nonlocalizable_templates
$(foreach template,$(2),$(call gb_SrsTarget_add_nonlocalizable_template,$(1),$(template)))
endef
# Use templates built by another SrsTarget.
#
# gb_SrsTarget_use_srstarget srs other-srs
......
......@@ -49,7 +49,6 @@ $(eval $(call gb_SrsTarget_add_files,svt/res,\
svtools/source/dialogs/wizardmachine.src \
$(if $(ENABLE_JAVA), \
svtools/source/java/javaerror.src) \
svtools/source/misc/ehdl.src \
svtools/source/misc/imagemgr.src \
svtools/source/misc/langtab.src \
svtools/source/misc/svtools.src \
......@@ -57,7 +56,8 @@ $(eval $(call gb_SrsTarget_add_files,svt/res,\
svtools/source/toolpanel/toolpanel.src \
))
$(eval $(call gb_SrsTarget_add_nonlocalized_files,svt/res,\
$(eval $(call gb_SrsTarget_add_nonlocalizable_files,svt/res,\
svtools/source/misc/ehdl.src \
svtools/source/brwbox/editbrowsebox.src \
))
......
......@@ -46,7 +46,6 @@ $(eval $(call gb_SrsTarget_add_files,svx/res,\
svx/source/dialog/fontwork.src \
svx/source/dialog/frmsel.src \
svx/source/dialog/imapdlg.src \
svx/source/dialog/langbox.src \
svx/source/dialog/language.src \
svx/source/dialog/passwd.src \
svx/source/dialog/prtqry.src \
......@@ -86,7 +85,8 @@ $(eval $(call gb_SrsTarget_add_files,svx/res,\
svx/source/toolbars/fontworkbar.src \
))
$(eval $(call gb_SrsTarget_add_nonlocalized_files,svx/res,\
$(eval $(call gb_SrsTarget_add_nonlocalizable_files,svx/res,\
svx/source/dialog/langbox.src \
svx/source/unodraw/unodraw.src \
))
......
......@@ -89,7 +89,6 @@ $(eval $(call gb_SrsTarget_add_files,sw/res,\
sw/source/ui/docvw/access.src \
sw/source/ui/docvw/docvw.src \
sw/source/ui/envelp/envelp.src \
sw/source/ui/envelp/envprt.src \
sw/source/ui/envelp/label.src \
sw/source/ui/envelp/labfmt.src \
sw/source/ui/envelp/mailmrge.src \
......@@ -123,4 +122,8 @@ $(eval $(call gb_SrsTarget_add_files,sw/res,\
sw/source/ui/wrtsh/wrtsh.src \
))
$(eval $(call gb_SrsTarget_add_nonlocalizable_files,sw/res,\
sw/source/ui/envelp/envprt.src \
))
# vim: set noet sw=4 ts=4:
......@@ -35,15 +35,17 @@ $(eval $(call gb_SrsTarget_set_include,vcl/source/src,\
$(eval $(call gb_SrsTarget_add_files,vcl/source/src,\
vcl/source/src/btntext.src \
vcl/source/src/helptext.src \
vcl/source/src/images.src \
vcl/source/src/menu.src \
vcl/source/src/print.src \
vcl/source/src/stdtext.src \
vcl/source/src/throbber.src \
vcl/source/src/units.src \
vcl/source/src/fpicker.src \
vcl/source/edit/textundo.src \
))
$(eval $(call gb_SrsTarget_add_nonlocalizable_files,vcl/source/src,\
vcl/source/src/images.src \
vcl/source/src/throbber.src \
))
# vim: set noet sw=4 ts=4:
......@@ -27,7 +27,7 @@ $(eval $(call gb_AllLangResTarget_add_srs,wzi,\
$(eval $(call gb_SrsTarget_SrsTarget,wzi/res))
$(eval $(call gb_SrsTarget_add_nonlocalized_files,wzi/res,\
$(eval $(call gb_SrsTarget_add_nonlocalizable_files,wzi/res,\
wizards/source/imagelists/imagelists.src \
))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment