basctl/source/basicide/basidesh.cxx | 9 ++++-- basctl/source/basicide/bastype2.hxx | 8 ++++- basctl/source/basicide/breakpoint.hxx | 9 +++++- basctl/source/basicide/layout.hxx | 2 - basctl/source/basicide/moduldl2.cxx | 12 ++++++-- basctl/source/basicide/moduldlg.hxx | 8 ++--- basctl/source/basicide/objdlg.hxx | 4 +- basctl/source/basicide/scriptdocument.cxx | 11 +++++--- basctl/source/basicide/unomodel.hxx | 2 - basegfx/source/workbench/convexhull.cxx | 2 - basic/qa/cppunit/basictest.hxx | 9 +++--- svx/source/unodraw/recoveryui.cxx | 4 +- vcl/inc/unx/gtk/gtkgdi.hxx | 1 vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx | 35 +++++++++++++++++++++++--- 14 files changed, 84 insertions(+), 32 deletions(-)
New commits: commit ac5368bf67192fc9f1c4633b20b15f4d8847f5e2 Author: Caolán McNamara <caol...@redhat.com> Date: Mon May 18 17:12:26 2015 +0100 VclPtr: fix recovery dialogs asserts on exit Change-Id: I3f3fcd13cbcf86eb431d499d3394a313dbdf7e47 diff --git a/svx/source/unodraw/recoveryui.cxx b/svx/source/unodraw/recoveryui.cxx index 614fcef..ba9b5c8 100644 --- a/svx/source/unodraw/recoveryui.cxx +++ b/svx/source/unodraw/recoveryui.cxx @@ -245,7 +245,7 @@ bool RecoveryUI::impl_doEmergencySave() css::uno::Reference< css::frame::XStatusListener > xCore(pCore); // create dialog for this operation and bind it to the used core service - VclPtrInstance<svxdr::SaveDialog> xDialog(m_pParentWindow, pCore); + ScopedVclPtrInstance<svxdr::SaveDialog> xDialog(m_pParentWindow, pCore); // start the dialog short nRet = xDialog->Execute(); @@ -260,7 +260,7 @@ void RecoveryUI::impl_doRecovery() // create all needed dialogs for this operation // and bind it to the used core service - VclPtrInstance<svxdr::RecoveryDialog> xDialog(m_pParentWindow, pCore); + ScopedVclPtrInstance<svxdr::RecoveryDialog> xDialog(m_pParentWindow, pCore); // start the dialog xDialog->Execute(); commit c8956a1eb4c2297685e85df4be3efa176acbc929 Author: Caolán McNamara <caol...@redhat.com> Date: Mon May 18 17:07:09 2015 +0100 gtk3: implement tree header bar area Change-Id: I9f4ef42eb35524714a170e9f4a4d5ef13e198efd diff --git a/vcl/inc/unx/gtk/gtkgdi.hxx b/vcl/inc/unx/gtk/gtkgdi.hxx index c89116b..087ad54 100644 --- a/vcl/inc/unx/gtk/gtkgdi.hxx +++ b/vcl/inc/unx/gtk/gtkgdi.hxx @@ -88,6 +88,7 @@ private: static GtkStyleContext *mpFrameOutStyle; static GtkStyleContext *mpFixedHoriLineStyle; static GtkStyleContext *mpFixedVertLineStyle; + static GtkStyleContext *mpTreeHeaderButtonStyle; static Rectangle NWGetScrollButtonRect( ControlPart nPart, Rectangle aAreaRect ); static Rectangle NWGetSpinButtonRect( ControlPart nPart, Rectangle aAreaRect); diff --git a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx index 6e12ca2..c64aa6e 100644 --- a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx @@ -44,6 +44,7 @@ GtkStyleContext* GtkSalGraphics::mpFrameInStyle = NULL; GtkStyleContext* GtkSalGraphics::mpFrameOutStyle = NULL; GtkStyleContext* GtkSalGraphics::mpFixedHoriLineStyle = NULL; GtkStyleContext* GtkSalGraphics::mpFixedVertLineStyle = NULL; +GtkStyleContext* GtkSalGraphics::mpTreeHeaderButtonStyle = NULL; bool GtkSalGraphics::style_loaded = false; /************************************************************************ @@ -814,6 +815,7 @@ static GtkWidget* gFrameIn; static GtkWidget* gFrameOut; static GtkWidget* gMenuBarWidget; static GtkWidget* gMenuItemMenuBarWidget; +static GtkWidget* gTreeViewWidget; bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, ControlState nState, const ImplControlValue& rValue, @@ -987,6 +989,10 @@ bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, co case CTRL_FIXEDLINE: context = nPart == PART_SEPARATOR_HORZ ? mpFixedHoriLineStyle : mpFixedVertLineStyle; renderType = RENDER_SEPERATOR; + break; + case CTRL_LISTHEADER: + context = mpTreeHeaderButtonStyle; + break; default: return false; } @@ -1789,10 +1795,10 @@ bool GtkSalGraphics::IsNativeControlSupported( ControlType nType, ControlPart nP return true; break; -// case CTRL_LISTHEADER: -// if(nPart == PART_BUTTON || nPart == PART_ARROW) -// return true; -// break; + case CTRL_LISTHEADER: + if (nPart == PART_BUTTON /*|| nPart == PART_ARROW*/) + return true; + break; } printf( "Unhandled is native supported for Type: %d, Part %d\n", @@ -1984,6 +1990,27 @@ GtkSalGraphics::GtkSalGraphics( GtkSalFrame *pFrame, GtkWidget *pWindow ) getStyleContext(&mpFixedHoriLineStyle, gtk_separator_new(GTK_ORIENTATION_HORIZONTAL)); getStyleContext(&mpFixedVertLineStyle, gtk_separator_new(GTK_ORIENTATION_VERTICAL)); + + /* Tree List */ + gTreeViewWidget = gtk_tree_view_new(); + gtk_container_add(GTK_CONTAINER(gDumbContainer), gTreeViewWidget); + + GtkTreeViewColumn* firstTreeViewColumn = gtk_tree_view_column_new(); + gtk_tree_view_column_set_title(firstTreeViewColumn, "M"); + gtk_tree_view_append_column(GTK_TREE_VIEW(gTreeViewWidget), firstTreeViewColumn); + + GtkTreeViewColumn* middleTreeViewColumn = gtk_tree_view_column_new(); + gtk_tree_view_column_set_title(middleTreeViewColumn, "M"); + gtk_tree_view_append_column(GTK_TREE_VIEW(gTreeViewWidget), middleTreeViewColumn); + + GtkTreeViewColumn* lastTreeViewColumn = gtk_tree_view_column_new(); + gtk_tree_view_column_set_title(lastTreeViewColumn, "M"); + gtk_tree_view_append_column(GTK_TREE_VIEW(gTreeViewWidget), lastTreeViewColumn); + + /* Use the middle column's header for our button */ + GtkWidget* pTreeHeaderCellWidget = gtk_tree_view_column_get_button(middleTreeViewColumn); + mpTreeHeaderButtonStyle = gtk_widget_get_style_context(pTreeHeaderCellWidget); + gtk_widget_show_all(gDumbContainer); } commit 4b5091cfd768360a7de3d416de670dfcdeb36990 Author: Caolán McNamara <caol...@redhat.com> Date: Mon May 18 16:42:39 2015 +0100 cppunit: noExplicitConstructor Change-Id: Iaf1387ea236bf3a5db9b2165d5b827dbdcf95207 diff --git a/basctl/source/basicide/basidesh.cxx b/basctl/source/basicide/basidesh.cxx index b427e2c..e337fdf 100644 --- a/basctl/source/basicide/basidesh.cxx +++ b/basctl/source/basicide/basidesh.cxx @@ -68,11 +68,14 @@ class ContainerListenerImpl : public ContainerListenerBASE { Shell* mpShell; public: - - ContainerListenerImpl (Shell* pShell) : mpShell(pShell) { } + explicit ContainerListenerImpl(Shell* pShell) + : mpShell(pShell) + { + } virtual ~ContainerListenerImpl() - { } + { + } void addContainerListener( const ScriptDocument& rScriptDocument, const OUString& aLibName ) { diff --git a/basctl/source/basicide/bastype2.hxx b/basctl/source/basicide/bastype2.hxx index bf270e2..c0f02b4 100644 --- a/basctl/source/basicide/bastype2.hxx +++ b/basctl/source/basicide/bastype2.hxx @@ -62,8 +62,12 @@ private: EntryType m_eType; public: - Entry (EntryType eType) : m_eType(eType) { } - virtual ~Entry (); + explicit Entry(EntryType eType) + : m_eType(eType) + { + } + + virtual ~Entry(); EntryType GetType () const { return m_eType; } }; diff --git a/basctl/source/basicide/breakpoint.hxx b/basctl/source/basicide/breakpoint.hxx index 847f073..5d1981b 100644 --- a/basctl/source/basicide/breakpoint.hxx +++ b/basctl/source/basicide/breakpoint.hxx @@ -38,7 +38,14 @@ struct BreakPoint size_t nStopAfter; size_t nHitCount; - BreakPoint(size_t nL) { nLine = nL; nStopAfter = 0; nHitCount = 0; bEnabled = true; bTemp = false; } + explicit BreakPoint(size_t nL) + : bEnabled(true) + , bTemp(false) + , nLine(nL) + , nStopAfter(0) + , nHitCount(0) + { + } }; class BreakPointList diff --git a/basctl/source/basicide/layout.hxx b/basctl/source/basicide/layout.hxx index 51e2ffd..3400866 100644 --- a/basctl/source/basicide/layout.hxx +++ b/basctl/source/basicide/layout.hxx @@ -54,7 +54,7 @@ public: virtual void dispose() SAL_OVERRIDE; protected: - Layout (vcl::Window* pParent); + explicit Layout(vcl::Window* pParent); void AddToLeft (DockingWindow* pWin, Size const& rSize) { aLeftSide.Add(pWin, rSize); } void AddToBottom (DockingWindow* pWin, Size const& rSize) { aBottomSide.Add(pWin, rSize); } diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx index 012419c..b8f68ee 100644 --- a/basctl/source/basicide/moduldl2.cxx +++ b/basctl/source/basicide/moduldl2.cxx @@ -74,7 +74,10 @@ class DummyInteractionHandler : public HandlerImpl_BASE { Reference< task::XInteractionHandler2 > m_xHandler; public: - DummyInteractionHandler( const Reference< task::XInteractionHandler2 >& xHandler ) : m_xHandler( xHandler ){} + explicit DummyInteractionHandler(const Reference<task::XInteractionHandler2>& xHandler) + : m_xHandler(xHandler) + { + } virtual void SAL_CALL handle( const Reference< task::XInteractionRequest >& rRequest ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE { @@ -94,7 +97,10 @@ private: ScriptDocument m_aDocument; public: - LibUserData (ScriptDocument const& rDocument) : m_aDocument(rDocument) { } + explicit LibUserData(ScriptDocument const& rDocument) + : m_aDocument(rDocument) + { + } virtual ~LibUserData() {}; const ScriptDocument& GetDocument() const { return m_aDocument; } @@ -1166,7 +1172,7 @@ class OLibCommandEnvironment : public LibCommandEnvironmentHelper Reference< task::XInteractionHandler > mxInteraction; public: - OLibCommandEnvironment( Reference< task::XInteractionHandler > xInteraction ) + explicit OLibCommandEnvironment(const Reference<task::XInteractionHandler>& xInteraction) : mxInteraction( xInteraction ) {} diff --git a/basctl/source/basicide/moduldlg.hxx b/basctl/source/basicide/moduldlg.hxx index 5b590bd..ac7c564 100644 --- a/basctl/source/basicide/moduldlg.hxx +++ b/basctl/source/basicide/moduldlg.hxx @@ -70,7 +70,7 @@ class GotoLineDialog : public ModalDialog VclPtr<OKButton> m_pOKButton; DECL_LINK(OkButtonHandler, void *); public: - GotoLineDialog(vcl::Window * pParent); + explicit GotoLineDialog(vcl::Window * pParent); virtual ~GotoLineDialog(); virtual void dispose() SAL_OVERRIDE; sal_Int32 GetLineNumber() const; @@ -87,7 +87,7 @@ private: DECL_LINK(OkButtonHandler, void *); public: - ExportDialog( vcl::Window * pParent ); + explicit ExportDialog( vcl::Window * pParent ); virtual ~ExportDialog(); virtual void dispose() SAL_OVERRIDE; @@ -153,7 +153,7 @@ private: VclPtr< ::CheckBox> m_pReplaceBox; public: - LibDialog( vcl::Window* pParent ); + explicit LibDialog(vcl::Window* pParent); virtual ~LibDialog(); virtual void dispose() SAL_OVERRIDE; @@ -255,7 +255,7 @@ protected: VclPtr<TabDialog> pTabDlg; public: - LibPage( vcl::Window* pParent ); + explicit LibPage(vcl::Window* pParent); virtual ~LibPage(); virtual void dispose() SAL_OVERRIDE; diff --git a/basctl/source/basicide/objdlg.hxx b/basctl/source/basicide/objdlg.hxx index 1ce7389..eee31c2 100644 --- a/basctl/source/basicide/objdlg.hxx +++ b/basctl/source/basicide/objdlg.hxx @@ -35,8 +35,8 @@ namespace basctl class ObjectCatalog : public DockingWindow { public: - ObjectCatalog (vcl::Window* pParent); - virtual ~ObjectCatalog (); + explicit ObjectCatalog(vcl::Window* pParent); + virtual ~ObjectCatalog(); virtual void dispose() SAL_OVERRIDE; public: void UpdateEntries () { aTree->UpdateEntries(); } diff --git a/basctl/source/basicide/scriptdocument.cxx b/basctl/source/basicide/scriptdocument.cxx index f777ad9..b318aa9 100644 --- a/basctl/source/basicide/scriptdocument.cxx +++ b/basctl/source/basicide/scriptdocument.cxx @@ -123,7 +123,10 @@ namespace basctl class FilterDocuments : public docs::IDocumentDescriptorFilter { public: - FilterDocuments( bool _bFilterInvisible ) : m_bFilterInvisible( _bFilterInvisible ) { } + explicit FilterDocuments(bool _bFilterInvisible) + : m_bFilterInvisible(_bFilterInvisible) + { + } virtual ~FilterDocuments() {} @@ -193,8 +196,8 @@ namespace basctl public: Impl (); - Impl (Reference<XModel> const& rxDocument); - virtual ~Impl (); + explicit Impl(Reference<XModel> const& rxDocument); + virtual ~Impl(); /** determines whether the instance refers to a valid "document" with script and dialog libraries @@ -1128,7 +1131,7 @@ namespace basctl { struct DocumentTitleLess : public ::std::binary_function< ScriptDocument, ScriptDocument, bool > { - DocumentTitleLess( const CollatorWrapper& _rCollator ) + explicit DocumentTitleLess( const CollatorWrapper& _rCollator ) :m_aCollator( _rCollator ) { } diff --git a/basctl/source/basicide/unomodel.hxx b/basctl/source/basicide/unomodel.hxx index acd21ac..cd614e5 100644 --- a/basctl/source/basicide/unomodel.hxx +++ b/basctl/source/basicide/unomodel.hxx @@ -30,7 +30,7 @@ class SIDEModel : public SfxBaseModel, { static void notImplemented() throw ( ::com::sun::star::io::IOException ); public: - SIDEModel( SfxObjectShell *pObjSh = 0 ); + explicit SIDEModel(SfxObjectShell *pObjSh = 0); virtual ~SIDEModel(); //XInterface diff --git a/basegfx/source/workbench/convexhull.cxx b/basegfx/source/workbench/convexhull.cxx index 5c40efd..e94c2d7 100644 --- a/basegfx/source/workbench/convexhull.cxx +++ b/basegfx/source/workbench/convexhull.cxx @@ -46,7 +46,7 @@ template <class PointType> double theta( const PointType& p1, const PointType& p template <class PointType> class ThetaCompare : public ::std::binary_function< const PointType&, const PointType&, bool > { public: - ThetaCompare( const PointType& rRefPoint ) : maRefPoint( rRefPoint ) {} + explicit ThetaCompare( const PointType& rRefPoint ) : maRefPoint( rRefPoint ) {} bool operator() ( const PointType& p1, const PointType& p2 ) { diff --git a/basic/qa/cppunit/basictest.hxx b/basic/qa/cppunit/basictest.hxx index c866de0..0d9c378 100644 --- a/basic/qa/cppunit/basictest.hxx +++ b/basic/qa/cppunit/basictest.hxx @@ -46,17 +46,18 @@ class MacroSnippet int nLine; int nCol; ErrorDetail() : nLine(0), nCol(0) {} - }; + } - MacroSnippet( const OUString& sSource ) : mbError(false) + explicit MacroSnippet(const OUString& sSource) + : mbError(false) { InitSnippet(); MakeModule( sSource ); - }; + } MacroSnippet() : mbError(false) { InitSnippet(); - }; + } void LoadSourceFromFile( const OUString& sMacroFileURL ) { OUString sSource;
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits