Commit Graph

824 Commits

Author SHA1 Message Date
Laurent Godard
a64999511a new uno sidebar api tdf#91806
the entry point is SfxBaseController::getSidebar()

the Decks and panels are now per SidebarController and not global anymore

' macro example
Sub testSidebarApi

	controller =  thisComponent.currentcontroller
	frameIni =  thisComponent.currentcontroller.frame
	sidebar =  thisComponent.currentcontroller.getSidebar()

	sidebar.setVisible(true)

	frame = sidebar.getFrame()

	decks = sidebar.getdecks()

	c = decks.count

	h = decks.hasElements()

	e = decks.getElementNames()

	a =  decks.hasByName("MyDeck")

	deck = decks.getByName("MyDeck")
	deck.activate(true)

	t = deck.getTitle()
	deck.setTitle("new deck title")

        deck.moveFirst()
        deck.moveLast()
        deck.moveUp()
        deck.moveDown()

        index = deck.getOrderIndex()

	panels = deck.getPanels()
	ep = panels.getElementnames()

	ap = panels.hasByName("aPanelName")

	panel = panels.getByName("aPanelName")
	panel.setTitle("new panel title")

	panel.collapse()

	panel.expand(true) ' expand and collapse other

        index = panel.getOrderIndex()

        panel.moveLast()
        panel.moveFirst()
        panel.moveDown()
        panel.moveUp()

End Sub

Change-Id: I7a4b953f2277dea483bb296ba6ead35de7205ace
Reviewed-on: https://gerrit.libreoffice.org/15856
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2015-06-22 04:59:07 +00:00
Michael Meeks
48c2815dd2 tdf#91727 - Unwind non-dispatch of idle handlers.
This clobbers the functionality from commit:

    06d731428e

    make idle timers actually activate only when idle

Since now all rendering and re-sizing is done in idle handlers it
does effectively the opposite of what was intended. A better solution
would allow special-casing the processing of just rendering,
re-sizing and window management to spin for eg. progress bar
rendering.

Also add helpful debugging labels to the idle & timeouts.

Also cleanup the Idle vs. Scheduler handling.

Also ensure that starting an Idle triggers a mainloop wakeup.

Also add a unit test.

Change-Id: Ifb0756714378fdb790be599b93c7a3ac1f9209e6
2015-06-10 17:27:20 +01:00
Stephan Bergmann
f6ec07a396 loplugin:cstylecast: deal with remaining pointer casts
Change-Id: I07bf1403e6b992807541a499b786d47f835b2f81
2015-06-08 16:29:41 +02:00
Michael Meeks
7aae8772aa Clear VclPtr instance reference on removed UserEvents.
Also extend VclPtr lifecycle test.

Change-Id: I4d989375ca02327216eb1f37e466aefdb733579d
Reviewed-on: https://gerrit.libreoffice.org/16107
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2015-06-05 19:45:12 +00:00
Tomaž Vajngerl
f16d82ea8f make it possible to force enable double buffering for all widgets
Change-Id: Ia0c8e9d8a22abaa2c06aea2a0f790dc34903ac37
2015-06-03 20:42:27 +09:00
Stephan Bergmann
c56a8863cd loplugin:cstylecast: deal with those that are (technically) const_cast
Change-Id: I1a9aa868d3724a7d14c181e45d956cdf2423e40c
2015-06-02 11:28:51 +02:00
Noel Grandin
f3331f7694 convert PARENTCLIPMODE constants to scoped enum
Change-Id: I36a53112e75fca9208b2f91e224a7c671695509b
2015-05-28 12:47:08 +02:00
Noel Grandin
4c93c30c79 convert GETFOCUS constants to scoped enum
Change-Id: I7c324bb6358be28c119592850eb7607479279f09
2015-05-28 12:47:05 +02:00
Noel Grandin
66854d697f convert WINDOW_DRAW flags to scoped enum
Change-Id: I9400a286fab18d683b4c109007961685f01b6da3
2015-05-27 11:14:26 +02:00
Noel Grandin
9e3b1236b6 convert WINDOW_DLGCTRL flags to scoped enum
Change-Id: I6c3a95cdcb15e5b1d4adb13908a751b06a302e20
2015-05-27 11:14:26 +02:00
Noel Grandin
5ad3886ec8 convert EXTTEXTINPUT constants to scoped enum
Change-Id: I1bb4ff2c13eaa2a9da3e32963ac0802e947e18d9
2015-05-27 11:14:25 +02:00
Caolán McNamara
662906ea64 if foo delete foo -> delete foo
Change-Id: I62c02f8ad69ddbb1cca5b8f0e4c5673d792cb08b
2015-05-26 16:59:44 +01:00
Noel Grandin
204d147b8a convert SCROLL constants to scoped enum
Change-Id: I5696fa39b2d032735cea7abe039349d4f83cf68d
2015-05-26 08:30:19 +02:00
Noel Grandin
bb7ce3137d convert INVALIDATE constants to scoped enum
fixing a bug in Window::ImplMoveAllInvalidateRegions, and improving the
IDL docs for XWindowPeer

Change-Id: Idb774ac913945db2ac7c492c11cf86c370624c3d
2015-05-26 08:30:18 +02:00
Noel Grandin
c7efb51e31 convert TOTOP constants to scoped enum
Change-Id: I85ba631ba298f1034dc5b6a04a5ff3d509c41bcb
2015-05-25 10:32:24 +02:00
Noel Grandin
4de86ac0c6 convert ACTIVATE_MODE constants to scoped enum
Change-Id: Ica20e033d5cde8a0c18eff51c63c66e6a3845fd0
2015-05-25 10:32:24 +02:00
Noel Grandin
b419da0f53 convert SHOW constants to scoped enum
Change-Id: I2712a0901049885502cade31f9757f712048bb33
2015-05-25 10:31:35 +02:00
Caolán McNamara
d1d2a0bb65 IsInModalNonRefMode just forwards to IsInModalMode now
Change-Id: I940b70648ede6239930ba36e755994e7749b2d0b
2015-05-24 15:40:23 +01:00
Caolán McNamara
b8c3d5c485 drop now unused WB_REFMODE bit
Change-Id: I873063a8cf52652ca8d3c871170beeb4585de8f1
2015-05-24 15:40:22 +01:00
Michael Meeks
0792e97bd7 VclPtr - add compat methods for old-style focus / notification.
The previous code would only invoke Window:: methods by the time we
hit the destructor; do the same to avoid fixing more scattered
crashers for now.

Change-Id: Ibdcd1290309bb7fc31a44d534c52d357da022591
Reviewed-on: https://gerrit.libreoffice.org/15880
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2015-05-23 20:51:12 +00:00
Noel Grandin
ac3802da9a convert WINDOW_POSSIZE constants to scoped enum
Change-Id: Id85137ffc7309a66b04132d588d289db136117b9
2015-05-22 10:37:59 +02:00
Noel Grandin
566922a98d convert WINDOW constants for GetWindow() methods to scoped enum
Change-Id: I0c7c6d095732704eb4ab48f1277a0592b1c7fa33
2015-05-22 10:37:59 +02:00
Noel Grandin
456c379ffd convert ANTIALIASING constants to scoped enum
Change-Id: I175b8ea4e8bc01c3cdd3dd90506eba01b35e0085
2015-05-20 09:52:09 +02:00
Noel Grandin
953f327818 convert COPYAREA constant to bool flag
since there is only value in this flags thing

Change-Id: I86d7a3a358c467a9748b00e1ba8c09106f282947
2015-05-20 09:52:08 +02:00
Jan Holesovsky
0fc56aad09 rendercontext: Per-widget double-buffering for the cases we know that work.
Uses a variable, not a virtual method, as any change would need a large
re-compile.

Change-Id: I103669b139a82137c5d346ab8c9459483d358f2b
2015-05-18 18:34:15 +02:00
Tomaž Vajngerl
b4bbb5e5d7 refactor how font, fg. and bg. are applied in widgets/controls
- Move vcl::RenderContext to outdev.
- Change some methods on vcl::Window to accept RenderContext
  as parameter.
- Add ApplySettings to vcl::Window - This method is called before
  painting. Refactor existing classes that use InitSettings to
  have ApplySettings or mark the classes to be refactored later.
- Add RenderSettings for adding defered settings to rendering.
  This is similar to ApplySettings but for more ad-hoc calls.

Change-Id: I4ea58461f3b6b08ccfa3e0ddd1a4a3e04f8c4f45
2015-05-18 11:22:49 +09:00
Noel Grandin
741d9990bf convert QUICKHELP constants to scoped enum
Change-Id: Ie7302c909feb2e83b8b5e62a5e6a1f901783fb49
2015-05-14 12:00:40 +02:00
Noel Grandin
6850e9b855 first step towards removing LazyDeletor
convert it from a template to a concrete class, since we only have one
use-site for it anyway

Change-Id: I7209243cc744c7ddb727d6136795d8628b91ff6f
2015-05-13 12:21:19 +02:00
Noel Grandin
5525ad365c convert FLOATWIN_TITLE constants to scoped enum
Change-Id: Iebd2eadfa375092a33d6de9d7f7964dba64f7d6b
2015-05-13 09:27:16 +02:00
Noel Grandin
4c27e84145 convert ENDTRACK_ constants to scoped enum
Change-Id: Iaccd9c3be1ae24f7f9861f9049cd5b52f155170f
2015-05-13 08:54:41 +02:00
Michael Stahl
8fca0c44e8 vcl: rename other members of StateChangedType for consistency
Change-Id: Ifd3339813e5d3dfb54566fd226aaf2d2a199d59a
2015-05-05 15:51:11 +02:00
Michael Stahl
c724eebbae vcl: rename conflicting defintion of TRANSPARENT remove it from postwin.h
Change-Id: I3b4e25c27593e3a61612a96baa2a4378542d151c
2015-05-05 15:51:10 +02:00
Tor Lillqvist
d883c12556 Get rid of the initial :: for the vcl namespace
We used it all over the place without leading :: already anyway, even
in many files in include. So let's be consistent. In the majority of
cases, prefer the easier-on-the-eyes choice, not the "safe" one.

In those files in include where *all* existing uses of ::vcl:: indeed
used the :: prefix, there let's keep it for consistency.

Change-Id: If99cb41d3bf290d38c601d91125c3c8d935e61d0
2015-04-30 07:27:52 +03:00
Caolán McNamara
9e0e0db304 coverity#1296208 Operands don't affect result
Change-Id: I9ba731626bb43daae277c20829306c7d2eccd41f
2015-04-29 21:17:19 +01:00
Tomaž Vajngerl
6cea2e61cf fix compile: delegate RenderContext parameter to super
Change-Id: I1c08e29c45d8334db52b129a957098481f3e57a4
2015-04-29 09:27:54 +09:00
Tomaž Vajngerl
704ebef99d remove old Paint(Rect&) method in vcl::Window
Change-Id: I0f3377eaeb68f4933ccc3f86c9136c97c09c464d
2015-04-29 09:24:20 +09:00
Tomaž Vajngerl
2d7ff9c23b change Paint input parameter to ref
Change-Id: I4bf97d46736ce8186c3699c9a861e44103ab0d4b
2015-04-29 09:03:56 +09:00
Tomaž Vajngerl
56e2f3e338 Add paint with render context to window -> impl. calls old paint
Change-Id: Ic4823f9f74c75e87de92d07a9a1310a7eed93074
2015-04-29 09:03:56 +09:00
Michael Meeks
e8b97a52c9 Merge remote-tracking branch 'origin/feature/vclptr'
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-28 15:08:48 +01:00
Michael Meeks
0cde74f788 Make Window's inDispose map more precisely to mbInDtor.
Change-Id: I545aa03d46b0673aafe73daa23047d2a4b6936dd
2015-04-25 12:16:28 +01:00
Stephan Bergmann
a9a4d46ce7 loplugin:simplifybool
Change-Id: I8276e8b356ff26241613de64bcd90b5dbcd92f29
2015-04-24 12:36:31 +02:00
Michael Meeks
89ec9424b2 Fix a number of boost::unique_ptr errors.
Audit for this problem in:
	"vclwidget: change all vcl::window fields to be wrapped in VclPtr"

Change-Id: I6e57f078364a7fd3fd4e61c748d7af843458758e
2015-04-22 21:13:50 +01:00
Michael Meeks
4fed8865be vcl: convert new to ::Create
Change-Id: Ifd52953086ea923fa1770892d13f32c2263aec54
2015-04-20 15:35:54 +01:00
Michael Meeks
df103589be Make leaked child debugging more helpful wrt. the hierarchy.
Change-Id: Iadd2b5214661e00209f789c9ada83d5d9dce12b7
2015-04-14 10:06:05 +01:00
Michael Meeks
93a8635776 Cleanup layout and window merge.
Change-Id: Ic61f85ef159981721420ebc5157bcf09cf09ec51
2015-04-10 14:14:15 +01:00
Michael Meeks
07f3d95b3d vcl: stop vcl::Window clobbering mnRefCnt itself.
Change-Id: If1926c8ecc94c3b9786a3f255371b440c482a155
2015-04-10 13:26:59 +01:00
Michael Meeks
7acf94a7cf vcl: remove curious self referential OutputDevice ptr.
No need to pay a per-instance cost for this, also avoid a self
reference for every Window sub-class.

Change-Id: I040a0ede9481229e43a39bc23297969e90b95f5e
2015-04-10 13:07:52 +01:00
Michael Meeks
8fb4672aef ScopedVclPtr: needs an = operator to make life flow.
Without this, assigning to a ScopedVclPtr instance thus:

    pScopedVclPtr = new Foo();

constructed a new intermediate ScopedVCLPtr, used a default assignment
operator, unhelpfully disposing the new Foo before it could make it to
pScopedVclPtr => add operator, and hide problematic constructors.

Change-Id: Icc0da962938bf115eac0c24a6a76cfeb66ddf23a
2015-04-10 13:01:48 +01:00
Michael Meeks
b5f08b336a remove erroneous new disposeAndClear.
Change-Id: Ib593f05447a8a657649ef83febb4ef0e5b6476dd
2015-04-10 12:11:16 +01:00
Noel Grandin
820576af4f start wrapping OutputDevice in VclPtr
Change-Id: If3ecbb0599b50d50ce6b3997ca7892200c332ffe
2015-04-10 12:10:43 +01:00