summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2019-04-27 21:44:12 +0900
committerTomaž Vajngerl <quikee@gmail.com>2019-04-28 04:14:22 +0200
commit5c3ae69f03eee5deddcaa4673b4fbab062f6c66a (patch)
tree0e62d720ea9023c79b9a10a97b4437a11a1354e5 /vcl
parent18651dbc32a2d58191c81d738a765a1c83546e12 (diff)
Separate AnimationBitmap from Animation.{hxx,cxx} source
Change-Id: I982a108b2241c049b595a13d6f39d24ef0266074 Reviewed-on: https://gerrit.libreoffice.org/71423 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/Library_vcl.mk1
-rw-r--r--vcl/source/animate/Animation.cxx31
-rw-r--r--vcl/source/animate/AnimationBitmap.cxx54
3 files changed, 55 insertions, 31 deletions
diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index b66da1f8a071..962171879a0b 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -116,6 +116,7 @@ endif
$(eval $(call gb_Library_add_exception_objects,vcl,\
vcl/source/animate/Animation \
+ vcl/source/animate/AnimationBitmap \
vcl/source/window/errinf \
vcl/source/window/settings \
vcl/source/window/paint \
diff --git a/vcl/source/animate/Animation.cxx b/vcl/source/animate/Animation.cxx
index 3e3f20b551b0..54582eaf40ff 100644
--- a/vcl/source/animate/Animation.cxx
+++ b/vcl/source/animate/Animation.cxx
@@ -19,9 +19,7 @@
#include <sal/config.h>
-#include <o3tl/underlyingenumvalue.hxx>
#include <tools/stream.hxx>
-#include <rtl/crc.h>
#include <sal/log.hxx>
#include <vcl/animate/Animation.hxx>
@@ -36,35 +34,6 @@
sal_uLong Animation::mnAnimCount = 0;
-BitmapChecksum AnimationBitmap::GetChecksum() const
-{
- BitmapChecksum nCrc = aBmpEx.GetChecksum();
- SVBT32 aBT32;
-
- Int32ToSVBT32( aPosPix.X(), aBT32 );
- nCrc = vcl_get_checksum( nCrc, aBT32, 4 );
-
- Int32ToSVBT32( aPosPix.Y(), aBT32 );
- nCrc = vcl_get_checksum( nCrc, aBT32, 4 );
-
- Int32ToSVBT32( aSizePix.Width(), aBT32 );
- nCrc = vcl_get_checksum( nCrc, aBT32, 4 );
-
- Int32ToSVBT32( aSizePix.Height(), aBT32 );
- nCrc = vcl_get_checksum( nCrc, aBT32, 4 );
-
- Int32ToSVBT32( nWait, aBT32 );
- nCrc = vcl_get_checksum( nCrc, aBT32, 4 );
-
- UInt32ToSVBT32( o3tl::underlyingEnumValue(eDisposal), aBT32 );
- nCrc = vcl_get_checksum( nCrc, aBT32, 4 );
-
- UInt32ToSVBT32( sal_uInt32(bUserInput), aBT32 );
- nCrc = vcl_get_checksum( nCrc, aBT32, 4 );
-
- return nCrc;
-}
-
Animation::Animation() :
mnLoopCount ( 0 ),
mnLoops ( 0 ),
diff --git a/vcl/source/animate/AnimationBitmap.cxx b/vcl/source/animate/AnimationBitmap.cxx
new file mode 100644
index 000000000000..c1d3e15bf09e
--- /dev/null
+++ b/vcl/source/animate/AnimationBitmap.cxx
@@ -0,0 +1,54 @@
+/* -*- 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 <sal/config.h>
+#include <o3tl/underlyingenumvalue.hxx>
+#include <rtl/crc.h>
+#include <vcl/animate/AnimationBitmap.hxx>
+
+BitmapChecksum AnimationBitmap::GetChecksum() const
+{
+ BitmapChecksum nCrc = aBmpEx.GetChecksum();
+ SVBT32 aBT32;
+
+ Int32ToSVBT32( aPosPix.X(), aBT32 );
+ nCrc = vcl_get_checksum( nCrc, aBT32, 4 );
+
+ Int32ToSVBT32( aPosPix.Y(), aBT32 );
+ nCrc = vcl_get_checksum( nCrc, aBT32, 4 );
+
+ Int32ToSVBT32( aSizePix.Width(), aBT32 );
+ nCrc = vcl_get_checksum( nCrc, aBT32, 4 );
+
+ Int32ToSVBT32( aSizePix.Height(), aBT32 );
+ nCrc = vcl_get_checksum( nCrc, aBT32, 4 );
+
+ Int32ToSVBT32( nWait, aBT32 );
+ nCrc = vcl_get_checksum( nCrc, aBT32, 4 );
+
+ UInt32ToSVBT32( o3tl::underlyingEnumValue(eDisposal), aBT32 );
+ nCrc = vcl_get_checksum( nCrc, aBT32, 4 );
+
+ UInt32ToSVBT32( sal_uInt32(bUserInput), aBT32 );
+ nCrc = vcl_get_checksum( nCrc, aBT32, 4 );
+
+ return nCrc;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */