[Libreoffice-commits] core.git: Branch 'feature/drawinglayercore' - include/vcl vcl/Library_vcl.mk vcl/source
Tomaž Vajngerl (via logerrit)
logerrit at kemper.freedesktop.org
Tue May 26 14:30:31 UTC 2020
include/vcl/GraphicAttributes.hxx | 32 +++++++++++++++++++-
vcl/Library_vcl.mk | 1
vcl/source/graphic/grfattr.cxx | 60 --------------------------------------
3 files changed, 30 insertions(+), 63 deletions(-)
New commits:
commit bfaaac456e539efe5c73c3e3e310bb022da1bd84
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Tue May 26 15:57:38 2020 +0200
Commit: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
CommitDate: Tue May 26 15:57:38 2020 +0200
GraphicAttributes: put const. and op. '=' into the header file
Change-Id: I1bc38f89457c3593673b445e7571a4fd82d5960b
diff --git a/include/vcl/GraphicAttributes.hxx b/include/vcl/GraphicAttributes.hxx
index 90364e408fee..ad2093875f72 100644
--- a/include/vcl/GraphicAttributes.hxx
+++ b/include/vcl/GraphicAttributes.hxx
@@ -53,9 +53,37 @@ private:
GraphicDrawMode meDrawMode;
public:
- GraphicAttr();
+ GraphicAttr()
+ : mfGamma(1.0)
+ , mnMirrFlags(basegfx::MirrorDirectionFlags::NONE)
+ , mnLeftCrop(0)
+ , mnTopCrop(0)
+ , mnRightCrop(0)
+ , mnBottomCrop(0)
+ , mnRotate10(0)
+ , mnContPercent(0)
+ , mnLumPercent(0)
+ , mnRPercent(0)
+ , mnGPercent(0)
+ , mnBPercent(0)
+ , mbInvert(false)
+ , mcTransparency(0)
+ , meDrawMode(GraphicDrawMode::Standard)
+ {
+ }
+
+ bool operator==(const GraphicAttr& rAttr) const
+ {
+ return mfGamma == rAttr.mfGamma && mnMirrFlags == rAttr.mnMirrFlags
+ && mnLeftCrop == rAttr.mnLeftCrop && mnTopCrop == rAttr.mnTopCrop
+ && mnRightCrop == rAttr.mnRightCrop && mnBottomCrop == rAttr.mnBottomCrop
+ && mnRotate10 == rAttr.mnRotate10 && mnContPercent == rAttr.mnContPercent
+ && mnLumPercent == rAttr.mnLumPercent && mnRPercent == rAttr.mnRPercent
+ && mnGPercent == rAttr.mnGPercent && mnBPercent == rAttr.mnBPercent
+ && mbInvert == rAttr.mbInvert && mcTransparency == rAttr.mcTransparency
+ && meDrawMode == rAttr.meDrawMode;
+ }
- bool operator==(const GraphicAttr& rAttr) const;
bool operator!=(const GraphicAttr& rAttr) const { return !(*this == rAttr); }
void SetDrawMode(GraphicDrawMode eDrawMode) { meDrawMode = eDrawMode; }
diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index 873bd41224b2..3147e6b1174f 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -323,7 +323,6 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
vcl/source/graphic/GraphicObject \
vcl/source/graphic/GraphicObject2 \
vcl/source/graphic/GraphicReader \
- vcl/source/graphic/grfattr \
vcl/source/graphic/Manager \
vcl/source/graphic/UnoGraphic \
vcl/source/graphic/UnoGraphicDescriptor \
diff --git a/vcl/source/graphic/grfattr.cxx b/vcl/source/graphic/grfattr.cxx
deleted file mode 100644
index 36e8605b77de..000000000000
--- a/vcl/source/graphic/grfattr.cxx
+++ /dev/null
@@ -1,60 +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 <vcl/GraphicAttributes.hxx>
-
-GraphicAttr::GraphicAttr() :
- mfGamma ( 1.0 ),
- mnMirrFlags ( basegfx::MirrorDirectionFlags::NONE ),
- mnLeftCrop ( 0 ),
- mnTopCrop ( 0 ),
- mnRightCrop ( 0 ),
- mnBottomCrop ( 0 ),
- mnRotate10 ( 0 ),
- mnContPercent ( 0 ),
- mnLumPercent ( 0 ),
- mnRPercent ( 0 ),
- mnGPercent ( 0 ),
- mnBPercent ( 0 ),
- mbInvert ( false ),
- mcTransparency ( 0 ),
- meDrawMode ( GraphicDrawMode::Standard )
-{
-}
-
-bool GraphicAttr::operator==( const GraphicAttr& rAttr ) const
-{
- return( ( mfGamma == rAttr.mfGamma ) &&
- ( mnMirrFlags == rAttr.mnMirrFlags ) &&
- ( mnLeftCrop == rAttr.mnLeftCrop ) &&
- ( mnTopCrop == rAttr.mnTopCrop ) &&
- ( mnRightCrop == rAttr.mnRightCrop ) &&
- ( mnBottomCrop == rAttr.mnBottomCrop ) &&
- ( mnRotate10 == rAttr.mnRotate10 ) &&
- ( mnContPercent == rAttr.mnContPercent ) &&
- ( mnLumPercent == rAttr.mnLumPercent ) &&
- ( mnRPercent == rAttr.mnRPercent ) &&
- ( mnGPercent == rAttr.mnGPercent ) &&
- ( mnBPercent == rAttr.mnBPercent ) &&
- ( mbInvert == rAttr.mbInvert ) &&
- ( mcTransparency == rAttr.mcTransparency ) &&
- ( meDrawMode == rAttr.meDrawMode ) );
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
More information about the Libreoffice-commits
mailing list