summaryrefslogtreecommitdiff
path: root/vcl/source/outdev
AgeCommit message (Collapse)Author
2015-04-28Merge remote-tracking branch 'origin/feature/vclptr'Michael Meeks
Resolve several thousand lines of conflicts. Conflicts: accessibility/source/extended/accessiblelistbox.cxx accessibility/source/standard/vclxaccessiblecombobox.cxx accessibility/source/standard/vclxaccessibledropdowncombobox.cxx accessibility/source/standard/vclxaccessibledropdownlistbox.cxx accessibility/source/standard/vclxaccessiblelistbox.cxx accessibility/source/standard/vclxaccessibletextfield.cxx basctl/source/basicide/basidesh.cxx cui/source/inc/chardlg.hxx cui/source/tabpages/tpbitmap.cxx dbaccess/source/ui/dlg/UserAdmin.cxx dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx extensions/source/propctrlr/propertyeditor.hxx extensions/source/scanner/sanedlg.cxx filter/source/pdf/impdialog.cxx include/sfx2/mgetempl.hxx include/sfx2/sidebar/SidebarToolBox.hxx include/sfx2/viewsh.hxx include/svtools/brwbox.hxx include/svtools/filectrl.hxx include/svtools/scrwin.hxx include/svx/dlgctrl.hxx include/svx/sidebar/Popup.hxx include/svx/sidebar/PopupContainer.hxx include/svx/sidebar/PopupControl.hxx include/svx/sidebar/SidebarDialControl.hxx include/svx/sidebar/ValueSetWithTextControl.hxx sc/source/ui/condformat/condformatdlgentry.cxx sc/source/ui/navipi/navipi.cxx sc/source/ui/sidebar/CellBorderStyleControl.hxx sd/source/ui/animations/CustomAnimationDialog.cxx sd/source/ui/inc/DrawViewShell.hxx sd/source/ui/inc/Ruler.hxx sd/source/ui/inc/SlideSorter.hxx sd/source/ui/inc/ViewTabBar.hxx sd/source/ui/inc/Window.hxx sd/source/ui/inc/morphdlg.hxx sd/source/ui/inc/sdpreslt.hxx sd/source/ui/sidebar/CurrentMasterPagesSelector.hxx sd/source/ui/sidebar/LayoutMenu.hxx sd/source/ui/sidebar/MasterPagesSelector.hxx sd/source/ui/sidebar/NavigatorWrapper.hxx sd/source/ui/sidebar/PanelBase.hxx sd/source/ui/sidebar/RecentMasterPagesSelector.cxx sd/source/ui/sidebar/RecentMasterPagesSelector.hxx sd/source/ui/slideshow/showwindow.hxx sd/source/ui/slidesorter/view/SlsInsertAnimator.cxx sd/source/ui/slidesorter/view/SlsLayeredDevice.hxx sd/source/ui/view/ViewShellBase.cxx sd/source/ui/view/drviewsa.cxx sfx2/source/appl/fileobj.hxx sfx2/source/appl/opengrf.cxx sfx2/source/control/thumbnailviewacc.hxx sfx2/source/dialog/securitypage.cxx sfx2/source/dialog/templdlg.cxx sfx2/source/doc/docinsert.cxx sfx2/source/doc/guisaveas.cxx sfx2/source/inc/alienwarn.hxx sfx2/source/sidebar/Deck.cxx sfx2/source/sidebar/Deck.hxx sfx2/source/sidebar/DeckTitleBar.cxx sfx2/source/sidebar/DeckTitleBar.hxx sfx2/source/sidebar/MenuButton.cxx sfx2/source/sidebar/MenuButton.hxx sfx2/source/sidebar/Panel.cxx sfx2/source/sidebar/Panel.hxx sfx2/source/sidebar/PanelTitleBar.hxx sfx2/source/sidebar/SidebarDockingWindow.hxx sfx2/source/sidebar/SidebarToolBox.cxx sfx2/source/sidebar/TabBar.hxx sfx2/source/sidebar/TabItem.cxx sfx2/source/sidebar/TabItem.hxx sfx2/source/sidebar/TitleBar.hxx sfx2/source/toolbox/imgmgr.cxx starmath/inc/edit.hxx starmath/inc/smmod.hxx starmath/qa/cppunit/test_starmath.cxx starmath/source/edit.cxx starmath/source/smmod.cxx svtools/source/brwbox/brwbox1.cxx svtools/source/brwbox/datwin.hxx svtools/source/contnr/fileview.cxx svtools/source/contnr/simptabl.cxx svtools/source/control/filectrl.cxx svtools/source/control/valueimp.hxx svx/inc/GalleryControl.hxx svx/source/dialog/dlgctrl.cxx svx/source/dialog/swframeexample.cxx svx/source/fmcomp/fmgridif.cxx svx/source/gallery2/GalleryControl.cxx svx/source/sidebar/EmptyPanel.hxx svx/source/sidebar/area/AreaPropertyPanel.hxx svx/source/sidebar/area/AreaTransparencyGradientControl.hxx svx/source/sidebar/graphic/GraphicPropertyPanel.hxx svx/source/sidebar/insert/InsertPropertyPanel.cxx svx/source/sidebar/insert/InsertPropertyPanel.hxx svx/source/sidebar/line/LinePropertyPanel.hxx svx/source/sidebar/line/LineWidthControl.cxx svx/source/sidebar/line/LineWidthControl.hxx svx/source/sidebar/line/LineWidthValueSet.hxx svx/source/sidebar/paragraph/ParaPropertyPanel.hxx svx/source/sidebar/possize/SidebarDialControl.cxx svx/source/sidebar/text/TextCharacterSpacingPopup.hxx svx/source/sidebar/text/TextPropertyPanel.hxx svx/source/sidebar/tools/PopupContainer.cxx svx/source/sidebar/tools/PopupControl.cxx svx/source/sidebar/tools/ValueSetWithTextControl.cxx svx/source/svdraw/svdfmtf.hxx svx/source/svdraw/svdibrow.cxx svx/source/tbxctrls/colrctrl.cxx svx/source/tbxctrls/tbcontrl.cxx sw/source/ui/dbui/mmaddressblockpage.cxx sw/source/ui/dialog/uiregionsw.cxx sw/source/ui/index/cnttab.cxx sw/source/uibase/inc/drpcps.hxx sw/source/uibase/sidebar/PageColumnControl.hxx sw/source/uibase/sidebar/PageMarginControl.hxx sw/source/uibase/sidebar/PageOrientationControl.hxx sw/source/uibase/sidebar/PagePropertyPanel.hxx sw/source/uibase/sidebar/PageSizeControl.hxx sw/source/uibase/uiview/view2.cxx sw/source/uibase/utlui/navipi.cxx vcl/inc/svdata.hxx vcl/source/control/combobox.cxx vcl/source/control/lstbox.cxx vcl/source/window/dockwin.cxx vcl/source/window/winproc.cxx Change-Id: I056cf3026ff17d65cca0b6e6588bda4a88fa8d95
2015-04-26add EditBoxValue::cloneCaolán McNamara
Change-Id: I03e74d766b85ddd61baa1dbf0f28a663931e7ec6
2015-04-24gtk3: get the right height for Edit boxesCaolán McNamara
smuggle the text height down to the native region calculation code instead of messing around with proxies Change-Id: I727ceddb5b431be82e6e5a725f9bca588e5b2046
2015-04-24loplugin:simplifyboolStephan Bergmann
Change-Id: I8276e8b356ff26241613de64bcd90b5dbcd92f29
2015-04-20vcl: convert new to ::CreateMichael Meeks
Change-Id: Ifd52953086ea923fa1770892d13f32c2263aec54
2015-04-16overloading is hard to resolve for poor old c++Michael Stahl
Change-Id: I76ae48783942a558c674c5dcb2869540a819bf49
2015-04-16tdf#86793: vcl: speed up OutputDevice::GetEllipsisString()Michael Stahl
The ridiculous algrorithm used for TEXT_DRAW_CENTERELLIPSIS will go faster if we cut out most of the text at the beginning instead of one at a time. (regression from 912ecaf565e68d2ca3fb9584712313e712749f75) Change-Id: I9310dda1847222215bafe372e3efef9d365e1ad9
2015-04-16tdf#84294: vcl: fix PDF export of transparent Writer frames in LO 4.3Michael Stahl
The transparent frame background is painted opaque because OutputDevice::DrawTransparent() records a MetaTransparentAction instead of returning early. Note that master and 4.4 use drawinglayer to paint backgrounds so the problem is only visible in 4.3. (regression from 36b59f2efc2bfb2c9256c39eb5687808deb) Change-Id: Ide7a076b72123097a9fe099b96d36cda7f7bb082
2015-04-10Fix misc. issues in lifecycle unit tests.Michael Meeks
Change-Id: I667852d1c854259ed698541b868a49322c6fbe64
2015-04-10automated VclPtrInstance conversion.Michael Meeks
Change-Id: I9a1d47202e2794461f6ec44f3e72ee1dd2fde09d
2015-04-10Convert more sites to VclPtrInstance.Michael Meeks
Change-Id: I364c5eb176d5003deb1938810cccf4f2aaedbd59
2015-04-10vclptr: create Instance helpers, and set initial ref-count to 1.Michael Meeks
Document that in README.lifecycle; the problem is that our constructors currently take and release references left/right on the object being created, which ... means we need an initial reference. Change-Id: I5de952b73ac67888c3fbb150d4a7cde2a7bc9abf
2015-04-10vclptr: add isDisposed method - and assert for it here & there.Michael Meeks
Change-Id: I2b154e0ed9eee0a45900ada7f805a1d444a31bc0
2015-04-10protect more printer code-paths.Michael Meeks
Change-Id: Ic5bc5c3325b460cba0d95484454c9bb826684890
2015-04-10cure a lot of unfortunate ScopedVclPtrs.Michael Meeks
Change-Id: I2149511f958ba75e81dc41b10b01eb9d19610037
2015-04-10vclptr: various mistakes fixed, and more ptr types converted.Michael Meeks
Change-Id: Iba04ec828f7ce37fc6ede28a64f1c286d81ff705
2015-04-10remove un-necessary type punning.Michael Meeks
Change-Id: I4f05929daa8b78b309d8a0498a2bb3246af9e18a
2015-04-10start wrapping OutputDevice in VclPtrNoel Grandin
Change-Id: If3ecbb0599b50d50ce6b3997ca7892200c332ffe
2015-04-10vclwidget: check for calling delete on subclasses of vcl::WindowNoel Grandin
Change-Id: I7fb7cf919e3f46dd03a18b1cb95fa881915f9642
2015-04-10vcl: fix virtual device lifecycle.Michael Meeks
Also remove an over-optimistic assert & ref-holding in dispose piece. Change-Id: I6ce6abb666c8143502fc450a26e1ba2aac787455
2015-04-10vclptr: move down impl. to OutputDeviceMichael Meeks
Ultimately we will want to ref-count & VclPtr OutputDevice instances separately from Window - but for now merge. This helps fix the amazing lifecycle foo in toolkit/ Change-Id: If40ee9f645c87aff08815926205e908205bdd67a
2015-04-02loplugin:staticmethodsNoel Grandin
Change-Id: Ibf0c73ac17ec19ed672f66907db47057920babca
2015-04-01loplugin:staticfunctionNoel Grandin
Change-Id: I909cf7e77f9d7194575636248196fda311fffdb6
2015-03-31tdf#89666: vcl: speed up HbLayoutEngine with cache in SwTxtFormatInfoMichael Stahl
When a SwTxtFormatInfo is created to format a paragraph, pre-compute the result of vcl::ScriptRun::next() and cache it for future calls to OutputDevice::GetTextBreak() and GetTextWidth(). This requires adapting a bunch of methods to pass the additional parameter, and some classes to backup and restore the cache when they replace the text of the SwTxtFormatInfo. There is some code in vcl OutputDevice::ImplPrepareLayoutArgs() to modify the passed string and replace digits depending on "meTextLanguage" member; try to set it to the correct value when creating the layout cache (unfortunately it's not possible if the user sets the CTL Numerals config to the non-default "Context" value). Another issue is the check in OutputDevice::ImplLayout() if there is a mpConversion member on the font; apparently this is used to translate between different Symbol fonts, so not very important; just ignore the cache in this case. This reduces vcl::ScriptRun::next() from 11 to 0.36 billion callgrind cycles when built with GCC 4.9.2 -m32 -Os (which is still 16% of the formatting). Change-Id: I61fb8530333f2e7a9199f767c00cf2181ba49951 Reviewed-on: https://gerrit.libreoffice.org/14732 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-03-29loplugin:cstylecastStephan Bergmann
Change-Id: I999ec56219a7d9a9dc8c1e9310cc74dccd0ac099
2015-03-28Revert "tdf#89666: vcl: speed up HbLayoutEngine with cache in SwTxtFormatInfo"Norbert Thiebaud
This reverts commit 1efe5fe38031f7bc23150c35e4c68940621a1d5b. which broke windows.
2015-03-28Clean up C-style casts from pointers to voidStephan Bergmann
Change-Id: Iad602cece6e328c7f5d5f36adb294c97b152ade3
2015-03-28tdf#89666: vcl: speed up HbLayoutEngine with cache in SwTxtFormatInfoMichael Stahl
When a SwTxtFormatInfo is created to format a paragraph, pre-compute the result of vcl::ScriptRun::next() and cache it for future calls to OutputDevice::GetTextBreak() and GetTextWidth(). This requires adapting a bunch of methods to pass the additional parameter, and some classes to backup and restore the cache when they replace the text of the SwTxtFormatInfo. There is some code in vcl OutputDevice::ImplPrepareLayoutArgs() to modify the passed string and replace digits depending on "meTextLanguage" member; try to set it to the correct value when creating the layout cache (unfortunately it's not possible if the user sets the CTL Numerals config to the non-default "Context" value). Another issue is the check in OutputDevice::ImplLayout() if there is a mpConversion member on the font; apparently this is used to translate between different Symbol fonts, so not very important; just ignore the cache in this case. This reduces vcl::ScriptRun::next() from 11 to 0.36 billion callgrind cycles when built with GCC 4.9.2 -m32 -Os (which is still 16% of the formatting). Change-Id: I61fb8530333f2e7a9199f767c00cf2181ba49951 Reviewed-on: https://gerrit.libreoffice.org/14732 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-03-26const_cast: convert some C-style casts and remove some redundant onesStephan Bergmann
Change-Id: I17c57a85bcda98ef36ddefd6562d4681d0c7d5fc
2015-03-23move cairo helpers to vcl and make per-plugCaolán McNamara
Change-Id: I4de4d5c3a191784598e93a8cf70e45a3f59ae857 Reviewed-on: https://gerrit.libreoffice.org/14907 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-03-19reorganize resizing surfaces logicCaolán McNamara
the only case where we don't just create a new surface is the X11 case Change-Id: I98a3c8f227e208ac9db969ed7711e293fb237c2e Reviewed-on: https://gerrit.libreoffice.org/14902 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-03-19move the cairo resize hack into vclCaolán McNamara
Change-Id: I41868da3901d9c3fff69c11da467952176e58f09 Reviewed-on: https://gerrit.libreoffice.org/14897 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-03-18vcl/text: fix duplicate text in fontwork tdf#81876Pierre-Eric Pelloux-Prayer
Regression introduced by commit 2ba05b4800d6cc322276a6911792363f8eb32051 because space character will take the error code path. The error propagates up to GetTextOutlines which then uses the fallback method. In this case, we now reset any work done before, to avoid having duplicate outlines. Change-Id: Ie15524ac462d4b4bb3c482e49c4fe96a2f2d2c71 Reviewed-on: https://gerrit.libreoffice.org/14850 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-03-18revert work in progressCaolán McNamara
Change-Id: I1387b0ed7b2d8bb9df801c03cf59efc9c0e1cfd3
2015-03-18more thinkingCaolán McNamara
Change-Id: Ie349bd35b1fc92b77cc15f51eb886a1c9c92cbe1
2015-03-18thinkingCaolán McNamara
Change-Id: Ib1a086bed7f70e244db2a0bd32819560c6949d51
2015-03-18move the cairo resize hack into vclCaolán McNamara
Change-Id: Ifd1817a28f4fb7ddcc85447fd3388fd0efd86476
2015-03-18move IsCairoWorking to vclplug level and renameCaolán McNamara
Change-Id: Id31de932afa61df6933d61ddba971f5d7060f0c1
2015-03-06Handle degenerate case of nMapNum == 0Stephan Bergmann
...appears to be occasionally necessary, probably since d8e7bc042bd0912a66c231b101cecda0f838a80f "Remove hack of replacing 0 with 1/LONG_MAX" Change-Id: I1eb7277bfdc9722c761bd03678cd770a3763de1f
2015-03-04Remove hack of replacing 0 with 1/LONG_MAXStephan Bergmann
...that hack was in there since the initial import, but it is unclear to me what it shall fix, and it rather leads to problems as reported by -fsanitize=signed-integer-overflow when OuptutDevice::PixelToLogic of a 1x1 Size calls ImplPixelToLogic with n=1, nMapDenom=LONG_MAX causing the computation of 2*n64 to overflow on 64-bit Linux. Change-Id: I2465da46175b8a1d4af1c23fb3df993230eec78d
2015-02-23Use SdrModel::isTiledRendering()Miklos Vajna
It turns out that in case the is-tiled-rendering flag is part of the sdr model, then that's enough for all the places where so far used a flag on the output device for this purpose, so change the two users of that method to use SdrModel::isTiledRendering(), and clean up the now unused one. Change-Id: Ife6d3d7e093c04b707497d9588942b38bcd8742d
2015-02-23Add OutputDevice::isTiledRendering()Miklos Vajna
This is similar to SwViewShell::isTiledRendering, but while SwViewShell describes a state of the application, this one describes a state of the output device. The output device may be created by LOK client code, while the view shell may not be accessible from lower layers of the stack, so we need both. Change-Id: I82f7755eb73603bd79283272fba4970dccae8784
2015-02-16boost::foo_ptr->std::foo_ptrCaolán McNamara
Change-Id: I9219619b538b6530a89f5932ac51eb3b62eb396a
2015-02-12do not silently fail if the optimized blend path doesn't do anythingLuboš Luňák
Otherwise e.g. rotated images in Draw may show as empty. Broken in d53103dd83bf20ac. Change-Id: I0b99b6c39b96f87a78ccb09c9db0a1bfac0f3296
2015-02-06shared_ptr<T>(new T(args)) -> make_shared<T>(args)Caolán McNamara
and boost:make_shared->std::make_shared Change-Id: Ic1e187c52c856a7b27817967b2caa8920f23a98d
2015-02-03Initialize graphics in OutputDevice::getFallbackFont.Ashod Nakashian
OutputDevice::getFallbackFont requires mpGraphics to be created/initialized. Without the check and initialization OutputDevice::getFallbackFont will segfault. Change-Id: I18225a24a6767933c8f1ff8f1cfd392543a95132 Reviewed-on: https://gerrit.libreoffice.org/14287 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-01-20move OutputDevice:: Clear/Refresh inside AddTempDevFontCaolán McNamara
and drop now redundant ImplClearFontData(true); mpFontCache->Invalidate(); which is done on entry Change-Id: I217c203980e5fd6a54b85f1b1376ecc2b92181db
2015-01-20font cache gets broken on adding an embedded fontCaolán McNamara
Change-Id: I665cde5d4c89443238efb283c86277dedf621197
2015-01-20Some more loplugin:cstylecast: vclStephan Bergmann
Change-Id: I74d35630b9fcdaa97af0b1f1e6d1e5c72488964d
2015-01-19Don't allow a negative sample range. Fixes test breakage.Tomaž Vajngerl
Change-Id: I3cf79b590b7d4c5aab92ccaebf6fd9c7eda529f7