summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Driesner <cd@openoffice.org>2001-11-08 07:58:28 +0000
committerCarsten Driesner <cd@openoffice.org>2001-11-08 07:58:28 +0000
commit940964c2c16b51d33d9b91a26fb34ffa6a97d86a (patch)
treeb0b2011eb271f848cba6b019b9ec2171b8144f1a
parent41afe89fb84044c580af556172eb46048bcadbb0 (diff)
#93921# support storing and loading images for menus and toolbars
-rw-r--r--framework/inc/classes/imagesconfiguration.hxx63
-rw-r--r--framework/source/classes/makefile.mk7
2 files changed, 67 insertions, 3 deletions
diff --git a/framework/inc/classes/imagesconfiguration.hxx b/framework/inc/classes/imagesconfiguration.hxx
new file mode 100644
index 000000000000..a2b61eb64538
--- /dev/null
+++ b/framework/inc/classes/imagesconfiguration.hxx
@@ -0,0 +1,63 @@
+#ifndef __FRAMEWORK_CLASSES_IMAGESCONFIGURATION_HXX_
+#define __FRAMEWORK_CLASSES_IMAGESCONFIGURATION_HXX_
+
+#ifndef _SVARRAY_HXX
+#include <svtools/svarray.hxx>
+#endif
+#ifndef _STRING_HXX
+#include <tools/string.hxx>
+#endif
+#ifndef _STREAM_HXX
+#include <tools/stream.hxx>
+#endif
+#ifndef _TOOLS_COLOR_HXX
+#include <tools/color.hxx>
+#endif
+
+namespace framework
+{
+
+struct ImageItemDescriptor
+{
+ String aCommandURL; // URL command to dispatch
+ long nIndex; // index of the bitmap inside the bitmaplist
+};
+
+struct ExternalImageItemDescriptor
+{
+ String aCommandURL; // URL command to dispatch
+ String aURL; // a URL to an external bitmap
+};
+
+typedef ImageItemDescriptor* ImageItemDescriptorPtr;
+SV_DECL_PTRARR_DEL( ImageItemListDescriptor, ImageItemDescriptorPtr, 10, 2);
+
+typedef ExternalImageItemDescriptor* ExternalImageItemDescriptorPtr;
+SV_DECL_PTRARR_DEL( ExternalImageItemListDescriptor, ExternalImageItemDescriptorPtr, 10, 2);
+
+struct ImageListItemDescriptor
+{
+ String aURL; // a URL to a bitmap with several images inside
+ Color aMaskColor; // a color used as transparent
+ ImageItemListDescriptor* pImageItemList; // an array of ItemItemDescriptors that describes every image inside
+};
+
+typedef ImageListItemDescriptor* ImageListItemDescriptorPtr;
+SV_DECL_PTRARR_DEL( ImageListDescriptor, ImageListItemDescriptorPtr, 10, 2);
+
+struct ImageListsDescriptor
+{
+ ImageListDescriptor* pImageList;
+ ExternalImageItemListDescriptor* pExternalImageList;
+};
+
+class ImagesConfiguration
+{
+ public:
+ static sal_Bool LoadImages( SvStream& rInStream, ImageListsDescriptor& aItems );
+ static sal_Bool StoreImages( SvStream& rOutStream, const ImageListsDescriptor& aItems );
+};
+
+} // namespace framework
+
+#endif // __FRAMEWORK_CLASSES_IMAGES
diff --git a/framework/source/classes/makefile.mk b/framework/source/classes/makefile.mk
index 581ecde3262a..0949a0da4774 100644
--- a/framework/source/classes/makefile.mk
+++ b/framework/source/classes/makefile.mk
@@ -2,9 +2,9 @@
#
# $RCSfile: makefile.mk,v $
#
-# $Revision: 1.18 $
+# $Revision: 1.19 $
#
-# last change: $Author: as $ $Date: 2001-07-31 06:55:31 $
+# last change: $Author: cd $ $Date: 2001-11-08 08:58:28 $
#
# The Contents of this file are made available subject to the terms of
# either of the following licenses
@@ -94,7 +94,8 @@ SLOFILES= $(SLO)$/servicemanager.obj \
$(SLO)$/statusbardocumenthandler.obj \
$(SLO)$/eventsconfiguration.obj \
$(SLO)$/eventsdocumenthandler.obj \
- $(SLO)$/converter.obj
+ $(SLO)$/converter.obj \
+ $(SLO)$/imagesconfiguration.obj
SRCFILES= fltdlg.src