framework/Library_fwk.mk | 4 framework/source/uiconfiguration/CommandImageResolver.cxx | 161 +++++++ framework/source/uiconfiguration/CommandImageResolver.hxx | 58 ++ framework/source/uiconfiguration/ImageArrayData.cxx | 91 ++++ framework/source/uiconfiguration/ImageList.cxx | 317 ++++++++++++++ framework/source/uiconfiguration/ImplImageList.cxx | 73 +++ framework/source/uiconfiguration/image.h | 67 ++ framework/source/uiconfiguration/imagemanagerimpl.hxx | 2 include/vcl/CommandImageResolver.hxx | 67 -- include/vcl/ImageTree.hxx | 2 include/vcl/commandinfoprovider.hxx | 1 include/vcl/image.hxx | 12 vcl/Library_vcl.mk | 4 vcl/inc/image.h | 37 - vcl/source/bitmap/CommandImageResolver.cxx | 161 ------- vcl/source/image/ImageArrayData.cxx | 93 ---- vcl/source/image/ImageList.cxx | 317 -------------- vcl/source/image/ImplImageList.cxx | 73 --- 18 files changed, 785 insertions(+), 755 deletions(-)
New commits: commit 3cd39b91f872ca32b09a362de2cb0efaf0e2ba3b Author: Caolán McNamara <[email protected]> Date: Thu Jan 5 14:09:17 2017 +0000 move ImageList to framework this can probably be replaced by a std::*map<Image> Change-Id: Ic36c5f406f5ea51cb9ff135858e319e0877179c7 diff --git a/framework/Library_fwk.mk b/framework/Library_fwk.mk index 1eaf497..f5b8f23 100644 --- a/framework/Library_fwk.mk +++ b/framework/Library_fwk.mk @@ -114,6 +114,9 @@ $(eval $(call gb_Library_add_exception_objects,fwk,\ framework/source/services/taskcreatorsrv \ framework/source/services/urltransformer \ framework/source/uiconfiguration/CommandImageResolver \ + framework/source/uiconfiguration/ImageArrayData \ + framework/source/uiconfiguration/ImageList \ + framework/source/uiconfiguration/ImplImageList \ framework/source/uiconfiguration/globalsettings \ framework/source/uiconfiguration/graphicnameaccess \ framework/source/uiconfiguration/imagemanager \ diff --git a/vcl/source/image/ImageArrayData.cxx b/framework/source/uiconfiguration/ImageArrayData.cxx similarity index 98% rename from vcl/source/image/ImageArrayData.cxx rename to framework/source/uiconfiguration/ImageArrayData.cxx index e1854d2..6ebfc09 100644 --- a/vcl/source/image/ImageArrayData.cxx +++ b/framework/source/uiconfiguration/ImageArrayData.cxx @@ -35,8 +35,6 @@ #include <rtl/strbuf.hxx> #endif -#include "BitmapProcessor.hxx" - ImageAryData::ImageAryData( const ImageAryData& rData ) : maName( rData.maName ), mnId( rData.mnId ), diff --git a/vcl/source/image/ImageList.cxx b/framework/source/uiconfiguration/ImageList.cxx similarity index 100% rename from vcl/source/image/ImageList.cxx rename to framework/source/uiconfiguration/ImageList.cxx diff --git a/vcl/source/image/ImplImageList.cxx b/framework/source/uiconfiguration/ImplImageList.cxx similarity index 100% rename from vcl/source/image/ImplImageList.cxx rename to framework/source/uiconfiguration/ImplImageList.cxx diff --git a/framework/source/uiconfiguration/image.h b/framework/source/uiconfiguration/image.h new file mode 100644 index 0000000..9b0542f --- /dev/null +++ b/framework/source/uiconfiguration/image.h @@ -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_IMAGE_H +#define FRAMEWORK_SOURCE_UICONFIGURATION_IMAGE_H + +#include <vcl/bitmapex.hxx> + +#include <unordered_map> +#include <vector> + +struct ImageAryData +{ + OUString maName; + // Images identified by either name, or by id + sal_uInt16 mnId; + BitmapEx maBitmapEx; + + ImageAryData( const OUString &aName, + sal_uInt16 nId, const BitmapEx &aBitmap ); + ImageAryData( const ImageAryData& rData ); + ~ImageAryData(); + + bool IsLoadable() { return maBitmapEx.IsEmpty() && !maName.isEmpty(); } + void Load(const OUString &rPrefix); + + ImageAryData& operator=( const ImageAryData& rData ); +}; + +struct ImplImageList +{ + typedef std::unordered_map< OUString, ImageAryData *, OUStringHash > + ImageAryDataNameHash; + + std::vector<ImageAryData *> maImages; + ImageAryDataNameHash maNameHash; + OUString maPrefix; + Size maImageSize; + + ImplImageList(); + ImplImageList( const ImplImageList &aSrc ); + ~ImplImageList(); + + void AddImage( const OUString &aName, + sal_uInt16 nId, const BitmapEx &aBitmapEx ); + void RemoveImage( sal_uInt16 nPos ); +}; + +#endif // INCLUDED_VCL_INC_IMAGE_H + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/vcl/ImageTree.hxx b/include/vcl/ImageTree.hxx index 80a6f3b..43df2c9 100644 --- a/include/vcl/ImageTree.hxx +++ b/include/vcl/ImageTree.hxx @@ -54,7 +54,7 @@ public: VCL_DLLPUBLIC OUString getImageUrl( OUString const & name, OUString const & style, OUString const & lang); - bool loadImage( + VCL_DLLPUBLIC bool loadImage( OUString const & name, OUString const & style, BitmapEx & bitmap, bool localized, const ImageLoadFlags eFlags = ImageLoadFlags::NONE); diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk index 07566d0..e8277dc 100644 --- a/vcl/Library_vcl.mk +++ b/vcl/Library_vcl.mk @@ -312,12 +312,9 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\ vcl/source/bitmap/BitmapTools \ vcl/source/bitmap/checksum \ vcl/source/image/Image \ - vcl/source/image/ImageArrayData \ - vcl/source/image/ImageList \ vcl/source/image/ImageTree \ vcl/source/image/ImageRepository \ vcl/source/image/ImplImage \ - vcl/source/image/ImplImageList \ vcl/source/image/ImplImageTree \ vcl/source/helper/canvasbitmap \ vcl/source/helper/canvastools \ diff --git a/vcl/inc/image.h b/vcl/inc/image.h index 5446dc7d..72a7f32 100644 --- a/vcl/inc/image.h +++ b/vcl/inc/image.h @@ -25,43 +25,6 @@ #include <unordered_map> #include <vector> -struct ImageAryData -{ - OUString maName; - // Images identified by either name, or by id - sal_uInt16 mnId; - BitmapEx maBitmapEx; - - ImageAryData( const OUString &aName, - sal_uInt16 nId, const BitmapEx &aBitmap ); - ImageAryData( const ImageAryData& rData ); - ~ImageAryData(); - - bool IsLoadable() { return maBitmapEx.IsEmpty() && !maName.isEmpty(); } - void Load(const OUString &rPrefix); - - ImageAryData& operator=( const ImageAryData& rData ); -}; - -struct ImplImageList -{ - typedef std::unordered_map< OUString, ImageAryData *, OUStringHash > - ImageAryDataNameHash; - - std::vector<ImageAryData *> maImages; - ImageAryDataNameHash maNameHash; - OUString maPrefix; - Size maImageSize; - - ImplImageList(); - ImplImageList( const ImplImageList &aSrc ); - ~ImplImageList(); - - void AddImage( const OUString &aName, - sal_uInt16 nId, const BitmapEx &aBitmapEx ); - void RemoveImage( sal_uInt16 nPos ); -}; - struct ImplImage { BitmapChecksum maBitmapChecksum; commit 4f5cd607e30633ca51263c2f45c4753e8990302f Author: Caolán McNamara <[email protected]> Date: Thu Jan 5 14:04:48 2017 +0000 move CommandImageResolver out of vcl and beside its only user Change-Id: I2bd70d87bb12d5750d8427b8a8fe786cfce8961b diff --git a/framework/Library_fwk.mk b/framework/Library_fwk.mk index 2246286..1eaf497 100644 --- a/framework/Library_fwk.mk +++ b/framework/Library_fwk.mk @@ -113,6 +113,7 @@ $(eval $(call gb_Library_add_exception_objects,fwk,\ framework/source/services/substitutepathvars \ framework/source/services/taskcreatorsrv \ framework/source/services/urltransformer \ + framework/source/uiconfiguration/CommandImageResolver \ framework/source/uiconfiguration/globalsettings \ framework/source/uiconfiguration/graphicnameaccess \ framework/source/uiconfiguration/imagemanager \ diff --git a/vcl/source/bitmap/CommandImageResolver.cxx b/framework/source/uiconfiguration/CommandImageResolver.cxx similarity index 99% rename from vcl/source/bitmap/CommandImageResolver.cxx rename to framework/source/uiconfiguration/CommandImageResolver.cxx index d34140d..98aec12 100644 --- a/vcl/source/bitmap/CommandImageResolver.cxx +++ b/framework/source/uiconfiguration/CommandImageResolver.cxx @@ -7,7 +7,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include <vcl/CommandImageResolver.hxx> +#include "CommandImageResolver.hxx" #include <vcl/settings.hxx> #include <vcl/svapp.hxx> #include <rtl/ustrbuf.hxx> diff --git a/include/vcl/CommandImageResolver.hxx b/framework/source/uiconfiguration/CommandImageResolver.hxx similarity index 96% rename from include/vcl/CommandImageResolver.hxx rename to framework/source/uiconfiguration/CommandImageResolver.hxx index 482e452..79368fc 100644 --- a/include/vcl/CommandImageResolver.hxx +++ b/framework/source/uiconfiguration/CommandImageResolver.hxx @@ -22,7 +22,7 @@ namespace vcl { -class VCL_DLLPUBLIC CommandImageResolver final +class CommandImageResolver final { private: typedef std::unordered_map<OUString, OUString, OUStringHash > CommandToImageNameMap; diff --git a/framework/source/uiconfiguration/imagemanagerimpl.hxx b/framework/source/uiconfiguration/imagemanagerimpl.hxx index 1d5022b..ec2cf9b 100644 --- a/framework/source/uiconfiguration/imagemanagerimpl.hxx +++ b/framework/source/uiconfiguration/imagemanagerimpl.hxx @@ -48,7 +48,7 @@ #include <unordered_map> #include <vector> -#include <vcl/CommandImageResolver.hxx> +#include "CommandImageResolver.hxx" namespace framework { diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk index 050ee31..07566d0 100644 --- a/vcl/Library_vcl.mk +++ b/vcl/Library_vcl.mk @@ -311,7 +311,6 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\ vcl/source/bitmap/BitmapProcessor \ vcl/source/bitmap/BitmapTools \ vcl/source/bitmap/checksum \ - vcl/source/bitmap/CommandImageResolver \ vcl/source/image/Image \ vcl/source/image/ImageArrayData \ vcl/source/image/ImageList \ commit 57990e4b8ea2eaeb478b161b568e31036c7a5fe4 Author: Caolán McNamara <[email protected]> Date: Thu Jan 5 13:59:32 2017 +0000 move ImageType enum out of CommandImageResolver.hxx Change-Id: I0b4da9a4edff8d0f9016fbd79cb205bdf2b35268 diff --git a/include/vcl/CommandImageResolver.hxx b/include/vcl/CommandImageResolver.hxx index 78af7b2..482e452 100644 --- a/include/vcl/CommandImageResolver.hxx +++ b/include/vcl/CommandImageResolver.hxx @@ -22,15 +22,6 @@ namespace vcl { -enum class ImageType -{ - Size16, - Size26, - Size32, - Small = Size16, - LAST = Size32, -}; - class VCL_DLLPUBLIC CommandImageResolver final { private: diff --git a/include/vcl/commandinfoprovider.hxx b/include/vcl/commandinfoprovider.hxx index fff271b..93f4f3f 100644 --- a/include/vcl/commandinfoprovider.hxx +++ b/include/vcl/commandinfoprovider.hxx @@ -22,7 +22,6 @@ #include <vcl/dllapi.h> #include <vcl/keycod.hxx> #include <vcl/image.hxx> -#include <vcl/CommandImageResolver.hxx> #include <com/sun/star/frame/XFrame.hpp> #include <com/sun/star/uno/XComponentContext.hpp> diff --git a/include/vcl/image.hxx b/include/vcl/image.hxx index 9549133..6fdfaff 100644 --- a/include/vcl/image.hxx +++ b/include/vcl/image.hxx @@ -36,6 +36,18 @@ struct ImplImage; struct ImplImageList; namespace com { namespace sun { namespace star { namespace graphic { class XGraphic;} } } } +namespace vcl +{ + enum class ImageType + { + Size16, + Size26, + Size32, + Small = Size16, + LAST = Size32, + }; +} + #define IMAGELIST_IMAGE_NOTFOUND ((sal_uInt16)0xFFFF) class VCL_DLLPUBLIC Image
_______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
