Commit Graph

174 Commits

Author SHA1 Message Date
a69f8ea61c vcl: convert push flags to type-safe enum-like class
Change-Id: Ib49a0dd5ecee0225f51bea2ff1c0ab5326595a47
2014-08-21 09:17:32 +02:00
794d5ac4ac vcl: use enum for complex text layout constants
Since these constants are bitfield flags, we define some methods to make
working with them reasonably type safe.

Move the definitions to outdevstate.hxx, since we need the values there,
and that appears to be the "root most" header file.

Also dump TEXT_LAYOUT_BIDI_LTR constant, since it means the same thing
as TEXT_LAYOUT_DEFAULT (ie. 0), and leaving it in causes people to write
weird code thinking that it's a real flag.

Change-Id: Iddab86cd6c78181ceb8caa48e77e1f5a8e526343
Reviewed-on: https://gerrit.libreoffice.org/10676
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-08-20 09:01:26 -05:00
4eb84ab8d6 typo
Change-Id: I74c2943c5967bb19a3d7b669313894134348adba
2014-08-04 15:59:04 +02:00
6ca2d0d664 vcl use DeviceCoordinate got GetNextGlyphs
Change-Id: I0b03973b2d09a0ce51a6ee7dcca5a310a544c3a9
2014-07-20 22:11:00 +02:00
cd3d26b7ed vcl consitent use of long for corrdinate
most of length in vcl are calculated in 'long'
but array of X position tend to be in sal_Int32.
As a prep work to be able to support 'double'
as the base type of Device Coordinate, harmonize
the use of 'long' for non-float coordinate.

Change-Id: I7cb33301ff6a5e2c62247b36a4e07e168a58a323
2014-07-20 22:10:59 +02:00
8e21a02520 vcl: add floating equivalent for MapRes
Change-Id: I165e403d2834d341f7da7a280859afccb995a3bb
2014-07-20 22:10:59 +02:00
2b8528a274 Use DeviceCorrdinate for DXArray in FillDXArray and ImplLayoutArgs
Change-Id: Ifba7104a13cf737200c81d1a1bd5ece9a29da60e
2014-07-20 22:10:58 +02:00
269e960ee1 add config_vcl to control DevicePixel coordinate base type
The eventual goal is to make vcl capable of handling a backend
that use double instead of sal_Int32 as its base type
for device coordinate.

Change-Id: I6174f1f4afe00992b95c9163bc21dd54fec98631
2014-07-20 22:10:58 +02:00
7a8fcfca98 fdo#79673 quartz: draw 'bullet' for 'space' directly in one pass
the current implementation of CoreText simply dropped the proper
implementation of DrawTextArray, by ignoring DXArray
this very visibly borked the show-non-displayable character
feature of writer.. the bullet representing the 'spaces'
was quite misplaced.
This solve specifically this problem.
More work is needed to bring proper support of DXArray back to CoreText


Conflicts:
	vcl/inc/sallayout.hxx
	vcl/source/outdev/text.cxx

Change-Id: Idb2cc90d5ffaa8b83f79241cee2d512112d1c3be
2014-07-15 21:45:11 +02:00
ae915ba34f More debugging; fixed Font::IsTransparent
Change-Id: Idcb54408dd3cf6561b78eb28fdb409d2e31df541
(cherry picked from commit d84dba8b01c1f240f22b774c951ebf206d5a3ac9)
2014-06-30 22:54:42 +02:00
13ed85d1ab Removed experimental change to IsTextFillColor
Change-Id: I99d1bfd3953c0fb01b9e202d93127b4f4f55faae
(cherry picked from commit c9e23d31aef62a00acfa90de8a80fb68f5e9dcbf)
2014-06-30 22:54:41 +02:00
be085bf523 Moved Text Filling Color in OutDev. Text Filling occurs in ImplDrawText
Change-Id: I9c75066a8dea32721757d0511a2af58c68408438
(cherry picked from commit b09cf493611f2521e66159287b88acc3c05d6d33)
2014-06-30 22:54:37 +02:00
d097bc8e15 HasBkg method to Font.HasBkg iff HasSingleUnderline.SetBkgColor in OutputDev
Change-Id: I10e6e1b916df0c78d26596a37944e8b57b2897e7
(cherry picked from commit 181266201b5e6aaad1dcd9cbc2dd4db44ecf3dc5)
2014-06-30 22:54:37 +02:00
8a0df1b7e5 Clean up OutputDevice and derived classes noncopyable-ness
Change-Id: Id29e52c94a89cac20e29ae0a1f0b9f90ffdfcf09
2014-06-30 16:42:43 +02:00
3e82897353 improve the inlinesimplememberfunctions clang plugin
Change-Id: I6d5a952901648e01904ef5c37f953c517304d31e
2014-06-17 10:55:17 +02:00
f634cda2a2 avoid problems with poppler's and vcl's FontInfo during runtime
Change-Id: I1dbd256812cccae1e6ed0ad8bb34ce427e5e5be8
2014-06-04 07:49:15 +02:00
202708afc6 Avoid duplication of two #defines
Split out the META_*_ACTION defines into a separate file.

Change-Id: Ie211b4d8b3720f1158d36347f27e5dfd5ca467b4
2014-05-28 07:41:07 +03:00
8847171b6b vcl: Document GetTextBoundRect() / GetTextWidth() / GetTextHeight().
GetTextBoundRect() fits different situations than the GetTextWidth() /
GetTextHeight() combination, so make it clear in the documentation.

These are complex enough that people shouldn't read the code just to
understand the difference, and misunderstanding of purpose of each leads
to visually not nice results.

Change-Id: Ida71477cdffbd8290328551bd6ddb4805b96c415
2014-05-25 11:43:14 +02:00
8d54796bf1 enhance pass-by-ref plugin to detect large arguments
Detect arguments larger than 64 chars passed by value.

Change-Id: I9b0ea9ccb99d115984a26eab67c9cf6afd5f6cae
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
2014-05-20 11:17:22 +02:00
e77bb87b41 vcl: rename CopyAreaFinal to CopyDeviceArea
The name I gave this makes no sense. Basically, this function calls on
the SalGraphics function to copy the area, so really this name is much
more clear.

Change-Id: I842e6f2b81014a8222c39a62c5437bd53d66141c
2014-05-20 00:45:49 +10:00
be8a675617 Rearrange outdev.cxx functions, et al.
* Rearranged outdev.cxx functions to better match outdev.hxx layout
* Moved transparency functions from outdev.cxx to transparency.cxx
* Corrected one comment typo in outdev.hxx
* Moved CreateUnoGraphicsList definition to outdev.cxx out of header
* Formatted function declarations in outdev.hxx

Change-Id: I6fda24ae8208ef5ea7b2fe8f59079d48d0af1488
2014-05-03 20:53:43 +10:00
f2e4bb4b96 Revert "VCL: move native widget rendering functions out of OutputDevice"
This reverts commit 5b86e33b5fb5f8250b88bf14e579cddd98fec36a.
2014-05-01 20:00:56 +10:00
5b86e33b5f VCL: move native widget rendering functions out of OutputDevice
The following functions should be in the Window class, not in
OutputDevice:

+ IsNativeControlSupported
+ HitTestNativeControl
+ DrawNativeControl
+ GetNativeControlRegion

Additionally, moved nativecontrols.cxx to vcl/source/window/ and whilst
we are about it, it turns out that VirtualDevice isn't used by these
functions. Therefore the 'orrible check to for the type of class can be
removed and in fact as VirtualDevice doesn't use it at all then we can
just remove the function and replace it with a call to
IsNativeWidgetEnabled().

Change-Id: Idd0bfb1cba1c2902f7a6d55d258efb38b67fb827
2014-05-01 19:37:45 +10:00
9a89946c95 VCL: Move line functions into state areas
Change-Id: I4a92c66892fbb9687b9e7c521c770150b75229b0
2014-04-28 22:27:11 +10:00
2fc8e17a01 VCL: Rename ApplyMask to DrawDeviceMask in OutputDevice
Change-Id: I3392294f8144a9f3124ada972934bb0452c6e13b
2014-04-28 22:27:10 +10:00
e474c95cde VCL: Renamed two functions
Renamed functions:

+ supportsOperation -> SupportsOperation
    For consistency

+ DrawAlphaBitmap -> DrawDeviceAlphaBitmap
    I want to make it more clear that these are the functions that call
    on mpGraphics to actually draw on the graphics device

Change-Id: Ic4951bfcc0ac0c09fe5b6908dfdf1f699a634265
2014-04-28 00:14:56 +10:00
ce941a33b7 VCL: complete reorganization of text and font functions in outdev.hxx
Change-Id: I7dbd9ec79213d43acf6486a2507c8f0cfb47d943
2014-04-27 22:26:49 +10:00
75886eb439 VCL: make all private functions SAL_DLLPRIVATE visibility
Change-Id: I746d41a1bfb9546c02b7381cf54785bcc50f1756
2014-04-27 21:08:12 +10:00
6244dcf7ed VCL: Rearrange most of the rest of the functions in outdev.hxx
Also: added SAL_DELETED_FUNCTION to DrawOutDev function that should
never be called upon.

Change-Id: Ib274fb67931a24164fe3592811c1489670f7c19b
2014-04-27 20:53:30 +10:00
bb5d1006bd VCL: rename OutputDevice::ImplInitFillColor and make it private
Change-Id: I01c0974d3a2f79cf3c6b9730ea306dcd49927a3c
2014-04-27 20:53:30 +10:00
ffd55ff0b9 VCL: OutputDevice::ImplRotatePosi, nOrientation param. should be short
Change-Id: Ie49b5b2c489619700f9cc34d9efb38454bcaff2c
2014-04-27 20:53:29 +10:00
248abe0afa VCL: rearrange functions in outdev/font.cxx
Change-Id: I98977212547929ff59641f0b73273d68740420fd
2014-04-27 20:53:29 +10:00
c08856c173 VCL: rearrange font functions, move functions into OutputDevice
I have rearrange the various functions of OutputDevice to better group
them in outdev.hxx. Also moved ImplRotatePos and ImplDrawWavePixel into
the OutputDevice class.

Change-Id: I0b384a4d094dffcfb3ee19c29562630cfb3a2167
2014-04-27 20:53:29 +10:00
2fb9104967 VCL: Group pixel functions in OutputDevice
Change-Id: Ifaa6c8099bbef4a6d1c6b410474c922b9ad66131
2014-04-27 20:53:28 +10:00
0ff8f8e680 VCL: Move polygon functions in outdev.hxx
Change-Id: I4d745b05efbbba9e07a93da1945154f5190346c8
2014-04-27 20:53:27 +10:00
900058b453 VCL: Move wallpaper and state based functions in outdev.hxx
Change-Id: Ice490863c1534909055b5c47b82d50aae788dda6
2014-04-27 20:53:27 +10:00
b856e286a8 VCL: final movement of text and font functions in outdev.hxx
Change-Id: I46f3253f3e36a2b81977ad46e9f2f37e1c25cb3b
2014-04-27 20:53:26 +10:00
a714fcd82e VCL: more movement of text and font functions in outdev.hxx
Change-Id: Ica7b18b501831c7a400584e0c085d74968649f07
2014-04-27 20:53:26 +10:00
2c027cdc45 VCL: again move text and font functions in outdev.hxx
Change-Id: Id149b071ff69b2eda04c1b10238531378c738867
2014-04-27 20:53:26 +10:00
faa47ba99d VCL: move text and font functions in outdev.hxx
Change-Id: I15e84cbebf5f54ca3301d6f778620bf614614203
2014-04-27 20:53:25 +10:00
cf0be7e6a2 VCL: Move constructors and destructors in outdev.hxx
Change-Id: I8b01cadcf18f980a16e81d565fd4785e338f90e0
2014-04-27 20:53:25 +10:00
062e69f40b Move UsePolyPolygonForComplexGradient() into gradient group in outdev.hxx
Change-Id: I4139515bba1dbcbaa1b70d8510b390b95ba26ed2
2014-04-27 20:53:24 +10:00
9ec73ef4c9 problem with a check define somewhere in MacOSX
Change-Id: I2e866116db510deef12b0da7995b9bc1b246b34a
2014-04-26 13:16:17 +01:00
94e175e961 the OutDevState dtors are never called
regression since cf3c6cb40f99fa1761a6af3d7447a899b9447868

Change-Id: Iaeb44d948d3e0a0b26cfd3e16aa81b979cf56457
2014-04-26 12:34:40 +01:00
5e57796c80 VCL: Move OutputDevice map structures to own VCL header file
Change-Id: Ifbaa51018d47fde72be80d5d1870fdda214db320
2014-04-25 23:34:10 +10:00
cf3c6cb40f VCL: ImpObjStack replaced with std::stack
ImpObjStack uses it's own home-grown stack and stack functions. There
is a function that unwinds the stack, but really it would be better if
we used std::set. In fact, this is better, because the name ImpObjStack
is really not terribly descriptive. I've replaced it with a stack of
OutDevState objects.

Change-Id: I87bdd4340ad77b7ffd9ff176fa5a9ffeac8b8666
2014-04-25 23:34:09 +10:00
ef3b68886c VCL: Remove unused and deprecated debug check function
Change-Id: I3fcf630b8a0ef5be0d98ddc11a746e07885bae53
2014-04-25 23:34:09 +10:00
da8aa93851 VCL: Reorganize and rename wallpaper functions
Grouped wallpaper functions in outdev.hxx, also changed the function
names:

+ ImplDrawColorWallpaper  -> DrawColorWallpaper
+ ImplDrawBitmapWallpaper -> DrawBitmapWallpaper
+ ImplDrawWallpaper       -> DrawWallpaper

Change-Id: I0eb9c21bf2f6a336df22cd27cd1557f2c795f792
2014-04-25 13:01:36 +10:00
927617d69a Renamed ImplGetDPI(X|Y) to GetDPI(X|Y)
Change-Id: If76b99589ddd83431593404c1034b8b726bc3f9b
2014-04-25 12:22:29 +10:00
808d273db0 Remove ImpInitOutDevData and ImplDeInitOutDevData in OutputDevice
All these do is some very, very basic initialization. There is no need
to lazy load the structure, it should be initialized when OutputDevice
is created in the constructor and deinitialized in the destructor.

Change-Id: I780caf4d02e9a2a7d094989cf0bba579493ca98d
2014-04-25 12:01:15 +10:00