diff options
author | Noel Grandin <noel@peralex.com> | 2016-04-28 14:35:37 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-05-03 07:26:26 +0000 |
commit | 82e9cfc9910005e55f57ab13dd685f8860f47d27 (patch) | |
tree | f0fa33b4a665bef70f2ffa3e5b73727a9e6d8057 /sd | |
parent | eb7593daa4bac21bd68182c8bbbd3ee3bd7b64dd (diff) |
use Any constructor for bool values, instead of temporary vars
mostly found with:
git grep -n 'setValue.*cppu.*UnoType.*bool.*get'
Change-Id: Ie8e5aa6402d25dbe90b0f492031a245bb222c1a5
Reviewed-on: https://gerrit.libreoffice.org/24464
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/unoidl/unocpres.cxx | 1 | ||||
-rw-r--r-- | sd/source/ui/unoidl/unohelp.hxx | 34 | ||||
-rw-r--r-- | sd/source/ui/unoidl/unolayer.cxx | 7 | ||||
-rw-r--r-- | sd/source/ui/unoidl/unomodel.cxx | 1 | ||||
-rw-r--r-- | sd/source/ui/unoidl/unoobj.cxx | 1 | ||||
-rw-r--r-- | sd/source/ui/unoidl/unopage.cxx | 1 | ||||
-rw-r--r-- | sd/source/ui/unoidl/unopback.cxx | 1 | ||||
-rw-r--r-- | sd/source/ui/unoidl/unosrch.cxx | 1 |
8 files changed, 3 insertions, 44 deletions
diff --git a/sd/source/ui/unoidl/unocpres.cxx b/sd/source/ui/unoidl/unocpres.cxx index d7835157dd78..90f6b6d16a7f 100644 --- a/sd/source/ui/unoidl/unocpres.cxx +++ b/sd/source/ui/unoidl/unocpres.cxx @@ -27,7 +27,6 @@ #include <cppuhelper/supportsservice.hxx> #include "createunocustomshow.hxx" -#include "unohelp.hxx" #include "unomodel.hxx" #include "drawdoc.hxx" #include "unocpres.hxx" diff --git a/sd/source/ui/unoidl/unohelp.hxx b/sd/source/ui/unoidl/unohelp.hxx deleted file mode 100644 index 25b76f8648b9..000000000000 --- a/sd/source/ui/unoidl/unohelp.hxx +++ /dev/null @@ -1,34 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef INCLUDED_SD_SOURCE_UI_UNOIDL_UNOHELP_HXX -#define INCLUDED_SD_SOURCE_UI_UNOIDL_UNOHELP_HXX - -namespace sd -{ -inline void bool2any( bool bBool, css::uno::Any& rAny ) -{ - rAny.setValue( &bBool, cppu::UnoType<bool>::get() ); -} - -} - -#endif // INCLUDED_SD_SOURCE_UI_UNOIDL_UNOHELP_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/unoidl/unolayer.cxx b/sd/source/ui/unoidl/unolayer.cxx index b556ae33f120..4d44236d066a 100644 --- a/sd/source/ui/unoidl/unolayer.cxx +++ b/sd/source/ui/unoidl/unolayer.cxx @@ -37,7 +37,6 @@ #include "unoprnms.hxx" #include <com/sun/star/lang/NoSupportException.hpp> #include <svx/svdpool.hxx> -#include "unohelp.hxx" #include "FrameView.hxx" #include "DrawViewShell.hxx" #include "View.hxx" @@ -258,13 +257,13 @@ uno::Any SAL_CALL SdLayer::getPropertyValue( const OUString& PropertyName ) switch( pEntry ? pEntry->nWID : -1 ) { case WID_LAYER_LOCKED: - sd::bool2any( get( LOCKED ), aValue ); + aValue <<= get( LOCKED ); break; case WID_LAYER_PRINTABLE: - sd::bool2any( get( PRINTABLE ), aValue ); + aValue <<= get( PRINTABLE ); break; case WID_LAYER_VISIBLE: - sd::bool2any( get( VISIBLE ), aValue ); + aValue <<= get( VISIBLE ); break; case WID_LAYER_NAME: { diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index 674ae3de4c4e..845a8de78a72 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -78,7 +78,6 @@ #include <sdpage.hxx> #include <strings.hrc> -#include "unohelp.hxx" #include <unolayer.hxx> #include <unoprnms.hxx> #include <unopage.hxx> diff --git a/sd/source/ui/unoidl/unoobj.cxx b/sd/source/ui/unoidl/unoobj.cxx index f833ae5b7373..d1d68073cb7b 100644 --- a/sd/source/ui/unoidl/unoobj.cxx +++ b/sd/source/ui/unoidl/unoobj.cxx @@ -59,7 +59,6 @@ #include <svx/svdogrp.hxx> #include "anminfo.hxx" -#include "unohelp.hxx" #include "unoobj.hxx" #include "unoprnms.hxx" #include "unomodel.hxx" diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx index 4aafc5f75910..4db7930b7531 100644 --- a/sd/source/ui/unoidl/unopage.cxx +++ b/sd/source/ui/unoidl/unopage.cxx @@ -70,7 +70,6 @@ #include "res_bmp.hrc" #include "unokywds.hxx" #include "unopback.hxx" -#include "unohelp.hxx" #include <vcl/dibtools.hxx> #include <svx/svdograf.hxx> #include <svx/svdoashp.hxx> diff --git a/sd/source/ui/unoidl/unopback.cxx b/sd/source/ui/unoidl/unopback.cxx index e7eb5b75f51a..06941d2204ee 100644 --- a/sd/source/ui/unoidl/unopback.cxx +++ b/sd/source/ui/unoidl/unopback.cxx @@ -31,7 +31,6 @@ #include <svx/unoshape.hxx> #include "unopback.hxx" -#include "unohelp.hxx" #include "drawdoc.hxx" #include "unokywds.hxx" diff --git a/sd/source/ui/unoidl/unosrch.cxx b/sd/source/ui/unoidl/unosrch.cxx index a4353007c9fa..fd80a34d320d 100644 --- a/sd/source/ui/unoidl/unosrch.cxx +++ b/sd/source/ui/unoidl/unosrch.cxx @@ -27,7 +27,6 @@ #include <comphelper/extract.hxx> -#include "unohelp.hxx" #include "unoprnms.hxx" #include "unosrch.hxx" |