diff options
author | Philipp Hofer <philipp.hofer@protonmail.com> | 2020-11-12 13:22:46 +0100 |
---|---|---|
committer | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2020-11-18 12:30:04 +0100 |
commit | 0ce86801128b0955dd46aca5e5b5add4b719df0a (patch) | |
tree | 4a6eb3870f6c51ea23bda34523dbe737d16bb572 /toolkit/source | |
parent | 49fbda99b4e563be54ee7c85560a5929f0627654 (diff) |
tdf#123936 Formatting files in module toolkit with clang-format
Change-Id: Ib4ee991a05335247d65343dfd3c3bcaf214a9e06
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105720
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Diffstat (limited to 'toolkit/source')
-rw-r--r-- | toolkit/source/awt/vclxwindow1.cxx | 35 | ||||
-rw-r--r-- | toolkit/source/awt/vclxwindows_internal.hxx | 4 | ||||
-rw-r--r-- | toolkit/source/controls/svmedit.cxx | 11 | ||||
-rw-r--r-- | toolkit/source/controls/tree/treecontrol.hxx | 17 | ||||
-rw-r--r-- | toolkit/source/helper/tkresmgr.cxx | 17 |
5 files changed, 42 insertions, 42 deletions
diff --git a/toolkit/source/awt/vclxwindow1.cxx b/toolkit/source/awt/vclxwindow1.cxx index 9a78589ded58..7c91d2234c72 100644 --- a/toolkit/source/awt/vclxwindow1.cxx +++ b/toolkit/source/awt/vclxwindow1.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include <toolkit/awt/vclxwindow.hxx> #include <com/sun/star/beans/NamedValue.hpp> #include <vcl/wrkwin.hxx> @@ -26,7 +25,7 @@ #ifdef _WIN32 #include <prewin.h> #include <postwin.h> -#elif defined ( MACOSX ) +#elif defined(MACOSX) #include <premac.h> #include <Cocoa/Cocoa.h> #include <postmac.h> @@ -34,11 +33,11 @@ #include <vcl/sysdata.hxx> /// helper method to set a window handle into a SystemParentData struct -void VCLXWindow::SetSystemParent_Impl( const css::uno::Any& rHandle ) +void VCLXWindow::SetSystemParent_Impl(const css::uno::Any& rHandle) { // does only work for WorkWindows VclPtr<vcl::Window> pWindow = GetWindow(); - if ( pWindow->GetType() != WindowType::WORKWINDOW ) + if (pWindow->GetType() != WindowType::WORKWINDOW) { css::uno::RuntimeException aException; aException.Message = "not a work window"; @@ -48,25 +47,25 @@ void VCLXWindow::SetSystemParent_Impl( const css::uno::Any& rHandle ) // use sal_Int64 here to accommodate all int types // uno::Any shift operator whill upcast if necessary sal_Int64 nHandle = 0; - bool bXEmbed = false; + bool bXEmbed = false; bool bThrow = false; - if( ! (rHandle >>= nHandle) ) + if (!(rHandle >>= nHandle)) { - css::uno::Sequence< css::beans::NamedValue > aProps; - if( rHandle >>= aProps ) + css::uno::Sequence<css::beans::NamedValue> aProps; + if (rHandle >>= aProps) { - for( const css::beans::NamedValue& rProp : std::as_const(aProps) ) + for (const css::beans::NamedValue& rProp : std::as_const(aProps)) { - if ( rProp.Name == "WINDOW" ) + if (rProp.Name == "WINDOW") rProp.Value >>= nHandle; - else if ( rProp.Name == "XEMBED" ) + else if (rProp.Name == "XEMBED") rProp.Value >>= bXEmbed; } } else bThrow = true; } - if( bThrow ) + if (bThrow) { css::uno::RuntimeException aException; aException.Message = "incorrect window handle type"; @@ -74,22 +73,22 @@ void VCLXWindow::SetSystemParent_Impl( const css::uno::Any& rHandle ) } // create system parent data SystemParentData aSysParentData; - aSysParentData.nSize = sizeof ( SystemParentData ); + aSysParentData.nSize = sizeof(SystemParentData); #if defined(_WIN32) aSysParentData.hWnd = reinterpret_cast<HWND>(nHandle); -#elif defined( MACOSX ) +#elif defined(MACOSX) aSysParentData.pView = reinterpret_cast<NSView*>(nHandle); -#elif defined( ANDROID ) +#elif defined(ANDROID) // Nothing -#elif defined( IOS ) +#elif defined(IOS) // Nothing -#elif defined( UNX ) +#elif defined(UNX) aSysParentData.aWindow = nHandle; aSysParentData.bXEmbedSupport = bXEmbed; #endif // set system parent - static_cast<WorkWindow*>(pWindow.get())->SetPluginParent( &aSysParentData ); + static_cast<WorkWindow*>(pWindow.get())->SetPluginParent(&aSysParentData); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/awt/vclxwindows_internal.hxx b/toolkit/source/awt/vclxwindows_internal.hxx index 9f4243e07ae9..0425225865ac 100644 --- a/toolkit/source/awt/vclxwindows_internal.hxx +++ b/toolkit/source/awt/vclxwindows_internal.hxx @@ -24,8 +24,8 @@ namespace toolkit { - void setButtonLikeFaceColor( vcl::Window* _pWindow, const css::uno::Any& _rColorValue ); - css::uno::Any getButtonLikeFaceColor( const vcl::Window* _pWindow ); +void setButtonLikeFaceColor(vcl::Window* _pWindow, const css::uno::Any& _rColorValue); +css::uno::Any getButtonLikeFaceColor(const vcl::Window* _pWindow); } #endif // INCLUDED_TOOLKIT_SOURCE_AWT_VCLXWINDOWS_INTERNAL_HXX diff --git a/toolkit/source/controls/svmedit.cxx b/toolkit/source/controls/svmedit.cxx index a6d1e6a55341..abfcd92297c0 100644 --- a/toolkit/source/controls/svmedit.cxx +++ b/toolkit/source/controls/svmedit.cxx @@ -20,20 +20,19 @@ #include <toolkit/awt/vclxwindows.hxx> #include <controls/svmedit.hxx> -MultiLineEdit::MultiLineEdit( vcl::Window* pParent, WinBits nWinStyle ) - : VclMultiLineEdit( pParent,nWinStyle ) +MultiLineEdit::MultiLineEdit(vcl::Window* pParent, WinBits nWinStyle) + : VclMultiLineEdit(pParent, nWinStyle) { } // virtual -css::uno::Reference< css::awt::XWindowPeer > -MultiLineEdit::GetComponentInterface(bool bCreate) +css::uno::Reference<css::awt::XWindowPeer> MultiLineEdit::GetComponentInterface(bool bCreate) { - css::uno::Reference< css::awt::XWindowPeer > xPeer( + css::uno::Reference<css::awt::XWindowPeer> xPeer( VclMultiLineEdit::GetComponentInterface(false)); if (!xPeer.is() && bCreate) { - rtl::Reference< VCLXMultiLineEdit > xVCLMEdit(new VCLXMultiLineEdit); + rtl::Reference<VCLXMultiLineEdit> xVCLMEdit(new VCLXMultiLineEdit); xVCLMEdit->SetWindow(this); xPeer = xVCLMEdit.get(); SetComponentInterface(xPeer); diff --git a/toolkit/source/controls/tree/treecontrol.hxx b/toolkit/source/controls/tree/treecontrol.hxx index d05809d7fead..4da77731abe3 100644 --- a/toolkit/source/controls/tree/treecontrol.hxx +++ b/toolkit/source/controls/tree/treecontrol.hxx @@ -22,31 +22,32 @@ #include <toolkit/controls/unocontrolmodel.hxx> -namespace toolkit { - - +namespace toolkit +{ // = UnoTreeModel class UnoTreeModel : public UnoControlModel { protected: - css::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const override; - ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override; + css::uno::Any ImplGetDefaultValue(sal_uInt16 nPropId) const override; + ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override; public: - explicit UnoTreeModel( const css::uno::Reference< css::uno::XComponentContext >& i_factory ); + explicit UnoTreeModel(const css::uno::Reference<css::uno::XComponentContext>& i_factory); rtl::Reference<UnoControlModel> Clone() const override; // css::beans::XMultiPropertySet - css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) override; + css::uno::Reference<css::beans::XPropertySetInfo> SAL_CALL getPropertySetInfo() override; // css::io::XPersistObject OUString SAL_CALL getServiceName() override; // XServiceInfo OUString SAL_CALL getImplementationName() override - { return "stardiv.Toolkit.TreeControlModel"; } + { + return "stardiv.Toolkit.TreeControlModel"; + } css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override { diff --git a/toolkit/source/helper/tkresmgr.cxx b/toolkit/source/helper/tkresmgr.cxx index f0b227ee572e..418c489f01c6 100644 --- a/toolkit/source/helper/tkresmgr.cxx +++ b/toolkit/source/helper/tkresmgr.cxx @@ -32,21 +32,22 @@ using ::com::sun::star::graphic::XGraphic; using ::com::sun::star::graphic::XGraphicProvider; using namespace ::com::sun::star; -Image TkResMgr::getImageFromURL( const OUString& i_rImageURL ) +Image TkResMgr::getImageFromURL(const OUString& i_rImageURL) { - if ( i_rImageURL.isEmpty() ) + if (i_rImageURL.isEmpty()) return Image(); try { - Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() ); - Reference< XGraphicProvider > xProvider( graphic::GraphicProvider::create(xContext) ); + Reference<uno::XComponentContext> xContext(::comphelper::getProcessComponentContext()); + Reference<XGraphicProvider> xProvider(graphic::GraphicProvider::create(xContext)); ::comphelper::NamedValueCollection aMediaProperties; - aMediaProperties.put( "URL", i_rImageURL ); - Reference< XGraphic > xGraphic = xProvider->queryGraphic( aMediaProperties.getPropertyValues() ); - return Image( xGraphic ); + aMediaProperties.put("URL", i_rImageURL); + Reference<XGraphic> xGraphic + = xProvider->queryGraphic(aMediaProperties.getPropertyValues()); + return Image(xGraphic); } - catch( const uno::Exception& ) + catch (const uno::Exception&) { DBG_UNHANDLED_EXCEPTION("toolkit"); } |