From 48289c37d73e7780ef3ea6a98aa5e214be0fde92 Mon Sep 17 00:00:00 2001 From: Andrea Gelmini Date: Fri, 28 Aug 2020 14:42:56 +0200 Subject: Fix typo in code Move "grahic" to "graphic" It passed "make check" on Linux + Use "#pragma once" in include/svx/svxgraphicitem.hxx. Change-Id: Ia8a42afd1a822e19093ecee7b0b8791f96de2867 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101623 Tested-by: Julien Nabet Reviewed-by: Julien Nabet --- .../controller/dialogs/dlg_ObjectProperties.cxx | 2 +- cui/source/tabpages/tpline.cxx | 2 +- include/svx/svxgrahicitem.hxx | 44 ---------------------- include/svx/svxgraphicitem.hxx | 41 ++++++++++++++++++++ solenv/clang-format/excludelist | 4 +- svx/Library_svx.mk | 2 +- svx/source/dialog/svxgrahicitem.cxx | 39 ------------------- svx/source/dialog/svxgraphicitem.cxx | 39 +++++++++++++++++++ 8 files changed, 85 insertions(+), 88 deletions(-) delete mode 100644 include/svx/svxgrahicitem.hxx create mode 100644 include/svx/svxgraphicitem.hxx delete mode 100644 svx/source/dialog/svxgrahicitem.cxx create mode 100644 svx/source/dialog/svxgraphicitem.cxx diff --git a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx index 1add0435b0bc..a356c1ac4185 100644 --- a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx +++ b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx @@ -53,7 +53,7 @@ #include #include -#include +#include #include #include diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx index 522bab7789a4..cec452121a47 100644 --- a/cui/source/tabpages/tpline.cxx +++ b/cui/source/tabpages/tpline.cxx @@ -45,7 +45,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/include/svx/svxgrahicitem.hxx b/include/svx/svxgrahicitem.hxx deleted file mode 100644 index 6d9a757c5f29..000000000000 --- a/include/svx/svxgrahicitem.hxx +++ /dev/null @@ -1,44 +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_SVX_SVXGRAHICITEM_HXX -#define INCLUDED_SVX_SVXGRAHICITEM_HXX - - -#include -#include - -#include - -class SVX_DLLPUBLIC SvxGraphicItem final : public SfxPoolItem -{ - Graphic aGraphic; - -public: - SvxGraphicItem( const Graphic& rGraphic); - - virtual bool operator==( const SfxPoolItem& ) const override; - virtual SvxGraphicItem* Clone( SfxItemPool *pPool = nullptr ) const override; - - const Graphic& GetGraphic() const { return aGraphic; } - -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/svx/svxgraphicitem.hxx b/include/svx/svxgraphicitem.hxx new file mode 100644 index 000000000000..78592f382445 --- /dev/null +++ b/include/svx/svxgraphicitem.hxx @@ -0,0 +1,41 @@ +/* -*- 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 . + */ + +#pragma once + +#include +#include + +#include + +class SVX_DLLPUBLIC SvxGraphicItem final : public SfxPoolItem +{ + Graphic aGraphic; + +public: + SvxGraphicItem( const Graphic& rGraphic); + + virtual bool operator==( const SfxPoolItem& ) const override; + virtual SvxGraphicItem* Clone( SfxItemPool *pPool = nullptr ) const override; + + const Graphic& GetGraphic() const { return aGraphic; } + +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/solenv/clang-format/excludelist b/solenv/clang-format/excludelist index 61eea12ba9ea..d075bc227e66 100644 --- a/solenv/clang-format/excludelist +++ b/solenv/clang-format/excludelist @@ -6914,7 +6914,7 @@ include/svx/svx3ditems.hxx include/svx/svxdlg.hxx include/svx/svxdllapi.h include/svx/svxerr.hxx -include/svx/svxgrahicitem.hxx +include/svx/svxgraphicitem.hxx include/svx/swframeexample.hxx include/svx/swframeposstrings.hxx include/svx/swframetypes.hxx @@ -13326,7 +13326,7 @@ svx/source/dialog/srchdlg.cxx svx/source/dialog/strarray.cxx svx/source/dialog/svxbmpnumvalueset.cxx svx/source/dialog/svxdlg.cxx -svx/source/dialog/svxgrahicitem.cxx +svx/source/dialog/svxgraphicitem.cxx svx/source/dialog/svxruler.cxx svx/source/dialog/swframeexample.cxx svx/source/dialog/swframeposstrings.cxx diff --git a/svx/Library_svx.mk b/svx/Library_svx.mk index bb2dbb43e946..424361233542 100644 --- a/svx/Library_svx.mk +++ b/svx/Library_svx.mk @@ -151,7 +151,7 @@ $(eval $(call gb_Library_add_exception_objects,svx,\ svx/source/dialog/srchdlg \ svx/source/dialog/strarray \ svx/source/dialog/svxbmpnumvalueset \ - svx/source/dialog/svxgrahicitem \ + svx/source/dialog/svxgraphicitem \ svx/source/dialog/svxruler \ svx/source/dialog/swframeexample \ svx/source/dialog/swframeposstrings \ diff --git a/svx/source/dialog/svxgrahicitem.cxx b/svx/source/dialog/svxgrahicitem.cxx deleted file mode 100644 index 6a64afba8517..000000000000 --- a/svx/source/dialog/svxgrahicitem.cxx +++ /dev/null @@ -1,39 +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 . - */ - -#include -#include - -SvxGraphicItem::SvxGraphicItem( const Graphic& rGraphic ) - : SfxPoolItem( SID_GRAPHIC ), aGraphic( rGraphic ) -{ - -} - -bool SvxGraphicItem::operator==( const SfxPoolItem& rItem) const -{ - return SfxPoolItem::operator==(rItem) && static_cast(rItem).aGraphic == aGraphic; -} - -SvxGraphicItem* SvxGraphicItem::Clone( SfxItemPool * ) const -{ - return new SvxGraphicItem( *this ); -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/svxgraphicitem.cxx b/svx/source/dialog/svxgraphicitem.cxx new file mode 100644 index 000000000000..9550e79e4814 --- /dev/null +++ b/svx/source/dialog/svxgraphicitem.cxx @@ -0,0 +1,39 @@ +/* -*- 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 . + */ + +#include +#include + +SvxGraphicItem::SvxGraphicItem( const Graphic& rGraphic ) + : SfxPoolItem( SID_GRAPHIC ), aGraphic( rGraphic ) +{ + +} + +bool SvxGraphicItem::operator==( const SfxPoolItem& rItem) const +{ + return SfxPoolItem::operator==(rItem) && static_cast(rItem).aGraphic == aGraphic; +} + +SvxGraphicItem* SvxGraphicItem::Clone( SfxItemPool * ) const +{ + return new SvxGraphicItem( *this ); +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit