[Libreoffice-commits] .: Branch 'feature/submodules' - 815 commits - accessibility/bridge accessibility/source android/Bootstrap android/experimental apache-commons/ExternalProject_apache_commons_codec.mk apache-commons/ExternalProject_apache_commons_httpclient.mk apache-commons/ExternalProject_apache_commons_lang.mk apache-commons/ExternalProject_apache_commons_logging.mk apache-commons/UnpackedTarball_apache_commons_codec.mk avmedia/source basctl/source basic/source beanshell/ExternalProject_beanshell.mk beanshell/Makefile beanshell/makefile.mk beanshell/Module_beanshell.mk beanshell/Package_beanshell.mk beanshell/prj beanshell/UnpackedTarball_beanshell.mk binaryurp/README bin/create_bootstrap_links binfilter boost/boost.vc2012.patch boost/UnpackedTarball_boost.mk bridges/CustomTarget_gcc3_ios_arm.mk bridges/Library_msvc_win32_intel.mk bridges/Library_msvc_win32_x86-64.mk cairo/cairo-1.10.2.patch cairo/pixman-0.24.4.patch canvas/inc canvas/Library_canvasfactory.mk canvas/Library_directx 9canvas.mk canvas/Library_gdipluscanvas.mk canvas/Makefile canvas/source canvas/StaticLibrary_directxcanvas.mk canvas/workben chart2/source cli_ure/CliLibrary_cli_basetypes.mk cli_ure/CliLibrary_cli_ure.mk cli_ure/CliNativeLibrary_cli_cppuhelper.mk cli_ure/CliUnoApi_cli_uretypes.mk cli_ure/CustomTarget_cli_ure_assemblies.mk cli_ure/Library_cli_cppuhelper_native.mk cli_ure/Library_cli_uno.mk cli_ure/source codemaker/source comphelper/inc comphelper/source compilerplugins/clang compilerplugins/.gitignore compilerplugins/Makefile compilerplugins/Makefile-clang.mk compilerplugins/Makefile.mk compilerplugins/README config_host.mk.in configure.in connectivity/CppunitTest_connectivity_mork.mk connectivity/inc connectivity/Library_ado.mk connectivity/Module_connectivity.mk connectivity/prj connectivity/qa connectivity/source cppuhelper/inc cppuhelper/Library_cppuhelper.mk cppuhelper/Module_cppuhelper.mk cppuhelper/Package_findsofficepath.mk cppuhelper/source cppuhelper/StaticLibrary _findsofficepath.mk cppu/source cpputools/source cross_tail_build/prj ct2n/README cui/AllLangResTarget_cui.mk cui/Makefile cui/README cui/source cui/uiconfig cui/UI_cui.mk cui/util dbaccess/Library_sdbt.mk dbaccess/source desktop/AllLangResTarget_deploymentgui.mk desktop/scripts desktop/source desktop/unx desktop/win32 dictionaries distro-configs/LibreOfficeAndroid.conf distro-configs/LibreOfficeAndroidX86.conf distro-configs/LibreOfficeLinux.conf distro-configs/LibreOfficeMacOSX.conf distro-configs/LibreOfficeWin32.conf distro-configs/LibreOfficeWin64.conf distro-configs/OxygenOfficeLinux.conf distro-configs/OxygenOfficeWin32.conf download drawinglayer/README drawinglayer/source editeng/AllLangResTarget_editeng.mk editeng/inc editeng/source embeddedobj/Library_embobj.mk embedserv/Library_emser.mk embedserv/source epm/makefile.mk expat/expat-2.1.0.patch expat/README extensions/Library_bib.mk extensions/Library_log.mk extensions/Library_npsoplugin.mk extensions/Library_oleaut obridge2.mk extensions/Library_oleautobridge.mk extensions/Library_so_activex.mk extensions/Library_so_activex_x64.mk extensions/Module_extensions.mk extensions/source external/msm100 external/msm110 external/prj filter/inc filter/Library_odfflatxml.mk filter/Library_PptImporter.mk filter/Makefile filter/Module_filter.mk filter/qa filter/README filter/source fontconfig/fontconfig-2.8.0.patch fontconfig/README forms/source forms/util formula/inc formula/source fpicker/source framework/inc framework/source freetype/README g gdk-pixbuf/README gettext/README .git-hooks/commit-msg git-hooks/commit-msg .git-hooks/post-merge git-hooks/post-merge .git-hooks/pre-commit git-hooks/pre-commit git-hooks/README .gitignore .gitmodules glib/README graphite/graphite2.patch graphite/graphite_make.patch graphite/makefile.mk helpcompiler/Executable_helpindexer.mk helpcompiler/Executable_helplinker.mk helpcompiler/inc helpcompiler/Library_helplinker.mk helpcompiler/Makefile helpcompiler/source h elpcontent2 hsqldb/ExternalProject_hsqldb.mk hsqldb/prj hunspell/makefile.mk hwpfilter/source i18npool/Executable_saxparser.mk i18npool/Library_i18nisolang1.mk i18npool/Library_textconv_dict.mk i18npool/README i18npool/source i18nutil/inc i18nutil/source icon-themes/galaxy icon-themes/README icon-themes/tango icon-themes/tango_testing instsetoo_native/inc_openoffice ios/experimental io/source javaunohelper/source jfreereport/ExternalProject_jfreereport_flow_engine.mk jfreereport/ExternalProject_jfreereport_flute.mk jfreereport/ExternalProject_jfreereport_libbase.mk jfreereport/ExternalProject_jfreereport_libfonts.mk jfreereport/ExternalProject_jfreereport_libformula.mk jfreereport/ExternalProject_jfreereport_liblayout.mk jfreereport/ExternalProject_jfreereport_libloader.mk jfreereport/ExternalProject_jfreereport_librepository.mk jfreereport/ExternalProject_jfreereport_libserializer.mk jfreereport/ExternalProject_jfreereport_libxml.mk jfreereport/ExternalProject_jfreereport_s ac.mk jfreereport/java jfreereport/Makefile jfreereport/Module_jfreereport.mk jfreereport/Package_jfreereport_flow_engine.mk jfreereport/Package_jfreereport_flute.mk jfreereport/Package_jfreereport_libbase.mk jfreereport/Package_jfreereport_libfonts.mk jfreereport/Package_jfreereport_libformula.mk jfreereport/Package_jfreereport_liblayout.mk jfreereport/Package_jfreereport_libloader.mk jfreereport/Package_jfreereport_librepository.mk jfreereport/Package_jfreereport_libserializer.mk jfreereport/Package_jfreereport_libxml.mk jfreereport/Package_jfreereport_sac.mk jfreereport/Package_jfreereport_version.mk jfreereport/patches jfreereport/prj jfreereport/UnpackedTarball_jfreereport_flow_engine.mk jfreereport/UnpackedTarball_jfreereport_flute.mk jfreereport/UnpackedTarball_jfreereport_libbase.mk jfreereport/UnpackedTarball_jfreereport_libfonts.mk jfreereport/UnpackedTarball_jfreereport_libformula.mk jfreereport/UnpackedTarball_jfreereport_liblayout.mk jfreereport/UnpackedTarball_ jfreereport_libloader.mk jfreereport/UnpackedTarball_jfreereport_librepository.mk jfreereport/UnpackedTarball_jfreereport_libserializer.mk jfreereport/UnpackedTarball_jfreereport_libxml.mk jfreereport/UnpackedTarball_jfreereport_sac.mk jpeg/configs jpeg/ExternalPackage_jpeg.mk jpeg/jpeg-8c.patch jpeg/Makefile jpeg/makefile.mk jpeg/Module_jpeg.mk jpeg/patches jpeg/prj jpeg/StaticLibrary_jpeg.mk jpeg/struct_alignment.patch jpeg/UnpackedTarball_jpeg.mk jvmfwk/plugins jvmfwk/README jvmfwk/source l10ntools/inc l10ntools/source languagetool/ExternalProject_languagetool.mk languagetool/JLanguageTool-1.4.0-no-hc.patch languagetool/Makefile languagetool/makefile.mk languagetool/Module_languagetool.mk languagetool/Package_languagetool.mk languagetool/prj languagetool/UnpackedTarball_languagetool.mk lcms2/lcms2-2.4-windows.patch lcms2/lcms2.patch lcms2/lcms2-windows-export.patch lcms2/makefile.mk libcdr/ExternalPackage_libcdr.mk libcdr/ExternalProject_libcdr.mk libcdr/libcdr-0.0.8-msc. patch libcdr/libcdr-configure.patch.1 libcdr/libcdr-msvc.patch libcdr/Module_libcdr.mk libcdr/prj libcdr/StaticLibrary_cdr.mk libcdr/UnpackedTarball_cdr.mk libcmis/prj liblangtag/liblangtag-0.2-cross.patch liblangtag/liblangtag-0.2-mingw-genfile.patch liblangtag/makefile.mk libmspub/prj liborcus/ExternalProject_liborcus.mk liborcus/prj libpng/prj Library_merged.mk librsvg/config.h librsvg/ExternalPackage_librsvg.mk librsvg/ExternalProject_librsvg.mk librsvg/Library_librsvg-2-2.mk librsvg/librsvg-2.32.1-win32.patch librsvg/Makefile librsvg/makefile.mk librsvg/Module_librsvg.mk librsvg/prj librsvg/UnpackedTarball_rsvg.mk libvisio/libvisio-0.0.19.patch libvisio/prj libvisio/UnpackedTarball_visio.mk libwpd/ExternalProject_libwpd.mk libwpd/prj libwpg/prj libwps/prj libxslt/makefile.mk lingucomponent/config lingucomponent/Makefile lingucomponent/source linguistic/inc linguistic/Makefile linguistic/qa linguistic/source linguistic/workben linguistic/xml lotuswordpro/source lpsolve/l p_solve_5.5.patch Makefile.top mdds/prj mdds/UnpackedTarball_mdds.mk Module_tail_build.mk mythes/makefile.mk neon/prj nss/makefile.mk nss/nss.patch nss/prj odk/index.html odk/source offapi/com offapi/type_reference offapi/UnoApi_offapi.mk officecfg/registry ooo.lst.in oowintool oox/inc oox/source oox/util openldap/makefile.mk openssl/makefile.mk package/source packimages/prj padmin/source post_download.in postprocess/packcomponents postprocess/prj postprocess/rebase python/makefile.mk python/Python-2.6.1-vc12.patch pyuno/source qadevOOo/tests rdbmaker/inc rdbmaker/source readlicense_oo/html readlicense_oo/odt readlicense_oo/Package_files.mk readlicense_oo/txt regexp/inc registry/source remotebridges/source reportbuilder/java reportdesign/inc reportdesign/Makefile reportdesign/prj reportdesign/qa reportdesign/source reportdesign/uiconfig reportdesign/util RepositoryExternal.mk RepositoryFixes.mk Repository.mk RepositoryModule_ooo.mk rhino/ExternalProject_rhino.mk rhino/Makefi le rhino/makefile.mk rhino/Module_rhino.mk rhino/OfficeScriptInfo.java rhino/Package_rhino.mk rhino/prj rhino/rhino1_5R5.patch rhino/UnpackedTarball_rhino.mk rsc/source sal/android sal/cppunittester salhelper/CppunitTest_salhelper_testapi.mk salhelper/Module_salhelper.mk salhelper/qa salhelper/source sal/inc sal/Module_sal.mk sal/osl sal/Package_inc.mk sal/prj sal/qa sal/rtl sal/util saxon/build.xml saxon/ExternalProject_saxon.mk scaddins/source sccomp/source sc/CppunitTest_sc_ucalc.mk sc/inc sc/Library_sc.mk sc/Library_scui.mk sc/Module_sc.mk scp2/source sc/qa scripting/examples scripting/README scripting/source scripting/util sc/sdi sc/source sc/uiconfig sdext/Makefile sdext/source sdext/StaticLibrary_pdfimport_s.mk sd/inc sd/Library_sd.mk sd/sdi sd/source setup_native/prj setup_native/source sfx2/AllLangResTarget_sfx2.mk sfx2/CppunitTest_sfx2_metadatable.mk sfx2/inc sfx2/Library_sfx.mk sfx2/Module_sfx2.mk sfx2/Package_inc.mk sfx2/source sfx2/uiconfig sfx2/UI_sfx.mk shell/ inc shell/Library_ooofilt.mk shell/Library_ooofilt_x64.mk shell/Library_propertyhdl.mk shell/Library_propertyhdl_x64.mk shell/Library_shlxthdl.mk shell/Library_shlxthdl_x64.mk shell/Makefile shell/qa shell/source shell/StaticLibrary_shlxthandler_common.mk shell/StaticLibrary_shlxthandler_common_x64.mk shell/StaticLibrary_xmlparser.mk shell/StaticLibrary_xmlparser_x64.mk solenv/bin solenv/gbuild solenv/inc soltools/cpp soltools/Executable_adjustvisibility.mk soltools/Executable_checkdll.mk soltools/Executable_cpp.mk soltools/Executable_javadep.mk soltools/Executable_makedepend.mk soltools/mkdepend sot/source starmath/inc starmath/Library_smd.mk starmath/README starmath/source stoc/InternalUnoApi_bootstrap.mk stoc/Library_bootstrap.mk stoc/Module_stoc.mk stoc/source stoc/test svl/inc svl/source svtools/AllLangResTarget_svt.mk svtools/inc svtools/Library_svt.mk svtools/Module_svtools.mk svtools/Package_inc.mk svtools/source svtools/uiconfig svtools/UI_svt.mk svx/inc svx/Library _textconversiondlgs.mk svx/source svx/workben sw/AllLangResTarget_sw.mk sw/CppunitTest_sw_filters_test.mk sw/CppunitTest_sw_subsequent_odfexport.mk sw/CppunitTest_sw_subsequent_odfimport.mk sw/CppunitTest_sw_subsequent_ooxmlexport.mk sw/CppunitTest_sw_subsequent_rtfexport.mk sw/CppunitTest_sw_subsequent_rtfimport.mk sw/inc sw/Package_uiconfig.mk sw/qa sw/sdi sw/source sw/uiconfig sw/UI_sw.mk sw/UI_swriter.mk sysui/prj tail_build/prj test/source testtools/source tomcat/ExternalProject_tomcat.mk tomcat/prj toolkit/inc toolkit/JunitTest_toolkit_complex.mk toolkit/JunitTest_toolkit_unoapi.mk toolkit/Module_toolkit.mk toolkit/Package_inc.mk toolkit/qa toolkit/source toolkit/src2xml toolkit/util tools/inc tools/source translations tubes/AllLangResTarget_tubes.mk tubes/Library_tubes.mk tubes/Module_tubes.mk tubes/qa tubes/source tubes/uiconfig tubes/UI_tubes.mk ucb/Library_srtrs1.mk ucb/Library_ucpdav1.mk ucb/Library_ucpext.mk ucb/Makefile ucb/qa ucb/source ucb/test ucb/workben udk api/com unotools/inc unotools/source unusedcode.easy uui/source vbahelper/source vbahelper/util vcl/aqua vcl/generic vcl/inc vcl/Library_vcl.mk vcl/Package_inc.mk vcl/source vcl/unx vcl/win vigra/prj wizards/com wizards/Jar_fax.mk wizards/Module_wizards.mk wizards/Pyuno_commonwizards.mk wizards/Pyuno_fax.mk writerfilter/inc writerfilter/source writerfilter/util writerperfect/source x11_extensions/prj xml2cmp/Executable_xml2cmp.mk xml2cmp/Makefile xml2cmp/Module_xml2cmp.mk xml2cmp/prj xml2cmp/README xml2cmp/source xmlhelp/source xmloff/source xmlscript/source xmlsecurity/inc xmlsecurity/source xpdf/makefile.mk xpdf/xpdf-no-writable-literals.patch xsltml/prj
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Tue Oct 16 09:37:07 PDT 2012
Rebased ref, commits from common ancestor:
commit ef75448ceb3070d6ace31248326f3af1bf336abb
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date: Tue Oct 16 11:23:24 2012 -0500
rebase submodules
Change-Id: I96db9172e46697b372044f1fa73d5abbce9f3fe0
diff --git a/binfilter b/binfilter
index 6501eb7..45565e1 160000
--- a/binfilter
+++ b/binfilter
@@ -1 +1 @@
-Subproject commit 6501eb7a7f6ab7dba2223a5b8a721290ef1be627
+Subproject commit 45565e1ee1258814b1de7321647c2a7dea8832d5
diff --git a/dictionaries b/dictionaries
index ce1a435..508deb8 160000
--- a/dictionaries
+++ b/dictionaries
@@ -1 +1 @@
-Subproject commit ce1a4352c1dd4dde7c549eb31d1d40d56704fcbf
+Subproject commit 508deb804294871ff540f669350f093a191d2e8e
diff --git a/helpcontent2 b/helpcontent2
index 4507e5f..a7d7be2 160000
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 4507e5f21836724cf768cf4e3ffbbf4ada6c87c3
+Subproject commit a7d7be20a6379bbd96a41a93f1c0edd55f1eca51
diff --git a/translations b/translations
index f83717c..2548be5 160000
--- a/translations
+++ b/translations
@@ -1 +1 @@
-Subproject commit f83717cf73f4549d9ae09bc557d59316d4165394
+Subproject commit 2548be535019c0a869c5759419c6964db5f82471
commit 7b86d722bed4db8bef40759553571f20349103ea
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date: Tue Oct 2 13:29:01 2012 -0500
missing fi in ./g
Change-Id: Ic763d7cd73c2a3df8e5d5146eaf795188d8c79d1
diff --git a/g b/g
index f70cac1..aa53015 100755
--- a/g
+++ b/g
@@ -147,6 +147,7 @@ local repo
if [ -n "$repo" ] ; then
cp -r "${repo?}" "${module?}/."
fi
+ fi
done
}
commit bc029e38bd7f483e7f79f308b4f7201b6ccb9add
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date: Tue Oct 2 13:24:09 2012 -0500
Updated core
Project: translations f83717cf73f4549d9ae09bc557d59316d4165394
null
add a README to the translations module
Change-Id: Iccfc83d5e9ec87802e88f83da1181493630805ea
Reviewed-on: https://gerrit.libreoffice.org/751
Reviewed-by: Norbert Thiebaud <nthiebaud at gmail.com>
Tested-by: Norbert Thiebaud <nthiebaud at gmail.com>
diff --git a/translations b/translations
index 751ae9d..f83717c 160000
--- a/translations
+++ b/translations
@@ -1 +1 @@
-Subproject commit 751ae9de9563da8b26aef8e5c0f80ad502fbfe81
+Subproject commit f83717cf73f4549d9ae09bc557d59316d4165394
commit 0807e432dcc9df8578d89766e252e4b2a8d6705d
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date: Tue Oct 2 13:22:42 2012 -0500
gitsubmodule gerrit specific keyword seems to be 'branch' not 'revision'
Change-Id: I8dfaa7854755cc8db5cbea9c8f682975dcb31d4f
diff --git a/.gitmodules b/.gitmodules
index f44a16d..2bba7a2 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,16 +1,16 @@
[submodule "binfilter"]
path = binfilter
url = git://gerrit.libreoffice.org/binfilter
- revision = .
+ branch = .
[submodule "dictionaries"]
path = dictionaries
url = git://gerrit.libreoffice.org/dictionaries
- revision = .
+ branch = .
[submodule "helpcontent2"]
path = helpcontent2
url = git://gerrit.libreoffice.org/help
- revision = .
+ branch = .
[submodule "translations"]
path = translations
url = git://gerrit.libreoffice.org/translations
- revision = .
+ branch = .
diff --git a/dictionaries b/dictionaries
index 19dba71..ce1a435 160000
--- a/dictionaries
+++ b/dictionaries
@@ -1 +1 @@
-Subproject commit 19dba715c843961a18bbc8871373e33be165c4ab
+Subproject commit ce1a4352c1dd4dde7c549eb31d1d40d56704fcbf
commit eb1d17ce96988e36783d19f3c485c734515609c0
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date: Tue Oct 2 12:59:44 2012 -0500
add tag support to ./g, try to optimize pre->post submerge situation
Change-Id: I052817865da6df193c0451eccc3b8b6f507845a3
diff --git a/g b/g
index 7c6551c..f70cac1 100755
--- a/g
+++ b/g
@@ -125,6 +125,31 @@ get_configured_submodules()
fi
}
+do_shortcut_update()
+{
+local module
+local repo
+
+ for module in $SUBMODULES_CONFIGURED ; do
+ if [ ! -d ${module?}/.git ] ; then
+ case "${module?}" in
+ helcontent2)
+ if [ -d clone/help/.git ] ; then
+ repo="clone/help/.git"
+ fi
+ ;;
+ *)
+ if [ -d clone/${module?}/.git ] ; then
+ repo="clone/${module?}/.git"
+ fi
+ ;;
+ esac
+ if [ -n "$repo" ] ; then
+ cp -r "${repo?}" "${module?}/."
+ fi
+ done
+}
+
do_git_cmd()
{
echo "cmd:$@"
@@ -147,11 +172,13 @@ local module
create_branch=1
elif [ "$create_branch" = "1" ] ; then
branch="$arg"
+ create_branch=0
fi
done
if [ -f .gitmodules ] ; then
+ git submodule update
if [ -n "$branch" ] ; then
- git submodules foreach git branch ${branch} HEAD || return $?
+ git submodules foreach git checkout -b ${branch} HEAD || return $?
fi
else
# now that is the nasty case we moved prior to submodules
@@ -189,6 +216,8 @@ do_init_modules()
local module
local configured
+ do_shortcut_update
+
for module in $SUBMODULES_CONFIGURED ; do
configured=$(git config --local --get submodule.${module}.url)
if [ -z "$configured" ] ; then
@@ -265,7 +294,7 @@ case "$COMMAND" in
do_git_cmd ${COMMAND} "$@"
;;
checkout)
- do_checkout "$@" && git submodule foreach git checkout "$@"
+ do_checkout "$@"
;;
clone)
do_init_modules && git submodule update && refresh_all_hooks
@@ -290,6 +319,9 @@ case "$COMMAND" in
reset)
do_reset
;;
+ tag)
+ do_git_cmd ${COMMAND} "$@"
+ ;;
*)
echo "./g does not support command:$COMMAND" 1>&2
exit 1;
commit 8fbdcf1ea1d1c7aebd3fd70d3321dd8fa3d45554
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date: Tue Oct 2 10:32:45 2012 -0500
when switching to a pre-submodule point, clean-up the soft-link point
Change-Id: I5a8f144bb4ad167cfa0e6763e3cf273b9127d65b
diff --git a/g b/g
index d73b8a6..7c6551c 100755
--- a/g
+++ b/g
@@ -137,6 +137,7 @@ do_checkout()
local cmd
local create_branch="0"
local branch
+local module
git checkout "$@" || return $?
for cmd in "$@" ; do
@@ -154,6 +155,11 @@ local branch
fi
else
# now that is the nasty case we moved prior to submodules
+ # delete the submodules left over if any
+ for module in $SUBMODULES_ALL ; do
+ echo "clean-up submodule $module"
+ rm -fr ${module}
+ done
# make sure we have the needed repo in clone
./g clone && ./g -f checkout "$@" || return $?
fi
@@ -167,6 +173,11 @@ do_reset()
git submodule update || return $?
else
# now that is the nasty case we moved prior to submodules
+ # delete the submodules left over if any
+ for module in $SUBMODULES_ALL ; do
+ echo "clean-up submodule $module"
+ rm -fr ${module}
+ done
# make sure we have the needed repo in clone
./g clone && ./g -f reset "$@"
fi
commit 5644b1f727fdec9bdcef7a94fe075ca16adb31b5
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date: Tue Oct 2 10:09:30 2012 -0500
typo in configure.in wrt the name of the helpcontent2 module
Change-Id: Id0d7335872c2e2c074769bd7edc1b7301b1ebdbe
diff --git a/configure.in b/configure.in
index 9f15c97..5f5b02d 100644
--- a/configure.in
+++ b/configure.in
@@ -4359,7 +4359,7 @@ if test "$with_help" != "no" -a $_os != iOS -a $_os != Android; then
BUILD_TYPE="$BUILD_TYPE HELP"
SCPDEFS="$SCPDEFS -DWITH_HELP"
GIT_REPO_NAMES="$GIT_REPO_NAMES help"
- GIT_NEEDED_SUBMODULES="helcontent2 $GIT_NEEDED_SUBMODULES"
+ GIT_NEEDED_SUBMODULES="helpcontent2 $GIT_NEEDED_SUBMODULES"
else
AC_MSG_RESULT([no])
fi
commit 3c1b15c9f1b527b1866933cbd65a324512a455a2
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date: Mon Oct 1 23:48:10 2012 -0500
submodules migration
Change-Id: Ib3e472a4b1abf880f695be7a6667393d6a82f10d
diff --git a/.git-hooks/commit-msg b/.git-hooks/commit-msg
new file mode 100755
index 0000000..fa0b2e2
--- /dev/null
+++ b/.git-hooks/commit-msg
@@ -0,0 +1,173 @@
+#!/bin/sh
+#
+# An example hook script to check the commit log message.
+# Called by git-commit with one argument, the name of the file
+# that has the commit message. The hook should exit with non-zero
+# status after issuing an appropriate message if it wants to stop the
+# commit. The hook is allowed to edit the commit message file.
+#
+# To enable this hook, make this file executable.
+
+# Uncomment the below to add a Signed-off-by line to the message.
+# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')
+# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1"
+
+# This example catches duplicate Signed-off-by lines.
+
+base_dir=$(dirname $0)
+MSG="$1"
+
+abort() {
+ cp $1 $1.save
+ cat >&2 <<EOF
+Commit aborted, your commit message was saved as '$1.save'.
+
+Reason: $2
+
+EOF
+ exit 1
+}
+
+test "" = "$(grep '^Signed-off-by: ' "$1" |
+ sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || {
+ abort "$1" "Duplicate Signed-off-by lines."
+}
+
+# Check that the first line exists, and is not an asterisk
+
+if [ -z "`head -n 1 $1 | grep -v '^[ \t]*\*$'`" ] ; then
+ abort "$1" "Please provide the general description on the first line."
+fi
+
+# ...and that it is not too long
+
+if [ "`head -n 1 $1 | wc -c`" -gt 79 ] ; then
+ abort "$1" "The first line is too long, please try to fit into 79 characters."
+fi
+
+# ...and that it does not continue on the second line
+if [ "`wc -l < $1`" -gt 1 -a -n "`head -n 2 $1 | tail -n 1 | sed 's/^#.*//'`" ] ; then
+ abort "$1" "The second line is not empty - maybe the first line continues there?"
+fi
+
+# Check that the message is not a ChangeLog-like one
+
+if [ -n "`head -n 1 $1 | grep '^[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}.*<.*@.*>'`" ] ; then
+ abort "$1" "The commit message looks like ChangeLog, please use the git form."
+fi
+
+# Check for whitespace in front of *'s
+
+if [ -n "`sed '/^#/,$d' $1 | grep '^[[:space:]]\+\*.*:'`" -a -z "`grep '^\*' $1`" ] ; then
+ abort "$1" "Please don't use whitespace in front of '* file: Description.' entries."
+fi
+
+#------------------ copied gerrit commit-msg hook to handle ChangeId -->
+# From Gerrit Code Review 2.3
+#
+# Part of Gerrit Code Review (http://code.google.com/p/gerrit/)
+#
+# Copyright (C) 2009 The Android Open Source Project
+#
+# Licensed 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
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+CHANGE_ID_AFTER="Bug|Issue"
+
+# Check for, and add if missing, a unique Change-Id
+#
+add_ChangeId() {
+ clean_message=`sed -e '
+ /^diff --git a\/.*/{
+ s///
+ q
+ }
+ /^Signed-off-by:/d
+ /^#/d
+ ' "$MSG" | git stripspace`
+ if test -z "$clean_message"
+ then
+ return
+ fi
+
+ id=`grep -i '^Change-Id:' "$MSG" | sed -e "s/.*: I//"`
+ temp_msg=`grep -v -i '^Change-Id:' "$MSG"`
+ echo "$temp_msg" > "$MSG"
+
+ if test -z "$id"
+ then
+ id=`_gen_ChangeId`
+ fi
+ perl -e '
+ $MSG = shift;
+ $id = shift;
+ $CHANGE_ID_AFTER = shift;
+
+ undef $/;
+ open(I, $MSG); $_ = <I>; close I;
+ s|^diff --git a/.*||ms;
+ s|^#.*$||mg;
+ exit unless $_;
+
+ @message = split /\n/;
+ $haveFooter = 0;
+ $startFooter = @message;
+ for($line = @message - 1; $line >= 0; $line--) {
+ $_ = $message[$line];
+
+ if (/^[a-zA-Z0-9-]+: /) {
+ $haveFooter++;
+ next;
+ }
+ next if /^[ []/;
+ $startFooter = $line if ($haveFooter && /^\r?$/);
+ last;
+ }
+
+ @footer = @message[$startFooter+1.. at message];
+ @message = @message[0..$startFooter];
+ push(@footer, "") unless @footer;
+
+ for ($line = 0; $line < @footer; $line++) {
+ $_ = $footer[$line];
+ next if /^($CHANGE_ID_AFTER):/i;
+ last;
+ }
+ splice(@footer, $line, 0, "Change-Id: I$id");
+
+ $_ = join("\n", @message, @footer);
+ open(O, ">$MSG"); print O; close O;
+ ' "$MSG" "$id" "$CHANGE_ID_AFTER"
+}
+_gen_ChangeIdInput() {
+ echo "tree `git write-tree`"
+ if parent=`git rev-parse HEAD^0 2>/dev/null`
+ then
+ echo "parent $parent"
+ fi
+ echo "author `git var GIT_AUTHOR_IDENT`"
+ echo "committer `git var GIT_COMMITTER_IDENT`"
+ echo
+ printf '%s' "$clean_message"
+}
+_gen_ChangeId() {
+ _gen_ChangeIdInput |
+ git hash-object -t commit --stdin
+}
+
+
+add_ChangeId
+#------------------ copied gerrit commit-msg hook to handle ChangeId <--
+
+
+exit 0
diff --git a/.git-hooks/post-merge b/.git-hooks/post-merge
new file mode 100755
index 0000000..25e62ed
--- /dev/null
+++ b/.git-hooks/post-merge
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+# Do not warn if there were no real merge
+git rev-parse -q --verify HEAD^2 >/dev/null || exit
+
+echo
+echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
+echo "! You probably used 'git pull' instead of 'git pull -r' !"
+echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
+echo
+echo "You can still fix it - please do 'git pull -r' now."
+echo
diff --git a/.git-hooks/pre-commit b/.git-hooks/pre-commit
new file mode 100755
index 0000000..5b752a3
--- /dev/null
+++ b/.git-hooks/pre-commit
@@ -0,0 +1,135 @@
+#!/usr/bin/env perl
+
+# A hook script to verify what is about to be committed.
+# Called by "git commit" with no arguments. The hook should
+# exit with non-zero status after issuing an appropriate message
+# if it wants to stop the commit.
+
+use strict;
+#use File::Copy;
+#use Cwd;
+
+$ENV{LC_ALL} = "C";
+
+sub check_whitespaces($)
+{
+ my ($h) = @_;
+ my $src_limited = "c|cpp|cxx|h|hrc|hxx|idl|inl|java|map|MK|pmk|pl|pm|sdi|sh|src|tab|xcu|xml";
+ my $src_full = "c|cpp|cxx|h|hrc|hxx|idl|inl|java|map|mk|MK|pmk|pl|pm|sdi|sh|src|tab|xcu|xml";
+
+ my $found_bad = 0;
+ my $filename;
+ my $reported_filename = "";
+ my $lineno;
+ sub bad_line
+ {
+ my ($why, $line, $file_filter) = @_;
+ if (!defined $file_filter || $filename =~ /\.($file_filter)$/)
+ {
+ if (!$found_bad)
+ {
+ print STDERR "*\n";
+ print STDERR "* You have some suspicious patch lines:\n";
+ print STDERR "*\n";
+ $found_bad = 1;
+ }
+ if ($reported_filename ne $filename)
+ {
+ print STDERR "* In $filename\n";
+ $reported_filename = $filename;
+ }
+ print STDERR "* $why (line $lineno)\n";
+ print STDERR "$filename:$lineno:$line\n";
+ }
+ }
+ open( FILES, "git-diff-index -p -M --cached $h |" ) || die "Cannot run git diff-index.";
+ while (<FILES>)
+ {
+ if (m|^diff --git a/(.*) b/\1$|)
+ {
+ $filename = $1;
+ next;
+ }
+ if (/^@@ -\S+ \+(\d+)/)
+ {
+ $lineno = $1 - 1;
+ next;
+ }
+ if (/^ /)
+ {
+ $lineno++;
+ next;
+ }
+ if (s/^\+//)
+ {
+ $lineno++;
+ chomp;
+ if (/\s$/)
+ {
+ bad_line("trailing whitespace", $_ , $src_limited);
+ }
+ if (/\s* /)
+ {
+ bad_line("indent with Tab", $_, $src_limited);
+ }
+ if (/^(?:[<>=]){7}$/)
+ {
+ bad_line("unresolved merge conflict", $src_full);
+ }
+ if (/SAL_DEBUG/)
+ {
+ bad_line("temporary debug in commit", $_, $src_limited);
+ }
+ }
+ }
+ if ( $found_bad)
+ {
+ exit($found_bad);
+ }
+}
+
+# Do the work :-)
+
+# Initial commit: diff against an empty tree object
+my $against="4b825dc642cb6eb9a060e54bf8d69288fbee4904";
+if ( system( "git rev-parse --verify HEAD >/dev/null 2>&1" ) == 0 )
+{
+ $against="HEAD"
+}
+
+# If you want to allow non-ascii filenames set this variable to true.
+my $allownonascii=`git config hooks.allownonascii`;
+
+# Cross platform projects tend to avoid non-ascii filenames; prevent
+# them from being added to the repository. We exploit the fact that the
+# printable range starts at the space character and ends with tilde.
+if ( $allownonascii ne "true" &&
+ # Note that the use of brackets around a tr range is ok here, (it's
+ # even required, for portability to Solaris 10's /usr/bin/tr), since
+ # the square bracket bytes happen to fall in the designated range.
+ `git diff --cached --name-only --diff-filter=A -z $against | \
+ LC_ALL=C tr -d '[ -~]\\0'` ne "" )
+{
+ print <<EOM;
+Error: Attempt to add a non-ascii file name.
+
+This can cause problems if you want to work
+with people on other platforms.
+
+To be portable it is advisable to rename the file ...
+
+If you know what you are doing you can disable this
+check using:
+
+ git config hooks.allownonascii true
+
+EOM
+ exit( 1 );
+}
+
+# fix whitespace in code
+check_whitespaces( $against);
+
+# all OK
+exit( 0 );
+# vi:set shiftwidth=4 expandtab:
diff --git a/.gitignore b/.gitignore
index eab21d9..c7eda8b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -101,12 +101,6 @@ TAGS
/external/*/*.msm
/moz/zipped/*.zip
-# links to the other repositories
-/binfilter
-/dictionaries
-/helpcontent2
-/translations
-
# compiled python objects for gdb pretty printers
/solenv/gdb/libreoffice/*.py[co]
/solenv/gdb/libreoffice/util/*.py[co]
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..f44a16d
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,16 @@
+[submodule "binfilter"]
+ path = binfilter
+ url = git://gerrit.libreoffice.org/binfilter
+ revision = .
+[submodule "dictionaries"]
+ path = dictionaries
+ url = git://gerrit.libreoffice.org/dictionaries
+ revision = .
+[submodule "helpcontent2"]
+ path = helpcontent2
+ url = git://gerrit.libreoffice.org/help
+ revision = .
+[submodule "translations"]
+ path = translations
+ url = git://gerrit.libreoffice.org/translations
+ revision = .
diff --git a/bin/create_bootstrap_links b/bin/create_bootstrap_links
index a42f7b8..df813b2 100755
--- a/bin/create_bootstrap_links
+++ b/bin/create_bootstrap_links
@@ -1,15 +1,17 @@
#!/usr/bin/env bash
-BIN_DIR=$(dirname $0)
-REPOS=$(cat ${BIN_DIR?}/repo-list)
-cd ${BIN_DIR?}/..
-BOOTSTRAP_DIR=$(pwd)
+# with submodules we do not need links anymore
-for repo in $REPOS ; do
- for link in $(ls clone/${repo}) ; do
- if [ ! -e "$link" ] ; then
- echo "Creating missing link $link"
- ln -s "clone/${repo}/$link" "$link"
- fi
- done
-done
+#BIN_DIR=$(dirname $0)
+#REPOS=$(cat ${BIN_DIR?}/repo-list)
+#cd ${BIN_DIR?}/..
+#BOOTSTRAP_DIR=$(pwd)
+
+#for repo in $REPOS ; do
+# for link in $(ls clone/${repo}) ; do
+# if [ ! -e "$link" ] ; then
+# echo "Creating missing link $link"
+# ln -s "clone/${repo}/$link" "$link"
+# fi
+# done
+#done
diff --git a/binfilter b/binfilter
new file mode 160000
index 0000000..6501eb7
--- /dev/null
+++ b/binfilter
@@ -0,0 +1 @@
+Subproject commit 6501eb7a7f6ab7dba2223a5b8a721290ef1be627
diff --git a/config_host.mk.in b/config_host.mk.in
index 8787a2e..2c46a6c 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -192,6 +192,7 @@ export GCONF_LIBS=@GCONF_LIBS@
export GIO_CFLAGS=@GIO_CFLAGS@
export GIO_LIBS=@GIO_LIBS@
export GIT_LINK_SRC=@GIT_LINK_SRC@
+export GIT_NEEDED_SUBMODULES=@GIT_NEEDED_SUBMODULES@
export GIT_REPO_NAMES=@GIT_REPO_NAMES@
export GLIB_CFLAGS=@GLIB_CFLAGS@
export GLIB_LIBS=@GLIB_LIBS@
diff --git a/configure.in b/configure.in
index 9906ead..9f15c97 100644
--- a/configure.in
+++ b/configure.in
@@ -11,6 +11,7 @@ save_CXX=$CXX
BUILD_TYPE="LibO"
SCPDEFS=""
GIT_REPO_NAMES=""
+GIT_NEEDED_SUBMODULES=""
LO_PATH= # used by path_munge to construct a PATH variable
PathFormat()
@@ -4347,6 +4348,7 @@ else
WITH_BINFILTER="YES"
BUILD_TYPE="$BUILD_TYPE BINFILTER"
GIT_REPO_NAMES="$GIT_REPO_NAMES binfilter"
+ GIT_NEEDED_SUBMODULES="binfilter $GIT_NEEDED_SUBMODULES"
AC_MSG_RESULT([yes])
fi
AC_SUBST(WITH_BINFILTER)
@@ -4357,6 +4359,7 @@ if test "$with_help" != "no" -a $_os != iOS -a $_os != Android; then
BUILD_TYPE="$BUILD_TYPE HELP"
SCPDEFS="$SCPDEFS -DWITH_HELP"
GIT_REPO_NAMES="$GIT_REPO_NAMES help"
+ GIT_NEEDED_SUBMODULES="helcontent2 $GIT_NEEDED_SUBMODULES"
else
AC_MSG_RESULT([no])
fi
@@ -4369,6 +4372,7 @@ if test -z "$with_myspell_dicts" -o "$with_myspell_dicts" = "yes"; then
WITH_MYSPELL_DICTS=YES
BUILD_TYPE="$BUILD_TYPE DICTIONARIES"
GIT_REPO_NAMES="$GIT_REPO_NAMES dictionaries"
+ GIT_NEEDED_SUBMODULES="dictionaries $GIT_NEEDED_SUBMODULES"
else
AC_MSG_RESULT([no])
WITH_MYSPELL_DICTS=NO
@@ -12185,6 +12189,7 @@ if test -z "$WITH_LANG" -o "$WITH_LANG" = "en-US"; then
else
AC_MSG_RESULT([$WITH_LANG])
GIT_REPO_NAMES="$GIT_REPO_NAMES translations"
+ GIT_NEEDED_SUBMODULES="translations $GIT_NEEDED_SUBMODULES"
fi
# check that the list is valid
for lang in $WITH_LANG; do
@@ -12210,6 +12215,7 @@ AC_SUBST(ALL_LANGS)
AC_SUBST(WITH_LANG)
AC_SUBST(WITH_LANG_LIST)
AC_SUBST(GIT_REPO_NAMES)
+AC_SUBST(GIT_NEEDED_SUBMODULES)
PathFormat "$SRC_ROOT/translations"
diff --git a/dictionaries b/dictionaries
new file mode 160000
index 0000000..19dba71
--- /dev/null
+++ b/dictionaries
@@ -0,0 +1 @@
+Subproject commit 19dba715c843961a18bbc8871373e33be165c4ab
diff --git a/download b/download
index 9674bfc..0dc1d0f 100755
--- a/download
+++ b/download
@@ -52,17 +52,19 @@ if [ -d .git ] ; then
if [ -z "$GIT_LINK_SRC" ]; then
./g -f clone
else
+ echo "FIXME: GIT_LINK_SRC method is not yet implemented with submodules" 1>&2
+ exit 1;
# space-saving clone from another local workdir
- mkdir clone
- branch=$(git symbolic-ref HEAD | cut -d"/" -f 3)
- for i in $GIT_REPO_NAMES ; do
- bin/git-new-workdir $GIT_LINK_SRC/$i clone/$i $branch
- for d in clone/$i/* ; do
- if [ "${d}" != "clone/$i/git-hooks" ]; then
- ln -sfn ${d} $(basename ${d})
- fi
- done
- done
+# mkdir clone
+# branch=$(git symbolic-ref HEAD | cut -d"/" -f 3)
+# for i in $GIT_REPO_NAMES ; do
+# bin/git-new-workdir $GIT_LINK_SRC/$i clone/$i $branch
+# for d in clone/$i/* ; do
+# if [ "${d}" != "clone/$i/git-hooks" ]; then
+# ln -sfn ${d} $(basename ${d})
+# fi
+# done
+# done
fi
fi
@@ -169,7 +171,7 @@ for i in $filelist ; do
# echo $i
if [ "$i" != `echo $i | sed "s/^http:\///"` ]; then
tarurl=$i
- # TODO: check for comment
+ # TODO: check for comment
else
if [ "$tarurl" != "" ]; then
sum=`echo $i | sed "s/-.*//"`
diff --git a/g b/g
index a82fc31..d73b8a6 100755
--- a/g
+++ b/g
@@ -3,116 +3,207 @@
# Wrapper for git to handle more subdirs at the same time
#
-# no params, no action
-if [ "$#" -eq "0" ] ; then
- git
- echo
- echo "Additional options available only in this 'g' wrapper:"
- echo
- echo "Usage: g [options] [git commands]"
- echo " -f Force - act on all the repos, not only the changed ones"
- echo " -s Silent - do not report the repo names."
- echo " -v Verbose - Print git commands."
- echo " -1 report the repos name on the first line of the output as <repo>:"
- echo " -z just to some house cleaning (hooks mostly). this is a stand-alone option as in ./g -z"
- echo " --set-push-user [username] re-write an existing tree's config with an fd.o commit account name"
- echo " --last-working checks out the last known working build (useful for windows)";
- echo " --set-last-working adds a note denoting a working build";
- echo " --push-notes pushes all notes";
- exit $?
+if [ -n "$g_debug" ] ; then
+ set -x
fi
-if [ ! "`type -p git`" ]; then
- echo "Cannot find the git binary! Is git installed and is in PATH?"
- exit 1
-fi
+SUBMODULES_ALL="binfilter dictionaries helpcontent2 translations"
pushd $(dirname $0) > /dev/null
COREDIR=$(pwd)
popd > /dev/null
-if test -f $COREDIR/bin/repo-list
-then
- ALLREPOS="core `cat "$COREDIR/bin/repo-list"`"
-else
- ALLREPOS=core
-fi
+usage()
+{
+ git
+ echo
+ echo "Usage: g [options] [git (checkout|clone|fetch|grep|pull|push|reset) [git options/args..]]"
+ echo ""
+ echo " -z restaure the git hooks and others sanity checks"
+}
-refresh_hooks()
+refresh_submodule_hooks()
{
- repo=$1
- case "$repo" in
- core)
- pushd $COREDIR > /dev/null
- for hook_name in $(ls -1 $COREDIR/git-hooks) ; do
- hook=".git/hooks/$hook_name"
- if [ ! -x "$hook" ] ; then
- rm -f "$hook"
- ln -sf "$COREDIR/git-hooks/$hook_name" "$hook"
- fi
- done
- popd > /dev/null
- ;;
- translations)
- if [ -d $COREDIR/clone/translations ] ; then
- pushd $COREDIR/clone/translations > /dev/null
- for hook_name in $(ls -1 $COREDIR/clone/translations/git-hooks); do
- hook=".git/hooks/$hook_name"
- if [ ! -x "$hook" ] ; then
- rm -f "$hook"
- ln -sf "$COREDIR/clone/translations/git-hooks/$hook_name" "$hook"
- fi
- done
- # .gitattribute should be per-repo, avoid entangling repos
- if [ -L .gitattributes ] ; then
- rm -f .gitattributes
- fi
- popd > /dev/null
- fi
- ;;
- binfilter|help|dictionaries)
- if [ -d $COREDIR/clone/$repo ] ; then
- pushd $COREDIR/clone/$repo > /dev/null
- # fixme: we should really keep these per-repo to
- # keep the repos independant. since these two
- # are realy not independant yet, we keep using core's hooks
- for hook_name in $(ls -1 $COREDIR/git-hooks) ; do
- hook=".git/hooks/$hook_name"
- if [ ! -x "$hook" ] ; then
- rm -f "$hook"
- ln -sf "$COREDIR/git-hooks/$hook_name" "$hook"
- fi
- done
- # .gitattribute should be per-repo, avoid entangling repos
- if [ -L .gitattributes ] ; then
- rm -f .gitattributes
- fi
- popd > /dev/null
+local repo=$1
+local hook
+local hook_name
+
+ if [ -d ${repo?}/.git ] ; then
+ # use core's hook by default
+ for hook_name in $(ls -1 ${COREDIR?}/.git-hooks) ; do
+ hook="${repo?}/.git/hooks/${hook_name?}"
+ if [ ! -e "${hook?}" -o -L "${hook?}" ] ; then
+ rm -f "${hook?}"
+ ln -sf "${COREDIR?}/.git-hooks/${hook_name?}" "${hook?}"
fi
- ;;
- esac
+ done
+ # override if need be by the submodules' own hooks
+ for hook_name in $(ls -1 ${COREDIR?}/${repo?}/.git-hooks 2>/dev/null) ; do
+ hook="${repo?}/.git/hooks/${hook_name?}"
+ if [ ! -e "${hook?}" -o -L "${hook?}" ] ; then
+ rm -f "${hook?}"
+ ln -sf "${COREDIR?}/${repo?}/.git-hooks/${hook_name?}" "${hook?}"
+ fi
+ done
+ fi
}
refresh_all_hooks()
{
- repos="$ALLREPOS"
- for repo in $repos ; do
- refresh_hooks $repo
+local repo
+local hook_name
+local hook
+
+ pushd ${COREDIR?} > /dev/null
+ for hook_name in $(ls -1 ${COREDIR?}/.git-hooks) ; do
+ hook=".git/hooks/${hook_name?}"
+ if [ ! -e "${hook?}" -o -L "${hook?}" ] ; then
+ rm -f "${hook?}"
+ ln -sf "${COREDIR?}/.git-hooks/${hook_name?}" "${hook?}"
+ fi
+ done
+
+ for repo in ${SUBMODULES_ALL?} ; do
+ refresh_submodule_hooks $repo
+ done
+ popd > /dev/null
+
+}
+
+set_push_url()
+{
+local repo
+
+ repo="$1"
+ if [ -n "$repo" ] ; then
+ pushd "${COREDIR?}/${repo?}" > /dev/null
+ else
+ pushd "${COREDIR?}" > /dev/null
+ repo="core"
+ fi
+ echo "setting up push url for ${repo?}"
+ if [ "${repo?}" = "helpcontent2" ] ; then
+ git config remote.origin.pushurl "ssh://${PUSH_USER}gerrit.libreoffice.org:29418/help"
+ else
+ git config remote.origin.pushurl "ssh://${PUSH_USER}gerrit.libreoffice.org:29418/${repo?}"
+ fi
+ popd > /dev/null
+}
+
+set_push_urls()
+{
+ PUSH_USER="$1"
+ if [ -n "$PUSH_USER" ] ; then
+ PUSH_USER="${PUSH_USER}@"
+ fi
+ set_push_url
+ for repo in ${SUBMODULES_ACTIVE?} ; do
+ set_push_url "${repo?}"
+ done
+}
+
+get_active_submodules()
+{
+SUBMODULES_ACTIVE=""
+local repo
+
+ for repo in ${SUBMODULES_ALL?} ; do
+ if [ -d ${repo?}/.git ] ; then
+ SUBMODULES_ACTIVE="${repo?} ${SUBMODULES_ACTIVE?}"
+ fi
done
}
-postprocess()
+get_configured_submodules()
{
- rc=$1
- if $DO_HOOK_REFRESH ; then
- refresh_all_hooks
+ SUBMODULES_CONFIGURED=""
+ if [ -f "config_host.mk" ] ; then
+ SUBMODULES_CONFIGURED=$(cat config_host.mk | grep GIT_NEEDED_SUBMODULES | sed -e "s/.*=//")
+ else
+ # if we need the configured submoduel before the configuration is done. we assumed you want them all
+ SUBMODULES_CONFIGURED=${SUBMODULES_ALL?}
fi
+}
+
+do_git_cmd()
+{
+ echo "cmd:$@"
+ git "$@"
+ git submodule foreach git "$@" $KEEP_GOING
+}
+
+do_checkout()
+{
+local cmd
+local create_branch="0"
+local branch
+
+ git checkout "$@" || return $?
+ for cmd in "$@" ; do
+ if [ "$cmd" = "-f" ]; then
+ return 0
+ elif [ "$cmd" = "-b" ] ; then
+ create_branch=1
+ elif [ "$create_branch" = "1" ] ; then
+ branch="$arg"
+ fi
+ done
+ if [ -f .gitmodules ] ; then
+ if [ -n "$branch" ] ; then
+ git submodules foreach git branch ${branch} HEAD || return $?
+ fi
+ else
+ # now that is the nasty case we moved prior to submodules
+ # make sure we have the needed repo in clone
+ ./g clone && ./g -f checkout "$@" || return $?
+ fi
+ return $?
+}
+
+do_reset()
+{
+ git reset "$@" || return $?
+ if [ -f .gitmodules ] ; then
+ git submodule update || return $?
+ else
+ # now that is the nasty case we moved prior to submodules
+ # make sure we have the needed repo in clone
+ ./g clone && ./g -f reset "$@"
+ fi
+ return $?;
+}
+
+do_init_modules()
+{
+local module
+local configured
- exit $rc;
+ for module in $SUBMODULES_CONFIGURED ; do
+ configured=$(git config --local --get submodule.${module}.url)
+ if [ -z "$configured" ] ; then
+ git submodule init $module || return $?
+ fi
+ done
+ return 0
}
-CLONEDIR="$COREDIR/clone"
-if [ ! -e ${CLONEDIR} ]; then mkdir -p "$CLONEDIR"; fi
+
+# no params, no action
+if [ "$#" -eq "0" ] ; then
+ usage
+fi
+
+if [ ! "`type -p git`" ]; then
+ echo "Cannot find the git binary! Is git installed and is in PATH?"
+ exit 1
+fi
+
+
+get_active_submodules
+get_configured_submodules
+
+
+
# extra params for some commands, like log
EXTRA=
@@ -125,7 +216,7 @@ PUSH_NOTES=
LAST_WORKING=
SET_LAST_WORKING=
ALLOW_EMPTY=
-KEEP_GOING=0
+KEEP_GOING=
REPORT_REPOS=1
REPORT_COMMANDS=0
REPORT_COMPACT=0
@@ -133,289 +224,67 @@ DO_HOOK_REFRESH=false
while [ "${COMMAND:0:1}" = "-" ] ; do
case "$COMMAND" in
- -f) KEEP_GOING=1
- ;;
- -s) REPORT_REPOS=0
- ;;
- -v) REPORT_COMMANDS=1
- ;;
- -1) REPORT_COMPACT=1
- ;;
- --set-push-user)
- shift
- PUSH_USER="$1"
- ;;
- --last-working) LAST_WORKING=1
- ;;
- --set-last-working) SET_LAST_WORKING=1
- ;;
- --push-notes) PUSH_NOTES=1
+ -f )KEEP_GOING="||:"
;;
-z)
- DO_HOOK_REFRESH=true
- postprocess 0
+ refresh_all_hooks
+ exit 0;
;;
+ --set-push-urls)
+ shift
+ PUSH_USER="$1"
+ if [ -n "${PUSH_USER}" ] ; then
+ PUSH_USER="${PUSH_USER}@"
+ fi
+ set_push_urls
+ exit 0;
+ ;;
+ -*)
+ echo "option: $COMMAND not supported" 1>&2
+ exit 1
esac
shift
COMMAND="$1"
done
+shift
+
case "$COMMAND" in
- apply)
- EXTRA="-p0 --stat --apply --index --ignore-space-change --whitespace=error"
- RELATIVIZE=0
- ;;
- clone|fetch|pull)
- DO_HOOK_REFRESH=true
- ;;
- diff)
- PAGER='--no-pager'
- REPORT_REPOS=0
- ;;
- log)
- if [ "$#" = "1" ] ; then
- EXTRA='-1'
- fi
- PAGER='--no-pager'
+ branch)
+ do_git_cmd ${COMMAND} "$@"
+ ;;
+ checkout)
+ do_checkout "$@" && git submodule foreach git checkout "$@"
+ ;;
+ clone)
+ do_init_modules && git submodule update && refresh_all_hooks
;;
+ fetch)
+ (git fetch "$@" && git submodule foreach git fetch "$@" ) && git submodule update
+
+ ;;
+ grep)
+ KEEP_GOING="||:"
+ do_git_cmd ${COMMAND} "$@"
+ ;;
+ pull)
+ git pull "$@" && git submodule update && refresh_all_hooks
+ ;;
push)
- if [ "$#" != "1" ] ; then
- PUSH_ALL=1
- fi
+ git submodule foreach git push "$@"
+ if [ "$?" = "0" ] ; then
+ git push "$@"
+ fi
+ ;;
+ reset)
+ do_reset
+ ;;
+ *)
+ echo "./g does not support command:$COMMAND" 1>&2
+ exit 1;
;;
esac
-# absolutize the parameters first
-unset FILES
-FILESNUM=0
-while shift ; do
- PARAM="$1"
- if [ -z "$PARAM" ] ; then
- continue
- elif [ "${PARAM:0:1}" = "-" ] ; then
- if [ \( "$COMMAND" = "checkout" -a "$PARAM" = "-b" \) -o \
- \( "$COMMAND" = "clone" -a "$PARAM" = "--reference" \) -o \
- \( "$COMMAND" = "commit" -a "$PARAM" = "-m" \) -o \
- \( "$COMMAND" = "commit" -a "$PARAM" = "-am" \) -o \
- \( "$COMMAND" = "tag" -a "$PARAM" = "-m" \) ]
- then
- # params that take an argument
- FILES[$FILESNUM]="$PARAM"
- FILESNUM=$(($FILESNUM+1))
- shift
- FILES[$FILESNUM]="$1"
- FILESNUM=$(($FILESNUM+1))
- else
- if [ "$COMMAND" = "commit" -a "$PARAM" = "-F" ]
- then
- shift
- # this still needs some magic to handle relative paths
- EXTRA="${EXTRA} -F ${1}"
- else
- [ "$COMMAND" = "commit" -a "$PARAM" = "--allow-empty" ] && ALLOW_EMPTY=1
- FILES[$FILESNUM]="$PARAM"
- FILESNUM=$(($FILESNUM+1))
- fi
- fi
- else
- if [ "$COMMAND" = "apply" ] ; then
- grep -qs $'^+ *\t' "$PARAM" && {
- echo "Patch '$PARAM' introduces tabs in indentation, aborting."
- echo
- echo "Please fix the patch (something like s/^\(+ *\)\t/\1 /) and try again."
- echo
- exit 1
- }
- fi
- if [ "$COMMAND" == "rev-parse" ] ; then
- # this is not a file
- FILES[$FILESNUM]="$PARAM"
- FILESNUM=$(($FILESNUM+1))
- else
- # make the paths absolute
- FILES[$FILESNUM]=$(perl -e 'use Cwd "abs_path"; print abs_path(shift);' "$PARAM" 2>/dev/null)
- if [ -z "${FILES[$FILESNUM]}" -o ! -e "${FILES[$FILESNUM]}" ] ; then
- # it is probably not a file, but a tag name, or something
- FILES[$FILESNUM]="$PARAM"
- fi
- FILESNUM=$(($FILESNUM+1))
- fi
- fi
-done
-
-# do it!
-DIRS="core $(cd $CLONEDIR ; ls)"
-if [ "$COMMAND" = "clone" ] ; then
- DIRS="$ALLREPOS"
-fi
-for REPO in $DIRS ; do
- DIR="$CLONEDIR/$REPO"
- NAME="$REPO"
- if [ "$REPO" = "core" ] ; then
- DIR="$COREDIR"
- NAME="main repo"
- fi
-
- if [ -d "$DIR" -a "z$PUSH_USER" != "z" ]; then
- echo "setting up push url for $DIR"
- (cd $DIR && git config remote.origin.pushurl "ssh://${PUSH_USER}@gerrit.libreoffice.org:29418/${REPO}")
- elif [ -d "$DIR" -a "z$LAST_WORKING" != "z" ]; then
- echo "fetching notes for $REPO ..."
- (cd $DIR && git fetch origin 'refs/notes/*:refs/notes/*')
- hash=`(cd $DIR && git log --pretty='%H %N' | grep 'win32 working build' | head -n1 | sed 's/ win32.*//')`
- if test "z$hash" != "z"; then
- echo "update to $hash"
- (cd $DIR && git checkout $hash)
- else
- echo "Warning: missing known working note on repo $REPO"
- fi
- elif [ -d "$DIR" -a "z$SET_LAST_WORKING" != "z" ]; then
- echo "fetching notes for $REPO ..."
- (cd $DIR && git fetch origin 'refs/notes/*:refs/notes/*')
- (cd $DIR && git notes add -m 'win32 working build')
- elif [ -d "$DIR" -a "z$PUSH_NOTES" != "z" ]; then
- echo "pushing notes for $REPO ..."
- (cd $DIR && git push origin 'refs/notes/*:refs/notes/*')
- elif [ \( -d "$DIR" -a -d "$DIR"/.git \) -o \( "$COMMAND" = "clone" \) ] ; then
- (
- # executed in a subshell
- if [ "$COMMAND" != "clone" ] ; then
- cd "$DIR"
- else
- cd "$CLONEDIR"
- fi
-
- # relativize the absolutized params again if we want to operate
- # only on the files belonging to this exact repo
- if [ "$RELATIVIZE" = "1" -a -n "$FILES" ] ; then
- FILESNUM=0
- INSERTNUM=0
- PWD=$(pwd)
- PWDLEN=$(pwd | wc -c)
- for I in "${FILES[@]}" ; do
- I="${I//@REPO@/${REPO}}"
- unset FILES[$FILESNUM]
- FILESNUM=$(($FILESNUM+1))
- # filter out files that don't belong to this repo
- if [ \( "${I:0:1}" = "/" \) -a \( "$COMMAND" != "clone" \) ] ; then
- if [ "${I:0:$PWDLEN}" = "$PWD/" ] ; then
- FILES[$INSERTNUM]="${I:$PWDLEN}"
- INSERTNUM=$(($INSERTNUM+1))
- fi
- else
- FILES[$INSERTNUM]="$I"
- INSERTNUM=$(($INSERTNUM+1))
- fi
- done
- [ "$INSERTNUM" = "0" ] && exit 0
- fi
-
- # some extra params
- case "$COMMAND" in
- apply)
- for I in * ; do
- if [ -d "$I" ] ; then
- EXTRA="$EXTRA --include=$I/*"
- else
- EXTRA="$EXTRA --include=$I"
- fi
- done
- ;;
- commit)
- if [ "$ALLOW_EMPTY" != "1" ] ; then
- [ -z "$(git diff-index --name-only HEAD --)" ] && exit 0
- fi
- ;;
- push)
- if [ "$PUSH_ALL" != "1" ] ; then
- [ -n "$(git rev-list @{upstream}..HEAD)" ] || exit 0
- fi
- ;;
- status)
- LOCALCOMMITS="$(git rev-list @{upstream}..HEAD)"
- if [ -z "$LOCALCOMMITS" ] ; then
- [ -z "$(git diff-index --name-only HEAD --)" ] && exit 0
- fi
- ;;
- clone)
- EXTRA="$(git config remote.origin.url)"
- EXTRA=${EXTRA/core/${REPO}}
- ;;
- esac
-
- # do it!
- if [ "$COMMAND" != "clone" -o ! -d $DIR ] ; then
- if [ "$REPORT_REPOS" = "1" -a "$COMMAND" != "grep" ] ; then
- if [ "$REPORT_COMPACT" = "1" ] ; then
- echo -n "${REPO}:"
- else
- echo "===== $NAME ====="
- fi
- fi
- if [ "$REPORT_COMMANDS" = "1" ] ; then
- echo "+ git $PAGER $COMMAND $EXTRA ${FILES[@]}"
- fi
- git $PAGER "$COMMAND" $EXTRA "${FILES[@]}"
- RETURN=$?
- fi
-
- # now we can change the dir in case of clone as well
- if [ "$COMMAND" = "clone" ] ; then
- cd $DIR
- fi
-
- case "$COMMAND" in
- pull|clone)
- # update links
- if [ "$DIR" != "$COREDIR" ]; then
- for link in $(ls) ; do
- if [ ! -e "$COREDIR/$link" ] ; then
- if test -h "$COREDIR/$link"; then
- rm "$COREDIR/$link"
- echo -n "re-"
- fi
- echo "creating missing link $link"
- ln -s "$DIR/$link" "$COREDIR/$link"
- fi
- done
- fi
- ;;
- status)
- # git status returns error in some versions, clear that
- RETURN=0
- ;;
- grep)
- # git grep return an 'error' if nothing is found
- # still we should continue grepping the other repos
- RETURN=0
- ;;
- esac
- if [ "$KEEP_GOING" = "1" ] ; then
- RETURN=0
- fi
-
- exit $RETURN
- ) || postprocess $?
- fi
-done
-
-# Cleanup the broken links
-if [ "$COMMAND" = "pull" ] ; then
- for link in $(ls $COREDIR) ; do
- if [ -h "$COREDIR/$link" -a ! -e "$COREDIR/$link" ]; then
- echo "Removing broken link $link"
- rm $COREDIR/$link
- fi
- done
-fi
-
-# warn
-if [ "$COMMAND" = "apply" ] ; then
- echo
- echo "Don't forget to check the status & commit now ;-)"
- echo
-fi
-
-postprocess $?
+exit $?
# vi:set shiftwidth=4 expandtab:
diff --git a/git-hooks/commit-msg b/git-hooks/commit-msg
deleted file mode 100755
index fa0b2e2..0000000
--- a/git-hooks/commit-msg
+++ /dev/null
@@ -1,173 +0,0 @@
-#!/bin/sh
-#
-# An example hook script to check the commit log message.
-# Called by git-commit with one argument, the name of the file
-# that has the commit message. The hook should exit with non-zero
-# status after issuing an appropriate message if it wants to stop the
-# commit. The hook is allowed to edit the commit message file.
-#
-# To enable this hook, make this file executable.
-
-# Uncomment the below to add a Signed-off-by line to the message.
-# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')
-# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1"
-
-# This example catches duplicate Signed-off-by lines.
-
-base_dir=$(dirname $0)
-MSG="$1"
-
-abort() {
- cp $1 $1.save
- cat >&2 <<EOF
-Commit aborted, your commit message was saved as '$1.save'.
-
-Reason: $2
-
-EOF
- exit 1
-}
-
-test "" = "$(grep '^Signed-off-by: ' "$1" |
- sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || {
- abort "$1" "Duplicate Signed-off-by lines."
-}
-
-# Check that the first line exists, and is not an asterisk
-
-if [ -z "`head -n 1 $1 | grep -v '^[ \t]*\*$'`" ] ; then
- abort "$1" "Please provide the general description on the first line."
-fi
-
-# ...and that it is not too long
-
-if [ "`head -n 1 $1 | wc -c`" -gt 79 ] ; then
- abort "$1" "The first line is too long, please try to fit into 79 characters."
-fi
-
-# ...and that it does not continue on the second line
-if [ "`wc -l < $1`" -gt 1 -a -n "`head -n 2 $1 | tail -n 1 | sed 's/^#.*//'`" ] ; then
- abort "$1" "The second line is not empty - maybe the first line continues there?"
-fi
-
-# Check that the message is not a ChangeLog-like one
-
-if [ -n "`head -n 1 $1 | grep '^[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}.*<.*@.*>'`" ] ; then
- abort "$1" "The commit message looks like ChangeLog, please use the git form."
-fi
-
-# Check for whitespace in front of *'s
-
-if [ -n "`sed '/^#/,$d' $1 | grep '^[[:space:]]\+\*.*:'`" -a -z "`grep '^\*' $1`" ] ; then
- abort "$1" "Please don't use whitespace in front of '* file: Description.' entries."
-fi
-
-#------------------ copied gerrit commit-msg hook to handle ChangeId -->
-# From Gerrit Code Review 2.3
-#
-# Part of Gerrit Code Review (http://code.google.com/p/gerrit/)
-#
-# Copyright (C) 2009 The Android Open Source Project
-#
-# Licensed 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
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-CHANGE_ID_AFTER="Bug|Issue"
-
-# Check for, and add if missing, a unique Change-Id
-#
-add_ChangeId() {
- clean_message=`sed -e '
- /^diff --git a\/.*/{
- s///
- q
- }
- /^Signed-off-by:/d
- /^#/d
- ' "$MSG" | git stripspace`
- if test -z "$clean_message"
- then
- return
- fi
-
- id=`grep -i '^Change-Id:' "$MSG" | sed -e "s/.*: I//"`
- temp_msg=`grep -v -i '^Change-Id:' "$MSG"`
- echo "$temp_msg" > "$MSG"
-
- if test -z "$id"
- then
- id=`_gen_ChangeId`
- fi
- perl -e '
- $MSG = shift;
- $id = shift;
- $CHANGE_ID_AFTER = shift;
-
- undef $/;
- open(I, $MSG); $_ = <I>; close I;
- s|^diff --git a/.*||ms;
- s|^#.*$||mg;
- exit unless $_;
-
- @message = split /\n/;
- $haveFooter = 0;
- $startFooter = @message;
- for($line = @message - 1; $line >= 0; $line--) {
- $_ = $message[$line];
-
- if (/^[a-zA-Z0-9-]+: /) {
- $haveFooter++;
- next;
- }
- next if /^[ []/;
- $startFooter = $line if ($haveFooter && /^\r?$/);
- last;
- }
-
- @footer = @message[$startFooter+1.. at message];
- @message = @message[0..$startFooter];
- push(@footer, "") unless @footer;
-
- for ($line = 0; $line < @footer; $line++) {
- $_ = $footer[$line];
- next if /^($CHANGE_ID_AFTER):/i;
- last;
- }
- splice(@footer, $line, 0, "Change-Id: I$id");
-
- $_ = join("\n", @message, @footer);
- open(O, ">$MSG"); print O; close O;
- ' "$MSG" "$id" "$CHANGE_ID_AFTER"
-}
-_gen_ChangeIdInput() {
- echo "tree `git write-tree`"
- if parent=`git rev-parse HEAD^0 2>/dev/null`
- then
- echo "parent $parent"
- fi
- echo "author `git var GIT_AUTHOR_IDENT`"
- echo "committer `git var GIT_COMMITTER_IDENT`"
- echo
- printf '%s' "$clean_message"
-}
-_gen_ChangeId() {
- _gen_ChangeIdInput |
- git hash-object -t commit --stdin
-}
-
-
-add_ChangeId
-#------------------ copied gerrit commit-msg hook to handle ChangeId <--
-
-
-exit 0
diff --git a/git-hooks/post-merge b/git-hooks/post-merge
deleted file mode 100755
index 25e62ed..0000000
--- a/git-hooks/post-merge
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/bash
-
-# Do not warn if there were no real merge
-git rev-parse -q --verify HEAD^2 >/dev/null || exit
-
-echo
-echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
-echo "! You probably used 'git pull' instead of 'git pull -r' !"
-echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
-echo
-echo "You can still fix it - please do 'git pull -r' now."
-echo
diff --git a/git-hooks/pre-commit b/git-hooks/pre-commit
deleted file mode 100755
index 5b752a3..0000000
--- a/git-hooks/pre-commit
+++ /dev/null
@@ -1,135 +0,0 @@
-#!/usr/bin/env perl
-
-# A hook script to verify what is about to be committed.
-# Called by "git commit" with no arguments. The hook should
-# exit with non-zero status after issuing an appropriate message
-# if it wants to stop the commit.
-
-use strict;
-#use File::Copy;
-#use Cwd;
-
-$ENV{LC_ALL} = "C";
-
-sub check_whitespaces($)
-{
- my ($h) = @_;
- my $src_limited = "c|cpp|cxx|h|hrc|hxx|idl|inl|java|map|MK|pmk|pl|pm|sdi|sh|src|tab|xcu|xml";
- my $src_full = "c|cpp|cxx|h|hrc|hxx|idl|inl|java|map|mk|MK|pmk|pl|pm|sdi|sh|src|tab|xcu|xml";
-
- my $found_bad = 0;
- my $filename;
- my $reported_filename = "";
- my $lineno;
- sub bad_line
- {
- my ($why, $line, $file_filter) = @_;
- if (!defined $file_filter || $filename =~ /\.($file_filter)$/)
- {
- if (!$found_bad)
- {
- print STDERR "*\n";
- print STDERR "* You have some suspicious patch lines:\n";
- print STDERR "*\n";
- $found_bad = 1;
- }
- if ($reported_filename ne $filename)
- {
- print STDERR "* In $filename\n";
- $reported_filename = $filename;
- }
- print STDERR "* $why (line $lineno)\n";
- print STDERR "$filename:$lineno:$line\n";
- }
- }
- open( FILES, "git-diff-index -p -M --cached $h |" ) || die "Cannot run git diff-index.";
- while (<FILES>)
- {
- if (m|^diff --git a/(.*) b/\1$|)
- {
- $filename = $1;
- next;
- }
- if (/^@@ -\S+ \+(\d+)/)
- {
- $lineno = $1 - 1;
- next;
- }
- if (/^ /)
- {
- $lineno++;
- next;
- }
- if (s/^\+//)
- {
- $lineno++;
- chomp;
- if (/\s$/)
- {
- bad_line("trailing whitespace", $_ , $src_limited);
- }
- if (/\s* /)
- {
- bad_line("indent with Tab", $_, $src_limited);
- }
- if (/^(?:[<>=]){7}$/)
- {
- bad_line("unresolved merge conflict", $src_full);
- }
- if (/SAL_DEBUG/)
- {
- bad_line("temporary debug in commit", $_, $src_limited);
- }
- }
- }
- if ( $found_bad)
- {
- exit($found_bad);
- }
-}
-
-# Do the work :-)
-
-# Initial commit: diff against an empty tree object
-my $against="4b825dc642cb6eb9a060e54bf8d69288fbee4904";
-if ( system( "git rev-parse --verify HEAD >/dev/null 2>&1" ) == 0 )
-{
- $against="HEAD"
-}
-
-# If you want to allow non-ascii filenames set this variable to true.
-my $allownonascii=`git config hooks.allownonascii`;
-
-# Cross platform projects tend to avoid non-ascii filenames; prevent
-# them from being added to the repository. We exploit the fact that the
-# printable range starts at the space character and ends with tilde.
-if ( $allownonascii ne "true" &&
- # Note that the use of brackets around a tr range is ok here, (it's
- # even required, for portability to Solaris 10's /usr/bin/tr), since
- # the square bracket bytes happen to fall in the designated range.
- `git diff --cached --name-only --diff-filter=A -z $against | \
- LC_ALL=C tr -d '[ -~]\\0'` ne "" )
-{
- print <<EOM;
-Error: Attempt to add a non-ascii file name.
-
-This can cause problems if you want to work
-with people on other platforms.
-
-To be portable it is advisable to rename the file ...
-
-If you know what you are doing you can disable this
-check using:
-
- git config hooks.allownonascii true
-
-EOM
- exit( 1 );
-}
-
-# fix whitespace in code
-check_whitespaces( $against);
-
-# all OK
-exit( 0 );
-# vi:set shiftwidth=4 expandtab:
diff --git a/helpcontent2 b/helpcontent2
new file mode 160000
index 0000000..4507e5f
--- /dev/null
+++ b/helpcontent2
@@ -0,0 +1 @@
+Subproject commit 4507e5f21836724cf768cf4e3ffbbf4ada6c87c3
diff --git a/translations b/translations
new file mode 160000
index 0000000..751ae9d
--- /dev/null
+++ b/translations
@@ -0,0 +1 @@
+Subproject commit 751ae9de9563da8b26aef8e5c0f80ad502fbfe81
commit b0176f6245b996cdfabdce7ca299b95e4b64bb88
Author: Pierre-Eric Pelloux-Prayer <pierre-eric at lanedo.com>
Date: Fri Oct 5 15:30:11 2012 +0200
vml import: only apply width-percent attribute if it's != 0
This fixes an issue with a shape defined with these attributes:
mso-width-percent:0;mso-height-percent:0 and
mso-width-relative:page;mso-height-relative:page;
where all points were then located in (0,0)
Change-Id: I51070ad2b2e4e05ab64f16813472ca1d7099fb09
Reviewed-on: https://gerrit.libreoffice.org/775
Reviewed-by: Petr Mladek <pmladek at suse.cz>
Tested-by: Petr Mladek <pmladek at suse.cz>
diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx
index fcc0da5..8d84edd 100644
--- a/oox/source/vml/vmlshape.cxx
+++ b/oox/source/vml/vmlshape.cxx
@@ -463,7 +463,9 @@ Reference< XShape > SimpleShape::implConvertAndInsert( const Reference< XShapes
if ( maTypeModel.maWidthRelative.isEmpty() || maTypeModel.maWidthRelative == "page" )
{
sal_Int16 nWidth = maTypeModel.maWidthPercent.toInt32() / 10;
- PropertySet( xShape ).setAnyProperty(PROP_RelativeWidth, makeAny( nWidth ) );
+ // Only apply if nWidth != 0
+ if ( nWidth )
+ PropertySet( xShape ).setAnyProperty(PROP_RelativeWidth, makeAny( nWidth ) );
}
}
if ( !maTypeModel.maHeightPercent.isEmpty( ) )
@@ -472,7 +474,9 @@ Reference< XShape > SimpleShape::implConvertAndInsert( const Reference< XShapes
if ( maTypeModel.maHeightRelative.isEmpty() || maTypeModel.maHeightRelative == "page" )
{
sal_Int16 nHeight = maTypeModel.maHeightPercent.toInt32() / 10;
- PropertySet( xShape ).setAnyProperty(PROP_RelativeHeight, makeAny( nHeight ) );
+ // Only apply if nHeight != 0
+ if ( nHeight )
+ PropertySet( xShape ).setAnyProperty(PROP_RelativeHeight, makeAny( nHeight ) );
}
}
}
commit e6b28a09f4bf9cfd30c1851d5ed9fb44c1423881
Author: Ricardo Montania <ricardo at linuxafundo.com.br>
Date: Sun Oct 14 19:00:25 2012 -0300
More rtl::OUString cleanup in basctl
Change-Id: Ife2754b17e111c0e129670b95bd2e16d81ad906c
Reviewed-on: https://gerrit.libreoffice.org/873
Reviewed-by: Petr Mladek <pmladek at suse.cz>
Tested-by: Petr Mladek <pmladek at suse.cz>
diff --git a/basctl/source/basicide/moduldlg.hxx b/basctl/source/basicide/moduldlg.hxx
index 71f6e66..1179a9c 100644
--- a/basctl/source/basicide/moduldlg.hxx
+++ b/basctl/source/basicide/moduldlg.hxx
@@ -105,7 +105,7 @@ class ExtTreeListBox : public TreeListBox
{
protected:
virtual sal_Bool EditingEntry( SvLBoxEntry* pEntry, Selection& rSel );
- virtual sal_Bool EditedEntry( SvLBoxEntry* pEntry, const rtl::OUString& rNewText );
+ virtual sal_Bool EditedEntry( SvLBoxEntry* pEntry, const OUString& rNewText );
virtual DragDropMode NotifyStartDrag( TransferDataContainer& rData, SvLBoxEntry* pEntry );
virtual sal_Bool NotifyAcceptDrop( SvLBoxEntry* pEntry );
@@ -142,7 +142,7 @@ public:
virtual void InitEntry( SvLBoxEntry*, const XubString&, const Image&, const Image&, SvLBoxButtonKind eButtonKind );
virtual sal_Bool EditingEntry( SvLBoxEntry* pEntry, Selection& rSel );
- virtual sal_Bool EditedEntry( SvLBoxEntry* pEntry, const rtl::OUString& rNewText );
+ virtual sal_Bool EditedEntry( SvLBoxEntry* pEntry, const OUString& rNewText );
void SetDocument( const ScriptDocument& rDocument ) { m_aDocument = rDocument; }
@@ -165,7 +165,7 @@ public:
LibDialog( Window* pParent );
~LibDialog();
- void SetStorageName( const ::rtl::OUString& rName );
+ void SetStorageName( const OUString& rName );
CheckBox& GetLibBox() { return aLibBox; }
bool IsReference() const { return aReferenceBox.IsChecked(); }
@@ -205,7 +205,7 @@ protected:
DECL_LINK( BasicBoxHighlightHdl, TreeListBox * );
DECL_LINK( ButtonHdl, Button * );
void CheckButtons();
- bool GetSelection( ScriptDocument& rDocument, ::rtl::OUString& rLibName );
+ bool GetSelection( ScriptDocument& rDocument, OUString& rLibName );
void DeleteCurrent();
void NewModule();
void NewDialog();
@@ -274,7 +274,7 @@ public:
// Helper functions
SbModule* createModImpl( Window* pWin, const ScriptDocument& rDocument,
- TreeListBox& rBasicBox, const ::rtl::OUString& rLibName, ::rtl::OUString aModName, bool bMain = false );
+ TreeListBox& rBasicBox, const OUString& rLibName, OUString aModName, bool bMain = false );
void createLibImpl( Window* pWin, const ScriptDocument& rDocument,
CheckBox* pLibBox, TreeListBox* pBasicBox );
diff --git a/basctl/source/basicide/scriptdocument.cxx b/basctl/source/basicide/scriptdocument.cxx
index cdf91fb..d61de8f 100644
--- a/basctl/source/basicide/scriptdocument.cxx
+++ b/basctl/source/basicide/scriptdocument.cxx
@@ -231,7 +231,7 @@ namespace basctl
getLibraryContainer( LibraryContainerType _eType ) const;
/// determines whether a given library is part of the shared installation
- bool isLibraryShared( const ::rtl::OUString& _rLibName, LibraryContainerType _eType );
+ bool isLibraryShared( const OUString& _rLibName, LibraryContainerType _eType );
/** returns the current frame of the document
@@ -252,30 +252,28 @@ namespace basctl
bool isDocumentModified() const;
bool saveDocument( const Reference< XStatusIndicator >& _rxStatusIndicator ) const;
- ::rtl::OUString
- getTitle() const;
- ::rtl::OUString
- getURL() const;
+ OUString getTitle() const;
+ OUString getURL() const;
bool allowMacros() const;
Reference< XNameContainer >
- getLibrary( LibraryContainerType _eType, const ::rtl::OUString& _rLibName, bool _bLoadLibrary ) const
+ getLibrary( LibraryContainerType _eType, const OUString& _rLibName, bool _bLoadLibrary ) const
SAL_THROW((NoSuchElementException));
- bool hasLibrary( LibraryContainerType _eType, const ::rtl::OUString& _rLibName ) const;
+ bool hasLibrary( LibraryContainerType _eType, const OUString& _rLibName ) const;
Reference< XNameContainer >
- getOrCreateLibrary( LibraryContainerType _eType, const ::rtl::OUString& _rLibName ) const;
+ getOrCreateLibrary( LibraryContainerType _eType, const OUString& _rLibName ) const;
- void loadLibraryIfExists( LibraryContainerType _eType, const ::rtl::OUString& _rLibrary );
+ void loadLibraryIfExists( LibraryContainerType _eType, const OUString& _rLibrary );
- bool removeModuleOrDialog( LibraryContainerType _eType, const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rModuleName );
- bool hasModuleOrDialog( LibraryContainerType _eType, const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rModName ) const;
- bool getModuleOrDialog( LibraryContainerType _eType, const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rObjectName, Any& _out_rModuleOrDialog );
- bool renameModuleOrDialog( LibraryContainerType _eType, const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rOldName, const ::rtl::OUString& _rNewName, const Reference< XNameContainer >& _rxExistingDialogModel );
- bool createModule( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rModName, bool _bCreateMain, ::rtl::OUString& _out_rNewModuleCode ) const;
- bool insertModuleOrDialog( LibraryContainerType _eType, const ::rtl::OUString& _rObjectName, const ::rtl::OUString& _rModName, const Any& _rElement ) const;
- bool updateModule( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rModName, const ::rtl::OUString& _rModuleCode ) const;
- bool createDialog( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rDialogName, Reference< XInputStreamProvider >& _out_rDialogProvider ) const;
+ bool removeModuleOrDialog( LibraryContainerType _eType, const OUString& _rLibName, const OUString& _rModuleName );
+ bool hasModuleOrDialog( LibraryContainerType _eType, const OUString& _rLibName, const OUString& _rModName ) const;
+ bool getModuleOrDialog( LibraryContainerType _eType, const OUString& _rLibName, const OUString& _rObjectName, Any& _out_rModuleOrDialog );
+ bool renameModuleOrDialog( LibraryContainerType _eType, const OUString& _rLibName, const OUString& _rOldName, const OUString& _rNewName, const Reference< XNameContainer >& _rxExistingDialogModel );
+ bool createModule( const OUString& _rLibName, const OUString& _rModName, bool _bCreateMain, OUString& _out_rNewModuleCode ) const;
+ bool insertModuleOrDialog( LibraryContainerType _eType, const OUString& _rObjectName, const OUString& _rModName, const Any& _rElement ) const;
+ bool updateModule( const OUString& _rLibName, const OUString& _rModName, const OUString& _rModuleCode ) const;
+ bool createDialog( const OUString& _rLibName, const OUString& _rDialogName, Reference< XInputStreamProvider >& _out_rDialogProvider ) const;
protected:
// DocumentEventListener
@@ -447,7 +445,7 @@ namespace basctl
}
- Reference< XNameContainer > ScriptDocument::Impl::getLibrary( LibraryContainerType _eType, const ::rtl::OUString& _rLibName, bool _bLoadLibrary ) const
+ Reference< XNameContainer > ScriptDocument::Impl::getLibrary( LibraryContainerType _eType, const OUString& _rLibName, bool _bLoadLibrary ) const
SAL_THROW((NoSuchElementException))
{
OSL_ENSURE( isValid(), "ScriptDocument::Impl::getLibrary: invalid state!" );
@@ -482,7 +480,7 @@ namespace basctl
}
- bool ScriptDocument::Impl::hasLibrary( LibraryContainerType _eType, const ::rtl::OUString& _rLibName ) const
+ bool ScriptDocument::Impl::hasLibrary( LibraryContainerType _eType, const OUString& _rLibName ) const
{
bool bHas = false;
try
@@ -498,7 +496,7 @@ namespace basctl
}
- Reference< XNameContainer > ScriptDocument::Impl::getOrCreateLibrary( LibraryContainerType _eType, const ::rtl::OUString& _rLibName ) const
+ Reference< XNameContainer > ScriptDocument::Impl::getOrCreateLibrary( LibraryContainerType _eType, const OUString& _rLibName ) const
{
Reference< XNameContainer > xLibrary;
try
@@ -520,7 +518,7 @@ namespace basctl
}
- void ScriptDocument::Impl::loadLibraryIfExists( LibraryContainerType _eType, const ::rtl::OUString& _rLibrary )
+ void ScriptDocument::Impl::loadLibraryIfExists( LibraryContainerType _eType, const OUString& _rLibrary )
{
try
{
@@ -535,7 +533,7 @@ namespace basctl
}
- bool ScriptDocument::Impl::removeModuleOrDialog( LibraryContainerType _eType, const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rModuleName )
+ bool ScriptDocument::Impl::removeModuleOrDialog( LibraryContainerType _eType, const OUString& _rLibName, const OUString& _rModuleName )
{
OSL_ENSURE( isValid(), "ScriptDocument::Impl::removeModuleOrDialog: invalid!" );
if ( isValid() )
@@ -558,7 +556,7 @@ namespace basctl
}
- bool ScriptDocument::Impl::hasModuleOrDialog( LibraryContainerType _eType, const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rModName ) const
+ bool ScriptDocument::Impl::hasModuleOrDialog( LibraryContainerType _eType, const OUString& _rLibName, const OUString& _rModName ) const
{
OSL_ENSURE( isValid(), "ScriptDocument::Impl::hasModuleOrDialog: invalid!" );
if ( !isValid() )
@@ -578,7 +576,7 @@ namespace basctl
}
- bool ScriptDocument::Impl::getModuleOrDialog( LibraryContainerType _eType, const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rObjectName, Any& _out_rModuleOrDialog )
+ bool ScriptDocument::Impl::getModuleOrDialog( LibraryContainerType _eType, const OUString& _rLibName, const OUString& _rObjectName, Any& _out_rModuleOrDialog )
{
OSL_ENSURE( isValid(), "ScriptDocument::Impl::getModuleOrDialog: invalid!" );
if ( !isValid() )
@@ -602,8 +600,8 @@ namespace basctl
}
- bool ScriptDocument::Impl::renameModuleOrDialog( LibraryContainerType _eType, const ::rtl::OUString& _rLibName,
- const ::rtl::OUString& _rOldName, const ::rtl::OUString& _rNewName, const Reference< XNameContainer >& _rxExistingDialogModel )
+ bool ScriptDocument::Impl::renameModuleOrDialog( LibraryContainerType _eType, const OUString& _rLibName,
+ const OUString& _rOldName, const OUString& _rNewName, const Reference< XNameContainer >& _rxExistingDialogModel )
{
OSL_ENSURE( isValid(), "ScriptDocument::Impl::renameModuleOrDialog: invalid!" );
if ( !isValid() )
@@ -675,9 +673,9 @@ namespace basctl
}
- bool ScriptDocument::Impl::createModule( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rModName, bool _bCreateMain, ::rtl::OUString& _out_rNewModuleCode ) const
+ bool ScriptDocument::Impl::createModule( const OUString& _rLibName, const OUString& _rModName, bool _bCreateMain, OUString& _out_rNewModuleCode ) const
{
- _out_rNewModuleCode = ::rtl::OUString();
+ _out_rNewModuleCode = OUString();
try
{
Reference< XNameContainer > xLib( getLibrary( E_SCRIPTS, _rLibName, true ) );
@@ -685,9 +683,9 @@ namespace basctl
return false;
// create new module
- _out_rNewModuleCode = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "REM ***** BASIC *****\n\n" ) );
+ _out_rNewModuleCode = "REM ***** BASIC *****\n\n" ;
if ( _bCreateMain )
- _out_rNewModuleCode += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Sub Main\n\nEnd Sub\n" ) );
+ _out_rNewModuleCode += "Sub Main\n\nEnd Sub\n" ;
// insert module into library
xLib->insertByName( _rModName, makeAny( _out_rNewModuleCode ) );
@@ -702,7 +700,7 @@ namespace basctl
}
- bool ScriptDocument::Impl::insertModuleOrDialog( LibraryContainerType _eType, const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rObjectName, const Any& _rElement ) const
+ bool ScriptDocument::Impl::insertModuleOrDialog( LibraryContainerType _eType, const OUString& _rLibName, const OUString& _rObjectName, const Any& _rElement ) const
{
try
{
@@ -721,7 +719,7 @@ namespace basctl
}
- bool ScriptDocument::Impl::updateModule( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rModName, const ::rtl::OUString& _rModuleCode ) const
+ bool ScriptDocument::Impl::updateModule( const OUString& _rLibName, const OUString& _rModName, const OUString& _rModuleCode ) const
{
try
{
@@ -739,7 +737,7 @@ namespace basctl
}
- bool ScriptDocument::Impl::createDialog( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rDialogName, Reference< XInputStreamProvider >& _out_rDialogProvider ) const
+ bool ScriptDocument::Impl::createDialog( const OUString& _rLibName, const OUString& _rDialogName, Reference< XInputStreamProvider >& _out_rDialogProvider ) const
{
try
{
@@ -823,21 +821,21 @@ namespace basctl
if ( _rxStatusIndicator.is() )
{
aArgs.realloc(1);
- aArgs[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "StatusIndicator" ) );
+ aArgs[0].Name = "StatusIndicator" ;
aArgs[0].Value <<= _rxStatusIndicator;
}
try
{
URL aURL;
- aURL.Complete = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:Save" ) );
+ aURL.Complete = ".uno:Save" ;
aURL.Main = aURL.Complete;
- aURL.Protocol = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:" ) );
- aURL.Path = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Save" ) );
+ aURL.Protocol = ".uno:" ;
+ aURL.Path = "Save" ;
Reference< XDispatchProvider > xDispProv( xFrame, UNO_QUERY_THROW );
Reference< XDispatch > xDispatch(
- xDispProv->queryDispatch( aURL, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "_self" ) ), FrameSearchFlag::AUTO ),
+ xDispProv->queryDispatch( aURL, "_self", FrameSearchFlag::AUTO ),
UNO_SET_THROW );
xDispatch->dispatch( aURL, aArgs );
@@ -852,11 +850,11 @@ namespace basctl
}
- ::rtl::OUString ScriptDocument::Impl::getTitle() const
+ OUString ScriptDocument::Impl::getTitle() const
{
OSL_PRECOND( isValid() && isDocument(), "ScriptDocument::Impl::getTitle: for documents only!" );
- ::rtl::OUString sTitle;
+ OUString sTitle;
if ( isValid() && isDocument() )
{
sTitle = ::comphelper::DocumentInfo::getDocumentTitle( m_xDocument );
@@ -865,11 +863,11 @@ namespace basctl
}
- ::rtl::OUString ScriptDocument::Impl::getURL() const
+ OUString ScriptDocument::Impl::getURL() const
{
OSL_PRECOND( isValid() && isDocument(), "ScriptDocument::Impl::getURL: for documents only!" );
- ::rtl::OUString sURL;
+ OUString sURL;
if ( isValid() && isDocument() )
{
try
@@ -926,7 +924,7 @@ namespace basctl
}
- bool ScriptDocument::Impl::isLibraryShared( const ::rtl::OUString& _rLibName, LibraryContainerType _eType )
+ bool ScriptDocument::Impl::isLibraryShared( const OUString& _rLibName, LibraryContainerType _eType )
{
bool bIsShared = false;
try
@@ -935,36 +933,36 @@ namespace basctl
if ( !xLibContainer->hasByName( _rLibName ) || !xLibContainer->isLibraryLink( _rLibName ) )
return false;
- ::rtl::OUString aFileURL;
+ OUString aFileURL;
Reference< XMultiServiceFactory > xMSF( ::comphelper::getProcessServiceFactory() );
Reference< XUriReferenceFactory > xUriFac;
if ( xMSF.is() )
{
xUriFac.set(
- xMSF->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.uri.UriReferenceFactory" ) ) ),
+ xMSF->createInstance( "com.sun.star.uri.UriReferenceFactory" ),
UNO_QUERY_THROW );
}
- ::rtl::OUString aLinkURL( xLibContainer->getLibraryLinkURL( _rLibName ) );
+ OUString aLinkURL( xLibContainer->getLibraryLinkURL( _rLibName ) );
Reference< XUriReference > xUriRef( xUriFac->parse( aLinkURL ), UNO_QUERY_THROW );
- ::rtl::OUString aScheme = xUriRef->getScheme();
+ OUString aScheme = xUriRef->getScheme();
if ( aScheme.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("file")) )
{
aFileURL = aLinkURL;
}
else if ( aScheme.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("vnd.sun.star.pkg")) )
{
- ::rtl::OUString aAuthority = xUriRef->getAuthority();
- if ( aAuthority.matchIgnoreAsciiCaseAsciiL( RTL_CONSTASCII_STRINGPARAM( "vnd.sun.star.expand:" ) ) )
+ OUString aAuthority = xUriRef->getAuthority();
+ if ( aAuthority.matchIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("vnd.sun.star.expand:")) )
{
- ::rtl::OUString aDecodedURL( aAuthority.copy( sizeof ( "vnd.sun.star.expand:" ) - 1 ) );
+ OUString aDecodedURL( aAuthority.copy( sizeof ( "vnd.sun.star.expand:" ) - 1 ) );
aDecodedURL = ::rtl::Uri::decode( aDecodedURL, rtl_UriDecodeWithCharset, RTL_TEXTENCODING_UTF8 );
Reference< XComponentContext > xContext(
comphelper::getComponentContext( xMSF ) );
Reference< XMacroExpander > xMacroExpander(
xContext->getValueByName(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/singletons/com.sun.star.util.theMacroExpander" )) ),
+ "/singletons/com.sun.star.util.theMacroExpander" ),
UNO_QUERY_THROW );
aFileURL = xMacroExpander->expandMacros( aDecodedURL );
}
@@ -976,11 +974,11 @@ namespace basctl
::osl::FileStatus aFileStatus( osl_FileStatus_Mask_FileURL );
OSL_VERIFY( ::osl::DirectoryItem::get( aFileURL, aFileItem ) == ::osl::FileBase::E_None );
OSL_VERIFY( aFileItem.getFileStatus( aFileStatus ) == ::osl::FileBase::E_None );
- ::rtl::OUString aCanonicalFileURL( aFileStatus.getFileURL() );
+ OUString aCanonicalFileURL( aFileStatus.getFileURL() );
- ::rtl::OUString aSearchURL1( RTL_CONSTASCII_USTRINGPARAM( "share/basic" ) );
- ::rtl::OUString aSearchURL2( RTL_CONSTASCII_USTRINGPARAM( "share/uno_packages" ) );
- ::rtl::OUString aSearchURL3( RTL_CONSTASCII_USTRINGPARAM( "share/extensions" ) );
+ OUString aSearchURL1( "share/basic" );
+ OUString aSearchURL2( "share/uno_packages" );
+ OUString aSearchURL3( "share/extensions" );
if( aCanonicalFileURL.indexOf( aSearchURL1 ) >= 0 ||
aCanonicalFileURL.indexOf( aSearchURL2 ) >= 0 ||
aCanonicalFileURL.indexOf( aSearchURL3 ) >= 0 )
@@ -1120,7 +1118,7 @@ namespace basctl
}
- ScriptDocument ScriptDocument::getDocumentWithURLOrCaption( const ::rtl::OUString& _rUrlOrCaption )
+ ScriptDocument ScriptDocument::getDocumentWithURLOrCaption( const OUString& _rUrlOrCaption )
{
ScriptDocument aDocument( getApplicationScriptDocument() );
if ( _rUrlOrCaption.isEmpty() )
@@ -1241,34 +1239,34 @@ namespace basctl
}
- Reference< XNameContainer > ScriptDocument::getLibrary( LibraryContainerType _eType, const ::rtl::OUString& _rLibName, bool _bLoadLibrary ) const
+ Reference< XNameContainer > ScriptDocument::getLibrary( LibraryContainerType _eType, const OUString& _rLibName, bool _bLoadLibrary ) const
SAL_THROW((NoSuchElementException))
{
return m_pImpl->getLibrary( _eType, _rLibName, _bLoadLibrary );
}
- bool ScriptDocument::hasLibrary( LibraryContainerType _eType, const ::rtl::OUString& _rLibName ) const
+ bool ScriptDocument::hasLibrary( LibraryContainerType _eType, const OUString& _rLibName ) const
{
return m_pImpl->hasLibrary( _eType, _rLibName );
}
- Reference< XNameContainer > ScriptDocument::getOrCreateLibrary( LibraryContainerType _eType, const ::rtl::OUString& _rLibName ) const
+ Reference< XNameContainer > ScriptDocument::getOrCreateLibrary( LibraryContainerType _eType, const OUString& _rLibName ) const
{
return m_pImpl->getOrCreateLibrary( _eType, _rLibName );
}
- void ScriptDocument::loadLibraryIfExists( LibraryContainerType _eType, const ::rtl::OUString& _rLibrary )
+ void ScriptDocument::loadLibraryIfExists( LibraryContainerType _eType, const OUString& _rLibrary )
{
m_pImpl->loadLibraryIfExists( _eType, _rLibrary );
}
- Sequence< ::rtl::OUString > ScriptDocument::getObjectNames( LibraryContainerType _eType, const ::rtl::OUString& _rLibName ) const
+ Sequence< OUString > ScriptDocument::getObjectNames( LibraryContainerType _eType, const OUString& _rLibName ) const
{
- Sequence< ::rtl::OUString > aModuleNames;
+ Sequence< OUString > aModuleNames;
try
{
@@ -1291,25 +1289,23 @@ namespace basctl
}
- ::rtl::OUString ScriptDocument::createObjectName( LibraryContainerType _eType, const ::rtl::OUString& _rLibName ) const
+ OUString ScriptDocument::createObjectName( LibraryContainerType _eType, const OUString& _rLibName ) const
{
- ::rtl::OUString aObjectName;
+ OUString aObjectName;
- ::rtl::OUString aBaseName = _eType == E_SCRIPTS
- ? ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Module" ) )
- : ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Dialog" ) );
+ OUString aBaseName = _eType == E_SCRIPTS ? "Module" : "Dialog";
- Sequence< ::rtl::OUString > aUsedNames( getObjectNames( _eType, _rLibName ) );
- ::std::set< ::rtl::OUString > aUsedNamesCheck;
+ Sequence< OUString > aUsedNames( getObjectNames( _eType, _rLibName ) );
+ ::std::set< OUString > aUsedNamesCheck;
::std::copy( aUsedNames.getConstArray(), aUsedNames.getConstArray() + aUsedNames.getLength(),
- ::std::insert_iterator< ::std::set< ::rtl::OUString > >( aUsedNamesCheck, aUsedNamesCheck.begin() ) );
+ ::std::insert_iterator< ::std::set< OUString > >( aUsedNamesCheck, aUsedNamesCheck.begin() ) );
bool bValid = false;
sal_Int32 i = 1;
while ( !bValid )
{
aObjectName = aBaseName;
- aObjectName += ::rtl::OUString::valueOf( i );
+ aObjectName += OUString::valueOf( i );
if ( aUsedNamesCheck.find( aObjectName ) == aUsedNamesCheck.end() )
bValid = true;
@@ -1321,7 +1317,7 @@ namespace basctl
}
- Sequence< ::rtl::OUString > ScriptDocument::getLibraryNames() const
+ Sequence< OUString > ScriptDocument::getLibraryNames() const
{
return GetMergedLibraryNames( getLibraryContainer( E_SCRIPTS ), getLibraryContainer( E_DIALOGS ) );
}
@@ -1364,19 +1360,19 @@ namespace basctl
}
- bool ScriptDocument::removeModule( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rModuleName ) const
+ bool ScriptDocument::removeModule( const OUString& _rLibName, const OUString& _rModuleName ) const
{
return m_pImpl->removeModuleOrDialog( E_SCRIPTS, _rLibName, _rModuleName );
}
- bool ScriptDocument::hasModule( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rModuleName ) const
+ bool ScriptDocument::hasModule( const OUString& _rLibName, const OUString& _rModuleName ) const
{
return m_pImpl->hasModuleOrDialog( E_SCRIPTS, _rLibName, _rModuleName );
}
- bool ScriptDocument::getModule( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rModName, ::rtl::OUString& _out_rModuleSource ) const
+ bool ScriptDocument::getModule( const OUString& _rLibName, const OUString& _rModName, OUString& _out_rModuleSource ) const
{
Any aCode;
if ( !m_pImpl->getModuleOrDialog( E_SCRIPTS, _rLibName, _rModName, aCode ) )
@@ -1386,13 +1382,13 @@ namespace basctl
}
- bool ScriptDocument::renameModule( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rOldName, const ::rtl::OUString& _rNewName ) const
+ bool ScriptDocument::renameModule( const OUString& _rLibName, const OUString& _rOldName, const OUString& _rNewName ) const
{
return m_pImpl->renameModuleOrDialog( E_SCRIPTS, _rLibName, _rOldName, _rNewName, NULL );
}
- bool ScriptDocument::createModule( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rModName, bool _bCreateMain, ::rtl::OUString& _out_rNewModuleCode ) const
+ bool ScriptDocument::createModule( const OUString& _rLibName, const OUString& _rModName, bool _bCreateMain, OUString& _out_rNewModuleCode ) const
{
if ( !m_pImpl->createModule( _rLibName, _rModName, _bCreateMain, _out_rNewModuleCode ) )
return false;
@@ -1403,31 +1399,31 @@ namespace basctl
}
- bool ScriptDocument::insertModule( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rModName, const ::rtl::OUString& _rModuleCode ) const
+ bool ScriptDocument::insertModule( const OUString& _rLibName, const OUString& _rModName, const OUString& _rModuleCode ) const
{
return m_pImpl->insertModuleOrDialog( E_SCRIPTS, _rLibName, _rModName, makeAny( _rModuleCode ) );
}
- bool ScriptDocument::updateModule( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rModName, const ::rtl::OUString& _rModuleCode ) const
+ bool ScriptDocument::updateModule( const OUString& _rLibName, const OUString& _rModName, const OUString& _rModuleCode ) const
{
return m_pImpl->updateModule( _rLibName, _rModName, _rModuleCode );
}
- bool ScriptDocument::removeDialog( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rDialogName ) const
+ bool ScriptDocument::removeDialog( const OUString& _rLibName, const OUString& _rDialogName ) const
{
return m_pImpl->removeModuleOrDialog( E_DIALOGS, _rLibName, _rDialogName );
}
- bool ScriptDocument::hasDialog( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rDialogName ) const
+ bool ScriptDocument::hasDialog( const OUString& _rLibName, const OUString& _rDialogName ) const
{
return m_pImpl->hasModuleOrDialog( E_DIALOGS, _rLibName, _rDialogName );
}
- bool ScriptDocument::getDialog( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rDialogName, Reference< XInputStreamProvider >& _out_rDialogProvider ) const
+ bool ScriptDocument::getDialog( const OUString& _rLibName, const OUString& _rDialogName, Reference< XInputStreamProvider >& _out_rDialogProvider ) const
{
Any aCode;
if ( !m_pImpl->getModuleOrDialog( E_DIALOGS, _rLibName, _rDialogName, aCode ) )
@@ -1437,13 +1433,13 @@ namespace basctl
}
- bool ScriptDocument::renameDialog( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rOldName, const ::rtl::OUString& _rNewName, const Reference< XNameContainer >& _rxExistingDialogModel ) const
+ bool ScriptDocument::renameDialog( const OUString& _rLibName, const OUString& _rOldName, const OUString& _rNewName, const Reference< XNameContainer >& _rxExistingDialogModel ) const
{
return m_pImpl->renameModuleOrDialog( E_DIALOGS, _rLibName, _rOldName, _rNewName, _rxExistingDialogModel );
}
- bool ScriptDocument::createDialog( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rDialogName, Reference< XInputStreamProvider >& _out_rDialogProvider ) const
+ bool ScriptDocument::createDialog( const OUString& _rLibName, const OUString& _rDialogName, Reference< XInputStreamProvider >& _out_rDialogProvider ) const
{
if ( !m_pImpl->createDialog( _rLibName, _rDialogName, _out_rDialogProvider ) )
return false;
@@ -1453,7 +1449,7 @@ namespace basctl
}
- bool ScriptDocument::insertDialog( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rDialogName, const Reference< XInputStreamProvider >& _rxDialogProvider ) const
+ bool ScriptDocument::insertDialog( const OUString& _rLibName, const OUString& _rDialogName, const Reference< XInputStreamProvider >& _rxDialogProvider ) const
{
return m_pImpl->insertModuleOrDialog( E_DIALOGS, _rLibName, _rDialogName, makeAny( _rxDialogProvider ) );
}
@@ -1477,7 +1473,7 @@ namespace basctl
}
- LibraryLocation ScriptDocument::getLibraryLocation( const ::rtl::OUString& _rLibName ) const
+ LibraryLocation ScriptDocument::getLibraryLocation( const OUString& _rLibName ) const
{
LibraryLocation eLocation = LIBRARY_LOCATION_UNKNOWN;
if ( !_rLibName.isEmpty() )
@@ -1505,9 +1501,9 @@ namespace basctl
}
- ::rtl::OUString ScriptDocument::getTitle( LibraryLocation _eLocation, LibraryType _eType ) const
+ OUString ScriptDocument::getTitle( LibraryLocation _eLocation, LibraryType _eType ) const
{
- ::rtl::OUString aTitle;
+ OUString aTitle;
switch ( _eLocation )
{
@@ -1546,13 +1542,13 @@ namespace basctl
}
- ::rtl::OUString ScriptDocument::getTitle() const
+ OUString ScriptDocument::getTitle() const
{
return m_pImpl->getTitle();
}
- ::rtl::OUString ScriptDocument::getURL() const
+ OUString ScriptDocument::getURL() const
{
return m_pImpl->getURL();
}
commit 1aba513f9092d5b61e9a1da3eb1b7f6c9c9055d2
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date: Sun Oct 14 23:49:56 2012 -0500
coverty: misuses of strncpy
Change-Id: I13b3f176fc37b49e1bb7b191e97ef657eafaebe6
Reviewed-on: https://gerrit.libreoffice.org/876
Reviewed-by: David Ostrovsky <David.Ostrovsky at gmx.de>
Reviewed-by: Eike Rathke <erack at redhat.com>
Reviewed-by: Petr Mladek <pmladek at suse.cz>
Tested-by: Petr Mladek <pmladek at suse.cz>
diff --git a/filter/source/graphicfilter/idxf/dxftblrd.cxx b/filter/source/graphicfilter/idxf/dxftblrd.cxx
index 9448cec..f99de87 100644
--- a/filter/source/graphicfilter/idxf/dxftblrd.cxx
+++ b/filter/source/graphicfilter/idxf/dxftblrd.cxx
@@ -40,28 +40,42 @@ void DXFLType::Read(DXFGroupReader & rDGR)
{
switch (rDGR.GetG())
{
- case 2: strncpy( sName, rDGR.GetS(), DXF_MAX_STRING_LEN + 1 ); break;
- case 70: nFlags=rDGR.GetI(); break;
- case 3: strncpy( sDescription, rDGR.GetS(), DXF_MAX_STRING_LEN + 1 ); break;
- case 73:
- if (nDashIndex!=-1) {
- rDGR.SetError();
- return;
- }
- nDashCount=rDGR.GetI();
- if (nDashCount>DXF_MAX_DASH_COUNT)
- nDashCount=DXF_MAX_DASH_COUNT;
- nDashIndex=0;
- break;
- case 40: fPatternLength=rDGR.GetF(); break;
- case 49:
- if (nDashCount==-1) {
- rDGR.SetError();
- return;
- }
- if (nDashIndex<nDashCount)
- fDash[nDashIndex++]=rDGR.GetF();
- break;
+ case 2:
+ strncpy( sName, rDGR.GetS(), DXF_MAX_STRING_LEN );
+ sName[DXF_MAX_STRING_LEN] = 0;
+ break;
+ case 3:
+ strncpy( sDescription, rDGR.GetS(), DXF_MAX_STRING_LEN );
+ sDescription[DXF_MAX_STRING_LEN] = 0;
+ break;
+ case 70:
+ nFlags=rDGR.GetI();
+ break;
+ case 73:
+ if (nDashIndex!=-1)
+ {
+ rDGR.SetError();
+ return;
+ }
+ nDashCount=rDGR.GetI();
+ if (nDashCount>DXF_MAX_DASH_COUNT)
+ {
+ nDashCount=DXF_MAX_DASH_COUNT;
+ }
+ nDashIndex=0;
+ break;
+ case 40: fPatternLength=rDGR.GetF(); break;
+ case 49:
+ if (nDashCount==-1)
+ {
+ rDGR.SetError();
+ return;
+ }
+ if (nDashIndex<nDashCount)
+ {
+ fDash[nDashIndex++]=rDGR.GetF();
+ }
+ break;
}
}
}
@@ -79,12 +93,24 @@ DXFLayer::DXFLayer()
void DXFLayer::Read(DXFGroupReader & rDGR)
{
- while (rDGR.Read()!=0) {
- switch(rDGR.GetG()) {
- case 2: strncpy( sName, rDGR.GetS(), DXF_MAX_STRING_LEN + 1 ); break;
- case 70: nFlags=rDGR.GetI(); break;
- case 62: nColor=rDGR.GetI(); break;
- case 6: strncpy( sLineType, rDGR.GetS(), DXF_MAX_STRING_LEN + 1 ); break;
+ while (rDGR.Read()!=0)
+ {
+ switch(rDGR.GetG())
+ {
+ case 2:
+ strncpy( sName, rDGR.GetS(), DXF_MAX_STRING_LEN );
+ sName[DXF_MAX_STRING_LEN] = 0;
+ break;
+ case 6:
+ strncpy( sLineType, rDGR.GetS(), DXF_MAX_STRING_LEN );
+ sLineType[DXF_MAX_STRING_LEN] = 0;
+ break;
+ case 70:
+ nFlags=rDGR.GetI();
+ break;
+ case 62:
+ nColor=rDGR.GetI();
+ break;
}
}
}
@@ -107,17 +133,40 @@ DXFStyle::DXFStyle()
void DXFStyle::Read(DXFGroupReader & rDGR)
{
- while (rDGR.Read()!=0) {
- switch(rDGR.GetG()) {
- case 2: strncpy( sName, rDGR.GetS(), DXF_MAX_STRING_LEN + 1 ); break;
- case 70: nFlags=rDGR.GetI(); break;
- case 40: fHeight=rDGR.GetF(); break;
- case 41: fWidthFak=rDGR.GetF(); break;
- case 50: fOblAngle=rDGR.GetF(); break;
- case 71: nTextGenFlags=rDGR.GetI(); break;
- case 42: fLastHeightUsed=rDGR.GetF(); break;
- case 3: strncpy( sPrimFontFile, rDGR.GetS(), DXF_MAX_STRING_LEN + 1 ); break;
- case 4: strncpy( sBigFontFile, rDGR.GetS(), DXF_MAX_STRING_LEN + 1 ); break;
+ while (rDGR.Read()!=0)
+ {
+ switch(rDGR.GetG())
+ {
+ case 2:
+ strncpy( sName, rDGR.GetS(), DXF_MAX_STRING_LEN );
+ sName[DXF_MAX_STRING_LEN] = 0;
+ break;
+ case 3:
+ strncpy( sPrimFontFile, rDGR.GetS(), DXF_MAX_STRING_LEN );
+ sPrimFontFile[DXF_MAX_STRING_LEN] = 0;
+ break;
+ case 4:
+ strncpy( sBigFontFile, rDGR.GetS(), DXF_MAX_STRING_LEN );
+ sBigFontFile[DXF_MAX_STRING_LEN] = 0;
+ break;
+ case 70:
+ nFlags=rDGR.GetI();
+ break;
+ case 40:
+ fHeight=rDGR.GetF();
+ break;
+ case 41:
+ fWidthFak=rDGR.GetF();
+ break;
+ case 42:
+ fLastHeightUsed=rDGR.GetF();
+ break;
+ case 50:
+ fOblAngle=rDGR.GetF();
+ break;
+ case 71:
+ nTextGenFlags=rDGR.GetI();
+ break;
}
}
}
@@ -164,44 +213,49 @@ DXFVPort::DXFVPort()
void DXFVPort::Read(DXFGroupReader & rDGR)
{
- while (rDGR.Read()!=0) {
- switch(rDGR.GetG()) {
- case 2: strncpy( sName, rDGR.GetS(), DXF_MAX_STRING_LEN + 1); break;
- case 70: nFlags=rDGR.GetI(); break;
- case 10: fMinX=rDGR.GetF(); break;
- case 20: fMinY=rDGR.GetF(); break;
- case 11: fMaxX=rDGR.GetF(); break;
- case 21: fMaxY=rDGR.GetF(); break;
- case 12: fCenterX=rDGR.GetF(); break;
- case 22: fCenterY=rDGR.GetF(); break;
- case 13: fSnapBaseX=rDGR.GetF(); break;
- case 23: fSnapBaseY=rDGR.GetF(); break;
- case 14: fSnapSapcingX=rDGR.GetF(); break;
- case 24: fSnapSpacingY=rDGR.GetF(); break;
- case 15: fGridX=rDGR.GetF(); break;
- case 25: fGridY=rDGR.GetF(); break;
- case 16: aDirection.fx=rDGR.GetF(); break;
- case 26: aDirection.fy=rDGR.GetF(); break;
- case 36: aDirection.fz=rDGR.GetF(); break;
- case 17: aTarget.fx=rDGR.GetF(); break;
- case 27: aTarget.fy=rDGR.GetF(); break;
- case 37: aTarget.fz=rDGR.GetF(); break;
- case 40: fHeight=rDGR.GetF(); break;
- case 41: fAspectRatio=rDGR.GetF(); break;
- case 42: fLensLength=rDGR.GetF(); break;
- case 43: fFrontClipPlane=rDGR.GetF(); break;
- case 44: fBackClipPlane=rDGR.GetF(); break;
- case 51: fTwistAngle=rDGR.GetF(); break;
- case 68: nStatus=rDGR.GetI(); break;
- case 69: nID=rDGR.GetI(); break;
- case 71: nMode=rDGR.GetI(); break;
- case 72: nCircleZoomPercent=rDGR.GetI(); break;
- case 73: nFastZoom=rDGR.GetI(); break;
- case 74: nUCSICON=rDGR.GetI(); break;
- case 75: nSnap=rDGR.GetI(); break;
- case 76: nGrid=rDGR.GetI(); break;
- case 77: nSnapStyle=rDGR.GetI(); break;
- case 78: nSnapIsopair=rDGR.GetI(); break;
+ while (rDGR.Read()!=0)
+ {
+ switch(rDGR.GetG())
+ {
+ case 2:
+ strncpy( sName, rDGR.GetS(), DXF_MAX_STRING_LEN);
+ sName[DXF_MAX_STRING_LEN] = 0;
+ break;
+ case 10: fMinX=rDGR.GetF(); break;
+ case 11: fMaxX=rDGR.GetF(); break;
+ case 12: fCenterX=rDGR.GetF(); break;
+ case 13: fSnapBaseX=rDGR.GetF(); break;
+ case 14: fSnapSapcingX=rDGR.GetF(); break;
+ case 15: fGridX=rDGR.GetF(); break;
+ case 16: aDirection.fx=rDGR.GetF(); break;
+ case 17: aTarget.fx=rDGR.GetF(); break;
+ case 20: fMinY=rDGR.GetF(); break;
+ case 21: fMaxY=rDGR.GetF(); break;
+ case 22: fCenterY=rDGR.GetF(); break;
+ case 23: fSnapBaseY=rDGR.GetF(); break;
+ case 24: fSnapSpacingY=rDGR.GetF(); break;
+ case 25: fGridY=rDGR.GetF(); break;
+ case 26: aDirection.fy=rDGR.GetF(); break;
+ case 27: aTarget.fy=rDGR.GetF(); break;
+ case 36: aDirection.fz=rDGR.GetF(); break;
+ case 37: aTarget.fz=rDGR.GetF(); break;
+ case 40: fHeight=rDGR.GetF(); break;
+ case 41: fAspectRatio=rDGR.GetF(); break;
+ case 42: fLensLength=rDGR.GetF(); break;
+ case 43: fFrontClipPlane=rDGR.GetF(); break;
+ case 44: fBackClipPlane=rDGR.GetF(); break;
+ case 51: fTwistAngle=rDGR.GetF(); break;
+ case 68: nStatus=rDGR.GetI(); break;
+ case 69: nID=rDGR.GetI(); break;
+ case 70: nFlags=rDGR.GetI(); break;
+ case 71: nMode=rDGR.GetI(); break;
+ case 72: nCircleZoomPercent=rDGR.GetI(); break;
+ case 73: nFastZoom=rDGR.GetI(); break;
+ case 74: nUCSICON=rDGR.GetI(); break;
+ case 75: nSnap=rDGR.GetI(); break;
+ case 76: nGrid=rDGR.GetI(); break;
+ case 77: nSnapStyle=rDGR.GetI(); break;
+ case 78: nSnapIsopair=rDGR.GetI(); break;
}
}
}
commit 6dfbd3324f43ff5b90030462b92ad8c0da3f6dd7
Author: Marcos Paulo de Souza <marcos.souza.org at gmail.com>
Date: Mon Oct 15 01:06:49 2012 -0300
Remove some unused methods
Change-Id: Ia9ed975309c6ed677437c6e1c2d6be4a8bd6f1e9
Signed-off-by: Marcos Paulo de Souza <marcos.souza.org at gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/875
Reviewed-by: Petr Mladek <pmladek at suse.cz>
Tested-by: Petr Mladek <pmladek at suse.cz>
diff --git a/sd/source/ui/framework/module/ResourceManager.cxx b/sd/source/ui/framework/module/ResourceManager.cxx
index 0cf323c..49a40be 100644
--- a/sd/source/ui/framework/module/ResourceManager.cxx
+++ b/sd/source/ui/framework/module/ResourceManager.cxx
@@ -125,27 +125,6 @@ void SAL_CALL ResourceManager::disposing (void)
}
}
-
-
-
-void ResourceManager::Enable (void)
-{
- mbIsEnabled = true;
- UpdateForMainViewShell();
-}
-
-
-
-
-void ResourceManager::Disable (void)
-{
- mbIsEnabled = false;
- UpdateForMainViewShell();
-}
-
-
-
-
void SAL_CALL ResourceManager::notifyConfigurationChange (
const ConfigurationChangeEvent& rEvent)
throw (RuntimeException)
diff --git a/sd/source/ui/framework/module/ResourceManager.hxx b/sd/source/ui/framework/module/ResourceManager.hxx
index cd69661..c206877 100644
--- a/sd/source/ui/framework/module/ResourceManager.hxx
+++ b/sd/source/ui/framework/module/ResourceManager.hxx
@@ -67,20 +67,6 @@ public:
virtual void SAL_CALL disposing (void);
- /** Allow the ResourceManager to make resource activation or
- deactivation requests.
- */
- void Enable (void);
-
- /** Disable the resource management. When called, the ResourceManager
- requests the resource to be deactivated. Until enabled again it
- does not make any further requests for resource activation or
- deactivation.
-
- Call this for example to hide resources in read-only mode.
- */
- void Disable (void);
-
// XConfigurationChangeListener
virtual void SAL_CALL notifyConfigurationChange (
diff --git a/sd/source/ui/slidesorter/controller/SlsAnimationFunction.cxx b/sd/source/ui/slidesorter/controller/SlsAnimationFunction.cxx
index c703d64..eaefe02 100644
--- a/sd/source/ui/slidesorter/controller/SlsAnimationFunction.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsAnimationFunction.cxx
@@ -36,27 +36,6 @@
namespace sd { namespace slidesorter { namespace controller {
-
-double AnimationFunction::Linear (const double nTime)
-{
- OSL_ASSERT(nTime>=0.0 && nTime<=1.0);
- return nTime;
-}
-
-
-
-
-double AnimationFunction::Blend (
- const double nStartValue,
- const double nEndValue,
- const double nTime)
-{
- return nStartValue*(1-nTime) + nEndValue*nTime;
-}
-
-
-
-
//===== AnimationBezierFunction ===============================================
AnimationBezierFunction::AnimationBezierFunction (
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsAnimationFunction.hxx b/sd/source/ui/slidesorter/inc/controller/SlsAnimationFunction.hxx
index 8f11973..b94ac65 100644
--- a/sd/source/ui/slidesorter/inc/controller/SlsAnimationFunction.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlsAnimationFunction.hxx
@@ -44,26 +44,6 @@ class SlideSorterView;
namespace sd { namespace slidesorter { namespace controller {
-/** A collection of functions that are usefull when creating animations.
- They are collected here until a better place is found.
-*/
-class AnimationFunction
- : private ::boost::noncopyable
-{
-public:
- /** Acceleration function that maps [0,1] to [0,1] linearly, ie it
- returns the given time value unaltered.
- */
- static double Linear (const double nTime);
-
- /** Blend two points together according to the given weight.
- */
- static double Blend (const double nStartValue, const double nEndValue, const double nWeight);
-};
-
-
-
-
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list