summaryrefslogtreecommitdiff
path: root/vcl/inc
diff options
context:
space:
mode:
authorRodolfo Ribeiro Gomes <rodolforg@gmail.com>2013-05-15 08:05:05 -0300
committerFridrich Strba <fridrich@documentfoundation.org>2013-05-21 19:43:25 +0000
commitd5151ab592367fde7db03fce81e0b76776d18216 (patch)
treeece94e39ffca1fefebf42e4ccf82b5c923646be6 /vcl/inc
parente8c9a6af25a7ff476e33ad239b70414168aabe3a (diff)
Allow 'textual links' on icon theme packages
This would allow use of better icon names ( fdo#30425 ) and minimizes space size needed by reuses of same icons bitmaps with different filenames. Icon packages shoud have a file named "links.txt" on root folder in order to achieve that. It binds a name of a 'virtual' file to an existing one, to avoid duplicates. This file should contain one or more lines like this: path/for/fakefile_that_reuse_a_bitmap.png path/for/existing_one.png Implemented as discussed in: http://lists.freedesktop.org/archives/libreoffice/2013-April/049650.html Change-Id: Ia65a1ba18f93297fae47fa520104821f6f336694 Signed-off-by: Rodolfo Ribeiro Gomes <rodolforg@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/3953 Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
Diffstat (limited to 'vcl/inc')
-rw-r--r--vcl/inc/impimagetree.hxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/vcl/inc/impimagetree.hxx b/vcl/inc/impimagetree.hxx
index d22e770e1016..11c003e2b079 100644
--- a/vcl/inc/impimagetree.hxx
+++ b/vcl/inc/impimagetree.hxx
@@ -72,12 +72,15 @@ private:
OUString, bool, OUStringHash > CheckStyleCache;
typedef boost::unordered_map<
OUString, std::pair< bool, BitmapEx >, OUStringHash > IconCache;
+ typedef boost::unordered_map<
+ OUString, OUString, OUStringHash > IconLinkCache;
OUString m_style;
Path m_path;
CheckStyleCache m_checkStyleCache;
IconCache m_iconCache;
bool m_cacheIcons;
+ IconLinkCache m_iconLinkCache;
void setStyle(OUString const & style );
@@ -87,6 +90,10 @@ private:
bool iconCacheLookup( OUString const & name, bool localized, BitmapEx & bitmap );
bool find(std::vector< OUString > const & paths, BitmapEx & bitmap );
+
+ void loadImageLinks();
+ void parseLinkFile(boost::shared_ptr< SvStream > stream);
+ OUString const & getRealImageName(OUString const & name);
};
typedef salhelper::SingletonRef< ImplImageTree > ImplImageTreeSingletonRef;