diff --git a/extras/source/glade/libreoffice-catalog.xml.in b/extras/source/glade/libreoffice-catalog.xml.in
index 170c0a8967a6..2f685a47ae8e 100644
--- a/extras/source/glade/libreoffice-catalog.xml.in
+++ b/extras/source/glade/libreoffice-catalog.xml.in
@@ -25,13 +25,6 @@
-
-
-
diff --git a/include/sfx2/templatelocalview.hxx b/include/sfx2/templatelocalview.hxx
index 6540d091f230..997a67823a44 100644
--- a/include/sfx2/templatelocalview.hxx
+++ b/include/sfx2/templatelocalview.hxx
@@ -105,8 +105,6 @@ public:
void setEditTemplateHdl(const Link &rLink);
- void updateThumbnailDimensions(tools::Long itemMaxSize);
-
static BitmapEx scaleImg (const BitmapEx &rImg, tools::Long width, tools::Long height);
static BitmapEx getDefaultThumbnail( const OUString& rPath );
@@ -137,7 +135,7 @@ protected:
std::vector maAllTemplates;
};
-class SfxTemplateLocalView final : public SfxThumbnailView
+class SfxTemplateLocalView : public SfxThumbnailView
{
typedef bool (*selection_cmp_fn)(const ThumbnailViewItem*,const ThumbnailViewItem*);
@@ -154,9 +152,9 @@ public:
// Fill view with template folders thumbnails
void Populate ();
- void reload ();
+ virtual void reload ();
- void showAllTemplates ();
+ virtual void showAllTemplates ();
void showRegion (TemplateContainerItem const *pItem);
@@ -220,6 +218,8 @@ public:
void setDefaultTemplateHdl(const Link &rLink);
+ void updateThumbnailDimensions(tools::Long itemMaxSize);
+
void RemoveDefaultTemplateIcon( const OUString& rPath);
static BitmapEx scaleImg (const BitmapEx &rImg, tools::Long width, tools::Long height);
@@ -230,13 +230,16 @@ public:
static bool IsDefaultTemplate(const OUString& rPath);
-private:
+protected:
virtual void OnItemDblClicked(ThumbnailViewItem *pItem) override;
sal_uInt16 mnCurRegionId;
TemplateViewItem *maSelectedItem;
+ long mnThumbnailWidth;
+ long mnThumbnailHeight;
+
Point maPosition; //store the point of click event
Link maOpenRegionHdl;
diff --git a/include/sfx2/thumbnailview.hxx b/include/sfx2/thumbnailview.hxx
index bd4a815b47ca..767f4d6375aa 100644
--- a/include/sfx2/thumbnailview.hxx
+++ b/include/sfx2/thumbnailview.hxx
@@ -329,7 +329,7 @@ public:
void RemoveItem(sal_uInt16 nItemId);
- void Clear();
+ virtual void Clear();
// Change current thumbnail item list with new one (invalidates all pointers to a thumbnail item)
void updateItems(std::vector> items);
@@ -413,6 +413,9 @@ protected:
virtual void OnItemDblClicked (ThumbnailViewItem *pItem);
+ // Set Item colors from the SfxThumbnailView colors
+ void UpdateColors();
+
protected:
friend class SfxThumbnailViewAcc;
diff --git a/sd/source/ui/dlg/animobjs.cxx b/sd/source/ui/dlg/animobjs.cxx
index 830149e62a0a..4f2cf6d8dce4 100644
--- a/sd/source/ui/dlg/animobjs.cxx
+++ b/sd/source/ui/dlg/animobjs.cxx
@@ -386,7 +386,7 @@ IMPL_LINK_NOARG(AnimationWindow, ClickRbtHdl, weld::Button&, void)
IMPL_LINK(AnimationWindow, ClickHelpHdl, weld::Button&, rButton, void)
{
if (Help* pHelp = Application::GetHelp())
- pHelp->Start(OStringToOUString(m_xContainer->get_help_id(), RTL_TEXTENCODING_UTF8), &rButton);
+ pHelp->Start(OUString::fromUtf8(m_xContainer->get_help_id()), &rButton);
}
IMPL_LINK( AnimationWindow, ClickGetObjectHdl, weld::Button&, rBtn, void )
diff --git a/sfx2/inc/recentdocsview.hxx b/sfx2/inc/recentdocsview.hxx
index 9067f3cef5a3..03fd7fda7c33 100644
--- a/sfx2/inc/recentdocsview.hxx
+++ b/sfx2/inc/recentdocsview.hxx
@@ -22,12 +22,14 @@ namespace com::sun::star::frame { class XDispatch; }
namespace sfx2
{
+class RecentDocsView;
+
struct LoadRecentFile
{
css::util::URL aTargetURL;
css::uno::Sequence< css::beans::PropertyValue > aArgSeq;
css::uno::Reference< css::frame::XDispatch > xDispatch;
- VclPtr< ThumbnailView > pView;
+ RecentDocsView* pView;
};
enum class ApplicationType
@@ -53,10 +55,11 @@ template<> struct typed_flags : is_typed_flags xWindow, std::unique_ptr xMenu);
+ virtual ~RecentDocsView() override;
void insertItem(const OUString &rURL, const OUString &rTitle, const BitmapEx &rThumbnail, sal_uInt16 nId);
@@ -70,12 +73,16 @@ public:
/// Update the information in the view.
virtual void Reload() override;
- DECL_STATIC_LINK( RecentDocsView, ExecuteHdl_Impl, void*, void );
+ // launch load of recently used file
+ void PostLoadRecentUsedFile(LoadRecentFile* pLoadRecentFile);
+
+ // received on load of recently used file
+ void DispatchedLoadRecentUsedFile();
private:
- virtual void MouseButtonDown( const MouseEvent& rMEvt ) override;
+ virtual bool MouseButtonDown( const MouseEvent& rMEvt ) override;
- virtual void MouseButtonUp( const MouseEvent& rMEvt ) override;
+ virtual bool MouseButtonUp( const MouseEvent& rMEvt ) override;
virtual void OnItemDblClicked(ThumbnailViewItem *pItem) override;
@@ -85,6 +92,8 @@ private:
bool isAcceptedFile(const OUString &rURL) const;
+ DECL_STATIC_LINK( RecentDocsView, ExecuteHdl_Impl, void*, void );
+
tools::Long mnItemMaxSize;
size_t mnLastMouseDownItem;
@@ -92,6 +101,8 @@ private:
BitmapEx maWelcomeImage;
OUString maWelcomeLine1;
OUString maWelcomeLine2;
+
+ sfx2::LoadRecentFile* mpLoadRecentFile;
};
} // namespace sfx2
diff --git a/sfx2/inc/templatedefaultview.hxx b/sfx2/inc/templatedefaultview.hxx
index 8c50c428792b..c5cb975fe943 100644
--- a/sfx2/inc/templatedefaultview.hxx
+++ b/sfx2/inc/templatedefaultview.hxx
@@ -11,18 +11,17 @@
#include
-class TemplateDefaultView final : public TemplateLocalView
+class TemplateDefaultView : public SfxTemplateLocalView
{
public:
- TemplateDefaultView(Window *pParent);
-
- virtual void reload() override;
+ TemplateDefaultView(std::unique_ptr xWindow,
+ std::unique_ptr xMenu);
virtual void showAllTemplates () override;
- virtual void KeyInput( const KeyEvent& rKEvt ) override;
+ virtual bool KeyInput( const KeyEvent& rKEvt ) override;
- virtual void MouseButtonDown( const MouseEvent& rMEvt ) override;
+ virtual bool MouseButtonDown( const MouseEvent& rMEvt ) override;
void createContextMenu();
diff --git a/sfx2/source/control/recentdocsview.cxx b/sfx2/source/control/recentdocsview.cxx
index 063051642fa0..83b0cb2fed82 100644
--- a/sfx2/source/control/recentdocsview.cxx
+++ b/sfx2/source/control/recentdocsview.cxx
@@ -23,7 +23,6 @@
#include
#include
#include
-#include
#include
#include
#include
@@ -43,6 +42,8 @@
#include
+#include