#!/usr/bin/env bash # # Wrapper for git to handle more subdirs at the same time # if [ -n "$g_debug" ] ; then set -x fi SUBMODULES_ALL="dictionaries helpcontent2 translations" pushd $(dirname $0) > /dev/null if [ -f config_host.mk ] ; then # we are in the BUILDDIR SRC_ROOT=$(< config_host.mk grep -a SRC_ROOT | sed -e "s/.*=//") else SRC_ROOT=$(pwd) fi popd > /dev/null COREDIR="$SRC_ROOT" usage() { git echo echo "Usage: g [options] [git (checkout|clone|fetch|grep|pull|push|reset) [git options/args..]]" echo "" echo " -z restore the git hooks and do other sanity checks" } refresh_submodule_hooks() { local repo=$1 local hook local hook_name if [ -d "${repo?}"/.git ] ; then # use core's hook by default for hook_name in "${COREDIR?}/.git-hooks"/* ; do hook="${repo?}/.git/hooks/${hook_name##*/}" if [ ! -e "${hook?}" ] || [ -L "${hook?}" ] ; then rm -f "${hook?}" ln -sf "${hook_name}" "${hook?}" fi done # override if need be by the submodules' own hooks for hook_name in "${COREDIR?}/${repo?}/.git-hooks"/* ; do hook="${repo?}/.git/hooks/${hook_name##*/}" if [ ! -e "${hook?}" ] || [ -L "${hook?}" ] ; then rm -f "${hook?}" ln -sf "${hook_name}" "${hook?}" fi done elif [ -d .git/modules/"${repo}"/hooks ] ; then for hook_name in "${COREDIR?}/.git-hooks"/* ; do hook=".git/modules/${repo?}/hooks/${hook_name##*/}" if [ ! -e "${hook?}" ] || [ -L "${hook?}" ] ; then rm -f "${hook?}" ln -sf "${hook_name}" "${hook?}" fi done # override if need be by the submodules' own hooks for hook_name in "${COREDIR?}/${repo?}/.git-hooks"/* ; do hook=".git/modules/${repo?}/hooks/${hook_name##*/}" if [ ! -e "${hook?}" ] || [ -L "${hook?}" ] ; then rm -f "${hook?}" ln -sf "${hook_name}" "${hook?}" fi done fi } refresh_all_hooks() { local repo local hook_name local hook pushd "${COREDIR?}" > /dev/null for hook_name in "${COREDIR?}/.git-hooks"/* ; do hook=".git/hooks/${hook_name##*/}" if [ ! -e "${hook?}" ] || [ -L "${hook?}" ] ; then rm -f "${hook?}" ln -sf "${hook_name}" "${hook?}" fi done for repo in ${SUBMODULES_ALL?} ; do refresh_submodule_hooks "$repo" done # In our workflow, it's always gerrit that does the submodule updates, so # better ignoring them to avoid accidentally including those changes in our # commits. # 'git submodule status' can be still used to see if a submodule has such # changes. for repo in ${SUBMODULES_CONFIGURED?} ; do git config submodule."$repo".ignore all 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}logerrit/help" else git config remote.origin.pushurl "ssh://${PUSH_USER}logerrit/${repo?}" fi popd > /dev/null } set_push_urls() { PUSH_USER="$1" 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 ] || [ -f "${repo?}"/.git ] ; then SUBMODULES_ACTIVE="${repo?} ${SUBMODULES_ACTIVE?}" fi done } get_configured_submodules() { SUBMODULES_CONFIGURED="" if [ -f config_host.mk ] ; then SUBMODULES_CONFIGURED=$(< config_host.mk grep -a GIT_NEEDED_SUBMODULES | sed -e "s/.*=//") else # if we need the configured submodule before the configuration is done. we assumed you want them all SUBMODULES_CONFIGURED=${SUBMODULES_ALL?} fi } get_git_reference() { REFERENCED_GIT="" if [ -f config_host.mk ]; then REFERENCED_GIT=$(< config_host.mk grep -a GIT_REFERENCE_SRC | sed -e "s/.*=//") fi LINKED_GIT="" if [ -f config_host.mk ]; then LINKED_GIT=$(< config_host.mk grep -a GIT_LINK_SRC | sed -e "s/.*=//") fi } do_shortcut_update() { local module local repo for module in $SUBMODULES_CONFIGURED ; do if [ ! -d "${module?}"/.git ] ; then case "${module?}" in helpcontent2) 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 fi done } do_git_cmd() { echo "cmd:$*" git "$@" git submodule foreach git "$@" $KEEP_GOING } do_checkout() { local cmd local create_branch="0" local branch local module 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="$cmd" create_branch=0 fi done if [ -f .gitmodules ] ; then git submodule update if [ -n "$branch" ] ; then git submodule foreach git checkout -b "${branch}" HEAD || return $? 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 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 # 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 return $?; } do_init_modules() { local module local configured do_shortcut_update for module in $SUBMODULES_CONFIGURED ; do if [ -n "$LINKED_GIT" ] ; then if ! [ -d ".git/modules/${module}" ]; then ./bin/git-new-module-workdir "${LINKED_GIT}/${module}" "${module}" fi fi configured=$(git config --local --get submodule."${module}".url) if [ -z "$configured" ] ; then git submodule init "$module" || return $? fi done for module in $SUBMODULES_CONFIGURED ; do if [ -n "$REFERENCED_GIT" ] ; then git submodule update --reference "$REFERENCED_GIT/.git/modules/$module" "$module" || return $? else git submodule update "$module" || return $? fi done return 0 } # 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 get_git_reference # extra params for some commands, like log EXTRA= COMMAND="$1" PAGER= RELATIVIZE=1 PUSH_ALL= PUSH_USER= PUSH_NOTES= LAST_WORKING= SET_LAST_WORKING= ALLOW_EMPTY= KEEP_GOING= REPORT_REPOS=1 REPORT_COMMANDS=0 REPORT_COMPACT=0 DO_HOOK_REFRESH=false while [ "${COMMAND:0:1}" = "-" ] ; do case "$COMMAND" in -f )KEEP_GOING="||:" ;; -z) 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 "$PUSH_USER" exit 0; ;; -*) echo "option: $COMMAND not supported" 1>&2 exit 1 esac shift COMMAND="$1" done shift case "$COMMAND" in branch) do_git_cmd "${COMMAND}" "$@" ;; checkout) do_checkout "$@" ;; clone) do_init_modules && 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) git submodule foreach git push "$@" if [ "$?" = "0" ] ; then git push "$@" fi ;; reset) do_reset ;; tag) do_git_cmd "${COMMAND}" "$@" ;; "") ;; *) echo "./g does not support command: $COMMAND" 1>&2 exit 1; ;; esac exit $? # vi:set shiftwidth=4 expandtab: tro/vector/vector-5.4 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
path: root/vcl/source/outdev/transparent.cxx
AgeCommit message (Collapse)Author
2017-12-05remove UL/L suffixes from integer constants on the RHS of expressionsNoel Grandin
Reviewed-on: https://gerrit.libreoffice.org/41237 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit 2e8acde112e1c6754df26902e79a78346ba45a2d) Change-Id: I899a8126c9d971601fea6c77eca165718aea0ac5 Reviewed-on: https://gerrit.libreoffice.org/45452 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com> (cherry picked from commit 2887aefa4d4f60ba8b0cd7efd5d3a73ffb209781)
2017-12-05convert BmpConversion to scoped enumNoel Grandin
and drop unused 4BIT_TRANS and 1BIT_MATRIX enumerators Also fix a bug in x11::convertBitmapDepth where we were incorrectly passing BmpConversion enumeratirs to ReduceColors Reviewed-on: https://gerrit.libreoffice.org/34062 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit b5699cd01b6a52906880c107bac6f3802ea7353d) Change-Id: I903c6866750e46ee752e10a17c05fcaaf6b11242 (cherry picked from commit 2d171734f349c0f9868106f57f5644a70fbeb945)
2017-12-05Extend ScopedBitmapAccess and modify various classes to use itMark Page
Exception safety, ensure the Access classes are always destroyed. Change-Id: I4889358476267853ffbd7fafc24950d84b4e9331 Reviewed-on: https://gerrit.libreoffice.org/31494 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit 677246466c471fbe3522c35be3639afa008a46c0) (cherry picked from commit 73abf54b775d9162fdfc27ad2649de774dd7e0d1)
2016-09-05convert RasterOp to scoped enumNoel Grandin
Change-Id: I136423c105316c9b5b18e64d04a248fd7ac5590b
2016-09-05convert OutDevSupportType to scoped enumNoel Grandin
Change-Id: I7a1e4448dfff0ea6909149533d228829d980796c
2016-07-06tdf#77667 Remove gcc3 workaroundkrishna keshav
where it could handle instantiated objects as parameters Removed objects of 'Point' as 'Point()' can be instantiated as a parameter. Change-Id: Iad2dceed6dfe8bd3cc555758c518620cd975a8fc Reviewed-on: https://gerrit.libreoffice.org/26967 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-05-25Convert BMP_FORMAT to scoped enumNoel Grandin
Change-Id: I751ab762b6e6f961e9e73a8a2ca92a3f5a5eb1c8 Reviewed-on: https://gerrit.libreoffice.org/25189 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-26tdf#48066 render stroke-miterlimit correctly in SVG importRegina Henschel
The property stroke-miterlimit is transported to the renderers via a new member mfMiterMinimumAngle in class LineAttribute Several drawPolyLine methods are adapted. This patch does not include changes in MetaAction. Presentation mode, printing, and PDF-export is still wrong. Corrected LineJoinMiter to LineJoinBevel in canvas, that s closer to NONE. Removed DrawPolyLine method without MiterMinimumAngle and adapted calls accordingly. Change-Id: I6bcd24add5d85c4d9a39e3788e0682091c5fc9c4 Reviewed-on: https://gerrit.libreoffice.org/23946 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de> Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
2016-02-16use consistent #define checks for the Windows platformNoel Grandin
stage 1 of replacing usage of various checks for the windows platform with the compiler-defined '_WIN32' macro Change-Id: Iece73abdee530937e0737190b1aa97a46cd3075f Reviewed-on: https://gerrit.libreoffice.org/22390 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-02-06vcl: bmpacc.hxx -> bitmapaccess.hxxChris Sherlock
Change-Id: I4bb19d6103c4a6a902d86b62a857e3478493924c
2016-01-21cppcheck: variableScopeCaolán McNamara
Change-Id: Id7cf5887c1ef0e0c0aad72ea5ac49f4d3db5065e
2016-01-10Fix typosAndrea Gelmini
Change-Id: I9a5940027423ff0791fa7da0b79b617412ce6b86 Reviewed-on: https://gerrit.libreoffice.org/21209 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2015-12-15Get rid of :: prefix for basegfx in include/vcl and vclTor Lillqvist
We already used it without the :: prefix, in many cases in the same files even. It is nice to have some consistency. I was not bored enough to do it everywhere. Change-Id: Ic8ac5bd9b4b2c02c41e5ea937a3d9477824f21cf
2015-11-23establish that Virtual Devices either match Physical Device depth or ...Caolán McNamara
are 1 or (rarely) 8 bit and lock that down. Change-Id: I3d946ebef34ffb71c5adea7aa420af50e9584e05
2015-11-18com::sun::star->css in vcl/Noel Grandin
Change-Id: Ifad76177673cf93746ba221838be80ff76fed228 Reviewed-on: https://gerrit.libreoffice.org/20032 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann
Change-Id: I05e89f9896170d4df3d1377549ea074f06b884a0
2015-09-30Fix typosAndrea Gelmini
Change-Id: I33385f1395f428c14bf86eff9891b288ddc590de Reviewed-on: https://gerrit.libreoffice.org/18993 Reviewed-by: Joren De Cuyper <jorendc@libreoffice.org> Tested-by: Joren De Cuyper <jorendc@libreoffice.org>
2015-09-29-Werror,-Wunused-variableStephan Bergmann
Change-Id: Ice39e95596c5fcd9b3b728ef0064161898f27fb5
2015-09-18valgrind: memory leak in scoped_ptr/unique_ptr -> VclPtr convertCaolán McNamara
regression from commit 820576af4fd6441a752742b43d804e9837839925 Author: Noel Grandin <noel@peralex.com> Date: Thu Mar 19 13:54:12 2015 +0200 start wrapping OutputDevice in VclPtr 9,800 (568 direct, 9,232 indirect) bytes in 1 blocks are definitely lost in loss record 12,696 of 12,898 by 0xC602E72: ScopedVclPtrInstance<VirtualDevice>::ScopedVclPtrInstance<>() (vclptr.hxx:375) Change-Id: I356f39c339fd28a9e19a00d61b6f1bee492f2638
2015-08-17Put Polygon from tools under tools:: namespaceNorbert Thiebaud
Polygon is one of these names that Clash with some system objects A similar work has been done earlier with PolyPolygon. Change-Id: Icf2217cb2906292b7275760f1a16be0e150312f5 Reviewed-on: https://gerrit.libreoffice.org/17789 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
2015-08-11loplugin: defaultparamsNoel Grandin
Change-Id: I79a889c68e91712d2abdacc559c78813f730e623
2015-07-08loplugin:unusedmethods vclNoel Grandin
Change-Id: I98b88ca3369a2c888fd63796e39d42376d513002