Commit Graph

2965 Commits

Author SHA1 Message Date
ff05b6b100 Remove unused basegfx::tools::equal
Change-Id: I2fb3121c711dfdd1e2081681864a6f4753960a81
2014-04-22 19:08:38 +02:00
1d28f42838 Remove unused basegfx::unotools::homMatrixFromMatrix
Change-Id: I92afab7cfae885dce76b9ffff0d98b8b9a39d85f
2014-04-22 19:08:38 +02:00
34fa29ed4c Remove unused basegfx::tools::containsOnlyHorizontalAndVerticalEdges
Change-Id: I8a8b7a5b47cd9e566c1b3154a527c78a8fcbd7df
2014-04-22 19:08:37 +02:00
81bce2dc7e Remove unused basegfx::copySign
Change-Id: I8e5e429b0f0b0cfa2dc65b8e57649bfa722b40e0
2014-04-22 19:08:37 +02:00
d52b0640f4 coverity#708340 Uninitialized scalar field
Change-Id: I1ad1777492f94e7a4162382d9d68e0032aaee460
2014-04-22 11:39:22 +01:00
0526aa64c2 coverity#708207 Uninitialized scalar field
Change-Id: I8d74ddcf551e4a853dcf04a4ba1f33a46579ed06
2014-04-22 11:39:20 +01:00
be48b0eb62 coverity#708205 Uninitialized scalar field
Change-Id: I9facdfaefcfa79c56b1db9e62b861cf425d5726f
2014-04-22 11:39:20 +01:00
53d230c9e4 coverity#708204 Uninitialized scalar field
Change-Id: I0f54051e41b98275608e0056a587c9e7fbeee0dd
2014-04-22 11:39:20 +01:00
d1f47efbc1 coverity#708203 Uninitialized scalar field
Change-Id: Id72f198b69a319b93a67f2e98a706f4e45fc576f
2014-04-22 11:39:20 +01:00
255194801e fod#77122 DOCX filter: link between textboxes is not being preserved
Added support for linked textboxes for docx interoperability.

Reviewed on:
	https://gerrit.libreoffice.org/9092

Change-Id: I7db4f5a1783afff53c64908d182788b262f5e863
2014-04-22 12:09:40 +02:00
2fed893457 Make OutputDevice::DrawTransformedBitmapEx a public function
Change-Id: I978ae6c5d1ece54828cab8624c20c7b6b6630c21
2014-04-22 03:37:36 +10:00
55f736a2bf Merge tworect.cxx with rect.cxx and rename functions
Change-Id: Iad6109a353181759fa64e48a82a003f785d0e58c
2014-04-22 03:37:35 +10:00
89f5a775e8 DrawTransformedBitmapEx - fix accidental rename
Change-Id: Ic13a4ac4ca3b4ed23c0db9bc6894024f7b2d959a
2014-04-22 02:57:48 +10:00
a75e11cb70 Make TryDrawPolyLineDirect a public function of OutputDevice
Change-Id: I24a571080ad7301c86065e75560b94091120ce0b
2014-04-22 02:55:27 +10:00
0347aecfc7 Reorganize outdev.hxx - mainly map functions
Mainly moved map functions into their own block, however I have also
done a bit more reorganization. Quite a bit to go, it seems...

Change-Id: I041d91c9b96066f5f1e11bd82968c2712988e5f4
2014-04-22 02:30:40 +10:00
f9fa335da0 Move DownsizeBitmap from gdi/print2.cxx to outdev/bitmap.cxx
Change-Id: Ib10024fe92ae364d31082177724be718d426fe26
2014-04-22 02:30:39 +10:00
31ae999575 Group OutputDevice masking functions together in outdev.hxx
Change-Id: Idde02b1456ab23e2479f097bee018f9d6398f003
2014-04-22 02:30:38 +10:00
77675447a8 Rearrange OutputDevice line functions
Reorganized OutputDevice line functions - several of these functions
should be private. I have renamed the following functions:

* ImplInitLineColor -> InitLineColor (made this private)
* ImplPaintLineGeometryWithEvtlExpand -> PaintLineGeometryWithEvtlExpand
  (made this private)
* ImplTryDrawPolyLineDirect -> TryDrawPolyLineDirectNoAA (made this
  private)

I also made a small code change to make bTryAA more clear, and also
change (bTryAA && TryDrawPolyLineDirect(rPoly.getB2DPolygon()) to a
nestied if statement.

Change-Id: I90e8083d69b715912bf0ad1d400bc355f3501981
2014-04-22 02:30:38 +10:00
b302925d07 Reorganize OutputDevice hatch functions
Grouped hatch functions in outdev.hxx. Renamed ImplDrawHatch to DrawHatch
(allow C++ overloading to work out which to use), and renamed
ImplCalcHatchValues to CalcHatchValues and ImplDrawHatchLine to
DrawHatchLIne.

Change-Id: I7be62ec1754864424f6c158ab70178606ccbf1b1
2014-04-22 02:30:37 +10:00
f749ffbdf4 Move DrawImage function location in outdev.hxx
... also slightly changed the overload documentation for DrawBitmapEx
and DrawBitmap functions.

Furthermore, DrawImage() should never be called from a Printer
instance, so warn and abort.

Change-Id: I0de65a5d7bd8249fcd14d844faf74477d490cef5
2014-04-22 02:30:36 +10:00
0d6bc7001d Rearrange OutputDevice's gradient functions
Rearranged gradient functions in outdev.hxx to group them together,
also renamed ImplGetGradientSteps to GetGradientSteps and
ImplGetGradientStepCount to GetGradientStepCount.

Change-Id: I98ea0d177531e50b9bdc097df15cfb93d26474e7
2014-04-22 02:30:36 +10:00
655443b42d Reorganize OutputDevice bitmap functions
I have moved the blending functions from blend.cxx to bitmap.cxx, I
also renamed the function ImplBlendWithAlpha to BlendBitmapWithAlpha
and ImplBlend to BlendBitmap.

I also grouped the functions in outdev.hxx - BlendBitmap and
BlendBitmapWithAlpha are both private functions, not public.

Change-Id: Idfaf8826341172bb0288473c643afa51a03b0580
2014-04-22 02:30:36 +10:00
97a5ba4a71 remove comments why a file gets included
also remove some commented out code

Change-Id: Ia80c5c57d8d2a74418032de50eee95642cc0969d
2014-04-21 18:08:28 +02:00
d8920e6d1d Make OGLFrameGrabber work
Steps of grabFrame
- Init opengl context
- Call libgltf to render
- Get a RGB buffer from libgltf
- Create a Bitmap from this RGB buffer

Additionally:
- Using mimetype is neccessary to decide which player to create.
- bAllowToCreateReplacementGraphic is unneeded.

Change-Id: I7fef043a3341771389144a4f4cac71b0862ef8a7
2014-04-20 18:00:48 +02:00
588bb542be fdo#74702 Only VirtualDevice should handle the Word ext lead bug
In #i60945# it was discovered that Unix's leading external font spacing
causes problems with the display of documents. Therefore, the reference
device implemented a workaround, which was to set the spacing to zero.
However, the reference device is a VirtualDevice, so it should really be
handled there, not in OutputDevice. I have added a new protected function
to OutputDevice, GetFontExtLead() that handles this.

Change-Id: I1b84ee7d9f7ae96841b441b52705e67c8115ae5c
2014-04-20 12:17:50 +10:00
eef0dd74e3 Change ImplDrawAlpha to DrawAlphaBitmap
OutputDevice has a public function ImplDrawAlpha, but that just draws
a bitmap with an alpha layer. It's really a public function, though
not yet used outside of OutputDevice. However, the name should really
be the same as SalGraphic's function which is DrawAlphaBitmap.

Change-Id: If2716c1a1a194079d6514a1d30d8b05f9fda664c
2014-04-19 22:25:49 +10:00
2d786ef296 Refactor OutputDevice::DrawImage()
There is a fair amount of code duplication going on here. If no valid
Size is passed to the function then we should pass on Size(), then in
the function we call we should check to see if there is a valid size.
In fact, this is something we should probably check for anyway, so if
anything this makes the code slightly more robust.

Change-Id: If7b55e5505ada6739375c69b123cf1e34a0fa66d
2014-04-19 19:44:33 +10:00
56de7aafcb fixincludeguards.sh: include/oox
Change-Id: Ie0aca6c4fdfa4b7e4a902983c751a6d13d85f230
2014-04-19 11:10:12 +02:00
f05861de99 XShapeDumper: add modeline and some corrections 2014-04-19 11:10:06 +02:00
7a924a4333 fixincludeguards.sh: include 2014-04-19 11:10:05 +02:00
1a04354590 Move headers that are private to toolkit there, then
Change-Id: I12df9dc88960a6f78e85ab2f604782d1a4f9faf6
2014-04-19 11:24:35 +03:00
6a579871d9 If it has been "not recommended currently" since 2007, it can go away
Change-Id: If60f51d57e2a2e980307c7a11caa39988aaaa9b4
2014-04-19 10:55:31 +03:00
9ad131f3c9 fdo#74702 Allow Window & OutputDevice to handle erasure
Window handles erasure of backgrounds for controls. Probably this
needs to be moved to a more specific class in the future, but for
now it should go into Windows.

I also removed an unnecessary temporary variable, and removed the
need to case the pointer to this from OutputDevice to Window. In
other words, this code has been vastly simplified :-)

Change-Id: I44b91cf68f29424ffbc1679b66fbeaeb024880e9
2014-04-19 16:51:47 +10:00
891e6a0be8 fdo#74702 Allow Printer & OutputDevice to handle font orientation
Printer handles setting font orientation differently to how a Window
or VirtualDevice handles it.

Change-Id: I2903b971651fe56f8d262d3467e76baef617455c
2014-04-19 12:24:49 +10:00
29d5ce2d88 sfx2: Move InitInterface_Impl() out of SFX_DECL_INTERFACE too.
Change-Id: Ib737e0d1b5888986b308aa60d4140f65e4e90243
2014-04-18 22:51:06 +02:00
b731d71c67 sfx2: Move InitInterface_Impl() method out of SFX_IMPL_INTERFACE.
SFX_IMPL_INTERFACE previously looked like a function; where in fact it is
several methods defined at once, and only the last one has a body.

This is extremely confusing and hard to read; let's kill that nonsense.

Change-Id: Ia4ae22eb58b1260c9c827c894f5345693bad49e7
2014-04-18 22:51:06 +02:00
8c3ab6093a sfx2: Kill SFX_STATUSBAR_REGISTRATION macro.
Change-Id: Iff0ffdb955892117a767e1f31c1f854a93feb560
2014-04-18 22:51:06 +02:00
2df21aa91b sfx2: Kill SFX_CHILDWINDOW_CONTEXT_REGISTRATION macro.
Change-Id: Ib94cc5bc33152e53910a50cce878fb69312d0c30
2014-04-18 22:51:05 +02:00
72d8c94dfa sfx2: Kill SFX_FEATURED_CHILDWINDOW_REGISTRATION macro.
Change-Id: I9bf1c2404eeb6c59525061157e91b8777f2da540
2014-04-18 22:51:05 +02:00
f4d61eca61 sfx2: Kill SFX_CHILDWINDOW_REGISTRATION macro.
Change-Id: Icd56e0cee1ce0283e8a1cbaafc81ecca25469185
2014-04-18 22:51:04 +02:00
1a1daff34e sfx2: Kill SFX_FEATURED_OBJECTBAR_REGISTRATION macro.
Change-Id: I7a364b74a9223a6256f004ee2367aaaff80e7f2e
2014-04-18 22:49:27 +02:00
9f83ea4bc6 sfx2: Kill SFX_POPUPMENU_REGISTRATION macro.
Change-Id: Ie68ccbe5874ec7c7e1bb73cb2937e06bb4910cd0
2014-04-18 22:49:27 +02:00
7acb27081c sfx2: Kill SFX_OBJECTBAR_REGISTRATION macro.
Change-Id: Ic80e9bebba8c7e76a0400769a2f9d75301227194
2014-04-18 22:49:27 +02:00
2be92a9d4e svidl: Unwind SFX_SLOTMAP_ARG, and kill it.
Change-Id: Icd99fd2cd530f52b0acf5d91667eeec8142e8340
2014-04-18 22:49:26 +02:00
62256ea10a svidl: Unwind SFX_ARGUMENT macro, and kill it.
Change-Id: I61334b687c251ccc90f125e8bf95f8689028b8c3
2014-04-18 22:49:26 +02:00
6b1f812678 svidl: Unwind SFX_ARGUMENTMAP macro, and kill it.
Change-Id: I7c4902a4151f207d8a61b76d05fad74a4c8854d4
2014-04-18 22:49:26 +02:00
fa632a57b7 fdo#77088 WMF - replace 32-bit min/max assumption with const
Added RECT_MIN and RECT_MAX which represent the minimum and
maximum value a Rectangle object can hold. In WMF we used a 32-bit
assumption what the min and max value could be (0x7fffffff,
0x80000000) which causes problems on 64-bit systems.

Change-Id: Ic62daebbc2708cdeb7b0cf7b694bd9940eb98313
2014-04-18 21:07:02 +02:00
9ea483e8a9 svtools: valueset.cxx - use scoped_ptr and clean-up
Change-Id: I91528f55af39faccfe1bf95999ac29669ead0aad
2014-04-18 21:07:02 +02:00
1139d618b8 handle strange brightness+contrast adjustment from msoffice (fdo#38410)
LO uses basically the formula "newpixel=(oldpixel-128)*contrast+128+brightness",
i.e. contrast is applied first. It looks like there's no "oficial" formula for this,
so a formula that applies brightness first would be ok too. MSO for some weird reason
apparently uses a formula that applies half of brightness before contrast and
half afterwards (insert funny political correctness or compromise joke here).
While the result is the same like with the LO formula if only either brightness
or contrast is adjusted, the result is different if both are involved. Just modify
the image using the MSO algorithm if this is the case.

Change-Id: I55fe8f395832685b90f024cf2f58b0797c1ba588
2014-04-18 20:53:01 +02:00
8afabd3942 Extract code of BitmapEx -> RGBA buffer conversion to OpenGLHelper
Needed by gltf rendering.

Change-Id: I1aa974f3c515c5fb19a07b54ff655331138553cb
2014-04-18 18:53:22 +02:00