diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-02-12 12:46:37 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-02-12 13:03:59 +0000 |
commit | e79c381f4d4906d5ba6c02bb84b7a40475a5399b (patch) | |
tree | c21d4e441c5979b976c4893fb2d7d2a983607727 /sfx2/source/inc | |
parent | cc7b1ee2f3a06c6f0a52f6c6de06b2dd21e1150c (diff) |
coverity#441010 Dereference after null check
Change-Id: I3f35f2ed2154f75303d561efecd1638b73872b61
Diffstat (limited to 'sfx2/source/inc')
-rw-r--r-- | sfx2/source/inc/templdgi.hxx | 41 |
1 files changed, 40 insertions, 1 deletions
diff --git a/sfx2/source/inc/templdgi.hxx b/sfx2/source/inc/templdgi.hxx index 68da5bcb09b7..8a4dfdc09a0d 100644 --- a/sfx2/source/inc/templdgi.hxx +++ b/sfx2/source/inc/templdgi.hxx @@ -81,6 +81,45 @@ public: virtual bool Notify( NotifyEvent& rNEvt ); }; +typedef std::vector<OUString> ExpandedEntries_t; + +/* [Description] + + TreeListBox class for displaying the hierarchical view of the templates +*/ + +class StyleTreeListBox_Impl : public DropListBox_Impl +{ +private: + SvTreeListEntry* pCurEntry; + Link aDoubleClickLink; + Link aDropLink; + OUString aParent; + OUString aStyle; + +protected: + virtual void Command( const CommandEvent& rMEvt ); + virtual bool Notify( NotifyEvent& rNEvt ); + virtual sal_Bool DoubleClickHdl(); + virtual bool ExpandingHdl(); + virtual void ExpandedHdl(); + virtual sal_Bool NotifyMoving(SvTreeListEntry* pTarget, + SvTreeListEntry* pEntry, + SvTreeListEntry*& rpNewParent, + sal_uIntPtr& rNewChildPos); +public: + StyleTreeListBox_Impl( SfxCommonTemplateDialog_Impl* pParent, WinBits nWinStyle = 0); + + void SetDoubleClickHdl(const Link &rLink) { aDoubleClickLink = rLink; } + void SetDropHdl(const Link &rLink) { aDropLink = rLink; } + using SvTreeListBox::GetParent; + const OUString& GetParent() const { return aParent; } + const OUString& GetStyle() const { return aStyle; } + void MakeExpanded_Impl(ExpandedEntries_t& rEntries) const; + + virtual PopupMenu* CreateContextMenu( void ); +}; + // class SfxActionListBox ------------------------------------------------ class SfxActionListBox : public DropListBox_Impl @@ -140,7 +179,7 @@ protected: SfxStyleFamilies* pStyleFamilies; SfxTemplateItem* pFamilyState[MAX_FAMILIES]; SfxStyleSheetBasePool* pStyleSheetPool; - SvTreeListBox* pTreeBox; + StyleTreeListBox_Impl* pTreeBox; SfxObjectShell* pCurObjShell; ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModuleManager2 > xModuleManager; |