summaryrefslogtreecommitdiff
path: root/smoketest/libtest.cxx
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2016-02-15 20:24:02 +0100
committerMichael Stahl <mstahl@redhat.com>2016-02-15 20:29:34 +0100
commit3d3835973c18e94bf0165167e78851d34f26a048 (patch)
treea1804e05888010db144fac5f44f06df67ba01cf2 /smoketest/libtest.cxx
parentd3f83ffa0e85a697af2cbf50a55dd7308609cf56 (diff)
smoketest: loplugin:nullptr
Change-Id: I849e2e945a31ab37c9a24969d6e1decd69170380
Diffstat (limited to 'smoketest/libtest.cxx')
-rw-r--r--smoketest/libtest.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/smoketest/libtest.cxx b/smoketest/libtest.cxx
index 98607fbd9609..550ff8b9d346 100644
--- a/smoketest/libtest.cxx
+++ b/smoketest/libtest.cxx
@@ -101,7 +101,7 @@ int main (int argc, char **argv)
fprintf( stderr, "Failed to find pre-init symbol: %s\n", lok_dlerror() );
return -1;
}
- preinit( install_path, NULL );
+ preinit(install_path, nullptr);
}
Office *pOffice = lok_cpp_init( install_path );
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-06-11tdf#154168 Export no transparency PNGs correctlyParis Oplopoios When bTranslucent was false the function would simply return, causing a 0 byte png. Now we just remove the alpha channel. Change-Id: Ie2578185ac12fb38b6f1b674758e564721e3973f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152840 Tested-by: Jenkins Reviewed-by: Paris Oplopoios <parisoplop@gmail.com> 2023-05-08unique_ptr->optional for BitmapNoel Grandin since Bitmap is really just a tiny wrapper around SalBmp Change-Id: Ie2c9be40f6abba72c600c6778ec42d0689c66558 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151498 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2023-01-12vcl: handle VCL_DUMP_BMP_PATH in BitmapEx::DumpAsPng()Miklos Vajna As requested at <https://gerrit.libreoffice.org/c/core/+/145361/2#message-e00b755a1a0cdc5cec9b8e2213226e56ec87c038>. Change-Id: I8868969a2061f0447b101d978acc5027d1bdd545 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145400 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> 2023-01-12vcl: introduce a BitmapEx::DumpAsPng()Miklos Vajna This is mostly useful for ad-hoc debugging, so you don't need to manually create an SvFileStream, a vcl::PngImageWriter & connect them, but you can step through code in the debugger and call DumpAsPng() at random code locations. The filename type is intentionally a 'const char*', so you can call DumpAsPng(0) from gdb; that would not be possible for a 'const OUString&' parameter type. Change-Id: I7e6c9bfe8410892969a1cbd1f827e2d62f409400 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145361 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2023-01-12maAlphaMask in BitmapEx should be AlphaMaskNoel Grandin Change-Id: I12dd1881c2896ab2970a0d149048a36d1aee9c9d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145243 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2023-01-12drop internal support for 1-bit imagesNoel Grandin on modern hardware, these are less efficient than regular alpha channels. Also, this greatly simplies the range of stuff that vcl needs to deal with, which will make the upcoming transparency->alpha patch easier to deal with. Enhance vcl::CreateFromData to convert incoming 1-bit data to 8-bit image. Change-Id: I35829da750029fe373d0d2911a669d10bab6ad23 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145321 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> 2023-01-10rename setAlphaFrom->ChangeColorAlpha and fix parameterNoel Grandin The nAlphaTo parameter was actually transparency. Change the implementation and the call sites to actually use alpha. Also remove one of the calls in Graphic::colorChange, because if the BitmapEx has no alpha channel, the call was going to do nothing anyway. Change-Id: I0bf27835b62596ac7c497c8606ceba04fcf859a1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145205 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2023-01-05flatten some code in vclNoel Grandin Change-Id: I29638408d60bfa02609ed58839829ed51d319e98 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145045 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2022-08-24tools: rename Rectangle::Justify() to Rectangle::Normalize()Chris Sherlock Jusify() normalizes the rectangle so both the Width and Height are positive, without changing the location of the rectangle. It ensures that the x and y coordinates will be moved to the top left of the rectangle. The name is strange, so renaming Justify() to Normalize(). Change-Id: Idbf163e65e52a798e38f785b8961b8042cf0cf2a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137379 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> 2021-11-19Drop F_2PIMike Kaganski Change-Id: Ie98606607b2ce262e4eed76bb8cd86fbfe846f76 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125506 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> 2021-11-19Use M_PI* instead of F_PI*Mike Kaganski Change-Id: Ie2b7a1c74fc516781a17a20157b8217bc41e383d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125504 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> 2021-08-23ofz: use BmpScaleFlag::Fast when recovering from bad svm mask sizeCaolán McNamara this isn't supposed to happen and is an error recovery added by: commit baebeb7de4c5f9511e45c2846ec2a72861a948c0 Date: Fri Jul 27 14:04:19 2012 +0000 Resolves: #i120165# Adapt Mask/Alpha at BitmapEx construction... when size differs from base bitmap so use the time-cheapest scaling available Change-Id: I6ea8f458681dcb69e1c128040cc550dd86ff7151 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120855 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> 2021-07-01BmpCombine::And is deadNoel Grandin ever since commit ddd2639a482befb4a3bf1f75a88e66c21a691b67 Date: Sat Feb 27 15:50:37 2021 +0200 drop mask from BitmapEx Change-Id: I45fae0140067e2bfe5ce1ae2f5014ce733835ef1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118220 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2021-05-05sal_uLong->sal_Int32 in BitmapNoel Grandin Change-Id: I267fbdb8946d307440cb675f6ff985bf58db5e4c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115108 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2021-04-29remove support for BITMASK in vcl backendsNoel Grandin Rather use a proper alpha channel if we need transparency. This is another small step towards merged alpha in our vcl layer. I suspect the intent in a lot of this code was to save memory. Which have been a thing way back then, but these days our backends mostly end up doing a copy-and-convert to a real alpha channel anyway, so the existing code is actually now a pessimisation. Change-Id: I4a2bcbb2f76b841f05bc00580f364492829c69de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114808 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 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-26BitmapEx: always convert 1-bit mask to alphaNoel Grandin which is a step towards dropping masks, and only using alpha. Change-Id: I6882c0e5b1c805b0cda5a2eaadcbdd078d8566c6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114622 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-30short circuit image creation if dest size is zeroNoel Grandin Change-Id: Iace5c871c6a95da8828fa103474f77d5d0555484 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113385 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> 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-03-26create operator bool for BitmapNoel so we can use a more natural syntax than "!!" Change-Id: I8152a0d3ce37115fc83d332a26725ca1d28d959a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113147 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2021-03-26flatten BitmapEx::GetAlphaNoel Change-Id: Ica7ed7fd94f2ddeaa6c5400d3606c5eeeffbf4f1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113141 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2021-03-13add PixelFormat enum that replaces bit count in Bitmap/BitmapExTomaž Vajngerl Bit count for the image is a numeric value (sal_uInt16) but only a handful of values make sense - namely 1,4,8,24 and 32. This replaces the numeric value with an enum, which only accepts those values and checks the correct values are used at compile time. Change-Id: I0fc137c62bce3b0d021f05019a1648da628521bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112408 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> 2021-03-03drop TransparentType::Color usageNoel Grandin which is dead code, since we convert to TransparentType::Bitmask in the constructor of BitmapEx Change-Id: I047b7d25317c4be4d17a8b0db9a90ec101875c9f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111683 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> 2021-01-16transparency->alpha in BitmapExNoel Grandin Change-Id: I631f4ca5a2bdcb8c7691a9a8c71d3de15377213b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109390 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2021-01-12transparency->alpha in tools::ColorNoel this just changes the Get/Set methods, the constructor and internal representation of Color is not changed. Change-Id: Idb6e07cc08bbaa5bd55b6bd4b585e648aef507b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109074 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2021-01-08use more IsTransparentNoel Grandin Change-Id: I3ef18a2601a51d56614b5da9b56e871bd33ec79e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108942 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2020-12-29vcl: move local bitmap headers to inc/bitmap directoryChris Sherlock Change-Id: I72cc28d4df8031e322daa50d79666cabcb6421a7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108040 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com> 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-12-24vcl: move bitmap files from gdi directory to bitmap directoryChris Sherlock Change-Id: I9358e2b0fe030d561da6df831c951328b09eab39 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108037 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>