summaryrefslogtreecommitdiff
path: root/vcl/qa
AgeCommit message (Collapse)AuthorFilesLines
2016-02-09Formatting changes across all modulesChris Sherlock1-5/+0
+ Removed comment cruft + Tab formatting in number of files + Some commented out code removed + Tab characters replaced with spaces + Newline cleanup in quite a few files + Tweak header guard #endifs Change-Id: I3208ff2f047da890edcc49b73389aca22442f5fc Reviewed-on: https://gerrit.libreoffice.org/22221 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-02-06vcl: bmpacc.hxx -> bitmapaccess.hxxChris Sherlock3-3/+3
Change-Id: I4bb19d6103c4a6a902d86b62a857e3478493924c
2016-02-04Use CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGEStephan Bergmann1-10/+14
Change-Id: I2f6da8bb39ebd791f0bd3aa955dfc8c83b96ca04
2016-02-04loplugin:fpcomparisonNoel Grandin1-5/+7
Change-Id: I084b63d1085976838426f1157e0ba238e0520d7f
2016-01-29vcl: add text alignment functions to ImplFont and FontAttributesChris Sherlock1-0/+14
ImplFont and FontAttributes now have GetAlignment and SetAlignment, and I have renamed Font::GetAlign to Font::GetAlignment, and Font::SetAlign to Font::SetAlignment. See commit description in 8bfccd3a71d911b6d ("vcl: Create accessor and mutator for font scaling in FontMetric") for reasoning behind patch. Unit test added to vcl/qa/cppunit/font.cxx to test text alignment. Change-Id: I6272c84fc9416c90616d957d1897eba9469fe7ba Reviewed-on: https://gerrit.libreoffice.org/21876 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-01-22vcl: add orientation flag property to Font classChris Sherlock1-0/+14
Add getter and setter for orientation flag to the Font class. See commit description in 8bfccd3a71d911b6d ("vcl: Create accessor and mutator for font scaling in FontMetric") for reasoning behind patch. Unit test added to vcl/qa/cppunit/font.cxx to test this flag. Change-Id: I62d5a47f870702eeac4625830dd279dd53fbcc3d Reviewed-on: https://gerrit.libreoffice.org/21696 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-01-21vcl: add subsettable flag property functions to Font classChris Sherlock1-0/+13
Added getter and setter for subsettable flag property to the Font class. See commit description in 8bfccd3a71d911b6d ("vcl: Create accessor and mutator for font scaling in FontMetric") for reasoning behind patch. Unit test added to vcl/qa/cppunit/font.cxx to test this flag. Change-Id: I2a66f1c4876698e1ffeaf260b2b43d5308b71191 Reviewed-on: https://gerrit.libreoffice.org/21651 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-01-21vcl: add embeddable font property functions to Font classChris Sherlock1-0/+12
Added setter and getter for embeddable font property to the Font class. See commit description in 8bfccd3a71d911b6d ("vcl: Create accessor and mutator for font scaling in FontMetric") for reasoning behind patch. Unit test added to vcl/qa/cppunit/font.cxx to test this flag. Change-Id: I7f4ddf09d4a122c7c335b017efcb95f1774ae0d8 Reviewed-on: https://gerrit.libreoffice.org/21650 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-01-20vcl: add built in font property functions to Font classChris Sherlock1-0/+11
Added setter for built-in font property and IsBuiltInFontFlag to Font class. See commit description in 8bfccd3a71d911b6d ("vcl: Create accessor and mutator for font scaling in FontMetric") for reasoning behind patch. Unit test added to vcl/qa/cppunit/font.cxx to test this flag. Change-Id: I61ce33fe6ffb31be22c68ce8a94d0886ebdc8fcf Reviewed-on: https://gerrit.libreoffice.org/21627 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-01-20vcl: add more property functions to FontChris Sherlock1-1/+7
Added increase and decrease quality functions to Font class, and also charset mutator and accessor function. See commit description in 8bfccd3a71d911b6d ("vcl: Create accessor and mutator for font scaling in FontMetric") for reasoning behind patch. Unit test change in vcl/qa/cppunit/font.cxx: - enhanced to check increase and decrease quality functions Change-Id: I2f5970438f6ef1ad185163d5fdcec5bbc88912a4 Reviewed-on: https://gerrit.libreoffice.org/21622 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-01-19vcl: add quality accessor & mutator to FontChris Sherlock1-0/+13
Change-Id: I261c717cabf966b8b20b8e6c921b38f4cd73e268 Reviewed-on: https://gerrit.libreoffice.org/21597 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-01-18vcl: change Font::SetName() to Font::SetFamilyName()Chris Sherlock1-1/+1
Change-Id: I9b7bd1ec25955981ebcb9085579cbb9fbaa802d5 Reviewed-on: https://gerrit.libreoffice.org/21560 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-01-17vcl: rename Font::GetName to Font::GetFamilyNameChris Sherlock1-2/+2
Change-Id: Ie20871a3078bf875c1782b7761d60591a9c9704f Reviewed-on: https://gerrit.libreoffice.org/21529 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-01-16revert vcl patch series that brok Mac and WindowsNorbert Thiebaud1-3/+3
revert: 9bc2f3de8672e812f3a67541c6d7069b434a7e42 vcl: add comment about ImplFontMetric::{Get|Set}LineHeight() 26371f105bc44e04469ec03fc5bb12505e651c6b vcl: FontAttributes::GetSlantType() -> FontAttributes::GetItalic() 2dd0b4317372b8022efe3911b38b4fa02956d8b9 vcl: font.hxx and metric.hxx cleanup, make ctors explicit and the dtor virtual 5ab13bf3ead3539e4ad847656da81e7eb6029652 vcl: tabify font.hxx f99550dae55e40e49bf9c9875053fe2abb4c71ca vcl: change Font::SetName() to Font::SetFamilyName() 2b297116cb6bb1061c43e5714e2609c8ee9f57d2 vcl: rename Font::GetName to Font::GetFamilyName Change-Id: I23f38921187d66b970ca815eb30dda4222a2da62
2016-01-16vcl: change Font::SetName() to Font::SetFamilyName()Chris Sherlock1-1/+1
Change-Id: I54a4036544c680c4a49607677af776aa7a433fbc Reviewed-on: https://gerrit.libreoffice.org/21510 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-01-16vcl: rename Font::GetName to Font::GetFamilyNameChris Sherlock1-2/+2
Change-Id: I83927e0992dfe0a2a79d139818a9f45d3761aae5 Reviewed-on: https://gerrit.libreoffice.org/21509 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-01-16vcl: created accessors and mutators for font classesChris Sherlock1-0/+63
Font accessors: - GetFamily() - GetPitch() - GetWidthType() - GetWeight() - GetItalic() - GetName() <--- shouldn't that be GetFamilyName()?!? - GetStyleName() Font mutators did not need to be added. Font unit tests are testing: - Setting and getting FontFamily private member - Setting and getting FontPitch private member - Setting and getting FontWidth private member - Setting and getting FontWeight private member - Setting and getting FontItalic private member - Setting and getting the family name and style ImplFont accessors: - GetFamilyNoAsk() - GetPitchNoAsk() - GetWidthTypeNoAsk() - GetWeightNoAsk() - GetItalicNoAsk() - GetFamilyName() - GetStyleName() (These "NoAsk" functions are necessary because the default getters call on a function that checks the configuration for default values, something that is not wanted in all cases). Change-Id: Icfbc8b4e5253d55a80892df050b0803dfc7d7c9f Reviewed-on: https://gerrit.libreoffice.org/21501 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-01-15vcl: forgot to add the unit test file...Chris Sherlock1-0/+69
Change-Id: Ifd598baaad1c70d0f1b7bd776c94b08520e5dca4
2016-01-14vcl: Create mutator for bullet offset attribute in FontMetricChris Sherlock1-1/+12
Mutator created for bullet offset attribute in FontMetric. See commit description in 8bfccd3a71d911b6d ("vcl: Create accessor and mutator for font scaling in FontMetric") for reasoning behind patch. Unit tests - check to ensure that can get and set bullet offset attribute - check equality operator on FontMetric after setting bullet offset attribute Change-Id: I87a76982a8b3ed697664299cb340fa35fb514c0e
2016-01-14vcl: Create mutator for slant attribute in FontMetricChris Sherlock1-0/+19
Mutator created for slant attribute in FontMetric. See commit description in 8bfccd3a71d911b6d ("vcl: Create accessor and mutator for font scaling in FontMetric") for reasoning behind patch. Unit tests - check to ensure that can get and set slant attribute - check equality operator on FontMetric after setting slant attribute Change-Id: I5490a40dba4c86386d59a42f2d04303b3fc4d536
2016-01-14vcl: Create mutator for line height attribute in FontMetricChris Sherlock1-1/+6
Mutator created for line height in attribute FontMetric. See commit description in 8bfccd3a71d911b6d ("vcl: Create accessor and mutator for font scaling in FontMetric") for reasoning behind patch. Unit tests - check to ensure that can get and set line height attribute - check equality operator on FontMetric after setting line height attribute Change-Id: I86dff217fa24850b5f9d04a17ddda464dfb0156a
2016-01-13vcl: Create accessor and mutator for ascent and descent in FontMetricChris Sherlock1-5/+38
Accessor and mutator created for ascent and descent spacing in FontMetric. See commit description in 8bfccd3a71d911b6d ("vcl: Create accessor and mutator for font scaling in FontMetric") for reasoning behind patch. Unit tests - check to ensure that can set font ascent and descent spacing - check equality operator on FontMetric after setting both ascent and descent font spacing Change-Id: I714363b14bdc61ddfa37a619fe4b03f4e4e96f7a Reviewed-on: https://gerrit.libreoffice.org/21458 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-01-13vcl: Create accessor and mutator for int and ext leading in FontMetricChris Sherlock1-3/+18
Accessor and mutator created for external and internal leading space in FontMetric. See commit description in 8bfccd3a71d911b6d ("vcl: Create accessor and mutator for font scaling in FontMetric") for reasoning behind patch. Unit tests - check to ensure that can set external and leading space - check equality operator on FontMetric after setting both external and internal leading space - enhanced tests to also check the inequality operator Change-Id: I973970dd0b0631c5eca3e89039dce57ac3a3eb63 Reviewed-on: https://gerrit.libreoffice.org/21454 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-01-13vcl: Create accessor and mutator for builtin font flag in FontMetricChris Sherlock1-2/+19
Accessor and mutator created for builtin font flag, removed the existing bit field. See commit description in 8bfccd3a71d911b6d ("vcl: Create accessor and mutator for font scaling in FontMetric") for reasoning behind patch. Unit tests - check to ensure that can set builtin font flag - check equality operator on FontMetric after setting builtin font flag Change-Id: Iac3f4270f86d10f9dcd0bb6e3951c0e983a4f22f Reviewed-on: https://gerrit.libreoffice.org/21414 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-01-13vcl: Create accessor and mutator for full stop centered in FontMetricChris Sherlock1-0/+21
Accessor and mutator created for full stop centered flag, removed bit field. See commit description in 8bfccd3a71d911b6d ("vcl: Create accessor and mutator for font scaling in FontMetric") for reasoning behind patch. Unit tests - check to ensure that can set full stop centered flag - check equality operator on FontMetric after setting full stop centered flag Change-Id: I9cacb0fbf9ea65cfebcaebdc9f0481c0a796cbcf Reviewed-on: https://gerrit.libreoffice.org/21413 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-01-13vcl: Create accessor and mutator for font scaling in FontMetricChris Sherlock1-0/+61
This is fragile code! There are actually *two* classes that do almost precisely the same thing, they are: - ImplFontMetric, and - ImplFontMetricData They both have much in common, including their class name, and even most of their functionality. In fact, they both have common accessor functions. When I look at the code, it looks like OutputDevice is actually given an ImplFontMetricData object, which it then uses to populate an ImplFontMetric object... Basically, I'm going to merge these classes. To do so, I'm going to do the following: Step 1: Implement accessor functions for ImplFontMetric and FontMetric (then remove the friendship of this class to OutputDevice!) Step 2: Write a unit test for each accessor function in ImplFontMetric Step 3: Ensure that ImplFontMetric and ImplFontMetricData use some sort of smart pointer (probably an intrusive_ptr like I did ages ago with FontCharMap) Step 4: Merge the two classes together once their class interfaces are the same and I am satisfied they do the same thing Step 5: Find all instances of inefficient usage - for instance, I can do away with the code that copies the ImplFontMetricData attributes into an ImplFontMetric object. Change-Id: I07c1cb848774b130fa2ca60b51da53e07754dd00 Reviewed-on: https://gerrit.libreoffice.org/21399 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-01-11Remove BitmapFilterStackBlur, which is unused...Stephan Bergmann1-175/+0
...ever since it got introduced with 28c61871e876e6a2cac47439f768504b1a4c94a0 "vcl: stack blur implementation + basic test & performance test" Change-Id: I78672cf74c24930df92121baecb9886df4382036
2016-01-10Cleanup FontCharMapPtr variable prefixesChris Sherlock1-6/+6
Change-Id: Ib106b91ab71ee45d5ad469d0beaf4ebaef8b57e1 Reviewed-on: https://gerrit.libreoffice.org/21306 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-01-05RC4 encrypt some WMF and TIFF test filesMichael Stahl8-0/+8
Reportedly some virus scanners warn about some of these files. Use a new "RC4" name prefix since the files don't come from external sources. http://permalink.gmane.org/gmane.comp.documentfoundation.libreoffice.devel/69200 Change-Id: I6d4cff2fdd5c0134bf2c77558ea09b3196b39be9
2016-01-04vcl: split classes out of metric.hxxChris Sherlock1-1/+1
Change-Id: Id3b155abec7b7a2ff43d0a35e98709f5ee51c6b9 Reviewed-on: https://gerrit.libreoffice.org/21069 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2015-12-11Fix test on FreeBSD which uses the same backend as LinuxBaptiste Daroussin1-1/+1
Change-Id: Ibc43b9f3d0fc9e343b0ff9abd627ee9afb881d69 Reviewed-on: https://gerrit.libreoffice.org/20624 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2015-12-10Calm unit test down for GL row-strides.Michael Meeks1-1/+2
Change-Id: Ie4123fc692f4fac33f082bb2d86b949d834f1858
2015-12-07Resolves: tdf#96224 don't fiddle around with a separate alpha bufferCaolán McNamara1-1/+1
use a format that supports alpha directly now we can unify the android and linux cases as well and drop the BGRX support Change-Id: I3c845913691d8194822423005d308cfa7ef13ec3 Reviewed-on: https://gerrit.libreoffice.org/20440 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-11-24Resolves: tdf#95962 incorrect scanline strideCaolán McNamara1-10/+5
we were reusing the stride of the surface we were cloning, but the new surface has a different underlying size. remove the custom stride argument and just change our stride calculation to use the same scheme that cairo and GDI uses, which remove another platform/drawing-system variable Change-Id: I257dac9757b121642e9ccfde7db0911edc9f3fb1 Reviewed-on: https://gerrit.libreoffice.org/20149 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-11-23establish that Virtual Devices either match Physical Device depth or ...Caolán McNamara1-1/+1
are 1 or (rarely) 8 bit and lock that down. Change-Id: I3d946ebef34ffb71c5adea7aa420af50e9584e05
2015-11-17loplugin:unnecessaryvirtualNoel Grandin2-3/+3
update the plugin with lessons learned from the mergeclasses plugin and re-run it Change-Id: I9d622eb3d05fceaf8fa764c533c8fa5dfb4c7711 Reviewed-on: https://gerrit.libreoffice.org/20015 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-10tdf#95650: Replace wrong assertion with conditionMike Kaganski1-0/+26
When UniscribeLayout::LayoutText(ImplLayoutArgs & rArgs) is run with BiDiRtl flag, and some skipped VisualItems was reversed in lines 908-927, it's possible that they will arrive in reverse order to the code adjusting mnSubStringMin, so this assertion may fire. This situation is not erroneous, so simply replacing the assert with "if". Change-Id: Icb244502dd00b4c08a2c5192369ee66d743b0dcc Reviewed-on: https://gerrit.libreoffice.org/19835 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann3-9/+9
Change-Id: I05e89f9896170d4df3d1377549ea074f06b884a0
2015-11-06loplugin:stringconstant: elide explicit ctor usage (automatic rewrite)Stephan Bergmann1-3/+3
Change-Id: I7ac150458a72963f3336d30ef9d99d7c0d81c024
2015-11-05afl-eventesting: deref of null mpTextObjCaolán McNamara1-0/+0
Change-Id: Icdb7d1cc250640f428984b96b0a51ac950013cb2
2015-11-05fix compiling of this java classNoel Grandin1-4/+32
(even though it's not being built right now) Change-Id: I237cce48ea50b1184b166a8a8132ae425597bffe
2015-11-02afl-eventtesting: crash close impress with spelling dialog activeCaolán McNamara1-0/+0
Change-Id: I1085b655a9a589f2e92edfdacfea6621d2f67d9c
2015-10-23afl-eventtesting: crash on undoing insert new page in impressCaolán McNamara1-0/+0
this is an intermittent crash in the real world but under event testing we can see that the PaintView is informed that the page has been deleted, but doesn't clear its use of the page if it so happens that there was earlier modification events that caused the fire-modification-timer to be launched If there happens to be no such events then the page is correctly cleared If the timer is active, then the page is not cleared, but eventually the timer will fire and access the deleted page and fall over and die minimal change for backporting ease, follow ups now Change-Id: I090ad62cc175545902574c93dec7082225d97ab7
2015-10-21afl-eventtesting: crash if you close shell behind running presentationCaolán McNamara1-0/+0
Change-Id: Ib8f02ddfe3b74e97145e22aa88e6f97d52c39f7a
2015-10-21afl-eventtesting: crash when accelerator processed after frame is disposedCaolán McNamara1-0/+0
Change-Id: I8c3dcca53d5fb18e9f1da0499a071d35a859a9de
2015-10-21move afl examples/test-cases to dedicated dirCaolán McNamara3-0/+24
Change-Id: I36f09cd19ea721ee69e62fac4cf0744827e8cefb
2015-10-20loplugin:defaultparamsStephan Bergmann1-1/+1
Change-Id: I3e5ee77b51eb8e1207d3f95e6a1d9d8272532ba6
2015-10-15cppcheck:variableScopeNoel Grandin1-4/+2
Change-Id: I9b671637fbe0f32e695d22b74bfb40a39a9fe884 Reviewed-on: https://gerrit.libreoffice.org/19364 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-12Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY codeStephan Bergmann4-43/+43
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-10-01Fix typosAndrea Gelmini2-2/+2
Change-Id: I8fd769ca61d1ec1a915a012c0c2244056dc5bcb8 Reviewed-on: https://gerrit.libreoffice.org/18992 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>