diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2015-04-28 11:41:31 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-04-28 15:08:48 +0100 |
commit | e8b97a52c96df9c8e8055407b1e40ed7cb9cfc67 (patch) | |
tree | b322529f4a54a6427862cb20cb4cf87fb6a5d065 /include/toolkit | |
parent | 2b0be6c0e9d23f1b8535ba7033732ae2e3bfb5c9 (diff) | |
parent | 0cde74f788a054fa2b65107a030dd463b8d11c7a (diff) |
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
Diffstat (limited to 'include/toolkit')
-rw-r--r-- | include/toolkit/awt/scrollabledialog.hxx | 5 | ||||
-rw-r--r-- | include/toolkit/awt/vclxaccessiblecomponent.hxx | 7 | ||||
-rw-r--r-- | include/toolkit/awt/vclxdevice.hxx | 19 | ||||
-rw-r--r-- | include/toolkit/awt/vclxgraphics.hxx | 3 | ||||
-rw-r--r-- | include/toolkit/awt/vclxprinter.hxx | 4 | ||||
-rw-r--r-- | include/toolkit/awt/vclxwindow.hxx | 8 | ||||
-rw-r--r-- | include/toolkit/controls/accessiblecontrolcontext.hxx | 3 | ||||
-rw-r--r-- | include/toolkit/helper/vclunohelper.hxx | 9 |
8 files changed, 34 insertions, 24 deletions
diff --git a/include/toolkit/awt/scrollabledialog.hxx b/include/toolkit/awt/scrollabledialog.hxx index e75fac70b0ed..70e2b32be919 100644 --- a/include/toolkit/awt/scrollabledialog.hxx +++ b/include/toolkit/awt/scrollabledialog.hxx @@ -43,8 +43,8 @@ namespace toolkit template < class T > class ScrollableWrapper : public T, public ScrollableInterface { - ScrollBar maHScrollBar; - ScrollBar maVScrollBar; + VclPtr<ScrollBar> maHScrollBar; + VclPtr<ScrollBar> maVScrollBar; Size maScrollArea; bool mbHasHoriBar; bool mbHasVertBar; @@ -59,6 +59,7 @@ namespace toolkit public: ScrollableWrapper( vcl::Window* pParent, WinBits nStyle = WB_STDDIALOG ); virtual ~ScrollableWrapper(); + virtual void dispose() SAL_OVERRIDE; virtual void SetScrollWidth( long nWidth ) SAL_OVERRIDE; virtual long GetScrollWidth() SAL_OVERRIDE { return maScrollArea.Width(); } virtual void SetScrollHeight( long nHeight ) SAL_OVERRIDE; diff --git a/include/toolkit/awt/vclxaccessiblecomponent.hxx b/include/toolkit/awt/vclxaccessiblecomponent.hxx index 62d167ba10f1..0fdc2a8f083f 100644 --- a/include/toolkit/awt/vclxaccessiblecomponent.hxx +++ b/include/toolkit/awt/vclxaccessiblecomponent.hxx @@ -33,6 +33,7 @@ #include <comphelper/accessiblecomponenthelper.hxx> #include <tools/link.hxx> +#include <vcl/vclptr.hxx> namespace vcl { class Window; } class VCLXWindow; @@ -83,7 +84,11 @@ public: virtual ~VCLXAccessibleComponent(); VCLXWindow* GetVCLXWindow() const { return mpVCLXindow; } - vcl::Window* GetWindow() const; + VclPtr<vcl::Window> GetWindow() const; + template< class derived_type > VclPtr< derived_type > GetAs() const { + return VclPtr< derived_type >( static_cast< derived_type * >( GetWindow().get() ) ); } + template< class derived_type > VclPtr< derived_type > GetAsDynamic() const { + return VclPtr< derived_type >( dynamic_cast< derived_type * >( GetWindow().get() ) ); } virtual void SAL_CALL disposing() SAL_OVERRIDE; diff --git a/include/toolkit/awt/vclxdevice.hxx b/include/toolkit/awt/vclxdevice.hxx index 61d568911b38..47a99ea1995e 100644 --- a/include/toolkit/awt/vclxdevice.hxx +++ b/include/toolkit/awt/vclxdevice.hxx @@ -27,43 +27,40 @@ #include <cppuhelper/weak.hxx> #include <osl/mutex.hxx> #include <vcl/virdev.hxx> +#include <vcl/vclptr.hxx> #include <com/sun/star/awt/XUnitConversion.hpp> class OutputDevice; class VirtualDevice; - -// class VCLXDevice - - // For using nDummy, no incompatible update, add a sal_Bool bCreatedWithToolkitMember later... #define FLAGS_CREATEDWITHTOOLKIT 0x00000001 -class TOOLKIT_DLLPUBLIC VCLXDevice : public ::com::sun::star::awt::XDevice, +/// An UNO wrapper for the VCL OutputDevice +class TOOLKIT_DLLPUBLIC VCLXDevice : + public ::com::sun::star::awt::XDevice, public ::com::sun::star::lang::XTypeProvider, public ::com::sun::star::lang::XUnoTunnel, public ::com::sun::star::awt::XUnitConversion, public ::cppu::OWeakObject { friend class VCLXGraphics; + friend class VCLXVirtualDevice; private: - OutputDevice* mpOutputDevice; + VclPtr<OutputDevice> mpOutputDevice; public: void* pDummy; sal_uInt32 nFlags; -protected: - void DestroyOutputDevice(); - public: VCLXDevice(); virtual ~VCLXDevice(); - void SetOutputDevice( OutputDevice* pOutDev ) { mpOutputDevice = pOutDev; } - OutputDevice* GetOutputDevice() const { return mpOutputDevice; } + void SetOutputDevice( const VclPtr<OutputDevice> &pOutDev ) { mpOutputDevice = pOutDev; } + VclPtr<OutputDevice> GetOutputDevice() const { return mpOutputDevice; } void SetCreatedWithToolkit( bool bCreatedWithToolkit ); diff --git a/include/toolkit/awt/vclxgraphics.hxx b/include/toolkit/awt/vclxgraphics.hxx index 627b6759f43b..89a568fe6fa9 100644 --- a/include/toolkit/awt/vclxgraphics.hxx +++ b/include/toolkit/awt/vclxgraphics.hxx @@ -31,6 +31,7 @@ #include <vcl/font.hxx> #include <tools/color.hxx> #include <vcl/vclenum.hxx> +#include <vcl/vclptr.hxx> class OutputDevice; namespace vcl { class Region; } @@ -55,7 +56,7 @@ private: // used to return same reference on each call to getDevice() ::com::sun::star::uno::Reference< ::com::sun::star::awt::XDevice> mxDevice; - OutputDevice* mpOutputDevice; + VclPtr<OutputDevice> mpOutputDevice; vcl::Font maFont; Color maTextColor; Color maTextFillColor; diff --git a/include/toolkit/awt/vclxprinter.hxx b/include/toolkit/awt/vclxprinter.hxx index 892cc4cb0839..a63f7746911d 100644 --- a/include/toolkit/awt/vclxprinter.hxx +++ b/include/toolkit/awt/vclxprinter.hxx @@ -57,11 +57,11 @@ class VCLXPrinterPropertySet :public VCLXPrinterPropertySet_Base ,public ::cppu::OPropertySetHelper { protected: - std::shared_ptr<Printer> mxPrinter; + VclPtr<Printer> mxPrinter; ::com::sun::star::uno::Reference< ::com::sun::star::awt::XDevice > mxPrnDevice; sal_Int16 mnOrientation; - bool mbHorizontal; + bool mbHorizontal; public: VCLXPrinterPropertySet( const OUString& rPrinterName ); virtual ~VCLXPrinterPropertySet(); diff --git a/include/toolkit/awt/vclxwindow.hxx b/include/toolkit/awt/vclxwindow.hxx index 6306ce6717e3..1ab1f9e8a8d2 100644 --- a/include/toolkit/awt/vclxwindow.hxx +++ b/include/toolkit/awt/vclxwindow.hxx @@ -128,8 +128,12 @@ public: VCLXWindow( bool bWithDefaultProps = false ); virtual ~VCLXWindow(); - virtual void SetWindow( vcl::Window* pWindow ); - vcl::Window* GetWindow() const { return static_cast<vcl::Window*>(GetOutputDevice()); } + virtual void SetWindow( const VclPtr< vcl::Window > &pWindow ); + template< class derived_type > VclPtr< derived_type > GetAs() const { + return VclPtr< derived_type >( static_cast< derived_type * >( GetOutputDevice().get() ) ); } + template< class derived_type > VclPtr< derived_type > GetAsDynamic() const { + return VclPtr< derived_type >( dynamic_cast< derived_type * >( GetOutputDevice().get() ) ); } + VclPtr<vcl::Window> GetWindow() const { return GetAs<vcl::Window>(); } void suspendVclEventListening( ); void resumeVclEventListening( ); diff --git a/include/toolkit/controls/accessiblecontrolcontext.hxx b/include/toolkit/controls/accessiblecontrolcontext.hxx index 78fdfe7cc4d8..b991b80793f3 100644 --- a/include/toolkit/controls/accessiblecontrolcontext.hxx +++ b/include/toolkit/controls/accessiblecontrolcontext.hxx @@ -26,6 +26,7 @@ #include <com/sun/star/lang/XEventListener.hpp> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/awt/XWindow.hpp> +#include <vcl/vclptr.hxx> namespace vcl { class Window; } @@ -116,7 +117,7 @@ namespace toolkit // stops listening at the control model void stopModelListening( ); - vcl::Window* implGetWindow( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >* _pxUNOWindow = NULL ) const; + VclPtr< vcl::Window > implGetWindow( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >* _pxUNOWindow = NULL ) const; }; diff --git a/include/toolkit/helper/vclunohelper.hxx b/include/toolkit/helper/vclunohelper.hxx index dc1ae888476f..c902e5c9155c 100644 --- a/include/toolkit/helper/vclunohelper.hxx +++ b/include/toolkit/helper/vclunohelper.hxx @@ -56,11 +56,12 @@ namespace com { namespace sun { namespace star { namespace awt { #include <vcl/bitmapex.hxx> #include <vcl/region.hxx> #include <vcl/metric.hxx> +#include <vcl/vclptr.hxx> +#include <vcl/window.hxx> #include <tools/mapunit.hxx> #include <tools/fldunit.hxx> #include <tools/poly.hxx> -namespace vcl { class Window; } class OutputDevice; class MouseEvent; class KeyEvent; @@ -79,9 +80,9 @@ public: static ::com::sun::star::uno::Reference< ::com::sun::star::awt::XBitmap> CreateBitmap( const BitmapEx& rBitmap ); // Window - static vcl::Window* GetWindow( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow>& rxWindow ); - static vcl::Window* GetWindow( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow2>& rxWindow2 ); - static vcl::Window* GetWindow( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer>& rxWindowPeer ); + static VclPtr< vcl::Window > GetWindow( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow>& rxWindow ); + static VclPtr< vcl::Window > GetWindow( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow2>& rxWindow2 ); + static VclPtr< vcl::Window > GetWindow( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer>& rxWindowPeer ); static ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow> GetInterface( vcl::Window* pWindow ); // OutputDevice |