# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- # # This file is part of the LibreOffice project. # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # # This file incorporates work covered by the following license notice: # # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed # with this work for additional information regarding copyright # ownership. The ASF licenses this file to you under the Apache # License, Version 2.0 (the "License"); you may not use this file # except in compliance with the License. You may obtain a copy of # the License at http://www.apache.org/licenses/LICENSE-2.0 . # $(eval $(call gb_Library_Library,swui)) $(eval $(call gb_Library_set_include,swui,\ -I$(SRCDIR)/sw/inc \ -I$(SRCDIR)/sw/source/uibase/inc \ -I$(SRCDIR)/sw/source/ui/inc \ -I$(WORKDIR)/SdiTarget/sw/sdi \ $$(INCLUDE) \ )) $(eval $(call gb_Library_set_precompiled_header,swui,$(SRCDIR)/sw/inc/pch/precompiled_swui)) $(eval $(call gb_Library_use_externals,swui,\ boost_headers \ icu_headers \ )) $(eval $(call gb_Library_use_custom_headers,swui,\ officecfg/registry \ )) $(eval $(call gb_Library_use_sdk_api,swui)) ifneq ($(SYSTEM_LIBXML),) $(eval $(call gb_Library_add_cxxflags,swui,\ $(LIBXML_CFLAGS) \ )) endif $(eval $(call gb_Library_use_libraries,swui,\ comphelper \ cppu \ cppuhelper \ $(call gb_Helper_optional,DBCONNECTIVITY, \ dbtools) \ editeng \ i18nlangtag \ i18nutil \ msfilter \ sal \ salhelper \ sfx \ sot \ svl \ svt \ svx \ svx \ svxcore \ sw \ tk \ tl \ ucbhelper \ utl \ vcl \ $(gb_UWINAPI) \ )) $(eval $(call gb_Library_add_exception_objects,swui,\ sw/source/ui/chrdlg/break \ sw/source/ui/chrdlg/chardlg \ sw/source/ui/chrdlg/drpcps \ sw/source/ui/chrdlg/numpara \ sw/source/ui/chrdlg/pardlg \ sw/source/ui/chrdlg/swuiccoll \ sw/source/ui/chrdlg/tblnumfm \ sw/source/ui/config/mailconfigpage \ sw/source/ui/config/optcomp \ sw/source/ui/config/optload \ sw/source/ui/config/optpage \ sw/source/ui/dialog/abstract \ sw/source/ui/dialog/addrdlg \ sw/source/ui/dialog/ascfldlg \ sw/source/ui/dialog/docstdlg \ sw/source/ui/dialog/macassgn \ sw/source/ui/dialog/swdialmgr \ sw/source/ui/dialog/swdlgfact \ sw/source/ui/dialog/swmessdialog \ sw/source/ui/dialog/swuiexp \ sw/source/ui/dialog/uiregionsw \ sw/source/ui/dialog/wordcountdialog \ sw/source/ui/dochdl/selglos \ sw/source/ui/envelp/envfmt \ sw/source/ui/envelp/envlop1 \ sw/source/ui/envelp/envprt \ sw/source/ui/envelp/label1 \ sw/source/ui/envelp/labelexp \ sw/source/ui/envelp/labfmt \ sw/source/ui/envelp/labprt \ sw/source/ui/envelp/mailmrge \ sw/source/ui/fldui/DropDownFieldDialog \ sw/source/ui/fldui/FldRefTreeListBox \ sw/source/ui/fldui/changedb \ sw/source/ui/fldui/flddb \ sw/source/ui/fldui/flddinf \ sw/source/ui/fldui/flddok \ sw/source/ui/fldui/fldedt \ sw/source/ui/fldui/fldfunc \ sw/source/ui/fldui/fldpage \ sw/source/ui/fldui/fldref \ sw/source/ui/fldui/fldtdlg \ sw/source/ui/fldui/fldvar \ sw/source/ui/fldui/inpdlg \ sw/source/ui/fldui/javaedit \ sw/source/ui/fmtui/tmpdlg \ sw/source/ui/frmdlg/column \ sw/source/ui/frmdlg/cption \ sw/source/ui/frmdlg/frmdlg \ sw/source/ui/frmdlg/frmpage \ sw/source/ui/frmdlg/pattern \ sw/source/ui/frmdlg/uiborder \ sw/source/ui/frmdlg/wrap \ sw/source/ui/index/cntex \ sw/source/ui/index/cnttab \ sw/source/ui/index/multmrk \ sw/source/ui/index/swuiidxmrk \ sw/source/ui/misc/bookmark \ sw/source/ui/misc/docfnote \ sw/source/ui/misc/glosbib \ sw/source/ui/misc/glossary \ sw/source/ui/misc/insfnote \ sw/source/ui/misc/linenum \ sw/source/ui/misc/num \ sw/source/ui/misc/outline \ sw/source/ui/misc/pgfnote \ sw/source/ui/misc/pggrid \ sw/source/ui/misc/srtdlg \ sw/source/ui/misc/swmodalredlineacceptdlg \ sw/source/ui/misc/titlepage \ sw/source/ui/table/colwd \ sw/source/ui/table/convert \ sw/source/ui/table/instable \ sw/source/ui/table/mergetbl \ sw/source/ui/table/rowht \ sw/source/ui/table/splittbl \ sw/source/ui/table/tabledlg \ sw/source/ui/table/tautofmt \ sw/source/ui/utlui/swrenamexnameddlg \ )) ifneq (,$(filter DBCONNECTIVITY,$(BUILD_TYPE))) $(eval $(call gb_Library_add_exception_objects,swui,\ sw/source/ui/dbui/addresslistdialog \ sw/source/ui/dbui/createaddresslistdialog \ sw/source/ui/dbui/customizeaddresslistdialog \ sw/source/ui/dbui/dbinsdlg \ sw/source/ui/dbui/dbtablepreviewdialog \ sw/source/ui/dbui/mailmergewizard \ sw/source/ui/dbui/mmaddressblockpage \ sw/source/ui/dbui/mmdocselectpage \ sw/source/ui/dbui/mmgreetingspage \ sw/source/ui/dbui/mmlayoutpage \ sw/source/ui/dbui/mmmergepage \ sw/source/ui/dbui/mmoutputpage \ sw/source/ui/dbui/mmoutputtypepage \ sw/source/ui/dbui/mmpreparemergepage \ sw/source/ui/dbui/selectdbtabledialog \ )) endif # vim: set noet sw=4 ts=4: LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
path: root/canvas/source/directx/dx_vcltools.cxx
AgeCommit message (Collapse)Author
2023-12-07simplify and modernise ScopedBitmapAccessNoel Grandin
(*) Make all of it use a "Scoped" paradigm (*) pass by value, no need to allocate on heap (*) make all of the construction go via the *Access constructors, instead of it being some via the constructors and some via the Acquire*Access methods. (*) take the Bitmap& by const& in the constructor, so we can avoid doing const_cast in random places. Change-Id: Ie03a9145c0965980ee8df9a89b8714a425e18f74 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160293 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-07-25Convert internal vcl bitmap formats transparency->alpha (II)Noel Grandin
(Second attempt at landing this) Image formats and graphics APIs use alpha, not transparency, so change our internal formats and data structures to work directly with alpha, so we don't need to modify data before we push it to graphics APIs. Add a couple of new Color constants to make the intention of the vcl code clearer. Notes (*) On macOS, tweaking the logic in CreateWithSalBitmapAndMask to more accurately reflect the requirements of the CGImageCreateWithMask function seems to fix some tests. (*) The vcl code does not properly support gradients with transparency. So the previous code was wrong, and this change is going to result in slightly different wrongness. Change-Id: I9e21c2e98d88ecfdc5f75db13bd1ffff7c38db98 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114168 Tested-by: Jenkins Reviewed-by: Patrick Luby <plubius@neooffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-07-06ScanlineFormat::N1BitLsbPal is unusedNoel Grandin
ever since commit 4160be791daaef1a0c059a248f678cbad6408a69 Author: Caolán McNamara <caolanm@redhat.com> Date: Tue Jan 10 20:55:31 2023 +0000 no more X11SalBitmap Change-Id: I9dd55acdde6af1bf7501a71e92725ab739801b0b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154060 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-11rename BitmapEx::GetAlpha to GetAlphaMaskNoel Grandin
to ease the reading of code related to an upcoming patch to convert transparency to alpha, since there is already a GetAlpha in Color. Change-Id: I1af0f8f6dd94acfe4673c8556c7aff6c20da3f7a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145209 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-18Move tools/diagnose_ex.h to comphelper/diagnose_ex.hxxStephan Bergmann
...so that its TOOLS_WARN_EXCEPTION can be used in comphelper/source/misc/logging.cxx in a follow-up commit. (And while at it, rename from diangose_ex.h to the more appropriate diagnose_ex.hxx. The comphelper module is sufficiently low-level for this immediate use case, so use that at least for now; o3tl might be even more suitable but doesn't have a Library until now. Also, for the immediate use case it would have sufficed to only break DbgGetCaughtException, exceptionToString, TOOLS_WARN_EXCEPTION, TOOLS_WARN_EXCEPTION_IF, and TOOLS_INFO_EXCEPTION out of include/tools/diagnose_ex.h into an additional new include/comphelper/diagnose_ex.hxx, but its probably easier overall to just move the complete include file as is.) Change-Id: I9f3222d4ccf1a9ac29d7eb9ba1530d53e2affaee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138451 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-12-22loplugin:unusedvariablecheckStephan Bergmann
Change-Id: I02b42dc4a825e01363e36d6a82f78519e2c6dfe7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127294 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-04-26drop mask from BitmapExNoel Grandin
So that we have fewer cases to deal with when we transition to 32-bit bitmaps. (*) rename maMask to maAlphaMask, since now it is only being used for alpha duties. (*) drop mbAlpha and mbTransparent to simplify state management, the only thing we need to check for alpha is if maAlphaMask is non-empty. Change-Id: I06252e38e950e846a94b4c2ba8ea763be17801fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111679 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-15tdf#141269 Incorrect transparency after roundtripCaolán McNamara
Revert "convert internal bitmap formats transparency->alpha" This reverts commit c181e510c5f5e74f1f6824b64637849aace9ae63. and later fix up of Revert "tdf#141504 qt5: ugly images" This reverts commit e7424ff25a724ea5bb54b2282d5c3cbf74c92053. a lot of places are still working int transparency values and not opacity Change-Id: I31342cdb76629acbaebfcdfa385407d3291fe06f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114150 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-04-02vcl: remove GetBitCount and GetColorCount from Bitmap{Ex}Tomaž Vajngerl
We can cast the PixelFormat enum to int for the same information and we can use the enum to reduce ambiguity when possible. Change-Id: I6ea648139465568cdeb12e5f5f75c7b609365bf4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113188 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-03-31remove internal 4bit scanline formatsNoel
since we have already removed the 4-bit internal bitmap formats. Change-Id: Ie481aaa8e25642a47e30beb6f37e2d3beda304e9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113412 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-28drop operator bool and operator! from Bitmap and BitmapExNoel
IRC chat: <quikee[m]> noelgrandin: doesn't adding operator bool to Bitmap has the same problem as Graphic and the reason why you dropped that commit 7334034ae93b49fc93b5859a3c047a319d138282 "drop Graphic::operator bool" <noelgrandin> quikee[m], hmmm, good point <noelgrandin> maybe I should just drop both operator bool and operator! in favor of IsEmpty <quikee[m]> noelgrandin: I don't remember what the problem is I just remembered we dropped it Graphic :) sure, dropping everything for IsEmpty is probably the best Change-Id: Ieae289cda64f0b8d8fdecd5ea9e6f2bb874ff4cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113163 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-23convert internal bitmap formats transparency->alphaNoel Grandin
Image formats and graphics APIs use alpha, not transparency, so change our internal formats and data structures to work directly with alpha, so we don't need to modify data before we push it to graphics APIs. Change-Id: I537f77f79e83876be11d787901df42710d190842 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108919 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Luboš Luňák <l.lunak@collabora.com> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-24vcl: move access functions into appropriate bitmap access filesChris Sherlock
Split class functions into BitmapInfoAccess.cxx, BitmapReadAccess.cxx and BitmapWriteAccess.cxx Split header files into BitmapInfoAccess.hxx and BitmapReadAccess.hxx Change-Id: I7dcbe1d26c5b64d297658a6b809c93d7ad7f053d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108039 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-11-05N8BitTcMask is unusedNoel
since commit 77809fba7d4bf5e0b604ffa3937c18d5530c2d56 Author: Luboš Luňák <l.lunak@collabora.com> Date: Fri Oct 9 19:28:49 2020 +0200 implement ImplFastBitmapConversion() for 8bit gray source Change-Id: I730aef10c1705ae6d3141014228cf79b8bfa3c63 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105305 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-16compact namespace: basegfx,canvasNoel Grandin
Change-Id: Idc808459b403bcdcccbd86b73dd22b424e507c8e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98897 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-10prefer 8bit bitmap masks to 1bpp masksLuboš Luňák
It's much simpler and more performant to work with 8bpp bytes rather than fiddle with 1bpp bits, and the memory savings don't really matter nowadays. E.g. the soft edges feature performs much worse when operating on 1bpp bitmaps (tdf#134237). I've looked and it seems nothing in LO code actually requires bitmap masks to really be 1bpp. As a next step we could perhaps also leave antiquity and embrace the past by dropping 1bpp masks entirely and using just alpha masks. The change also moves the workaround for #i75531, it was breaking CppunitTest_vcl_svm_test and X11-related hacks belong to the X11 code (especially with the X11 backend becoming more and more niche). Change-Id: I7848f06c8b83bbad2ea35f17f2b65855f8d1f456 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97839 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2019-09-26remove internal use of 16-bit packed formatsNoel Grandin
none of our supported hardware uses these any more Change-Id: Ic95d6df619a05df0bec1f5870596cb2bb3bcc6cb Reviewed-on: https://gerrit.libreoffice.org/79476 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-08Remove misguided FALLTHROUGH commentsStephan Bergmann
...between adjacent switch labels without any intervening statements Change-Id: Ieb8a0d9f71ea4382b5f7d005cdf7111d06aeb5d0 Reviewed-on: https://gerrit.libreoffice.org/64789 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-10-20new/delete mismatchCaolán McNamara
Change-Id: I910366753d1d365e0388262c98fca12d000e83e5 Reviewed-on: https://gerrit.libreoffice.org/61979 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-01-23More loplugin:cstylecast on WindowsStephan Bergmann
Automatic rewrite (of loplugin:cstylecast and loplugin:unnecessaryparen) after cab0427cadddb3aaf1349c66f2fa13a4234ba4b2 "Enable loplugin:cstylecast for some more cases" and a409d32e7f6fc09e041079d6dbc3c927497adfed "More loplugin:cstylecast" Change-Id: Ib3355159dd08333e1b7a8d091caf2069cdcc7862 Reviewed-on: https://gerrit.libreoffice.org/48317 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-02-08loplugin:unusedenumconstants read-only constants in vclNoel Grandin
Change-Id: I8c81444cbecdc103cc47d9a4133b0b4d9010e0c2 Reviewed-on: https://gerrit.libreoffice.org/34018 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-16clang-cl loplugin: canvasStephan Bergmann
Change-Id: I3e4f9ccbe608a98759f2a9e312839eb909e6b575 Reviewed-on: https://gerrit.libreoffice.org/29878 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-08-24tdf#96505 get rid of long integer literals 'L'Asela Dasanayaka
Remove L from integer literals in module canvas all 0L, 1L, 2L , 7L and 8L Change-Id: Idd41a31857b4bb58ed8e7b6f4e727a73806098b1 Reviewed-on: https://gerrit.libreoffice.org/27817 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.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>