[Libreoffice-commits] core.git: framework/source include/vcl

Caolán McNamara caolanm at redhat.com
Thu Jan 5 15:54:57 UTC 2017


 framework/source/uiconfiguration/CommandImageResolver.hxx |    2 
 framework/source/uiconfiguration/ImageList.cxx            |    1 
 framework/source/uiconfiguration/ImageList.hxx            |   67 ++++++++++++++
 include/vcl/image.hxx                                     |   42 --------
 4 files changed, 70 insertions(+), 42 deletions(-)

New commits:
commit ab3fe69ffb9c9e8d57968bb112434df91bfc3c7e
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Jan 5 15:52:57 2017 +0000

    finish moving ImageList to framework
    
    Change-Id: I9d9f292066321174af8b0bcd96c58de5fc7566b8

diff --git a/framework/source/uiconfiguration/CommandImageResolver.hxx b/framework/source/uiconfiguration/CommandImageResolver.hxx
index 79368fc..d7788e4 100644
--- a/framework/source/uiconfiguration/CommandImageResolver.hxx
+++ b/framework/source/uiconfiguration/CommandImageResolver.hxx
@@ -16,6 +16,8 @@
 
 #include <com/sun/star/uno/Sequence.hxx>
 
+#include "ImageList.hxx"
+
 #include <unordered_map>
 #include <vector>
 
diff --git a/framework/source/uiconfiguration/ImageList.cxx b/framework/source/uiconfiguration/ImageList.cxx
index 6610c51..389c016 100644
--- a/framework/source/uiconfiguration/ImageList.cxx
+++ b/framework/source/uiconfiguration/ImageList.cxx
@@ -32,6 +32,7 @@
 #include <vcl/imagerepository.hxx>
 #include <vcl/ImageTree.hxx>
 #include <image.h>
+#include "ImageList.hxx"
 
 ImageList::ImageList()
 {
diff --git a/framework/source/uiconfiguration/ImageList.hxx b/framework/source/uiconfiguration/ImageList.hxx
new file mode 100644
index 0000000..426a626
--- /dev/null
+++ b/framework/source/uiconfiguration/ImageList.hxx
@@ -0,0 +1,67 @@
+/* -*- 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 FRAMEWORK_SOURCE_UICONFIGURATION_IMAGELIST_HXX
+#define FRAMEWORK_SOURCE_UICONFIGURATION_IMAGELIST_HXX
+
+class ImageList
+{
+public:
+                    explicit ImageList();
+                    ImageList( const std::vector<OUString>& rNameVector,
+                               const OUString& rPrefix);
+
+    void            InsertFromHorizontalStrip( const BitmapEx &rBitmapEx,
+                                   const std::vector< OUString > &rNameVector );
+    BitmapEx        GetAsHorizontalStrip() const;
+    sal_uInt16      GetImageCount() const;
+    Size            GetImageSize() const;
+
+    void            AddImage( const OUString& rImageName, const Image& rImage );
+
+    void            ReplaceImage( const OUString& rImageName, const Image& rImage );
+
+    void            RemoveImage( sal_uInt16 nId );
+
+    Image           GetImage( sal_uInt16 nId ) const;
+    Image           GetImage( const OUString& rImageName ) const;
+
+    sal_uInt16      GetImagePos( sal_uInt16 nId ) const;
+    bool            HasImageForId( sal_uInt16 nId ) const;
+    sal_uInt16      GetImagePos( const OUString& rImageName ) const;
+
+    sal_uInt16      GetImageId( sal_uInt16 nPos ) const;
+
+    OUString        GetImageName( sal_uInt16 nPos ) const;
+    void            GetImageNames( ::std::vector< OUString >& rNames ) const;
+
+    bool            operator==( const ImageList& rImageList ) const;
+    bool            operator!=( const ImageList& rImageList ) const { return !(ImageList::operator==( rImageList )); }
+
+private:
+
+    std::shared_ptr<ImplImageList> mpImplData;
+
+    void    ImplInit( sal_uInt16 nItems, const Size &rSize );
+    sal_uInt16  ImplGetImageId( const OUString& rImageName ) const;
+};
+
+#endif // INCLUDED_VCL_IMAGE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/vcl/image.hxx b/include/vcl/image.hxx
index 6fdfaff..04e832b 100644
--- a/include/vcl/image.hxx
+++ b/include/vcl/image.hxx
@@ -82,48 +82,6 @@ private:
     SAL_DLLPRIVATE void    ImplInit( const BitmapEx& rBmpEx );
 };
 
-class VCL_DLLPUBLIC ImageList
-{
-public:
-                    explicit ImageList();
-                    ImageList( const std::vector<OUString>& rNameVector,
-                               const OUString& rPrefix);
-
-    void                    InsertFromHorizontalStrip( const BitmapEx &rBitmapEx,
-                                   const std::vector< OUString > &rNameVector );
-    BitmapEx        GetAsHorizontalStrip() const;
-    sal_uInt16      GetImageCount() const;
-    Size            GetImageSize() const;
-
-    void            AddImage( const OUString& rImageName, const Image& rImage );
-
-    void            ReplaceImage( const OUString& rImageName, const Image& rImage );
-
-    void            RemoveImage( sal_uInt16 nId );
-
-    Image           GetImage( sal_uInt16 nId ) const;
-    Image           GetImage( const OUString& rImageName ) const;
-
-    sal_uInt16      GetImagePos( sal_uInt16 nId ) const;
-    bool            HasImageForId( sal_uInt16 nId ) const;
-    sal_uInt16      GetImagePos( const OUString& rImageName ) const;
-
-    sal_uInt16      GetImageId( sal_uInt16 nPos ) const;
-
-    OUString        GetImageName( sal_uInt16 nPos ) const;
-    void            GetImageNames( ::std::vector< OUString >& rNames ) const;
-
-    bool            operator==( const ImageList& rImageList ) const;
-    bool            operator!=( const ImageList& rImageList ) const { return !(ImageList::operator==( rImageList )); }
-
-private:
-
-    std::shared_ptr<ImplImageList> mpImplData;
-
-    SAL_DLLPRIVATE void    ImplInit( sal_uInt16 nItems, const Size &rSize );
-    SAL_DLLPRIVATE sal_uInt16  ImplGetImageId( const OUString& rImageName ) const;
-};
-
 #endif // INCLUDED_VCL_IMAGE_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list