From a5cc3ce566f1a1ebd5995582efed104fb2793fb0 Mon Sep 17 00:00:00 2001 From: Palenik Mihály Date: Mon, 30 Jun 2014 15:53:56 +0200 Subject: Convert DLG_COLLECTION_VIEW to .ui MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Conflicts: include/svtools/fileview.hxx svtools/source/contnr/fileview.cxx Change-Id: I78b590410ec4e55eeecd2da8ab79738f05e403b5 Reviewed-on: https://gerrit.libreoffice.org/9981 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- svtools/source/contnr/fileview.cxx | 31 ++++++++++++++++++++++--------- svtools/source/contnr/templwin.cxx | 2 +- svtools/source/contnr/templwin.src | 5 ----- 3 files changed, 23 insertions(+), 15 deletions(-) (limited to 'svtools') diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx index 8a4444d1ffca..81bf2dba6a09 100644 --- a/svtools/source/contnr/fileview.cxx +++ b/svtools/source/contnr/fileview.cxx @@ -1094,12 +1094,7 @@ bool ViewTabListBox_Impl::Kill( const OUString& rContent ) return bRet; } - - - - // class SvtFileView ----------------------------------------------------- - SvtFileView::SvtFileView( Window* pParent, WinBits nBits, bool bOnlyFolder, bool bMultiSelection ) : @@ -1125,9 +1120,9 @@ SvtFileView::SvtFileView( Window* pParent, WinBits nBits, pHeaderBar->SetEndDragHdl( LINK( this, SvtFileView, HeaderEndDrag_Impl ) ); } -SvtFileView::SvtFileView( Window* pParent, const ResId& rResId, sal_uInt8 nFlags ) : +SvtFileView::SvtFileView( Window* pParent, WinBits nStyle, sal_uInt8 nFlags ) : - Control( pParent, rResId ) + Control( pParent, nStyle ) { Reference< XComponentContext > xContext = ::comphelper::getProcessComponentContext(); Reference< XInteractionHandler > xInteractionHandler( @@ -1143,8 +1138,6 @@ SvtFileView::SvtFileView( Window* pParent, const ResId& rResId, sal_uInt8 nFlags pHeaderBar->SetEndDragHdl( LINK( this, SvtFileView, HeaderEndDrag_Impl ) ); } - - SvtFileView::~SvtFileView() { // use temp pointer to prevent access of deleted member (GetFocus()) @@ -1153,6 +1146,26 @@ SvtFileView::~SvtFileView() delete pTemp; } +extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSvtFileView(Window *pParent, +VclBuilder::stringmap &rMap) +{ + WinBits nBits = WB_CLIPCHILDREN|WB_LEFT|WB_VCENTER|WB_3DLOOK; + + bool bDropdown = VclBuilder::extractDropdown(rMap); + + if (bDropdown) + nBits |= WB_DROPDOWN; + + return new SvtFileView(pParent, nBits, true, true); +} + + + +Size SvtFileView::GetOptimalSize() const +{ + return LogicToPixel(Size(208, 50), MAP_APPFONT); +} + OUString SvtFileView::GetURL( SvTreeListEntry* pEntry ) const diff --git a/svtools/source/contnr/templwin.cxx b/svtools/source/contnr/templwin.cxx index 6141fae75de2..13c9c0507914 100644 --- a/svtools/source/contnr/templwin.cxx +++ b/svtools/source/contnr/templwin.cxx @@ -411,7 +411,7 @@ SvtFileViewWindow_Impl::SvtFileViewWindow_Impl( SvtTemplateWindow* pParent ) : Window( pParent, WB_DIALOGCONTROL | WB_TABSTOP | WB_BORDER | WB_3DLOOK ), rParent ( *pParent ), - aFileView ( this, SvtResId( CTRL_FILEVIEW ), FILEVIEW_SHOW_NONE | FILEVIEW_SHOW_ONLYTITLE ), + aFileView ( this, WB_TABSTOP | WB_3DLOOK, FILEVIEW_SHOW_NONE | FILEVIEW_SHOW_ONLYTITLE ), bIsTemplateFolder ( false ) { diff --git a/svtools/source/contnr/templwin.src b/svtools/source/contnr/templwin.src index 5343cca11416..7043f18ec008 100644 --- a/svtools/source/contnr/templwin.src +++ b/svtools/source/contnr/templwin.src @@ -25,11 +25,6 @@ // Magenta and Grey as mask colors #define MASK_COL_MAGENTA Color { Red = 0xFFFF ; Green = 0x0000 ; Blue = 0xFFFF ; }; -Control CTRL_FILEVIEW -{ - Pos = MAP_APPFONT ( 0 , 0 ) ; -}; - String STR_SVT_NEWDOC { Text [ en-US ] = "New Document"; -- cgit v1.2.3