summaryrefslogtreecommitdiff
path: root/include/sfx2
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-10-25 16:35:48 +0100
committerCaolán McNamara <caolanm@redhat.com>2016-10-26 12:02:40 +0100
commitc14b9d036ac8549feb588764b3596c0eb42cf97c (patch)
tree695b0e480549c55df4da70720b3669825b8b8228 /include/sfx2
parent88ec5de1c950d5b9c32fb98054557436d2aa426d (diff)
assemble SfxStyleFamilies from more generic resource components
Change-Id: I25aa0d8bca1f16f5fc27d3b299709479a1635ea3
Diffstat (limited to 'include/sfx2')
-rw-r--r--include/sfx2/mgetempl.hxx2
-rw-r--r--include/sfx2/module.hxx4
-rw-r--r--include/sfx2/sfx.hrc2
-rw-r--r--include/sfx2/styfitem.hxx47
4 files changed, 12 insertions, 43 deletions
diff --git a/include/sfx2/mgetempl.hxx b/include/sfx2/mgetempl.hxx
index 637f928d867e..f60f4bf74e1f 100644
--- a/include/sfx2/mgetempl.hxx
+++ b/include/sfx2/mgetempl.hxx
@@ -23,6 +23,7 @@
#include <vcl/fixed.hxx>
#include <vcl/lstbox.hxx>
#include <vcl/vclmedit.hxx>
+#include <sfx2/styfitem.hxx>
#include <sfx2/tabdlg.hxx>
/* expected:
@@ -30,7 +31,6 @@
SID_TEMPLATE_FAMILY : In: Family of Template
*/
-class SfxStyleFamilies;
class SfxStyleFamilyItem;
class SfxStyleSheetBase;
diff --git a/include/sfx2/module.hxx b/include/sfx2/module.hxx
index 4a20b1c5f27a..9a01f82a94f3 100644
--- a/include/sfx2/module.hxx
+++ b/include/sfx2/module.hxx
@@ -23,6 +23,7 @@
#include <sfx2/app.hxx>
#include <sfx2/dllapi.h>
#include <sfx2/shell.hxx>
+#include <sfx2/styfitem.hxx>
#include <svtools/imgdef.hxx>
#include <sal/types.h>
#include <tools/fldunit.hxx>
@@ -37,7 +38,6 @@ class SfxObjectFactory;
class SfxModule;
class SfxModule_Impl;
class SfxSlotPool;
-class SfxStyleFamilies;
struct SfxChildWinContextFactory;
struct SfxChildWinFactory;
struct SfxStbCtrlFactory;
@@ -85,7 +85,7 @@ public:
const SfxItemSet& rSet );
virtual void Invalidate(sal_uInt16 nId = 0) override;
- SfxStyleFamilies* CreateStyleFamilies();
+ virtual SfxStyleFamilies* CreateStyleFamilies() { return nullptr; }
static SfxModule* GetActiveModule( SfxViewFrame* pFrame=nullptr );
static FieldUnit GetCurrentFieldUnit();
diff --git a/include/sfx2/sfx.hrc b/include/sfx2/sfx.hrc
index 5d6faa5b1b3b..251dd229285b 100644
--- a/include/sfx2/sfx.hrc
+++ b/include/sfx2/sfx.hrc
@@ -111,8 +111,6 @@
#define RID_DEFAULTABOUT (RID_SFX_START+0)
-#define DLG_STYLE_DESIGNER (RID_SFX_START+8)
-
#define STR_STYLE_FILTER_AUTO (RID_SFX_START+9)
#define STR_STYLE_FILTER_USED (RID_SFX_START+10)
#define STR_STYLE_FILTER_USERDEF (RID_SFX_START+11)
diff --git a/include/sfx2/styfitem.hxx b/include/sfx2/styfitem.hxx
index 1fd10168c693..b1dd71bedae9 100644
--- a/include/sfx2/styfitem.hxx
+++ b/include/sfx2/styfitem.hxx
@@ -25,64 +25,35 @@
#include <vcl/bitmap.hxx>
#include <vcl/image.hxx>
#include <tools/rc.hxx>
+#include <tools/resary.hxx>
#include <rsc/rscsfx.hxx>
#include <vector>
-struct SfxFilterTupel {
+struct SFX2_DLLPUBLIC SfxFilterTupel
+{
OUString aName;
sal_uInt16 nFlags;
};
-typedef ::std::vector< SfxFilterTupel* > SfxStyleFilter;
-
-// CLASS -----------------------------------------------------------------
+typedef std::vector<SfxFilterTupel> SfxStyleFilter;
-class SfxStyleFamilyItem: public Resource
+class SFX2_DLLPUBLIC SfxStyleFamilyItem
{
- Image aImage;
- Bitmap aBitmap;
- OUString aText;
- OUString aHelpText;
SfxStyleFamily nFamily;
+ OUString aText;
+ Image aImage;
SfxStyleFilter aFilterList;
public:
- SfxStyleFamilyItem( const ResId &rId );
- ~SfxStyleFamilyItem();
+ SfxStyleFamilyItem(SfxStyleFamily nFamily, const OUString &rName, const Image& rImage, const ResId &rStringArray);
const OUString& GetText() const { return aText; }
SfxStyleFamily GetFamily() const { return nFamily; }
const SfxStyleFilter& GetFilterList() const { return aFilterList; }
const Image& GetImage() const { return aImage; }
-
-
- class GrantAccess { friend class SfxStyleFamilies; };
void SetImage( const Image& _rImg ) { aImage = _rImg; }
};
-class SFX2_DLLPUBLIC SfxStyleFamilies: public Resource
-{
- ::std::vector< SfxStyleFamilyItem* > aEntryList;
-
-public:
- SfxStyleFamilies( const ResId &);
- SfxStyleFamilies( ) {};
- ~SfxStyleFamilies();
-
- size_t size() const
- { return aEntryList.size(); }
-
- const SfxStyleFamilyItem* at(size_t nIdx) const
- { return aEntryList.empty() ? nullptr : aEntryList[nIdx]; }
-
- /** updates the images of all single SfxStyleFamilyItems with new images from the given resource
-
- <p>The resource must contain a local image lists, with the id being the integer equivalent for the
- requested bitmap mode, incremented by 1.</p>
-
- <p>Usually, you will use the same resource which originally constructed the object.</p>
- */
- void updateImages( const ResId& _rId );
-};
+using SfxStyleFamilies = std::vector<SfxStyleFamilyItem>;
#endif