dbaccess/source/core/api/BookmarkSet.hxx | 2 dbaccess/source/core/api/CacheSet.hxx | 2 dbaccess/source/core/api/FilteredContainer.cxx | 4 dbaccess/source/core/api/OptimisticSet.cxx | 4 dbaccess/source/core/api/PrivateRow.hxx | 2 dbaccess/source/core/api/RowSet.hxx | 2 dbaccess/source/core/api/RowSetBase.hxx | 2 dbaccess/source/core/api/RowSetRow.hxx | 4 dbaccess/source/core/api/StaticSet.hxx | 2 dbaccess/source/core/api/WrappedResultSet.hxx | 2 dbaccess/source/core/api/query.hxx | 2 dbaccess/source/core/api/querydescriptor.hxx | 2 dbaccess/source/core/dataaccess/ComponentDefinition.cxx | 2 dbaccess/source/core/dataaccess/ModelImpl.cxx | 2 dbaccess/source/core/dataaccess/ModelImpl.hxx | 8 sw/uiconfig/swriter/ui/inserttable.ui | 7 vcl/inc/unx/gtk/gtkgdi.hxx | 4 vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx | 150 +++++++--------- 18 files changed, 100 insertions(+), 103 deletions(-)
New commits: commit 3cb7db75ace1f69d0e03685a8959714424366f13 Author: Caolán McNamara <caol...@redhat.com> Date: Mon Jun 22 12:44:04 2015 +0100 gtk3: native render the comically oversized gtk3 spinbuttons Change-Id: I3e97200d59a97271617a6e9a88c807a07a33edfe diff --git a/dbaccess/source/core/api/StaticSet.hxx b/dbaccess/source/core/api/StaticSet.hxx index c8b9d4b..1a07d79 100644 --- a/dbaccess/source/core/api/StaticSet.hxx +++ b/dbaccess/source/core/api/StaticSet.hxx @@ -34,7 +34,7 @@ namespace dbaccess bool fetchRow(); void fillAllRows(); public: - OStaticSet(sal_Int32 i_nMaxRows) : OCacheSet(i_nMaxRows) + explicit OStaticSet(sal_Int32 i_nMaxRows) : OCacheSet(i_nMaxRows) , m_aSetIter(m_aSet.end()) , m_bEnd(false) { diff --git a/dbaccess/source/core/api/WrappedResultSet.hxx b/dbaccess/source/core/api/WrappedResultSet.hxx index 1c77944..870cfe6 100644 --- a/dbaccess/source/core/api/WrappedResultSet.hxx +++ b/dbaccess/source/core/api/WrappedResultSet.hxx @@ -35,7 +35,7 @@ namespace dbaccess void updateColumn(sal_Int32 nPos,::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowUpdate > _xParameter,const connectivity::ORowSetValue& _rValue); public: - WrappedResultSet(sal_Int32 i_nMaxRows) : OCacheSet(i_nMaxRows) + explicit WrappedResultSet(sal_Int32 i_nMaxRows) : OCacheSet(i_nMaxRows) {} virtual ~WrappedResultSet() { diff --git a/vcl/inc/unx/gtk/gtkgdi.hxx b/vcl/inc/unx/gtk/gtkgdi.hxx index 9b130ab..0d02188 100644 --- a/vcl/inc/unx/gtk/gtkgdi.hxx +++ b/vcl/inc/unx/gtk/gtkgdi.hxx @@ -101,13 +101,13 @@ private: ControlType nType, ControlPart nPart, const ImplControlValue& aValue ); - static void PaintOneSpinButton( GtkStyleContext *context, + void PaintOneSpinButton( GtkStyleContext *context, cairo_t *cr, ControlType nType, ControlPart nPart, Rectangle aAreaRect, ControlState nState ); - static void PaintSpinButton(GtkStyleContext *context, + void PaintSpinButton(GtkStyleContext *context, cairo_t *cr, const Rectangle& rControlRectangle, ControlType nType, diff --git a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx index cacf348..a0afcd6 100644 --- a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx @@ -57,7 +57,9 @@ static void NWConvertVCLStateToGTKState( ControlState nVCLState, *nGTKState = GTK_STATE_FLAG_NORMAL; if (!( nVCLState & ControlState::ENABLED )) + { *nGTKState = GTK_STATE_FLAG_INSENSITIVE; + } if ( nVCLState & ControlState::PRESSED ) { @@ -66,7 +68,9 @@ static void NWConvertVCLStateToGTKState( ControlState nVCLState, } if ( nVCLState & ControlState::ROLLOVER ) + { *nGTKState = (GtkStateFlags) (*nGTKState | GTK_STATE_FLAG_PRELIGHT); + } if ( nVCLState & ControlState::SELECTED ) *nGTKState = (GtkStateFlags) (*nGTKState | GTK_STATE_FLAG_SELECTED); @@ -105,40 +109,40 @@ static void NWCalcArrowRect( const Rectangle& rButton, Rectangle& rArrow ) ) ); } -#define MIN_SPIN_ARROW_WIDTH 6 - Rectangle GtkSalGraphics::NWGetSpinButtonRect( ControlPart nPart, Rectangle aAreaRect) { - gint buttonSize; - Rectangle buttonRect; - const PangoFontDescription *fontDesc; - GtkBorder padding; - gtk_style_context_save(mpSpinStyle); gtk_style_context_add_class(mpSpinStyle, GTK_STYLE_CLASS_BUTTON); - fontDesc = gtk_style_context_get_font( mpSpinStyle, GTK_STATE_FLAG_NORMAL); + gint w, h; + gtk_icon_size_lookup (GTK_ICON_SIZE_MENU, &w, &h); + gint icon_size = std::max(w, h); + + GtkBorder padding, border; gtk_style_context_get_padding(mpSpinStyle, GTK_STATE_FLAG_NORMAL, &padding); + gtk_style_context_get_border(mpSpinStyle, GTK_STATE_FLAG_NORMAL, &border); + + gint buttonWidth = icon_size + padding.left + padding.right + + border.left + border.right; + + gint buttonHeight = icon_size + padding.top + padding.bottom + + border.top + border.bottom; - buttonSize = MAX( PANGO_PIXELS(pango_font_description_get_size(fontDesc) ), - MIN_SPIN_ARROW_WIDTH ); - buttonSize -= buttonSize % 2 - 1; /* force odd */ - buttonRect.SetSize( Size( buttonSize + padding.left + padding.right, - buttonRect.GetHeight() ) ); - buttonRect.setX( aAreaRect.Left() + (aAreaRect.GetWidth() - buttonRect.GetWidth()) ); + Rectangle buttonRect; + buttonRect.SetSize(Size(buttonWidth, buttonHeight)); + buttonRect.setY(aAreaRect.Top()); + buttonRect.Bottom() = buttonRect.Top() + aAreaRect.GetHeight(); if ( nPart == PART_BUTTON_UP ) { - buttonRect.setY( aAreaRect.Top() ); - buttonRect.Bottom() = buttonRect.Top() + (aAreaRect.GetHeight() / 2); + buttonRect.setX(aAreaRect.Left() + (aAreaRect.GetWidth() - 2*buttonRect.GetWidth())); } else if( nPart == PART_BUTTON_DOWN ) { - buttonRect.setY( aAreaRect.Top() + (aAreaRect.GetHeight() / 2) ); - buttonRect.Bottom() = aAreaRect.Bottom(); // cover area completely + buttonRect.setX(aAreaRect.Left() + (aAreaRect.GetWidth() - buttonRect.GetWidth())); } else { - buttonRect.Right() = buttonRect.Left()-1; + buttonRect.Right() = (aAreaRect.Left() + (aAreaRect.GetWidth() - 2*buttonRect.GetWidth()))-1; buttonRect.Left() = aAreaRect.Left(); buttonRect.Top() = aAreaRect.Top(); buttonRect.Bottom() = aAreaRect.Bottom(); @@ -549,9 +553,7 @@ void GtkSalGraphics::PaintOneSpinButton( GtkStyleContext *context, Rectangle buttonRect; GtkStateFlags stateFlags; GtkShadowType shadowType; - Rectangle arrowRect; - gint arrowSize; - GtkBorder padding; + GtkBorder padding, border; NWConvertVCLStateToGTKState( nState, &stateFlags, &shadowType ); buttonRect = NWGetSpinButtonRect( nPart, aAreaRect ); @@ -561,27 +563,39 @@ void GtkSalGraphics::PaintOneSpinButton( GtkStyleContext *context, gtk_style_context_add_class(context, GTK_STYLE_CLASS_BUTTON); gtk_style_context_get_padding(context, GTK_STATE_FLAG_NORMAL, &padding); + gtk_style_context_get_border(context, GTK_STATE_FLAG_NORMAL, &border); gtk_render_background(context, cr, - (buttonRect.Left() - aAreaRect.Left()), (buttonRect.Top() - aAreaRect.Top()), + buttonRect.Left(), buttonRect.Top(), buttonRect.GetWidth(), buttonRect.GetHeight() ); gtk_render_frame(context, cr, - (buttonRect.Left() - aAreaRect.Left()), (buttonRect.Top() - aAreaRect.Top()), + buttonRect.Left(), buttonRect.Top(), buttonRect.GetWidth(), buttonRect.GetHeight() ); - arrowSize = (gint) floor((buttonRect.GetWidth() - padding.left - padding.right) * 0.45); - arrowSize -= arrowSize % 2 - 1; /* force odd */ - arrowRect.SetSize( Size( arrowSize, arrowSize ) ); + gint iconWidth = (buttonRect.GetWidth() - padding.left - padding.right - border.left - border.right); + gint iconHeight = (buttonRect.GetHeight() - padding.top - padding.bottom - border.top - border.bottom); + + const char* icon = (nPart == PART_BUTTON_UP) ? "list-add-symbolic" : "list-remove-symbolic"; + GtkIconTheme *pIconTheme = gtk_icon_theme_get_for_screen(gtk_widget_get_screen(mpWindow)); + + GtkIconInfo *info = gtk_icon_theme_lookup_icon(pIconTheme, icon, std::min(iconWidth, iconHeight), + static_cast<GtkIconLookupFlags>(0)); + + GdkPixbuf *pixbuf = gtk_icon_info_load_symbolic_for_context + (info, + context, + NULL, + NULL); + iconWidth = gdk_pixbuf_get_width(pixbuf); + iconHeight = gdk_pixbuf_get_height(pixbuf); + Rectangle arrowRect; + arrowRect.SetSize(Size(iconWidth, iconHeight)); arrowRect.setX( buttonRect.Left() + (buttonRect.GetWidth() - arrowRect.GetWidth()) / 2 ); - if ( nPart == PART_BUTTON_UP ) - arrowRect.setY( buttonRect.Top() + (buttonRect.GetHeight() - arrowRect.GetHeight()) / 2 + 1); - else - arrowRect.setY( buttonRect.Top() + (buttonRect.GetHeight() - arrowRect.GetHeight()) / 2 - 1); + arrowRect.setY( buttonRect.Top() + (buttonRect.GetHeight() - arrowRect.GetHeight()) / 2 ); - gtk_render_arrow(context, cr, - (nPart == PART_BUTTON_UP) ? 0 : G_PI, - (arrowRect.Left() - aAreaRect.Left()), (arrowRect.Top() - aAreaRect.Top()), - arrowSize); + gtk_render_icon(context, cr, pixbuf, arrowRect.Left(), arrowRect.Top()); + g_object_unref(pixbuf); + gtk_icon_info_free(info); gtk_style_context_restore(context); } @@ -590,17 +604,15 @@ void GtkSalGraphics::PaintSpinButton(GtkStyleContext *context, cairo_t *cr, const Rectangle& rControlRectangle, ControlType nType, - ControlPart nPart, + ControlPart /*nPart*/, const ImplControlValue& rValue ) { - (void)nPart; Rectangle areaRect; - GtkShadowType shadowType; - const SpinbuttonValue * pSpinVal = (rValue.getType() == CTRL_SPINBUTTONS) ? static_cast<const SpinbuttonValue *>(&rValue) : NULL; - ControlPart upBtnPart = PART_BUTTON_UP; - ControlState upBtnState = ControlState::ENABLED; - ControlPart downBtnPart = PART_BUTTON_DOWN; - ControlState downBtnState = ControlState::ENABLED; + const SpinbuttonValue *pSpinVal = (rValue.getType() == CTRL_SPINBUTTONS) ? static_cast<const SpinbuttonValue *>(&rValue) : NULL; + ControlPart upBtnPart = PART_BUTTON_UP; + ControlState upBtnState = ControlState::NONE; + ControlPart downBtnPart = PART_BUTTON_DOWN; + ControlState downBtnState = ControlState::NONE; if ( pSpinVal ) { @@ -611,33 +623,21 @@ void GtkSalGraphics::PaintSpinButton(GtkStyleContext *context, downBtnState = pSpinVal->mnLowerState; } + areaRect = rControlRectangle; + + gtk_render_background(context, cr, + 0, 0, + areaRect.GetWidth(), areaRect.GetHeight() ); + gtk_render_frame(context, cr, + 0, 0, + areaRect.GetWidth(), areaRect.GetHeight() ); + // CTRL_SPINBUTTONS pass their area in pSpinVal, not in rControlRectangle - if ( nType == CTRL_SPINBUTTONS ) + if (pSpinVal) { - if ( !pSpinVal ) - { - SAL_WARN( "vcl.gtk", "Tried to draw CTRL_SPINBUTTONS, but the SpinButtons data structure didn't exist!" ); - return; - } areaRect = pSpinVal->maUpperRect; areaRect.Union( pSpinVal->maLowerRect ); } - else - areaRect = rControlRectangle; - - gtk_style_context_get_style( context, - "shadow-type", &shadowType, - NULL ); - - if ( shadowType != GTK_SHADOW_NONE ) - { - gtk_render_background(context, cr, - 0, 0, - areaRect.GetWidth(), areaRect.GetHeight() ); - gtk_render_frame(context, cr, - 0, 0, - areaRect.GetWidth(), areaRect.GetHeight() ); - } PaintOneSpinButton(context, cr, nType, upBtnPart, areaRect, upBtnState ); PaintOneSpinButton(context, cr, nType, downBtnPart, areaRect, downBtnState ); @@ -849,13 +849,9 @@ bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, co switch(nType) { case CTRL_SPINBOX: - switch (nPart) - { - case PART_ENTIRE_CONTROL: - context = mpSpinStyle; - renderType = RENDER_SPINBUTTON; - break; - } + case CTRL_SPINBUTTONS: + context = mpSpinStyle; + renderType = RENDER_SPINBUTTON; break; case CTRL_EDITBOX: context = mpEntryStyle; @@ -1821,14 +1817,14 @@ bool GtkSalGraphics::IsNativeControlSupported( ControlType nType, ControlPart nP break; case CTRL_SPINBOX: - if(nPart==PART_ENTIRE_CONTROL || nPart==PART_ALL_BUTTONS || nPart==HAS_BACKGROUND_TEXTURE) + if (nPart==PART_ENTIRE_CONTROL || nPart==HAS_BACKGROUND_TEXTURE || nPart == PART_ALL_BUTTONS || nPart == PART_BUTTON_UP || nPart == PART_BUTTON_DOWN) return true; break; -// case CTRL_SPINBUTTONS: -// if(nPart==PART_ENTIRE_CONTROL || nPart==PART_ALL_BUTTONS) -// return true; -// break; + case CTRL_SPINBUTTONS: + if (nPart==PART_ENTIRE_CONTROL || nPart==PART_ALL_BUTTONS) + return true; + break; case CTRL_FRAME: case CTRL_WINDOW_BACKGROUND: commit c23cd790940e2f821b51ea07058be6e4a2938482 Author: Caolán McNamara <caol...@redhat.com> Date: Mon Jun 22 15:45:51 2015 +0100 let the gtkentry here expand horizontally if the dialog does Change-Id: I6931879c541f56c0ea8125a434bcd74fba8791f8 diff --git a/sw/uiconfig/swriter/ui/inserttable.ui b/sw/uiconfig/swriter/ui/inserttable.ui index c8b581e..b0f6ffb 100644 --- a/sw/uiconfig/swriter/ui/inserttable.ui +++ b/sw/uiconfig/swriter/ui/inserttable.ui @@ -107,6 +107,7 @@ <object class="GtkEntry" id="nameedit"> <property name="visible">True</property> <property name="can_focus">True</property> + <property name="hexpand">True</property> <property name="shadow_type">out</property> </object> <packing> @@ -119,10 +120,10 @@ <object class="GtkLabel" id="label3"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="xalign">0</property> <property name="label" translatable="yes">_Name:</property> <property name="use_underline">True</property> <property name="mnemonic_widget">nameedit</property> + <property name="xalign">0</property> </object> <packing> <property name="left_attach">0</property> @@ -133,10 +134,10 @@ <object class="GtkLabel" id="3"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="xalign">0</property> <property name="label" translatable="yes">_Columns:</property> <property name="use_underline">True</property> <property name="mnemonic_widget">colspin</property> + <property name="xalign">0</property> </object> <packing> <property name="left_attach">0</property> @@ -162,10 +163,10 @@ <object class="GtkLabel" id="4"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="xalign">1</property> <property name="label" translatable="yes">_Rows:</property> <property name="use_underline">True</property> <property name="mnemonic_widget">rowspin</property> + <property name="xalign">1</property> </object> <packing> <property name="left_attach">2</property> commit 90134af864d46e45ae4a1c9836ef6f83d7dbbfd2 Author: Caolán McNamara <caol...@redhat.com> Date: Mon Jun 22 15:44:52 2015 +0100 cppcheck: noExplicitConstructor Change-Id: I913f983bb0f55e05bb5ec8994ee75a7e7d69bd1b diff --git a/dbaccess/source/core/api/BookmarkSet.hxx b/dbaccess/source/core/api/BookmarkSet.hxx index 2f86adc..70667a9 100644 --- a/dbaccess/source/core/api/BookmarkSet.hxx +++ b/dbaccess/source/core/api/BookmarkSet.hxx @@ -32,7 +32,7 @@ namespace dbaccess void updateColumn(sal_Int32 nPos,::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowUpdate > _xParameter,const connectivity::ORowSetValue& _rValue); public: - OBookmarkSet(sal_Int32 i_nMaxRows) : OCacheSet(i_nMaxRows) + explicit OBookmarkSet(sal_Int32 i_nMaxRows) : OCacheSet(i_nMaxRows) {} virtual ~OBookmarkSet() { diff --git a/dbaccess/source/core/api/CacheSet.hxx b/dbaccess/source/core/api/CacheSet.hxx index ad6293a..f6269e0 100644 --- a/dbaccess/source/core/api/CacheSet.hxx +++ b/dbaccess/source/core/api/CacheSet.hxx @@ -55,7 +55,7 @@ namespace dbaccess bool m_bDeleted; OUString m_sRowSetFilter; - OCacheSet(sal_Int32 i_nMaxRows); + explicit OCacheSet(sal_Int32 i_nMaxRows); virtual ~OCacheSet(); static void setParameter(sal_Int32 nPos diff --git a/dbaccess/source/core/api/FilteredContainer.cxx b/dbaccess/source/core/api/FilteredContainer.cxx index 4002ce9..f0843db 100644 --- a/dbaccess/source/core/api/FilteredContainer.cxx +++ b/dbaccess/source/core/api/FilteredContainer.cxx @@ -103,8 +103,8 @@ sal_Int32 createWildCardVector(Sequence< OUString >& _rTableFilter, ::std::vecto OptionalString sSchema; OptionalString sName; - TableInfo( const OUString& _composedName ) - :sComposedName( _composedName ) + explicit TableInfo( const OUString& _composedName ) + : sComposedName( _composedName ) { } diff --git a/dbaccess/source/core/api/OptimisticSet.cxx b/dbaccess/source/core/api/OptimisticSet.cxx index 4a91782..0a5721f 100644 --- a/dbaccess/source/core/api/OptimisticSet.cxx +++ b/dbaccess/source/core/api/OptimisticSet.cxx @@ -483,7 +483,7 @@ namespace struct PositionFunctor : ::std::unary_function<SelectColumnsMetaData::value_type,bool> { sal_Int32 m_nPos; - PositionFunctor(sal_Int32 i_nPos) + explicit PositionFunctor(sal_Int32 i_nPos) : m_nPos(i_nPos) { } @@ -496,7 +496,7 @@ namespace struct TableNameFunctor : ::std::unary_function<SelectColumnsMetaData::value_type,bool> { OUString m_sTableName; - TableNameFunctor(const OUString& i_sTableName) + explicit TableNameFunctor(const OUString& i_sTableName) : m_sTableName(i_sTableName) { } diff --git a/dbaccess/source/core/api/PrivateRow.hxx b/dbaccess/source/core/api/PrivateRow.hxx index 016d5f0..99583b7 100644 --- a/dbaccess/source/core/api/PrivateRow.hxx +++ b/dbaccess/source/core/api/PrivateRow.hxx @@ -30,7 +30,7 @@ namespace dbaccess ORowSetValueVector::Vector m_aRow; sal_Int32 m_nPos; public: - OPrivateRow(const ORowSetValueVector::Vector& i_aRow) : m_aRow(i_aRow),m_nPos(0) + explicit OPrivateRow(const ORowSetValueVector::Vector& i_aRow) : m_aRow(i_aRow),m_nPos(0) { } virtual sal_Bool SAL_CALL wasNull( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; diff --git a/dbaccess/source/core/api/RowSet.hxx b/dbaccess/source/core/api/RowSet.hxx index 19e50f5..d227476 100644 --- a/dbaccess/source/core/api/RowSet.hxx +++ b/dbaccess/source/core/api/RowSet.hxx @@ -244,7 +244,7 @@ namespace dbaccess virtual ~ORowSet(); public: - ORowSet(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >&); + explicit ORowSet(const css::uno::Reference<css::uno::XComponentContext>&); // com::sun::star::lang::XTypeProvider virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; diff --git a/dbaccess/source/core/api/RowSetBase.hxx b/dbaccess/source/core/api/RowSetBase.hxx index 3e111c1..f5dd954 100644 --- a/dbaccess/source/core/api/RowSetBase.hxx +++ b/dbaccess/source/core/api/RowSetBase.hxx @@ -374,7 +374,7 @@ namespace dbaccess @see ORowSetBase::doCancelModification */ - ORowSetNotifier( ORowSetBase* m_pRowSet ); + explicit ORowSetNotifier( ORowSetBase* m_pRowSet ); /** use this one to consturct an vector for change value notification */ diff --git a/dbaccess/source/core/api/RowSetRow.hxx b/dbaccess/source/core/api/RowSetRow.hxx index 22dee65..6c4f1ac 100644 --- a/dbaccess/source/core/api/RowSetRow.hxx +++ b/dbaccess/source/core/api/RowSetRow.hxx @@ -39,7 +39,7 @@ namespace dbaccess ORowSetOldRowHelper(const ORowSetOldRowHelper& _rRh) SAL_DELETED_FUNCTION; public: ORowSetOldRowHelper(){} - ORowSetOldRowHelper(const ORowSetRow& _rRow) + explicit ORowSetOldRowHelper(const ORowSetRow& _rRow) : m_aRow(_rRow) {} @@ -54,7 +54,7 @@ namespace dbaccess { const ::com::sun::star::uno::Any& m_rAny; public: - ORowSetValueCompare(const ::com::sun::star::uno::Any& _rAny) : m_rAny(_rAny){} + explicit ORowSetValueCompare(const ::com::sun::star::uno::Any& _rAny) : m_rAny(_rAny){} bool operator ()(const ORowSetRow& _rRH) { diff --git a/dbaccess/source/core/api/query.hxx b/dbaccess/source/core/api/query.hxx index baf50c2..6204f76 100644 --- a/dbaccess/source/core/api/query.hxx +++ b/dbaccess/source/core/api/query.hxx @@ -79,7 +79,7 @@ protected: { OQuery* m_pActor; public: - OAutoActionReset(OQuery* _pActor) : m_pActor(_pActor) { } + explicit OAutoActionReset(OQuery* _pActor) : m_pActor(_pActor) { } ~OAutoActionReset() { m_pActor->m_eDoingCurrently = NONE; } }; diff --git a/dbaccess/source/core/api/querydescriptor.hxx b/dbaccess/source/core/api/querydescriptor.hxx index cbf12e5d..dabc24f 100644 --- a/dbaccess/source/core/api/querydescriptor.hxx +++ b/dbaccess/source/core/api/querydescriptor.hxx @@ -126,7 +126,7 @@ protected: virtual ~OQueryDescriptor(); public: OQueryDescriptor(); - OQueryDescriptor(const OQueryDescriptor_Base& _rSource); + explicit OQueryDescriptor(const OQueryDescriptor_Base& _rSource); virtual css::uno::Sequence<css::uno::Type> SAL_CALL getTypes() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; diff --git a/dbaccess/source/core/dataaccess/ComponentDefinition.cxx b/dbaccess/source/core/dataaccess/ComponentDefinition.cxx index 41b3982..3c9d0b1 100644 --- a/dbaccess/source/core/dataaccess/ComponentDefinition.cxx +++ b/dbaccess/source/core/dataaccess/ComponentDefinition.cxx @@ -60,7 +60,7 @@ class OColumnPropertyListener: protected: virtual ~OColumnPropertyListener(){} public: - OColumnPropertyListener(OComponentDefinition* _pComponent) : m_pComponent(_pComponent){} + explicit OColumnPropertyListener(OComponentDefinition* _pComponent) : m_pComponent(_pComponent){} // XPropertyChangeListener virtual void SAL_CALL propertyChange( const PropertyChangeEvent& /*_rEvent*/ ) throw (RuntimeException, std::exception) SAL_OVERRIDE { diff --git a/dbaccess/source/core/dataaccess/ModelImpl.cxx b/dbaccess/source/core/dataaccess/ModelImpl.cxx index 40575e5..773b5b9 100644 --- a/dbaccess/source/core/dataaccess/ModelImpl.cxx +++ b/dbaccess/source/core/dataaccess/ModelImpl.cxx @@ -121,7 +121,7 @@ class DocumentStorageAccess : public ::cppu::WeakImplHelper2< XDocumentSubStor bool m_bDisposingSubStorages; public: - DocumentStorageAccess( ODatabaseModelImpl& _rModelImplementation ) + explicit DocumentStorageAccess( ODatabaseModelImpl& _rModelImplementation ) :m_pModelImplementation( &_rModelImplementation ) ,m_bPropagateCommitToRoot( true ) ,m_bDisposingSubStorages( false ) diff --git a/dbaccess/source/core/dataaccess/ModelImpl.hxx b/dbaccess/source/core/dataaccess/ModelImpl.hxx index d51070c..f1f2d8a 100644 --- a/dbaccess/source/core/dataaccess/ModelImpl.hxx +++ b/dbaccess/source/core/dataaccess/ModelImpl.hxx @@ -128,7 +128,7 @@ public: /** beware of life time: the mutex you pass here must live as least as long as the VosMutexFacade instance lives. */ - VosMutexFacade( ::osl::Mutex& _rMutex ); + explicit VosMutexFacade( ::osl::Mutex& _rMutex ); virtual void acquire() SAL_OVERRIDE; virtual void release() SAL_OVERRIDE; @@ -509,7 +509,7 @@ protected: mutable ::comphelper::SharedMutex m_aMutex; protected: - ModelDependentComponent( const ::rtl::Reference< ODatabaseModelImpl >& _model ); + explicit ModelDependentComponent( const ::rtl::Reference< ODatabaseModelImpl >& _model ); virtual ~ModelDependentComponent(); /** returns the component itself @@ -560,7 +560,7 @@ public: class ModifyLock { public: - ModifyLock( ModelDependentComponent& _component ) + explicit ModifyLock( ModelDependentComponent& _component ) :m_rComponent( _component ) { m_rComponent.lockModify(); @@ -594,7 +594,7 @@ public: @throws ::com::sun::star::lang::DisposedException If the given component is already disposed */ - ModelMethodGuard( const ModelDependentComponent& _component ) + explicit ModelMethodGuard( const ModelDependentComponent& _component ) :BaseMutexGuard( _component.getMutex( ModelDependentComponent::GuardAccess() ) ) { _component.checkDisposed();
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits