[Libreoffice-commits] core.git: 5 commits - fpicker/source fpicker/uiconfig fpicker/UIConfig_fps.mk include/svtools include/vcl svtools/source sw/source vcl/source

Caolán McNamara caolanm at redhat.com
Mon Jun 30 08:32:20 PDT 2014


 fpicker/UIConfig_fps.mk                    |    1 
 fpicker/source/office/OfficeFilePicker.cxx |    1 
 fpicker/source/office/OfficeFilePicker.hrc |    2 
 fpicker/source/office/PlacesListBox.cxx    |    4 
 fpicker/source/office/PlacesListBox.hxx    |    2 
 fpicker/source/office/iodlg.cxx            |  706 +++++------------------------
 fpicker/source/office/iodlg.hrc            |   46 -
 fpicker/source/office/iodlg.hxx            |   16 
 fpicker/source/office/iodlg.src            |  230 +--------
 fpicker/source/office/iodlgimp.cxx         |   53 --
 fpicker/source/office/iodlgimp.hxx         |   20 
 fpicker/uiconfig/ui/explorerfiledialog.ui  |  545 ++++++++++++++++++++++
 include/svtools/fileview.hxx               |    2 
 include/svtools/helpid.hrc                 |    4 
 include/vcl/bmpacc.hxx                     |  124 +----
 include/vcl/syswin.hxx                     |    1 
 svtools/source/contnr/fileview.cxx         |    5 
 sw/source/ui/frmdlg/frmpage.cxx            |   10 
 vcl/source/window/syswin.cxx               |   10 
 19 files changed, 797 insertions(+), 985 deletions(-)

New commits:
commit 1caad856de1c1c5b0a8c31d2226416a2db9632cd
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jun 30 16:29:48 2014 +0100

    Resolves: fdo#80681 widget is not transparent
    
    regression from 12dfca2ea61116665a7abefd43a9a4caa2b8920b
    Author: Armin Le Grand <alg at apache.org>
    Date:   Mon May 14 15:16:00 2012 +0000
        Resolves: #i119307# added deletion of sw's BmpWindow control...
        ...due to the fact that graphics may be transparent
    
    Change-Id: I7eb2ee8ed53f0ef907a4573a735c71de43b6e8d3

diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index 6ef2811..3197345 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -2606,8 +2606,12 @@ BmpWindow::BmpWindow(Window* pPar, WinBits nStyle)
     , bGraphic(false)
     , bLeftAlign(false)
 {
-    // #i119307# use background, the graphic might have transparency
-    SetBackground(Wallpaper(Color(COL_WHITE)));
+    SetBackground();
+    SetPaintTransparent(sal_True);
+    // #i119307# the graphic might have transparency, set up white as the color
+    // to use when drawing a rectangle under the image
+    SetLineColor(COL_WHITE);
+    SetFillColor(COL_WHITE);
 }
 
 Size BmpWindow::GetOptimalSize() const
@@ -2665,7 +2669,7 @@ void BmpWindow::Paint( const Rectangle& )
     }
 
     // #i119307# clear window background, the graphic might have transparency
-    Erase();
+    DrawRect(Rectangle(aPntPos, aPntSz));
 
     if ( bGraphic )
         aGraphic.Draw( this, aPntPos, aPntSz );
commit 01da41b3085d4873dd69fd053102506de861db57
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jun 30 15:07:07 2014 +0100

    tweak helpids now
    
    Change-Id: I2ab7255f634d626cf34ec9f1dcb19d5f24db1c09

diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx
index babf443..15ae59c 100644
--- a/fpicker/source/office/iodlg.cxx
+++ b/fpicker/source/office/iodlg.cxx
@@ -543,6 +543,7 @@ void SvtFileDialog::Init_Impl
     m_aImages = ImageList( SvtResId( RID_FILEPICKER_IMAGES ) );
     Window *pUpContainer = get<Window>("up");
     _pImp->_pBtnUp = new SvtUpButton_Impl(pUpContainer, this, 0);
+    _pImp->_pBtnUp->SetHelpId( HID_FILEOPEN_LEVELUP );
     _pImp->_pBtnUp->set_vexpand(true);
     _pImp->_pBtnUp->Show();
 
@@ -574,7 +575,6 @@ void SvtFileDialog::Init_Impl
     // in save mode, don't use the autocompletion as selection in the edit part
     bool bSaveMode = ( FILEDLG_MODE_SAVE == _pImp->_eMode );
     _pImp->_pEdFileName->SetNoURLSelection( bSaveMode );
-    _pImp->_pEdFileName->SetHelpId( HID_FILEDLG_AUTOCOMPLETEBOX );
 
     _pImp->_pBtnConnectToServer->SetAccessibleName( _pImp->_pBtnConnectToServer->GetQuickHelpText() );
     _pImp->_pBtnNewFolder->SetStyle( _pImp->_pBtnNewFolder->GetStyle() | WB_NOPOINTERFOCUS );
@@ -2671,6 +2671,7 @@ void SvtFileDialog::AddControls_Impl( )
     }
 
     _pImp->_pPlaces = new PlacesListBox(_pContainer, this, SVT_RESSTR(STR_PLACES_TITLE), WB_BORDER);
+    _pImp->_pPlaces->SetHelpId("SVT_HID_FILESAVE_PLACES_LISTBOX");
     Size aSize(LogicToPixel(Size(50, 85), MAP_APPFONT));
     _pImp->_pPlaces->set_height_request(aSize.Height());
     _pImp->_pPlaces->set_width_request(aSize.Width());
diff --git a/include/svtools/helpid.hrc b/include/svtools/helpid.hrc
index 479a214..6470e0a 100644
--- a/include/svtools/helpid.hrc
+++ b/include/svtools/helpid.hrc
@@ -23,7 +23,6 @@
 #define HID_FILEDLG_LINK_CB                                    "SVT_HID_FILEDLG_LINK_CB"
 #define HID_FILEDLG_PREVIEW_CB                                 "SVT_HID_FILEDLG_PREVIEW_CB"
 #define HID_FILEDLG_STANDARD                                  "SVT_HID_FILEDLG_STANDARD"
-#define HID_FILEDLG_AUTOCOMPLETEBOX                           "SVT_HID_FILEDLG_AUTOCOMPLETEBOX"
 
 // Help ids of template dialog
 #define HID_TEMPLATEDLG_DIALOG                                 "SVT_HID_TEMPLATEDLG_DIALOG"
@@ -36,8 +35,6 @@
 #define HID_TEMPLATEDLG_TB_PREVIEW                             "SVT_HID_TEMPLATEDLG_TB_PREVIEW"
 
 // Help ids for the filepicker dialogs
-#define HID_EXPLORERDLG_FILE                                   "SVT_HID_EXPLORERDLG_FILE"
-
 // help ids for fileview contextmenu
 #define HID_FILEVIEW_MENU_DELETE                               "SVT_HID_FILEVIEW_MENU_DELETE"
 #define HID_FILEVIEW_MENU_RENAME                               "SVT_HID_FILEVIEW_MENU_RENAME"
@@ -57,6 +54,7 @@
 #define HID_FILESAVE_DIALOG                                    "SVT_HID_FILESAVE_DIALOG"
 #define HID_FILESAVE_DOPLAY                                    "SVT_HID_FILESAVE_DOPLAY"
 
+#define HID_FILEOPEN_LEVELUP                                   "SVT_HID_FILEOPEN_LEVELUP"
 #define HID_FILEOPEN_READONLY                                  "SVT_HID_FILEOPEN_READONLY"
 #define HID_FILEOPEN_VERSION                                   "SVT_HID_FILEOPEN_VERSION"
 #define HID_FILEOPEN_IMAGE_TEMPLATE                            "SVT_HID_FILEOPEN_IMAGE_TEMPLATE"
commit eb8c56127af9843f55eea649f210c6077c97ea49
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jun 30 14:38:57 2014 +0100

    rework resize into a custom widget
    
    so that the order of resizing will happen in the right sequence
    to work correctly every time
    
    Change-Id: I1adffe276db3fb80eb34ca74c2ceb51a6ee28526

diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx
index fc1d24b..babf443 100644
--- a/fpicker/source/office/iodlg.cxx
+++ b/fpicker/source/office/iodlg.cxx
@@ -412,7 +412,57 @@ SvtFileDialog::SvtFileDialog ( Window* _pParent, WinBits nBits )
     Init_Impl( nBits );
 }
 
+class CustomContainer : public Window
+{
+    SvtExpFileDlg_Impl* _pImp;
+    SvtFileView* _pFileView;
+    Splitter* _pSplitter;
+
+public:
+    CustomContainer(Window *pParent)
+        : Window(pParent)
+        , _pImp(NULL)
+        , _pFileView(NULL)
+        , _pSplitter(NULL)
+    {
+    }
+
+    void init(SvtExpFileDlg_Impl* pImp,
+              SvtFileView* pFileView,
+              Splitter* pSplitter)
+    {
+        _pImp = pImp;
+        _pFileView = pFileView;
+        _pSplitter = pSplitter;
+    }
 
+    virtual void Resize() SAL_OVERRIDE
+    {
+        Window::Resize();
+
+        if (!_pImp || !_pImp->_pPlaces)
+            return;
+
+        Size aSize = GetSizePixel();
+
+        Point aBoxPos(_pFileView->GetPosPixel());
+        Size aNewSize(aSize.Width() - aBoxPos.X(), aSize.Height());
+        _pFileView->SetSizePixel( aNewSize );
+
+        // Resize the Splitter to fit the height
+        Size splitterNewSize = _pSplitter->GetSizePixel( );
+        splitterNewSize.Height() = aSize.Height();
+        _pSplitter->SetSizePixel( splitterNewSize );
+        sal_Int32 nMinX = _pImp->_pPlaces->GetPosPixel( ).X( );
+        sal_Int32 nMaxX = _pFileView->GetPosPixel( ).X( ) + _pFileView->GetSizePixel( ).Width() - nMinX;
+        _pSplitter->SetDragRectPixel( Rectangle( Point( nMinX, 0 ), Size( nMaxX, aSize.Width() ) ) );
+
+        // Resize the places list box to fit the height of the FileView
+        Size placesNewSize(_pImp->_pPlaces->GetSizePixel());
+        placesNewSize.Height() = aSize.Height();
+        _pImp->_pPlaces->SetSizePixel( placesNewSize );
+    }
+};
 
 SvtFileDialog::~SvtFileDialog()
 {
@@ -451,6 +501,7 @@ SvtFileDialog::~SvtFileDialog()
     delete _pImp;
     delete _pFileView;
     delete _pSplitter;
+    delete _pContainer;
     delete _pPrevBmp;
     delete _pUserControls;
 }
@@ -496,7 +547,6 @@ void SvtFileDialog::Init_Impl
     _pImp->_pBtnUp->Show();
 
     _pImp->_nStyle = nStyle;
-    _pImp->_a6Size = LogicToPixel( Size( 6, 6 ), MAP_APPFONT );
     _pImp->_eMode = ( nStyle & WB_SAVEAS ) ? FILEDLG_MODE_SAVE : FILEDLG_MODE_OPEN;
     _pImp->_eDlgType = FILEDLG_TYPE_FILEDLG;
 
@@ -534,12 +584,14 @@ void SvtFileDialog::Init_Impl
     if ( ( nStyle & SFXWB_MULTISELECTION ) == SFXWB_MULTISELECTION )
         _pImp->_bMultiSelection = true;
 
-    Window *pContainer = get<Window>("container");
+    _pContainer = new CustomContainer(get<Window>("container"));
     Size aSize(LogicToPixel(Size(270, 85), MAP_APPFONT));
-    pContainer->set_height_request(aSize.Height());
-    pContainer->set_width_request(aSize.Width());
-    pContainer->SetSizePixel(aSize);
-    _pFileView = new SvtFileView( pContainer, WB_BORDER,
+    _pContainer->set_height_request(aSize.Height());
+    _pContainer->set_width_request(aSize.Width());
+    _pContainer->set_hexpand(true);
+    _pContainer->set_vexpand(true);
+
+    _pFileView = new SvtFileView( _pContainer, WB_BORDER,
                                        FILEDLG_TYPE_PATHDLG == _pImp->_eDlgType,
                                        _pImp->_bMultiSelection );
     _pFileView->Show();
@@ -547,7 +599,7 @@ void SvtFileDialog::Init_Impl
     _pFileView->SetHelpId( HID_FILEDLG_STANDARD );
     _pFileView->SetStyle( _pFileView->GetStyle() | WB_TABSTOP );
 
-    _pSplitter = new Splitter( pContainer, WB_HSCROLL );
+    _pSplitter = new Splitter( _pContainer, WB_HSCROLL );
     _pSplitter->SetBackground( Wallpaper( Application::GetSettings().GetStyleSettings().GetFaceColor() ));
     _pSplitter->SetSplitHdl( LINK( this, SvtFileDialog, Split_Hdl ) );
 
@@ -658,11 +710,12 @@ void SvtFileDialog::Init_Impl
         OUString( "/org.openoffice.Office.UI/FilePicker" )
     );
 
+    _pContainer->init(_pImp, _pFileView, _pSplitter);
+    _pContainer->Show();
+
     Resize();
 }
 
-
-
 IMPL_STATIC_LINK( SvtFileDialog, NewFolderHdl_Impl, PushButton*, EMPTYARG )
 {
     pThis->_pFileView->EndInplaceEditing( false );
@@ -2239,9 +2292,6 @@ void SvtFileDialog::InitSize()
     if ( _pImp->_aIniKey.isEmpty() )
         return;
 
-    Size aDlgSize = GetResizeOutputSizePixel();
-    SetMinOutputSizePixel( aDlgSize );
-
     // initialize from config
     SvtViewOptions aDlgOpt( E_DIALOG, _pImp->_aIniKey );
 
@@ -2378,6 +2428,7 @@ void SvtFileDialog::DataChanged( const DataChangedEvent& _rDCEvt )
     ModalDialog::DataChanged( _rDCEvt );
 }
 
+
 void SvtFileDialog::Resize()
 {
     Dialog::Resize();
@@ -2385,56 +2436,6 @@ void SvtFileDialog::Resize()
     if ( IsRollUp() )
         return;
 
-    Window *pContainer = get<Window>("container");
-    long nContainerHeight = pContainer->GetSizePixel().Height();
-
-    Size aDlgSize = GetResizeOutputSizePixel();
-    Size aOldSize = _pImp->_aDlgSize;
-    _pImp->_aDlgSize = aDlgSize;
-    long nWinDeltaW = 0;
-
-    if(_pPrevBmp)
-    {
-        nWinDeltaW = _pPrevWin->GetOutputSizePixel().Width();
-        _pPrevBmp->SetSizePixel(_pPrevWin->GetOutputSizePixel());
-    }
-
-    Size aNewSize = _pFileView->GetSizePixel();
-    Point aBoxPos( _pFileView->GetPosPixel() );
-    long nDeltaY = aNewSize.Height();
-    long nDeltaX = aNewSize.Width();
-    aNewSize.Height() = nContainerHeight;
-    aNewSize.Width() = aDlgSize.Width() - aBoxPos.X() - 2*_pImp->_a6Size.Width() - nWinDeltaW;
-    if ( aOldSize.Height() )
-        nDeltaY = _pImp->_aDlgSize.Height() - aOldSize.Height();
-    else
-        nDeltaY = aNewSize.Height() - nDeltaY;
-    nDeltaX = aNewSize.Width() - nDeltaX;
-
-    if ( nWinDeltaW )
-        nWinDeltaW = nDeltaX * 2 / 3;
-    aNewSize.Width() -= nWinDeltaW;
-    nDeltaX -= nWinDeltaW;
-
-    _pFileView->SetSizePixel( aNewSize );
-
-    // Resize the Splitter to fit the height
-    Size splitterNewSize = _pSplitter->GetSizePixel( );
-    splitterNewSize.Height() = nContainerHeight;
-    _pSplitter->SetSizePixel( splitterNewSize );
-    sal_Int32 nMinX = _pImp->_pPlaces->GetPosPixel( ).X( );
-    sal_Int32 nMaxX = _pFileView->GetPosPixel( ).X( ) + _pFileView->GetSizePixel( ).Width() - nMinX;
-    _pSplitter->SetDragRectPixel( Rectangle( Point( nMinX, 0 ), Size( nMaxX, aDlgSize.Width() ) ) );
-
-    // Resize the places list box to fit the height of the FileView
-    Size placesNewSize(_pImp->_pPlaces->GetSizePixel());
-    placesNewSize.Height() = nContainerHeight;
-    _pImp->_pPlaces->SetSizePixel( placesNewSize );
-
-    if ( !nDeltaY && !nDeltaX )
-        // This resize was only called to show or hide the indicator.
-        return;
-
     if ( _pFileNotifier )
         _pFileNotifier->notify( DIALOG_SIZE_CHANGED, 0 );
 }
@@ -2669,9 +2670,7 @@ void SvtFileDialog::AddControls_Impl( )
         _pImp->_pLbImageTemplates->Show();
     }
 
-    Window *pContainer;
-        get(pContainer, "container");
-        _pImp->_pPlaces = new PlacesListBox( pContainer, this, SVT_RESSTR(STR_PLACES_TITLE), WB_BORDER );
+    _pImp->_pPlaces = new PlacesListBox(_pContainer, this, SVT_RESSTR(STR_PLACES_TITLE), WB_BORDER);
     Size aSize(LogicToPixel(Size(50, 85), MAP_APPFONT));
     _pImp->_pPlaces->set_height_request(aSize.Height());
     _pImp->_pPlaces->set_width_request(aSize.Width());
diff --git a/fpicker/source/office/iodlg.hxx b/fpicker/source/office/iodlg.hxx
index 58fd919..4984321 100644
--- a/fpicker/source/office/iodlg.hxx
+++ b/fpicker/source/office/iodlg.hxx
@@ -80,6 +80,8 @@ class SvtFileDialogFilter_Impl;
 
 
 class SvtExpFileDlg_Impl;
+class CustomContainer;
+
 class SvtFileDialog : public ModalDialog, public ::svt::IFilePickerController
 {
 private:
@@ -93,6 +95,7 @@ private:
     PushButton*                 _pPbPlay;
     Window*                     _pPrevWin;
     FixedBitmap*                _pPrevBmp;
+    CustomContainer*            _pContainer;
     SvtFileView*                _pFileView;
     Splitter*                   _pSplitter;
     ::svt::IFilePickerListener* _pFileNotifier;
diff --git a/fpicker/source/office/iodlgimp.hxx b/fpicker/source/office/iodlgimp.hxx
index 25b90d1..9b5d5e2 100644
--- a/fpicker/source/office/iodlgimp.hxx
+++ b/fpicker/source/office/iodlgimp.hxx
@@ -181,9 +181,7 @@ public:
     // MultiSelection?
     bool                        _bMultiSelection;
 
-    // remember fixsizes for resize
-    Size                            _a6Size;
-    Size                            _aDlgSize;
+    // remember sizes
     OUString                        _aIniKey;
 
     bool                        _bFolderHasOpened;
diff --git a/fpicker/uiconfig/ui/explorerfiledialog.ui b/fpicker/uiconfig/ui/explorerfiledialog.ui
index 2a82568..de95524 100644
--- a/fpicker/uiconfig/ui/explorerfiledialog.ui
+++ b/fpicker/uiconfig/ui/explorerfiledialog.ui
@@ -121,11 +121,15 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkDrawingArea" id="container">
+                  <object class="GtkBox" id="container">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
                     <property name="hexpand">True</property>
                     <property name="vexpand">True</property>
+                    <property name="orientation">vertical</property>
+                    <child>
+                      <placeholder/>
+                    </child>
                   </object>
                   <packing>
                     <property name="expand">True</property>
diff --git a/include/vcl/syswin.hxx b/include/vcl/syswin.hxx
index f5a1eca..871c52d 100644
--- a/include/vcl/syswin.hxx
+++ b/include/vcl/syswin.hxx
@@ -203,7 +203,6 @@ public:
     const Size&     GetMinOutputSizePixel() const { return maMinOutSize; }
     void            SetMaxOutputSizePixel( const Size& rSize );
     const Size&     GetMaxOutputSizePixel() const;
-    Size            GetResizeOutputSizePixel() const;
 
     void            SetWindowState(const OString& rStr);
     OString    GetWindowState(sal_uLong nMask = WINDOWSTATE_MASK_ALL) const;
diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx
index 508b582..c4077a1 100644
--- a/vcl/source/window/syswin.cxx
+++ b/vcl/source/window/syswin.cxx
@@ -386,16 +386,6 @@ const Size& SystemWindow::GetMaxOutputSizePixel() const
     return mpImplData->maMaxOutSize;
 }
 
-Size SystemWindow::GetResizeOutputSizePixel() const
-{
-    Size aSize = GetOutputSizePixel();
-    if ( aSize.Width() < maMinOutSize.Width() )
-        aSize.Width() = maMinOutSize.Width();
-    if ( aSize.Height() < maMinOutSize.Height() )
-        aSize.Height() = maMinOutSize.Height();
-    return aSize;
-}
-
 static void ImplWindowStateFromStr(WindowStateData& rData,
     const OString& rStr)
 {
commit d48af86c9b745d750c97ba9b1c59ea936bcab0ae
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jun 30 14:33:03 2014 +0100

    DBG_ASSERT->assert
    
    Change-Id: I977e65d15970a523a28076949544fd846e68ec0a

diff --git a/include/vcl/bmpacc.hxx b/include/vcl/bmpacc.hxx
index 153464f..b64b91b 100644
--- a/include/vcl/bmpacc.hxx
+++ b/include/vcl/bmpacc.hxx
@@ -27,8 +27,6 @@
 
 
 // - Access defines -
-
-
 #define DECL_FORMAT_GETPIXEL( Format ) \
 static BitmapColor GetPixelFor##Format( ConstScanline pScanline, long nX, const ColorMask& rMask );
 
@@ -59,18 +57,12 @@ case( BMP_FORMAT##Format ):            \
 }                                       \
 break;
 
-
-
 // - Access functions -
-
-
 typedef BitmapColor (*FncGetPixel)( ConstScanline pScanline, long nX, const ColorMask& rMask );
 typedef void (*FncSetPixel)( Scanline pScanline, long nX, const BitmapColor& rBitmapColor, const ColorMask& rMask );
 
 
 // - BitmapReadAccess -
-
-
 class VCL_DLLPUBLIC BitmapReadAccess
 {
     friend class BitmapWriteAccess;
@@ -167,10 +159,7 @@ public:
     BitmapColor GetColorWithFallback( double fY, double fX, const BitmapColor& rFallback ) const;
 };
 
-
 // - BitmapWriteAccess -
-
-
 class VCL_DLLPUBLIC BitmapWriteAccess : public BitmapReadAccess
 {
 public:
@@ -212,84 +201,61 @@ private:
     BitmapWriteAccess&          operator=( const BitmapWriteAccess& ) { return *this; }
 };
 
-
 // - Inlines -
-
-
 inline bool BitmapReadAccess::operator!() const
 {
     return( mpBuffer == NULL );
 }
 
-
-
 inline long BitmapReadAccess::Width() const
 {
     return( mpBuffer ? mpBuffer->mnWidth : 0L );
 }
 
-
-
 inline long BitmapReadAccess::Height() const
 {
     return( mpBuffer ? mpBuffer->mnHeight : 0L );
 }
 
-
-
 inline Point BitmapReadAccess::TopLeft() const
 {
     return Point();
 }
 
-
-
 inline Point BitmapReadAccess::BottomRight() const
 {
     return Point( Width() - 1L, Height() - 1L );
 }
 
-
-
 inline bool BitmapReadAccess::IsTopDown() const
 {
-    DBG_ASSERT( mpBuffer, "Access is not valid!" );
+    assert(mpBuffer && "Access is not valid!");
     return mpBuffer && ( BMP_SCANLINE_ADJUSTMENT( mpBuffer->mnFormat ) == BMP_FORMAT_TOP_DOWN );
 }
 
-
-
 inline bool BitmapReadAccess::IsBottomUp() const
 {
     return !IsTopDown();
 }
 
-
-
 inline sal_uLong BitmapReadAccess::GetScanlineFormat() const
 {
-    DBG_ASSERT( mpBuffer, "Access is not valid!" );
+    assert(mpBuffer && "Access is not valid!");
     return( mpBuffer ? BMP_SCANLINE_FORMAT( mpBuffer->mnFormat ) : 0UL );
 }
 
-
-
 inline sal_uLong BitmapReadAccess::GetScanlineSize() const
 {
-    DBG_ASSERT( mpBuffer, "Access is not valid!" );
+    assert(mpBuffer && "Access is not valid!");
     return( mpBuffer ? mpBuffer->mnScanlineSize : 0UL );
 }
 
-
-
 inline sal_uInt16  BitmapReadAccess::GetBitCount() const
 {
-    DBG_ASSERT( mpBuffer, "Access is not valid!" );
+    assert(mpBuffer && "Access is not valid!");
     return( mpBuffer ? mpBuffer->mnBitCount : 0 );
 }
 
-
-
 inline BitmapColor BitmapReadAccess::GetBestMatchingColor( const BitmapColor& rBitmapColor )
 {
     if( HasPalette() )
@@ -298,68 +264,52 @@ inline BitmapColor BitmapReadAccess::GetBestMatchingColor( const BitmapColor& rB
         return rBitmapColor;
 }
 
-
-
 inline Scanline BitmapReadAccess::GetBuffer() const
 {
-    DBG_ASSERT( mpBuffer, "Access is not valid!" );
+    assert(mpBuffer && "Access is not valid!");
     return( mpBuffer ? mpBuffer->mpBits : NULL );
 }
 
-
-
 inline Scanline BitmapReadAccess::GetScanline( long nY ) const
 {
-    DBG_ASSERT( mpBuffer, "Access is not valid!" );
-    DBG_ASSERT( nY < mpBuffer->mnHeight, "y-coordinate out of range!" );
+    assert(mpBuffer && "Access is not valid!");
+    assert(nY < mpBuffer->mnHeight && "y-coordinate out of range!");
     return( mpBuffer ? mpScanBuf[ nY ] : NULL );
 }
 
-
-
 inline bool BitmapReadAccess::HasPalette() const
 {
-    DBG_ASSERT( mpBuffer, "Access is not valid!" );
+    assert(mpBuffer && "Access is not valid!");
     return( mpBuffer && !!mpBuffer->maPalette );
 }
 
-
-
 inline const BitmapPalette& BitmapReadAccess::GetPalette() const
 {
-    DBG_ASSERT( mpBuffer, "Access is not valid!" );
+    assert(mpBuffer && "Access is not valid!");
     return mpBuffer->maPalette;
 }
 
-
-
 inline sal_uInt16 BitmapReadAccess::GetPaletteEntryCount() const
 {
-    DBG_ASSERT( HasPalette(), "Bitmap has no palette!" );
+    assert(HasPalette() && "Bitmap has no palette!");
     return( HasPalette() ? mpBuffer->maPalette.GetEntryCount() : 0 );
 }
 
-
-
 inline const BitmapColor& BitmapReadAccess::GetPaletteColor( sal_uInt16 nColor ) const
 {
-    DBG_ASSERT( mpBuffer, "Access is not valid!" );
-    DBG_ASSERT( HasPalette(), "Bitmap has no palette!" );
+    assert(mpBuffer && "Access is not valid!");
+    assert(HasPalette() && "Bitmap has no palette!");
     return mpBuffer->maPalette[ nColor ];
 }
 
-
-
 inline const BitmapColor& BitmapReadAccess::GetBestPaletteColor( const BitmapColor& rBitmapColor ) const
 {
     return GetPaletteColor( GetBestPaletteIndex( rBitmapColor ) );
 }
 
-
-
 inline bool BitmapReadAccess::HasColorMask() const
 {
-    DBG_ASSERT( mpBuffer, "Access is not valid!" );
+    assert(mpBuffer && "Access is not valid!");
     const sal_uLong nFormat = BMP_SCANLINE_FORMAT( mpBuffer->mnFormat );
 
     return( nFormat == BMP_FORMAT_8BIT_TC_MASK  ||
@@ -369,21 +319,17 @@ inline bool BitmapReadAccess::HasColorMask() const
             nFormat == BMP_FORMAT_32BIT_TC_MASK );
 }
 
-
-
 inline ColorMask& BitmapReadAccess::GetColorMask() const
 {
-    DBG_ASSERT( mpBuffer, "Access is not valid!" );
+    assert(mpBuffer && "Access is not valid!");
     return mpBuffer->maColorMask;
 }
 
-
-
 inline BitmapColor BitmapReadAccess::GetPixel( long nY, long nX ) const
 {
-    DBG_ASSERT( mpBuffer, "Access is not valid!" );
-    DBG_ASSERT( nX < mpBuffer->mnWidth, "x-coordinate out of range!" );
-    DBG_ASSERT( nY < mpBuffer->mnHeight, "y-coordinate out of range!" );
+    assert(mpBuffer && "Access is not valid!");
+    assert(nX < mpBuffer->mnWidth && "x-coordinate out of range!");
+    assert(nY < mpBuffer->mnHeight && "y-coordinate out of range!");
     return mFncGetPixel( mpScanBuf[ nY ], nX, maColorMask );
 }
 
@@ -392,24 +338,18 @@ inline sal_uInt8 BitmapReadAccess::GetPixelIndex( long nY, long nX ) const
     return GetPixel( nY, nX ).GetBlueOrIndex();
 }
 
-
-
 inline BitmapColor BitmapReadAccess::GetPixelFromData( const sal_uInt8* pData, long nX ) const
 {
-    DBG_ASSERT( pData, "Access is not valid!" );
+    assert(pData && "Access is not valid!");
     return mFncGetPixel( pData, nX, maColorMask );
 }
 
-
-
 inline void BitmapReadAccess::SetPixelOnData( sal_uInt8* pData, long nX, const BitmapColor& rBitmapColor )
 {
-    DBG_ASSERT( pData, "Access is not valid!" );
+    assert(pData && "Access is not valid!");
     mFncSetPixel( pData, nX, rBitmapColor, maColorMask );
 }
 
-
-
 inline BitmapColor BitmapReadAccess::GetColor( long nY, long nX ) const
 {
     if( HasPalette() )
@@ -418,45 +358,35 @@ inline BitmapColor BitmapReadAccess::GetColor( long nY, long nX ) const
         return GetPixel( nY, nX );
 }
 
-
-
 inline sal_uInt8 BitmapReadAccess::GetLuminance( long nY, long nX ) const
 {
     return GetColor( nY, nX ).GetLuminance();
 }
 
-
-
 inline void BitmapWriteAccess::SetPalette( const BitmapPalette& rPalette )
 {
-    DBG_ASSERT( mpBuffer, "Access is not valid!" );
+    assert(mpBuffer && "Access is not valid!");
     mpBuffer->maPalette = rPalette;
 }
 
-
-
 inline void BitmapWriteAccess::SetPaletteEntryCount( sal_uInt16 nCount )
 {
-    DBG_ASSERT( mpBuffer, "Access is not valid!" );
+    assert(mpBuffer && "Access is not valid!");
     mpBuffer->maPalette.SetEntryCount( nCount );
 }
 
-
-
 inline void BitmapWriteAccess::SetPaletteColor( sal_uInt16 nColor, const BitmapColor& rBitmapColor )
 {
-    DBG_ASSERT( mpBuffer, "Access is not valid!" );
-    DBG_ASSERT( HasPalette(), "Bitmap has no palette!" );
+    assert(mpBuffer && "Access is not valid!");
+    assert(HasPalette() && "Bitmap has no palette!");
     mpBuffer->maPalette[ nColor ] = rBitmapColor;
 }
 
-
-
 inline void BitmapWriteAccess::SetPixel( long nY, long nX, const BitmapColor& rBitmapColor )
 {
-    DBG_ASSERT( mpBuffer, "Access is not valid!" );
-    DBG_ASSERT( nX < mpBuffer->mnWidth, "x-coordinate out of range!" );
-    DBG_ASSERT( nY < mpBuffer->mnHeight, "y-coordinate out of range!" );
+    assert(mpBuffer && "Access is not valid!");
+    assert(nX < mpBuffer->mnWidth && "x-coordinate out of range!");
+    assert(nY < mpBuffer->mnHeight && "y-coordinate out of range!");
     mFncSetPixel( mpScanBuf[ nY ], nX, rBitmapColor, maColorMask );
 }
 
@@ -465,8 +395,6 @@ inline void BitmapWriteAccess::SetPixelIndex( long nY, long nX, sal_uInt8 cIndex
     SetPixel( nY, nX, BitmapColor( cIndex ));
 }
 
-
-
 #endif // INCLUDED_VCL_BMPACC_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit f90eb33a268bdcd1c52aea5670a58267b0907096
Author: Szymon KÅ‚os <eszkadev at gmail.com>
Date:   Sat Jun 28 16:10:39 2014 +0200

    DLG_FPICKER_EXPLORERFILE conversion to .ui
    
    Change-Id: I5d8f5d0182fb6af5111b60caa29912d313c2efa0

diff --git a/fpicker/UIConfig_fps.mk b/fpicker/UIConfig_fps.mk
index c18b90c..c558258 100644
--- a/fpicker/UIConfig_fps.mk
+++ b/fpicker/UIConfig_fps.mk
@@ -10,6 +10,7 @@
 $(eval $(call gb_UIConfig_UIConfig,fps))
 
 $(eval $(call gb_UIConfig_add_uifiles,fps,\
+	fpicker/uiconfig/ui/explorerfiledialog \
 	fpicker/uiconfig/ui/foldernamedialog \
 ))
 
diff --git a/fpicker/source/office/OfficeFilePicker.cxx b/fpicker/source/office/OfficeFilePicker.cxx
index 4c1b5f8..3c83a32 100644
--- a/fpicker/source/office/OfficeFilePicker.cxx
+++ b/fpicker/source/office/OfficeFilePicker.cxx
@@ -193,7 +193,6 @@ void SvtFilePicker::prepareExecute()
                 aAccess.enableControl( rEntry.m_nElementID, rEntry.m_bEnabled );
         }
 
-        getDialog()->updateListboxLabelSizes();
     }
 
     if ( m_pFilterList && !m_pFilterList->empty() )
diff --git a/fpicker/source/office/OfficeFilePicker.hrc b/fpicker/source/office/OfficeFilePicker.hrc
index c3df806..6aaf88e 100644
--- a/fpicker/source/office/OfficeFilePicker.hrc
+++ b/fpicker/source/office/OfficeFilePicker.hrc
@@ -11,8 +11,6 @@
 
 #include <vcl/fpicker.hrc>
 
-#define DLG_FPICKER_EXPLORERFILE                    (RID_FPICKER_START+14)
-
 #define DLG_FPICKER_PLACE_EDIT                      (RID_FPICKER_START+16)
 
 #define RID_FILEPICKER_IMAGES                       (RID_FPICKER_START+17)
diff --git a/fpicker/source/office/PlacesListBox.cxx b/fpicker/source/office/PlacesListBox.cxx
index 67430c5..09141b6 100644
--- a/fpicker/source/office/PlacesListBox.cxx
+++ b/fpicker/source/office/PlacesListBox.cxx
@@ -53,8 +53,8 @@ void PlacesListBox_Impl::MouseButtonUp( const MouseEvent& rMEvt )
     mpParent->updateView( );
 }
 
-PlacesListBox::PlacesListBox( SvtFileDialog* pFileDlg, const OUString& rTitle, const ResId& rResId ) :
-    Control( pFileDlg, rResId ),
+PlacesListBox::PlacesListBox( Window* pParent, SvtFileDialog* pFileDlg, const OUString& rTitle, WinBits nBits ) :
+    Control( pParent, nBits ),
     maPlaces( ),
     mpDlg( pFileDlg ),
     mpImpl( NULL ),
diff --git a/fpicker/source/office/PlacesListBox.hxx b/fpicker/source/office/PlacesListBox.hxx
index 19a5963..c92b80e 100644
--- a/fpicker/source/office/PlacesListBox.hxx
+++ b/fpicker/source/office/PlacesListBox.hxx
@@ -48,7 +48,7 @@ class PlacesListBox : public Control
         bool                 mbSelectionChanged;
 
     public:
-        PlacesListBox( SvtFileDialog* pFileDlg, const OUString& rTitle, const ResId& rResId );
+        PlacesListBox( Window* pParent, SvtFileDialog* pFileDlg, const OUString& rTitle, WinBits nBits );
         virtual ~PlacesListBox( );
 
         void AppendPlace( PlacePtr pPlace );
diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx
index cbe92b5..fc1d24b 100644
--- a/fpicker/source/office/iodlg.cxx
+++ b/fpicker/source/office/iodlg.cxx
@@ -368,7 +368,7 @@ SvtFileDialog::SvtFileDialog
     WinBits nBits,
     WinBits nExtraBits
 ) :
-    ModalDialog( _pParent, SvtResId( DLG_FPICKER_EXPLORERFILE ) )
+    ModalDialog( _pParent, "ExplorerFileDialog", "fps/ui/explorerfiledialog.ui" )
 
     ,_pUserControls( NULL )
     ,_pCbReadOnly( NULL )
@@ -393,7 +393,7 @@ SvtFileDialog::SvtFileDialog
 
 
 SvtFileDialog::SvtFileDialog ( Window* _pParent, WinBits nBits )
-    :ModalDialog( _pParent, SvtResId( DLG_FPICKER_EXPLORERFILE ) )
+    :ModalDialog( _pParent, "ExplorerFileDialog", "fps/ui/explorerfiledialog.ui" )
     ,_pUserControls( NULL )
     ,_pCbReadOnly( NULL )
     ,_pCbLinkBox( NULL)
@@ -451,26 +451,49 @@ SvtFileDialog::~SvtFileDialog()
     delete _pImp;
     delete _pFileView;
     delete _pSplitter;
-
-    delete _pCbReadOnly;
-    delete _pCbLinkBox;
-    delete _pCbPreviewBox;
-    delete _pCbSelection;
-    delete _pPbPlay;
-    delete _pPrevWin;
     delete _pPrevBmp;
-
     delete _pUserControls;
 }
 
-
-
 void SvtFileDialog::Init_Impl
 (
     WinBits nStyle
 )
 {
+    get(_pCbReadOnly, "readonly");
+    get(_pCbLinkBox, "link");
+    get(_pCbPreviewBox, "cb_preview");
+    get(_pCbSelection, "selection");
+    get(_pPrevWin, "preview");
+    get(_pPbPlay, "play");
+    get(_pImp->_pCbOptions, "options");
+    get(_pImp->_pFtFileName, "file_name_label");
+    get(_pImp->_pEdFileName, "file_name");
+    get(_pImp->_pFtFileType, "file_type_label");
+    get(_pImp->_pLbFilter, "file_type");
+    get(_pImp->_pEdCurrentPath, "current_path");
+    get(_pImp->_pBtnFileOpen, "open");
+    get(_pImp->_pBtnCancel, "cancel");
+    get(_pImp->_pBtnHelp, "help");
+    get(_pImp->_pBtnConnectToServer, "connect_to_server");
+    get(_pImp->_pBtnNewFolder, "new_folder");
+    get(_pImp->_pCbPassword, "password");
+    get(_pImp->_pCbAutoExtension, "extension");
+    get(_pImp->_pFtFileVersion, "shared_label");
+    get(_pImp->_pLbFileVersion, "shared");
+    get(_pImp->_pFtTemplates, "shared_label");
+    get(_pImp->_pLbTemplates, "shared");
+    get(_pImp->_pFtImageTemplates, "shared_label");
+    get(_pImp->_pLbImageTemplates, "shared");
+
+    _pImp->_pLbImageTemplates->setMaxWidthChars(40);
+    _pImp->_pLbFilter->setMaxWidthChars(40);
+
     m_aImages = ImageList( SvtResId( RID_FILEPICKER_IMAGES ) );
+    Window *pUpContainer = get<Window>("up");
+    _pImp->_pBtnUp = new SvtUpButton_Impl(pUpContainer, this, 0);
+    _pImp->_pBtnUp->set_vexpand(true);
+    _pImp->_pBtnUp->Show();
 
     _pImp->_nStyle = nStyle;
     _pImp->_a6Size = LogicToPixel( Size( 6, 6 ), MAP_APPFONT );
@@ -491,139 +514,59 @@ void SvtFileDialog::Init_Impl
     }
 
     // Create control element, the order defines the tab control.
-    _pImp->_pFtFileName = new FixedText( this, SvtResId( FT_EXPLORERFILE_FILENAME ) );
-
-    SvtURLBox* pURLBox = new SvtURLBox( this, SvtResId( ED_EXPLORERFILE_FILENAME ) );
-    _pImp->_pEdFileName = pURLBox;
-    _pImp->_pEdFileName->Show();
-    pURLBox->SetSelectHdl( LINK( this, SvtFileDialog, EntrySelectHdl_Impl ) );
-    pURLBox->SetOpenHdl( STATIC_LINK( this, SvtFileDialog, OpenHdl_Impl ) );
+    _pImp->_pEdFileName->SetSelectHdl( LINK( this, SvtFileDialog, EntrySelectHdl_Impl ) );
+    _pImp->_pEdFileName->SetOpenHdl( STATIC_LINK( this, SvtFileDialog, OpenHdl_Impl ) );
 
     // in folder picker mode, only auto-complete directories (no files)
     bool bIsFolderPicker = ( _pImp->_eDlgType == FILEDLG_TYPE_PATHDLG );
-    pURLBox->SetOnlyDirectories( bIsFolderPicker );
+    _pImp->_pEdFileName->SetOnlyDirectories( bIsFolderPicker );
 
     // in save mode, don't use the autocompletion as selection in the edit part
     bool bSaveMode = ( FILEDLG_MODE_SAVE == _pImp->_eMode );
-    pURLBox->SetNoURLSelection( bSaveMode );
-
+    _pImp->_pEdFileName->SetNoURLSelection( bSaveMode );
     _pImp->_pEdFileName->SetHelpId( HID_FILEDLG_AUTOCOMPLETEBOX );
 
-    _pImp->_pFtFileType = new FixedText( this, SvtResId( FT_EXPLORERFILE_FILETYPE ) );
-    _pImp->CreateFilterListControl( this, SvtResId( LB_EXPLORERFILE_FILETYPE ) );
-
-    // move the filter listbox to the space occupied by the version listbox
-    // if that box isn't needed
-    if ( !( _nExtraBits & SFX_EXTRA_SHOWVERSIONS ) &&
-         !( _nExtraBits & SFX_EXTRA_TEMPLATES ) &&
-         !( _nExtraBits & SFX_EXTRA_IMAGE_TEMPLATE ) )
-    {
-        {
-            FixedText aSharedListBoxLabel( this, SvtResId( FT_EXPLORERFILE_SHARED_LISTBOX ) );
-            _pImp->_pFtFileType->SetPosPixel( aSharedListBoxLabel.GetPosPixel() );
-        }
-
-        {
-            ListBox aSharedListBox( this, SvtResId( LB_EXPLORERFILE_SHARED_LISTBOX ) );
-            _pImp->GetFilterListControl()->SetPosPixel( aSharedListBox.GetPosPixel() );
-        }
-    }
-
-    _pImp->_pEdCurrentPath = new SvtURLBox( this, SvtResId(ED_EXPLORERFILE_CURRENTPATH) );
-    _pImp->_pEdCurrentPath->Show();
-
-    _pImp->_pBtnFileOpen = new PushButton( this, SvtResId( BTN_EXPLORERFILE_OPEN ) );
-    _pImp->_pBtnCancel = new CancelButton( this, SvtResId( BTN_EXPLORERFILE_CANCEL ) );
-    _pImp->_pBtnHelp = new HelpButton( this, SvtResId( BTN_EXPLORERFILE_HELP ) );
-
-    _pImp->_pBtnConnectToServer = new PushButton ( this, SvtResId ( BTN_EXPLORERFILE_CONNECT_TO_SERVER ) );
     _pImp->_pBtnConnectToServer->SetAccessibleName( _pImp->_pBtnConnectToServer->GetQuickHelpText() );
-
-    _pImp->_pBtnUp = new SvtUpButton_Impl( this, SvtResId( BTN_EXPLORERFILE_UP ) );
-    _pImp->_pBtnNewFolder = new ImageButton( this, SvtResId( BTN_EXPLORERFILE_NEWFOLDER ) );
     _pImp->_pBtnNewFolder->SetStyle( _pImp->_pBtnNewFolder->GetStyle() | WB_NOPOINTERFOCUS );
-
     _pImp->_pBtnUp->SetAccessibleName( _pImp->_pBtnUp->GetQuickHelpText() );
     _pImp->_pBtnNewFolder->SetAccessibleName( _pImp->_pBtnNewFolder->GetQuickHelpText() );
 
     if ( ( nStyle & SFXWB_MULTISELECTION ) == SFXWB_MULTISELECTION )
         _pImp->_bMultiSelection = true;
 
-    _pFileView = new SvtFileView( this, SvtResId( CTL_EXPLORERFILE_FILELIST ),
+    Window *pContainer = get<Window>("container");
+    Size aSize(LogicToPixel(Size(270, 85), MAP_APPFONT));
+    pContainer->set_height_request(aSize.Height());
+    pContainer->set_width_request(aSize.Width());
+    pContainer->SetSizePixel(aSize);
+    _pFileView = new SvtFileView( pContainer, WB_BORDER,
                                        FILEDLG_TYPE_PATHDLG == _pImp->_eDlgType,
                                        _pImp->_bMultiSelection );
+    _pFileView->Show();
     _pFileView->EnableAutoResize();
-
     _pFileView->SetHelpId( HID_FILEDLG_STANDARD );
     _pFileView->SetStyle( _pFileView->GetStyle() | WB_TABSTOP );
 
-    _pSplitter = new Splitter( this, SvtResId( EXPLORERFILE_SPLITTER ) );
+    _pSplitter = new Splitter( pContainer, WB_HSCROLL );
     _pSplitter->SetBackground( Wallpaper( Application::GetSettings().GetStyleSettings().GetFaceColor() ));
     _pSplitter->SetSplitHdl( LINK( this, SvtFileDialog, Split_Hdl ) );
 
-    // determine the size of the buttons
-    Size aSize = _pImp->_pBtnNewFolder->GetSizePixel();
     Image aNewFolderImg( GetButtonImage( IMG_FILEDLG_CREATEFOLDER ) );
     _pImp->_pBtnNewFolder->SetModeImage( aNewFolderImg );
 
-    // set position of the buttons
-    Size aDlgSize = GetOutputSizePixel();
-    long n6AppFontInPixel =
-            LogicToPixel( Size( 6, 0 ), MAP_APPFONT ).Width();
-    long n3AppFontInPixel =
-            LogicToPixel( Size( 3, 0 ), MAP_APPFONT ).Width();
-    long nHalf3AppFontInPixel = n3AppFontInPixel/2;
-
-    // nDelta is the space between the right border and the left border of the
-    // component currently positioned
-    long nDelta = n6AppFontInPixel;
-
-    // New folder
-    Point aPos(
-        aDlgSize.Width() - nDelta,
-        _pImp->_pBtnNewFolder->GetPosPixel().Y()
-    );
-    nDelta += aSize.Width() + nHalf3AppFontInPixel;
-    aPos.X() = aDlgSize.Width() - nDelta;
-    _pImp->_pBtnNewFolder->SetPosPixel(aPos);
-
-    // Previous level (up)
-    nDelta += aSize.Width() + nHalf3AppFontInPixel;
-    aPos.X() = aDlgSize.Width() - nDelta;
-    _pImp->_pBtnUp->SetPosPixel(aPos);
-
-    // Connect to server ("...")
-    nDelta += _pImp->_pBtnConnectToServer->GetSizePixel().Width() + nHalf3AppFontInPixel;
-    aPos.X() = aDlgSize.Width() - nDelta;
-    _pImp->_pBtnConnectToServer->SetPosPixel(aPos);
-
-    // Set the size of the URL bar
-    nDelta += nHalf3AppFontInPixel; // right margin of the URL bar
-    aSize.Width() = aDlgSize.Width()
-        - _pImp->_pEdCurrentPath->GetPosPixel().X()
-        - nDelta;
-    _pImp->_pEdCurrentPath->SetOutputSizePixel(aSize);
-
-    aPos.X() = _pImp->_pEdCurrentPath->GetPosPixel().X();
-    _pImp->_pEdCurrentPath->SetPosPixel(aPos);
-
     if ( nStyle & SFXWB_READONLY )
     {
-        _pCbReadOnly = new CheckBox( this, SvtResId( CB_EXPLORERFILE_READONLY ) );
         _pCbReadOnly->SetHelpId( HID_FILEOPEN_READONLY );
         _pCbReadOnly->SetText( SvtResId( STR_SVT_FILEPICKER_READONLY ) );
-        AddControl( _pCbReadOnly );
-        ReleaseOwnership( _pCbReadOnly );
         _pCbReadOnly->SetClickHdl( LINK( this, SvtFileDialog, ClickHdl_Impl ) );
+        _pCbReadOnly->Show();
     }
 
     if ( nStyle & SFXWB_PASSWORD )
     {
-        _pImp->_pCbPassword = new CheckBox( this, SvtResId( CB_EXPLORERFILE_PASSWORD ) );
         _pImp->_pCbPassword->SetText( SvtResId( STR_SVT_FILEPICKER_PASSWORD ) );
-        AddControl( _pImp->_pCbPassword );
-        ReleaseOwnership( _pImp->_pCbPassword );
         _pImp->_pCbPassword->SetClickHdl( LINK( this, SvtFileDialog, ClickHdl_Impl ) );
+        _pImp->_pCbPassword->Show();
     }
 
     // set the ini file for extracting the size
@@ -631,51 +574,6 @@ void SvtFileDialog::Init_Impl
 
     AddControls_Impl( );
 
-    // Determine the amount of pixel the other elements have to be adjusted in their position.
-    aPos.Y() += aSize.Height();
-    aPos.Y() += LogicToPixel( Size( 0, 6 ), MAP_APPFONT ).Height();
-    long nYOffset = aPos.Y();
-    aPos = _pFileView->GetPosPixel();
-
-    aPos.Y() = nYOffset;
-    nYOffset -= aPos.Y();
-
-    // Adjust the position of the other elements.
-    _pFileView->SetPosPixel( aPos );
-
-    aPos.X() = _pSplitter->GetPosPixel().X();
-    _pSplitter->SetPosPixel( aPos );
-
-    aPos.X() = _pImp->_pPlaces->GetPosPixel().X();
-    _pImp->_pPlaces->SetPosPixel( aPos );
-
-
-    lcl_MoveControl( _pImp->_pFtFileName, 0, nYOffset );
-    lcl_MoveControl( _pImp->_pEdFileName, 0, nYOffset );
-
-    lcl_MoveControl( _pImp->_pFtFileVersion, 0, nYOffset );
-    lcl_MoveControl( _pImp->_pLbFileVersion, 0, nYOffset );
-
-    lcl_MoveControl( _pImp->_pFtTemplates, 0, nYOffset );
-    lcl_MoveControl( _pImp->_pLbTemplates, 0, nYOffset );
-
-    lcl_MoveControl( _pImp->_pFtImageTemplates, 0, nYOffset );
-    lcl_MoveControl( _pImp->_pLbImageTemplates, 0, nYOffset );
-
-    lcl_MoveControl( _pImp->_pFtFileType, 0, nYOffset );
-    lcl_MoveControl( _pImp->GetFilterListControl(), 0, nYOffset );
-
-    lcl_MoveControl( _pImp->_pBtnFileOpen, 0, nYOffset );
-    lcl_MoveControl( _pImp->_pBtnCancel, 0, nYOffset );
-
-    lcl_MoveControl( _pImp->_pBtnHelp, 0, nYOffset + 3 );
-        // a little more spacing between Cancel- and HelpButton
-
-    // adjust size of the dialog
-    aSize = GetSizePixel();
-    aSize.Height() += nYOffset;
-    SetSizePixel( aSize );
-
     // adjust the labels to the mode
     sal_uInt16 nResId = STR_EXPLORERFILE_OPEN;
     sal_uInt16 nButtonResId = 0;
@@ -719,7 +617,6 @@ void SvtFileDialog::Init_Impl
     _pFileView->SetDoubleClickHdl( LINK( this, SvtFileDialog, DblClickHdl_Impl ) );
     _pFileView->SetOpenDoneHdl( LINK( this, SvtFileDialog, OpenDoneHdl_Impl ) );
 
-    FreeResource();
 
     // set timer for the filterbox travel
     _pImp->_aFilterTimer.SetTimeout( TRAVELFILTER_TIMEOUT );
@@ -755,14 +652,13 @@ void SvtFileDialog::Init_Impl
         if ( _pCbSelection ) _pCbSelection->SetHelpId( HID_FILESAVE_SELECTION );
     }
 
-    // correct the z-order of the controls
-    implArrangeControls();
-
     /// read our settings from the configuration
     m_aConfiguration = OConfigurationTreeRoot::createWithComponentContext(
         ::comphelper::getProcessComponentContext(),
         OUString( "/org.openoffice.Office.UI/FilePicker" )
     );
+
+    Resize();
 }
 
 
@@ -1762,45 +1658,6 @@ public:
     ~SvtDefModalDialogParent_Impl() { Application::SetDefDialogParent( _pOld ); }
 };
 
-
-
-
-void SvtFileDialog::updateListboxLabelSizes()
-{
-    sal_Int16 nLineControlId[5] = {
-        LISTBOX_VERSION, LISTBOX_TEMPLATE, LISTBOX_IMAGE_TEMPLATE, LISTBOX_FILTER, EDIT_FILEURL
-    };
-
-    // determine the maximum width needed for the listbox labels
-    long nMaxWidth = 0;
-    for ( sal_Int32 i=0; i<5; ++i )
-    {
-        FixedText* pLabel = static_cast< FixedText* >( getControl( nLineControlId[i], sal_True ) );
-        if ( !pLabel )
-            continue;
-        nMaxWidth = ::std::max( pLabel->GetTextWidth( pLabel->GetText() ), nMaxWidth );
-    }
-
-    // ensure that all labels are wide enough
-    for ( sal_Int32 i=0; i<5; ++i )
-    {
-        FixedText* pLabel = static_cast< FixedText* >( getControl( nLineControlId[i], sal_True ) );
-        ListBox* pListbox = static_cast< ListBox* >( getControl( nLineControlId[i], sal_False ) );
-        if ( !pLabel || !pListbox )
-            continue;
-        Size aCurrentSize( pLabel->GetSizePixel() );
-        if ( aCurrentSize.Width() >= nMaxWidth )
-            continue;
-
-        long nChange = nMaxWidth - aCurrentSize.Width();
-        pLabel->SetSizePixel( Size( nMaxWidth, aCurrentSize.Height() ) );
-
-        aCurrentSize = pListbox->GetSizePixel();
-        pListbox->SetSizePixel( Size( aCurrentSize.Width() - nChange, aCurrentSize.Height() ) );
-        lcl_MoveControl( pListbox, nChange, 0 );
-    }
-}
-
 namespace
 {
 
@@ -2385,14 +2242,6 @@ void SvtFileDialog::InitSize()
     Size aDlgSize = GetResizeOutputSizePixel();
     SetMinOutputSizePixel( aDlgSize );
 
-    if ( !_pImp->_nFixDeltaHeight )
-    {
-        // calculate and save fixsize
-        long nBoxH = _pFileView->GetSizePixel().Height();
-        long nH = GetSizePixel().Height();
-        _pImp->_nFixDeltaHeight = nH - nBoxH;
-    }
-
     // initialize from config
     SvtViewOptions aDlgOpt( E_DIALOG, _pImp->_aIniKey );
 
@@ -2435,54 +2284,6 @@ std::vector<OUString> SvtFileDialog::GetPathList() const
 }
 
 
-
-void SvtFileDialog::implArrangeControls()
-{
-    // this is the list of controls in the order they should be tabbed
-    // from topleft to bottomright
-    // pb: #136070# new order so all LabeledBy relations are correct now
-    Control* pControls[] =
-    {
-        _pImp->_pEdCurrentPath, _pImp->_pBtnConnectToServer,
-        _pImp->_pBtnUp, _pImp->_pBtnNewFolder,                              // image buttons
-        _pImp->_pPlaces,                                                    // list of places
-        _pFileView,                                                         // the file view
-        _pImp->_pFtFileName, _pImp->_pEdFileName,
-        _pImp->_pFtFileVersion, _pImp->_pLbFileVersion,
-        _pImp->_pFtTemplates, _pImp->_pLbTemplates,
-        _pImp->_pFtImageTemplates, _pImp->_pLbImageTemplates,
-        _pImp->_pFtFileType, _pImp->GetFilterListControl(),                 // edit fields/list boxes
-        _pImp->_pCbPassword, _pImp->_pCbAutoExtension, _pImp->_pCbOptions,  // checkboxes
-        _pCbReadOnly, _pCbLinkBox, _pCbPreviewBox, _pCbSelection, _pPbPlay, // check boxes (continued)
-        _pImp->_pBtnFileOpen, _pImp->_pBtnCancel, _pImp->_pBtnHelp          // buttons
-
-        // (including the FixedTexts is important - not for tabbing order (they're irrelevant there),
-        // but for working keyboard shortcuts)
-    };
-
-    // loop through all these controls and adjust the z-order
-    Window* pPreviousWin = NULL;
-    Control** pCurrent = pControls;
-    for ( sal_Int32 i = 0; i < sal_Int32(sizeof( pControls ) / sizeof( pControls[ 0 ] )); ++i, ++pCurrent )
-    {
-        if ( !*pCurrent )
-            // this control is not available in the current operation mode -> skip
-            continue;
-
-        if ( pPreviousWin )
-            (*pCurrent)->SetZOrder( pPreviousWin, WINDOW_ZORDER_BEHIND );
-        else
-            (*pCurrent)->SetZOrder( NULL, WINDOW_ZORDER_FIRST );
-
-        pPreviousWin = *pCurrent;
-    }
-
-    // FileName edit not the first control but it should have the focus initially
-    _pImp->_pEdFileName->GrabFocus();
-}
-
-
-
 bool SvtFileDialog::IsolateFilterFromPath_Impl( OUString& rPath, OUString& rFilter )
 {
     OUString aEmpty;
@@ -2577,29 +2378,33 @@ void SvtFileDialog::DataChanged( const DataChangedEvent& _rDCEvt )
     ModalDialog::DataChanged( _rDCEvt );
 }
 
-
 void SvtFileDialog::Resize()
 {
+    Dialog::Resize();
+
     if ( IsRollUp() )
         return;
 
+    Window *pContainer = get<Window>("container");
+    long nContainerHeight = pContainer->GetSizePixel().Height();
+
     Size aDlgSize = GetResizeOutputSizePixel();
     Size aOldSize = _pImp->_aDlgSize;
     _pImp->_aDlgSize = aDlgSize;
     long nWinDeltaW = 0;
 
-    if ( _pPrevWin &&
-         _pPrevWin->GetPosPixel().X() > _pFileView->GetPosPixel().X() )
+    if(_pPrevBmp)
     {
-        nWinDeltaW = _pPrevWin->GetOutputSizePixel().Width() + _pImp->_a6Size.Width();
+        nWinDeltaW = _pPrevWin->GetOutputSizePixel().Width();
+        _pPrevBmp->SetSizePixel(_pPrevWin->GetOutputSizePixel());
     }
 
     Size aNewSize = _pFileView->GetSizePixel();
     Point aBoxPos( _pFileView->GetPosPixel() );
     long nDeltaY = aNewSize.Height();
     long nDeltaX = aNewSize.Width();
-    aNewSize.Height() = aDlgSize.Height() - _pImp->_nFixDeltaHeight;
-    aNewSize.Width() = aDlgSize.Width() - aBoxPos.X() - _pImp->_a6Size.Width() - nWinDeltaW;
+    aNewSize.Height() = nContainerHeight;
+    aNewSize.Width() = aDlgSize.Width() - aBoxPos.X() - 2*_pImp->_a6Size.Width() - nWinDeltaW;
     if ( aOldSize.Height() )
         nDeltaY = _pImp->_aDlgSize.Height() - aOldSize.Height();
     else
@@ -2615,7 +2420,7 @@ void SvtFileDialog::Resize()
 
     // Resize the Splitter to fit the height
     Size splitterNewSize = _pSplitter->GetSizePixel( );
-    splitterNewSize.Height() += nDeltaY;
+    splitterNewSize.Height() = nContainerHeight;
     _pSplitter->SetSizePixel( splitterNewSize );
     sal_Int32 nMinX = _pImp->_pPlaces->GetPosPixel( ).X( );
     sal_Int32 nMaxX = _pFileView->GetPosPixel( ).X( ) + _pFileView->GetSizePixel( ).Width() - nMinX;
@@ -2623,102 +2428,17 @@ void SvtFileDialog::Resize()
 
     // Resize the places list box to fit the height of the FileView
     Size placesNewSize(_pImp->_pPlaces->GetSizePixel());
-    placesNewSize.Height() += nDeltaY;
+    placesNewSize.Height() = nContainerHeight;
     _pImp->_pPlaces->SetSizePixel( placesNewSize );
 
     if ( !nDeltaY && !nDeltaX )
         // This resize was only called to show or hide the indicator.
         return;
 
-
-    // move controls
-
-    // controls to move vertically
-    {
-        Control* aMoveControlsVert[] =
-        {
-            _pImp->_pFtFileName, _pImp->_pEdFileName, _pImp->_pFtFileVersion, _pImp->_pLbFileVersion,
-            _pImp->_pFtTemplates, _pImp->_pLbTemplates, _pImp->_pFtImageTemplates, _pImp->_pLbImageTemplates,
-            _pImp->_pFtFileType, _pImp->GetFilterListControl(), _pCbReadOnly, _pCbLinkBox, _pCbPreviewBox,
-            _pPbPlay, _pImp->_pCbPassword, _pImp->_pCbAutoExtension, _pImp->_pCbOptions, _pCbSelection
-        };
-        Control** ppMoveControls = aMoveControlsVert;
-        Control** ppMoveControlsEnd = ppMoveControls + sizeof( aMoveControlsVert ) / sizeof( aMoveControlsVert[0] );
-        for ( ; ppMoveControls != ppMoveControlsEnd; ++ppMoveControls )
-            lcl_MoveControl( *ppMoveControls, 0, nDeltaY );
-    }
-
-    // controls to move vertically and horizontally
-    {
-        Control* aMoveControlsBoth[] =
-        {
-            _pImp->_pBtnFileOpen, _pImp->_pBtnCancel, _pImp->_pBtnHelp
-        };
-        Control** ppMoveControls = aMoveControlsBoth;
-        Control** ppMoveControlsEnd = ppMoveControls + sizeof( aMoveControlsBoth ) / sizeof( aMoveControlsBoth[0] );
-        for ( ; ppMoveControls != ppMoveControlsEnd; ++ppMoveControls )
-            lcl_MoveControl( *ppMoveControls, nDeltaX, nDeltaY );
-    }
-
-    // controls to move horizontally
-    {
-        Control* aMoveControlsHor[] =
-        {
-            _pImp->_pBtnConnectToServer,
-            _pImp->_pBtnUp, _pImp->_pBtnNewFolder
-        };
-        Control** ppMoveControls = aMoveControlsHor;
-        Control** ppMoveControlsEnd = ppMoveControls + sizeof( aMoveControlsHor ) / sizeof( aMoveControlsHor[0] );
-        for ( ; ppMoveControls != ppMoveControlsEnd; ++ppMoveControls )
-            lcl_MoveControl( *ppMoveControls, nDeltaX, 0 );
-    }
-
-
-    // resize controls
-    {
-        Control* aSizeControls[] =
-        {
-            _pImp->_pEdFileName, _pImp->_pLbFileVersion, _pImp->_pLbTemplates, _pImp->_pLbImageTemplates,
-            _pImp->GetFilterListControl(), _pImp->_pEdCurrentPath,
-        };
-        sal_Int32 nSizeControls = sizeof( aSizeControls ) / sizeof( aSizeControls[0] );
-        Control** ppSizeControls = aSizeControls;
-        for ( sal_Int32 j=0; j<nSizeControls; ++j, ++ppSizeControls )
-        {
-            if ( *ppSizeControls )
-            {
-                aNewSize = (*ppSizeControls)->GetSizePixel();
-                aNewSize.Width() += nDeltaX;
-                (*ppSizeControls)->SetSizePixel( aNewSize );
-            }
-        }
-    }
-
-    // align additional controls
-    if ( _pPrevWin &&
-         _pPrevWin->GetPosPixel().X() > _pFileView->GetPosPixel().X() )
-    {
-        // special alignment for controls of the type window
-        // also adjust the size
-        Point aNewPos = _pPrevWin->GetPosPixel();
-        aNewPos.X() += nDeltaX;
-        _pPrevWin->SetPosPixel( aNewPos );
-        _pPrevBmp->SetPosPixel( aNewPos );
-        aNewSize = _pPrevWin->GetOutputSizePixel();
-        aNewSize.Width() += nWinDeltaW;
-        aNewSize.Height() += nDeltaY;
-        if ( !aOldSize.Height() )
-            aNewSize.Height() -= ( _pImp->_a6Size.Height() / 2 );
-        _pPrevWin->SetOutputSizePixel( aNewSize );
-        _pPrevBmp->SetOutputSizePixel( aNewSize );
-        _pPrevBmp->Invalidate();
-    }
-
     if ( _pFileNotifier )
         _pFileNotifier->notify( DIALOG_SIZE_CHANGED, 0 );
 }
 
-
 Control* SvtFileDialog::getControl( sal_Int16 _nControlId, sal_Bool _bLabelControl ) const
 {
     Control* pReturn = NULL;
@@ -2860,12 +2580,10 @@ void SvtFileDialog::AddControls_Impl( )
     // create the "insert as link" checkbox, if needed
     if ( _nExtraBits & SFX_EXTRA_INSERTASLINK )
     {
-        _pCbLinkBox = new CheckBox( this );
         _pCbLinkBox ->SetText( SvtResId( STR_SVT_FILEPICKER_INSERT_AS_LINK ) );
         _pCbLinkBox ->SetHelpId( HID_FILEDLG_LINK_CB );
-        AddControl( _pCbLinkBox  );
-        ReleaseOwnership( _pCbLinkBox );
         _pCbLinkBox->SetClickHdl( LINK( this, SvtFileDialog, ClickHdl_Impl ) );
+        _pCbLinkBox->Show();
     }
 
     // create the "show preview" checkbox ( and the preview window, too ), if needed
@@ -2877,92 +2595,94 @@ void SvtFileDialog::AddControls_Impl( )
         _pImp->DisableFilterBoxAutoWidth();
 
         // "preview"
-        _pCbPreviewBox = new CheckBox( this );
         _pCbPreviewBox->SetText( SvtResId( STR_SVT_FILEPICKER_SHOW_PREVIEW ) );
         _pCbPreviewBox->SetHelpId( HID_FILEDLG_PREVIEW_CB );
-        AddControl( _pCbPreviewBox );
-        ReleaseOwnership( _pCbPreviewBox );
         _pCbPreviewBox->SetClickHdl( LINK( this, SvtFileDialog, ClickHdl_Impl ) );
+        _pCbPreviewBox->Show();
 
         // generate preview window just here
-        _pPrevWin = new Window( this, WinBits( WB_BORDER ) );
-        AddControl( _pPrevWin );
-        ReleaseOwnership( _pPrevWin );
-        _pPrevWin->Hide();
+        _pPrevWin->SetOutputSizePixel(Size(200, 300));
+        _pPrevWin->Show();
 
-        _pPrevBmp = new FixedBitmap( this, WinBits( WB_BORDER ) );
+        _pPrevBmp = new FixedBitmap( _pPrevWin, WinBits( WB_BORDER ) );
         _pPrevBmp->SetBackground( Wallpaper( Color( COL_WHITE ) ) );
+        _pPrevBmp->SetSizePixel(_pPrevWin->GetSizePixel());
         _pPrevBmp->Show();
         _pPrevBmp->SetAccessibleName(SVT_RESSTR(STR_PREVIEW));
     }
 
     if ( _nExtraBits & SFX_EXTRA_AUTOEXTENSION )
     {
-        _pImp->_pCbAutoExtension = new CheckBox( this, SvtResId( CB_AUTO_EXTENSION ) );
         _pImp->_pCbAutoExtension->SetText( SvtResId( STR_SVT_FILEPICKER_AUTO_EXTENSION ) );
         _pImp->_pCbAutoExtension->Check( true );
-        AddControl( _pImp->_pCbAutoExtension );
-        ReleaseOwnership( _pImp->_pCbAutoExtension );
         _pImp->_pCbAutoExtension->SetClickHdl( LINK( this, SvtFileDialog, AutoExtensionHdl_Impl ) );
+        _pImp->_pCbAutoExtension->Show();
     }
 
     if ( _nExtraBits & SFX_EXTRA_FILTEROPTIONS )
     {
-        _pImp->_pCbOptions = new CheckBox( this, SvtResId( CB_OPTIONS ) );
         _pImp->_pCbOptions->SetText( SvtResId( STR_SVT_FILEPICKER_FILTER_OPTIONS ) );
-        AddControl( _pImp->_pCbOptions );
-        ReleaseOwnership( _pImp->_pCbOptions );
         _pImp->_pCbOptions->SetClickHdl( LINK( this, SvtFileDialog, ClickHdl_Impl ) );
+        _pImp->_pCbOptions->Show();
     }
 
     if ( _nExtraBits & SFX_EXTRA_SELECTION )
     {
-        _pCbSelection = new CheckBox( this, SvtResId( CB_OPTIONS ) );
         _pCbSelection->SetText( SvtResId( STR_SVT_FILEPICKER_SELECTION ) );
-        AddControl( _pCbSelection );
-        ReleaseOwnership( _pCbSelection );
         _pCbSelection->SetClickHdl( LINK( this, SvtFileDialog, ClickHdl_Impl ) );
+        _pCbSelection->Show();
     }
 
     if ( _nExtraBits & SFX_EXTRA_PLAYBUTTON )
     {
-        _pPbPlay = new PushButton( this );
         _pPbPlay->SetText( SvtResId( STR_SVT_FILEPICKER_PLAY ) );
         _pPbPlay->SetHelpId( HID_FILESAVE_DOPLAY );
-        AddControl( _pPbPlay );
-        ReleaseOwnership( _pPbPlay );
         _pPbPlay->SetClickHdl( LINK( this, SvtFileDialog, PlayButtonHdl_Impl ) );
+        _pPbPlay->Show();
     }
 
     if ( _nExtraBits & SFX_EXTRA_SHOWVERSIONS )
     {
-        _pImp->_pFtFileVersion = new FixedText( this, SvtResId( FT_EXPLORERFILE_SHARED_LISTBOX ) );
         _pImp->_pFtFileVersion->SetText( SvtResId( STR_SVT_FILEPICKER_VERSION ) );
+        _pImp->_pFtFileVersion->Show();
 
-        _pImp->_pLbFileVersion = new ListBox( this, SvtResId( LB_EXPLORERFILE_SHARED_LISTBOX ) );
         _pImp->_pLbFileVersion->SetHelpId( HID_FILEOPEN_VERSION );
+        _pImp->_pLbFileVersion->Show();
     }
     else if ( _nExtraBits & SFX_EXTRA_TEMPLATES )
     {
-        _pImp->_pFtTemplates = new FixedText( this, SvtResId( FT_EXPLORERFILE_SHARED_LISTBOX ) );
         _pImp->_pFtTemplates->SetText( SvtResId( STR_SVT_FILEPICKER_TEMPLATES ) );
+        _pImp->_pFtTemplates->Show();
 
-        _pImp->_pLbTemplates = new ListBox( this, SvtResId( LB_EXPLORERFILE_SHARED_LISTBOX ) );
         _pImp->_pLbTemplates->SetHelpId( HID_FILEOPEN_VERSION );
+        _pImp->_pLbTemplates->Show();
             // This is strange. During the re-factoring during 96930, I discovered that this help id
             // is set in the "Templates mode". This was hidden in the previous implementation.
             // Shouldn't this be a more meaningfull help id.
     }
     else if ( _nExtraBits & SFX_EXTRA_IMAGE_TEMPLATE )
     {
-        _pImp->_pFtImageTemplates = new FixedText( this, SvtResId( FT_EXPLORERFILE_SHARED_LISTBOX ) );
         _pImp->_pFtImageTemplates->SetText( SvtResId( STR_SVT_FILEPICKER_IMAGE_TEMPLATE ) );
+        _pImp->_pFtImageTemplates->Show();
 
-        _pImp->_pLbImageTemplates = new ListBox( this, SvtResId( LB_EXPLORERFILE_SHARED_LISTBOX ) );
         _pImp->_pLbImageTemplates->SetHelpId( HID_FILEOPEN_IMAGE_TEMPLATE );
+        _pImp->_pLbImageTemplates->Show();
     }
 
-    _pImp->_pPlaces = new PlacesListBox( this, SVT_RESSTR(STR_PLACES_TITLE), SvtResId(LB_EXPLORERFILE_PLACES_LISTBOX) );
+    Window *pContainer;
+        get(pContainer, "container");
+        _pImp->_pPlaces = new PlacesListBox( pContainer, this, SVT_RESSTR(STR_PLACES_TITLE), WB_BORDER );
+    Size aSize(LogicToPixel(Size(50, 85), MAP_APPFONT));
+    _pImp->_pPlaces->set_height_request(aSize.Height());
+    _pImp->_pPlaces->set_width_request(aSize.Width());
+    _pImp->_pPlaces->SetSizePixel(aSize);
+    _pImp->_pPlaces->Show();
+
+    sal_Int32 nPosX = _pImp->_pPlaces->GetSizePixel().Width();
+    _pSplitter->SetPosPixel(Point(nPosX, 0));
+    nPosX += _pSplitter->GetSizePixel().Width();
+    _pFileView->SetPosPixel(Point(nPosX, 0));
+
     _pImp->_pPlaces->SetAddHdl( LINK ( this, SvtFileDialog, AddPlacePressed_Hdl ) );
     _pImp->_pPlaces->SetDelHdl( LINK ( this, SvtFileDialog, RemovePlacePressed_Hdl ) );
 
@@ -3074,154 +2794,6 @@ bool SvtFileDialog::getShowState()
         return false;
 }
 
-
-void SvtFileDialog::ReleaseOwnership( Window* pUserControl )
-
-/*
-  [Description]
-  This method ensures that the specified element is no longer in possession
-  of the instance.
-*/
-
-{
-    ControlChain_Impl* pElement = _pUserControls;
-    while ( pElement )
-    {
-        if ( pElement->_pControl == pUserControl )
-        {
-            pElement->_bHasOwnership = false;
-            break;
-        }
-        pElement = pElement->_pNext;
-    }
-}
-
-
-
-bool SvtFileDialog::AddControl( Window* pControl, sal_Bool bNewLine )
-{
-    // control already exists
-    ControlChain_Impl* pElement = _pUserControls;
-    while ( pElement )
-    {
-        if ( pElement->_pControl == pControl )
-            return false;
-        pElement = pElement->_pNext;
-    }
-
-    // Check if controls have already been added.
-    Size aNewControlSize( pControl->GetOutputSizePixel() );
-    Size aDlgSize( GetOutputSizePixel() );
-    WindowType nType = pControl->GetType();
-    if ( !aNewControlSize.Height() )
-    {
-        // Detect a size.
-        Size aSize( 0, 10 );
-        if ( nType == WINDOW_PUSHBUTTON )
-        {
-            Size aDefSiz = LogicToPixel( Size( 50, 14 ), MAP_APPFONT );
-            long nTextWidth = pControl->GetTextWidth( pControl->GetText() );
-            aSize.Width() = nTextWidth + WIDTH_ADDITION;
-
-            // PushButton:  Minimum width 50 logical units,
-            //              height always 14 logical units.
-            if ( aDefSiz.Width() > aSize.Width() )
-                aSize.Width() = aDefSiz.Width();
-            aSize.Height() = aDefSiz.Height();
-            aNewControlSize = aSize;
-        }
-        else
-            aNewControlSize = LogicToPixel( aSize, MAP_APPFONT );
-        if ( nType != WINDOW_PUSHBUTTON )
-            aNewControlSize.Width() = pControl->GetTextWidth( pControl->GetText() ) + WIDTH_ADDITION;
-        if ( nType == WINDOW_CHECKBOX )
-            aNewControlSize.Width() += WIDTH_ADDITION;
-        if ( nType == WINDOW_WINDOW )
-        {
-            aNewControlSize.Height() = GetOutputSizePixel().Height() - 18;
-            aNewControlSize.Width() = 200;
-            aDlgSize.Width() += 210;
-            SetOutputSizePixel( aDlgSize );
-        }
-        pControl->SetOutputSizePixel( aNewControlSize );
-    }
-    Point aNewControlPos;
-    Size* pNewDlgSize = NULL;
-    bool bNewRow = bNewLine;
-
-    if ( nType == WINDOW_WINDOW )
-    {
-        aNewControlPos.X() = aDlgSize.Width() - 210;
-        aNewControlPos.Y() = 8;
-    }
-    else if ( _pUserControls )
-    {
-        Point aNewControlRange( _pUserControls->_pControl->GetPosPixel() );
-        long nPrevControlHeight = _pUserControls->_pControl->GetSizePixel().Height();
-        aNewControlRange +=
-            Point( _pUserControls->_pControl->GetOutputSizePixel().Width(), 0 );
-        aNewControlPos = aNewControlRange;
-        if ( nPrevControlHeight > aNewControlSize.Height() )
-        {
-            long nY = nPrevControlHeight;
-            nY -= aNewControlSize.Height();
-            nY /= 2;
-            aNewControlPos.Y() += nY;
-        }
-        aNewControlPos += LogicToPixel( Point( 3, 0 ), MAP_APPFONT );
-        aNewControlRange += LogicToPixel( Point( 9, 0 ), MAP_APPFONT );
-        aNewControlRange += Point( aNewControlSize.Width(), 0 );
-
-        // Check if a new row has to be created.
-        if ( aNewControlRange.X() > aDlgSize.Width() )
-            bNewRow = true;
-    }
-    else
-    {
-        // Create a new row if there was no usercontrol before.
-        bNewRow = true;
-    }
-
-    // Check if a new row has to be created.
-    Size aBorderSize = LogicToPixel( Size( 6, 6 ), MAP_APPFONT );
-    long nLeftBorder = aBorderSize.Width();
-    long nLowerBorder = aBorderSize.Height();
-    if ( bNewRow )
-    {
-        // Set control at the beginning of a new line.
-        long nSmallBorderHeight = nLowerBorder / 2;
-        aNewControlPos = Point( nLeftBorder, 0 );
-        aNewControlPos += Point( 0, aDlgSize.Height() );
-        aNewControlPos.Y() -= nSmallBorderHeight;
-        // Set new size.
-        pNewDlgSize = new Size( aDlgSize );
-        pNewDlgSize->Height() -= nSmallBorderHeight;
-        pNewDlgSize->Height() += aNewControlSize.Height();
-        pNewDlgSize->Height() += nLowerBorder;
-    }
-    else
-    {
-        // Check if the window has to be resized.
-        Size aNewControlRange( 0, aNewControlPos.Y() );
-        aNewControlRange.Height() += aNewControlSize.Height();
-        aNewControlRange.Height() += nLowerBorder;
-        if ( aNewControlRange.Height() > aDlgSize.Height() )
-            pNewDlgSize = new Size( aDlgSize.Width(), aNewControlRange.Height() );
-    }
-
-    // Update view.
-    if ( pNewDlgSize )
-    {
-        SetOutputSizePixel( *pNewDlgSize );
-        delete pNewDlgSize;
-    }
-    pControl->SetPosPixel( aNewControlPos );
-    pControl->Show();
-    _pUserControls = new ControlChain_Impl( pControl, _pUserControls );
-
-    return true;
-}
-
 bool SvtFileDialog::ContentHasParentFolder( const OUString& rURL )
 {
     m_aContent.bindTo( rURL );
@@ -3330,7 +2902,7 @@ IMPL_LINK_NOARG( SvtFileDialog, Split_Hdl )
     fileViewSize.Width() -= ( nNewX - nOldX );
     _pFileView->SetPosSizePixel( fileViewPos, fileViewSize );
 
-    _pSplitter->SetPosPixel( Point( nSplitPos, _pSplitter->GetPosPixel().Y() ) );
+    _pSplitter->SetPosPixel( Point( placeSize.Width(), _pSplitter->GetPosPixel().Y() ) );
     return 0;
 }
 
diff --git a/fpicker/source/office/iodlg.hrc b/fpicker/source/office/iodlg.hrc
index 0a814d2..7f14764 100644
--- a/fpicker/source/office/iodlg.hrc
+++ b/fpicker/source/office/iodlg.hrc
@@ -21,50 +21,26 @@
 #define _SVTOOLS_IODLGIMPL_HRC
 
 #include "svtools/helpid.hrc"
+#include <vcl/fpicker.hrc>
 
 // ModalDialog DLG_SVT_EXPLORERFILE
 
-#define ED_EXPLORERFILE_CURRENTPATH         10
-#define BTN_EXPLORERFILE_NEWFOLDER          11
-#define BTN_EXPLORERFILE_UP                 12
-#define BTN_EXPLORERFILE_OPEN               14
-#define BTN_EXPLORERFILE_CANCEL             15
-#define BTN_EXPLORERFILE_HELP               16
-
 #define IMG_FILEDLG_BTN_UP                  10
 #define IMG_FILEDLG_BTN_STD                 11
 #define IMG_FILEDLG_CREATEFOLDER            14
 #define IMG_FILEDLG_PLACE_LOCAL             15
 #define IMG_FILEDLG_PLACE_REMOTE            16
 
-#define CTL_EXPLORERFILE_FILELIST           20
-
-#define FT_EXPLORERFILE_FILENAME            30
-#define ED_EXPLORERFILE_FILENAME            31
-#define FT_EXPLORERFILE_SHARED_LISTBOX      32
-#define LB_EXPLORERFILE_SHARED_LISTBOX      33
-#define FT_EXPLORERFILE_FILETYPE            34
-#define LB_EXPLORERFILE_FILETYPE            35
-
-#define CB_EXPLORERFILE_READONLY            40
-#define CB_EXPLORERFILE_PASSWORD            41
-#define CB_AUTO_EXTENSION                   42
-#define CB_OPTIONS                          43
-
-#define LB_EXPLORERFILE_PLACES_LISTBOX      50
-#define BTN_EXPLORERFILE_CONNECT_TO_SERVER  51
-#define EXPLORERFILE_SPLITTER               52
-
-#define STR_EXPLORERFILE_OPEN               1
-#define STR_EXPLORERFILE_SAVE               2
-#define STR_EXPLORERFILE_BUTTONSAVE         3
-#define STR_PATHNAME                        4
-#define STR_PATHSELECT                      5
-#define STR_BUTTONSELECT                    6
-#define STR_ACTUALVERSION                   7
-#define STR_PREVIEW             			8
-#define STR_DEFAULT_DIRECTORY     			9
-#define STR_PLACES_TITLE         			10
+#define STR_EXPLORERFILE_OPEN               (RID_FPICKER_START+31)
+#define STR_EXPLORERFILE_SAVE               (RID_FPICKER_START+32)
+#define STR_EXPLORERFILE_BUTTONSAVE         (RID_FPICKER_START+33)
+#define STR_PATHNAME                        (RID_FPICKER_START+34)
+#define STR_PATHSELECT                      (RID_FPICKER_START+35)
+#define STR_BUTTONSELECT                    (RID_FPICKER_START+36)
+#define STR_ACTUALVERSION                   (RID_FPICKER_START+37)
+#define STR_PREVIEW                         (RID_FPICKER_START+38)
+#define STR_DEFAULT_DIRECTORY               (RID_FPICKER_START+39)
+#define STR_PLACES_TITLE                    (RID_FPICKER_START+40)
 
 #endif
 
diff --git a/fpicker/source/office/iodlg.hxx b/fpicker/source/office/iodlg.hxx
index b03ba84..58fd919 100644
--- a/fpicker/source/office/iodlg.hxx
+++ b/fpicker/source/office/iodlg.hxx
@@ -161,7 +161,6 @@ private:
     // removes a filter with wildcards from the path and returns it
     bool IsolateFilterFromPath_Impl( OUString& rPath, OUString& rFilter );
 
-    void    implArrangeControls();
     void    implUpdateImages( );
 
 protected:
@@ -176,8 +175,6 @@ protected:
     OUString                    _aPath;
     OUString                    _aDefExt;
 
-    void                        ReleaseOwnership( Window* pUserControl );
-
     /** enables or disables the complete UI of the file picker, with only offering a
         cancel button
 
@@ -260,9 +257,6 @@ public:
 
     void                        displayIOException( const OUString& _rURL, ::com::sun::star::ucb::IOErrorCode _eCode );
 
-    // originally from VclFileDialog
-    virtual bool                AddControl( Window* pControl, sal_Bool bNewLine = sal_False );
-
     // inline
     inline void                 SetPath( const OUString& rNewURL );
     inline void                 SetHasFilename( bool bHasFilename );
@@ -284,13 +278,6 @@ public:
     bool                    ContentCanMakeFolder( const OUString& rURL );
     bool                    ContentGetTitle( const OUString& rURL, OUString& rTitle );
 
-    /** updates the sizes of the listboxes in the bottom area of the dialog, and of their labels,
-        according to the space occupied by the current label texts
-
-        @since #i42824#
-    */
-    void                        updateListboxLabelSizes();
-
 private:
     SvtFileDialogFilter_Impl*   implAddFilter( const OUString& _rFilter, const OUString& _rType );
 
diff --git a/fpicker/source/office/iodlg.src b/fpicker/source/office/iodlg.src
index 822ce92..e09fe0b 100644
--- a/fpicker/source/office/iodlg.src
+++ b/fpicker/source/office/iodlg.src
@@ -47,200 +47,48 @@ ImageList RID_FILEPICKER_IMAGES
     FILEPICKER_IL_IDLIST
 };
 
- // dialogs *******************************************************************
+// strings *******************************************************************
 
-ModalDialog DLG_FPICKER_EXPLORERFILE
+String STR_EXPLORERFILE_OPEN
 {
-    OutputSize = TRUE ;
-    SVLook = TRUE ;
-    Moveable = TRUE ;
-    Closeable = TRUE ;
-    Sizeable = TRUE;
-    HelpId = HID_EXPLORERDLG_FILE ;
-    Size = MAP_APPFONT ( 280 , 174 ) ;
-    ComboBox ED_EXPLORERFILE_CURRENTPATH
-    {
-        Pos = MAP_APPFONT ( 6 , 6 ) ;
-        Size = MAP_APPFONT ( 90 , 12 ) ;
-        Border = TRUE ;
-    };
-    ImageButton BTN_EXPLORERFILE_NEWFOLDER
-    {
-        HelpID = "fpicker:ImageButton:DLG_SVT_EXPLORERFILE:BTN_EXPLORERFILE_NEWFOLDER";
-        TabStop = FALSE ;
-        Pos = MAP_APPFONT ( 59 , 6 ) ;
-        Size = MAP_APPFONT( 12, 12 ) ;
-        QuickHelpText [ en-US ] = "Create New Folder" ;
-    };
-    MenuButton BTN_EXPLORERFILE_UP
-    {
-        HelpID = "fpicker:MenuButton:DLG_SVT_EXPLORERFILE:BTN_EXPLORERFILE_UP";
-        TabStop = FALSE ;
-        Pos = MAP_APPFONT ( 109 , 6 ) ;
-        Size = MAP_APPFONT( 12, 12 ) ;
-        QuickHelpText [ en-US ] = "Up One Level" ;
-    };
-    Splitter EXPLORERFILE_SPLITTER
-    {
-        Pos = MAP_APPFONT( 56, 26 );
-        Size = MAP_APPFONT( 3, 85 );
-        HScroll = TRUE;
-    };
-    Control LB_EXPLORERFILE_PLACES_LISTBOX
-    {
-        HelpID = "fpicker:ListBox:DLG_SVT_EXPLORERFILE:LB_EXPLORERFILE_PLACES_LISTBOX";
-        Pos = MAP_APPFONT ( 6 , 26 ) ;
-        Size = MAP_APPFONT ( 50 , 85 ) ;
-        Border = TRUE ;
-    };
-    PushButton BTN_EXPLORERFILE_CONNECT_TO_SERVER
-    {
-        HelpID = "fpicker:PushButton:DLG_SVT_EXPLORERFILE:BTN_EXPLORERFILE_CONNECT_TO_SERVER";
-        Pos = MAP_APPFONT ( 94 , 6 ) ;
-        Size = MAP_APPFONT ( 50 , 12 ) ;
-        Text [ en-US ] = "Servers..." ;
-        QuickHelpText [ en-US ] = "Connect To Server" ;
-    };
-    Control CTL_EXPLORERFILE_FILELIST
-    {
-        TabStop = TRUE ;
-        Pos = MAP_APPFONT ( 59 , 26 ) ;
-        Size = MAP_APPFONT ( 215 , 85 ) ;
-        Border = TRUE ;
-    };
-    FixedText FT_EXPLORERFILE_FILENAME
-    {
-        Pos = MAP_APPFONT ( 6 , 118 ) ;
-        Size = MAP_APPFONT ( 50 , 10 ) ;
-        Text [ en-US ] = "File ~name:" ;
-    };
-    ComboBox ED_EXPLORERFILE_FILENAME
-    {
-        HelpID = "fpicker:Edit:DLG_SVT_EXPLORERFILE:ED_EXPLORERFILE_FILENAME";
-        Pos = MAP_APPFONT ( 59 , 117 ) ;
-        Size = MAP_APPFONT ( 159 , 12 ) ;
-        Border = TRUE ;
-        DropDown = TRUE ;
-        AutoSize = TRUE ;
-        AutoHScroll = TRUE ;
-    };
-    FixedText FT_EXPLORERFILE_SHARED_LISTBOX
-    {
-        Pos = MAP_APPFONT ( 6 , 133 ) ;
-        Size = MAP_APPFONT ( 50 , 10 ) ;
-        // Note: this control does not have a text. The text is filled at runtime from the STR_SVT_FILEPICKER_VERSION,
-        // STR_SVT_FILEPICKER_TEMPLATES, or STR_SVT_FILEPICKER_IMAGE_TEMPLATE resource
-    };
-    ListBox LB_EXPLORERFILE_SHARED_LISTBOX
-    {
-        HelpID = "fpicker:ListBox:DLG_SVT_EXPLORERFILE:LB_EXPLORERFILE_SHARED_LISTBOX";
-        Pos = MAP_APPFONT ( 59 , 132 ) ;
-        Size = MAP_APPFONT ( 159 , 40 ) ;
-        DropDown = TRUE ;
-        AutoSize = TRUE ;
-        AutoHScroll = TRUE ;
-    };
-    FixedText FT_EXPLORERFILE_FILETYPE
-    {
-        Pos = MAP_APPFONT ( 6 , 148 ) ;
-        Size = MAP_APPFONT ( 50 , 10 ) ;
-        Text [ en-US ] = "File ~type:" ;
-    };
-    ListBox LB_EXPLORERFILE_FILETYPE
-    {
-        HelpID = "fpicker:ListBox:DLG_SVT_EXPLORERFILE:LB_EXPLORERFILE_FILETYPE";
-        Pos = MAP_APPFONT ( 59 , 147 ) ;
-        Size = MAP_APPFONT ( 159 , 80 ) ;
-        DropDown = TRUE ;
-        AutoSize = TRUE ;
-        AutoHScroll = TRUE ;
-        Sort = FALSE ;
-    };
-    CheckBox CB_EXPLORERFILE_READONLY
-    {
-        HelpID = "fpicker:CheckBox:DLG_SVT_EXPLORERFILE:CB_EXPLORERFILE_READONLY";
-        Size = MAP_APPFONT ( 80 , 10 ) ;
-        Text [ en-US ] = "~Read-only" ;
-    };
-    CheckBox CB_EXPLORERFILE_PASSWORD
-    {
-        HelpID = "fpicker:CheckBox:DLG_SVT_EXPLORERFILE:CB_EXPLORERFILE_PASSWORD";
-        Size = MAP_APPFONT ( 100, 10 ) ;
-        Text [ en-US ] = "Save with password" ;
-    };
-    CheckBox CB_AUTO_EXTENSION
-    {
-        HelpID = "fpicker:CheckBox:DLG_SVT_EXPLORERFILE:CB_AUTO_EXTENSION";
-        Size = MAP_APPFONT ( 160 , 10 ) ;
-        Text [ en-US ] = "~Automatic file name extension" ;
-    };
-    CheckBox CB_OPTIONS
-    {
-        HelpID = "fpicker:CheckBox:DLG_SVT_EXPLORERFILE:CB_OPTIONS";
-        Size = MAP_APPFONT ( 120 , 10 ) ;
-        Text [ en-US ] = "Edit ~filter settings";
-    };
-    PushButton BTN_EXPLORERFILE_OPEN
-    {
-        HelpID = "fpicker:PushButton:DLG_SVT_EXPLORERFILE:BTN_EXPLORERFILE_OPEN";
-        Pos = MAP_APPFONT ( 224 , 117 ) ;
-        Size = MAP_APPFONT ( 50 , 14 ) ;
-        DefButton = TRUE ;
-        Text [ en-US ] = "~Open" ;
-    };
-    CancelButton BTN_EXPLORERFILE_CANCEL
-    {
-        Pos = MAP_APPFONT ( 224 , 134 ) ;
-        Size = MAP_APPFONT ( 50 , 14 ) ;
-    };
-    HelpButton BTN_EXPLORERFILE_HELP
-    {
-        Pos = MAP_APPFONT ( 224 , 151 ) ;
-        Size = MAP_APPFONT ( 50 , 14 ) ;
-    };
-    String STR_EXPLORERFILE_OPEN
-    {
-        Text [ en-US ] = "Open" ;
-    };
-    String STR_EXPLORERFILE_SAVE
-    {
-        Text [ en-US ] = "Save as" ;
-    };
-    String STR_EXPLORERFILE_BUTTONSAVE
-    {
-        Text [ en-US ] = "~Save" ;
-    };
-    String STR_PATHNAME
-    {
-        Text [ en-US ] = "~Path:" ;
-    };
-    String STR_PATHSELECT
-    {
-        Text [ en-US ] = "Select path" ;
-    };
-    String STR_BUTTONSELECT
-    {
-        Text [ en-US ] = "~Select";
-    };
-    String STR_ACTUALVERSION
-    {
-        Text [ en-US ] = "Current version";
-    };
-    String STR_PREVIEW
-    {
-        Text [ en-US ] = "File Preview";
-    };
-    String STR_DEFAULT_DIRECTORY
-    {
-        Text [ en-US ] = "My Documents" ;
-    };
-    String STR_PLACES_TITLE
-    {
-        Text [ en-US ] = "Places" ;
-    };
+    Text [ en-US ] = "Open" ;
+};
+String STR_EXPLORERFILE_SAVE
+{
+    Text [ en-US ] = "Save as" ;
+};
+String STR_EXPLORERFILE_BUTTONSAVE
+{
+    Text [ en-US ] = "~Save" ;
+};
+String STR_PATHNAME
+{
+    Text [ en-US ] = "~Path:" ;
+};
+String STR_PATHSELECT
+{
+    Text [ en-US ] = "Select path" ;
+};
+String STR_BUTTONSELECT
+{
+    Text [ en-US ] = "~Select";
+};
+String STR_ACTUALVERSION
+{
+    Text [ en-US ] = "Current version";
+};
+String STR_PREVIEW
+{
+    Text [ en-US ] = "File Preview";
+};
+String STR_DEFAULT_DIRECTORY
+{
+    Text [ en-US ] = "My Documents" ;
+};
+String STR_PLACES_TITLE
+{
+    Text [ en-US ] = "Places" ;
 };
-
-// strings *******************************************************************
 
 String RID_FILEOPEN_NOTEXISTENTFILE
 {
diff --git a/fpicker/source/office/iodlgimp.cxx b/fpicker/source/office/iodlgimp.cxx
index db54a6d..48ac401 100644
--- a/fpicker/source/office/iodlgimp.cxx
+++ b/fpicker/source/office/iodlgimp.cxx
@@ -91,13 +91,13 @@ SvtFileDialogFilter_Impl::~SvtFileDialogFilter_Impl()
 
 
 
-SvtFileDialogURLSelector::SvtFileDialogURLSelector( SvtFileDialog* _pParent, const ResId& _rResId, sal_uInt16 _nButtonId )
-    :MenuButton ( _pParent, _rResId )
-    ,m_pParent  ( _pParent )
+SvtFileDialogURLSelector::SvtFileDialogURLSelector( Window* _pParent, SvtFileDialog* _pDlg, WinBits nBits, sal_uInt16 _nButtonId )
+    :MenuButton ( _pParent, nBits )
+    ,m_pDlg     ( _pDlg )
     ,m_pMenu    ( new PopupMenu )
 {
     SetStyle( GetStyle() | WB_NOPOINTERFOCUS | WB_RECTSTYLE | WB_SMALLSTYLE );
-    SetModeImage( m_pParent->GetButtonImage( _nButtonId ) );
+    SetModeImage( _pDlg->GetButtonImage( _nButtonId ) );
     SetMenuMode( MENUBUTTON_MENUMODE_TIMED );
     SetDropDown( PUSHBUTTON_DROPDOWN_TOOLBOX );
 }
@@ -123,8 +123,8 @@ void SvtFileDialogURLSelector::Activate()
 
 
 
-SvtUpButton_Impl::SvtUpButton_Impl( SvtFileDialog* pParent, const ResId& rResId )
-    :SvtFileDialogURLSelector( pParent, rResId, IMG_FILEDLG_BTN_UP )
+SvtUpButton_Impl::SvtUpButton_Impl( Window *pParent, SvtFileDialog* pDlg, WinBits nBits )
+    :SvtFileDialogURLSelector( pParent, pDlg, nBits, IMG_FILEDLG_BTN_UP )
 {
 }
 
@@ -190,19 +190,19 @@ void SvtUpButton_Impl::Select()
     }
 }
 
-
 void SvtUpButton_Impl::Click()
 {
     GetDialogParent()->PrevLevel_Impl();
 }
 
+Size SvtUpButton_Impl::GetOptimalSize() const
+{
+    return LogicToPixel(Size(12, 12), MAP_APPFONT);
+}
 
 // SvtExpFileDlg_Impl
-
-
 SvtExpFileDlg_Impl::SvtExpFileDlg_Impl( WinBits )   :
 
-    _pLbFilter          ( NULL ),
     _pCurFilter         ( NULL ),
     _pFilter            ( new SvtFileDialogFilterList_Impl() ),
     _pUserFilter        ( NULL ),
@@ -215,6 +215,7 @@ SvtExpFileDlg_Impl::SvtExpFileDlg_Impl( WinBits )   :
     _pFtImageTemplates  ( NULL ),
     _pLbImageTemplates  ( NULL ),
     _pFtFileType        ( NULL ),
+    _pLbFilter          ( NULL ),
     _pBtnFileOpen       ( NULL ),
     _pBtnCancel         ( NULL ),
     _pBtnHelp           ( NULL ),
@@ -234,7 +235,6 @@ SvtExpFileDlg_Impl::SvtExpFileDlg_Impl( WinBits )   :
     m_bNeedDelayedFilterExecute ( false ),
     _pDefaultFilter     ( NULL ),
     _bMultiSelection    ( false ),
-    _nFixDeltaHeight    ( 0 ),
     _bFolderHasOpened   ( false )
 {
 }
@@ -243,29 +243,10 @@ SvtExpFileDlg_Impl::SvtExpFileDlg_Impl( WinBits )   :
 
 SvtExpFileDlg_Impl::~SvtExpFileDlg_Impl()
 {
-    delete _pEdCurrentPath;
-    delete _pCbPassword;
-    delete _pCbAutoExtension;
-    delete _pCbOptions;
-    delete _pBtnNewFolder;
     delete _pBtnUp;
-    delete _pBtnHelp;
-    delete _pBtnCancel;
-    delete _pBtnFileOpen;
-    delete _pLbFilter;
-    delete _pFtFileType;
-    delete _pLbFileVersion;
-    delete _pFtFileVersion;
-    delete _pFtTemplates;
-    delete _pLbTemplates;
-    delete _pFtImageTemplates;
-    delete _pLbImageTemplates;
-    delete _pEdFileName;
-    delete _pFtFileName;
     delete _pUserFilter;
     delete _pFilter;
     delete _pPlaces;
-    delete _pBtnConnectToServer;
 }
 
 
@@ -343,16 +324,4 @@ void SvtExpFileDlg_Impl::InitFilterList( )
         InsertFilterListEntry( &(*_pFilter)[ nPos-- ] );
 }
 
-
-
-void SvtExpFileDlg_Impl::CreateFilterListControl( Window* _pParent, const ResId& _rId )
-{
-    DBG_ASSERT( !_pLbFilter, "SvtExpFileDlg_Impl::CreateFilterListControl: already created the control!" );
-    if ( !_pLbFilter )
-    {
-        _pLbFilter = new ListBox( _pParent, _rId );
-        _pLbFilter->SetDropDownLineCount( 10 );
-    }
-}
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/fpicker/source/office/iodlgimp.hxx b/fpicker/source/office/iodlgimp.hxx
index 816d6ef..25b90d1 100644
--- a/fpicker/source/office/iodlgimp.hxx
+++ b/fpicker/source/office/iodlgimp.hxx
@@ -79,18 +79,18 @@ enum SvtFileDlgType
 class SvtFileDialogURLSelector : public MenuButton
 {
 private:
-    SvtFileDialog*      m_pParent;
+    SvtFileDialog*      m_pDlg;
     PopupMenu*          m_pMenu;
 
 protected:
-    inline        SvtFileDialog*  GetDialogParent()       { return m_pParent; }
+    inline        SvtFileDialog*  GetDialogParent()       { return m_pDlg; }
 
 protected:
 
     virtual void    FillURLMenu( PopupMenu* _pMenu ) = 0;
 
 protected:
-    SvtFileDialogURLSelector( SvtFileDialog* _pParent, const ResId& _rResId, sal_uInt16 _nButtonId );
+    SvtFileDialogURLSelector( Window* _pParent, SvtFileDialog* _pDlg, WinBits nBits, sal_uInt16 _nButtonId );
     virtual ~SvtFileDialogURLSelector();
 
     virtual void        Activate() SAL_OVERRIDE;
@@ -102,13 +102,14 @@ private:
     std::vector<OUString> _aURLs;
 
 public:
-    SvtUpButton_Impl( SvtFileDialog* pParent, const ResId& rResId );
+    SvtUpButton_Impl( Window* pParent, SvtFileDialog* pDlg, WinBits nBits );
     virtual ~SvtUpButton_Impl();
 
 protected:
     virtual void        FillURLMenu( PopupMenu* _pMenu ) SAL_OVERRIDE;
     virtual void        Select() SAL_OVERRIDE;
     virtual void        Click() SAL_OVERRIDE;
+    virtual Size        GetOptimalSize() const SAL_OVERRIDE;
 };
 
 typedef sal_uInt8 SvtFileDlgState;
@@ -123,8 +124,6 @@ private:
     DECL_STATIC_LINK( SvtExpFileDlg_Impl, UnClickHdl, Button* );
 
 private:
-    ListBox*                        _pLbFilter;
-
     const SvtFileDialogFilter_Impl* _pCurFilter;
     OUString                        m_sCurrentFilterDisplayName;    // may differ from _pCurFilter->GetName in case it is a cached entry
 
@@ -147,11 +146,12 @@ public:
     ListBox*                        _pLbImageTemplates;
 
     FixedText*                      _pFtFileType;
+    ListBox*                        _pLbFilter;
     PushButton*                     _pBtnFileOpen;
     PushButton*                     _pBtnCancel;
     HelpButton*                     _pBtnHelp;
     SvtUpButton_Impl*               _pBtnUp;
-    ImageButton*                    _pBtnNewFolder;
+    PushButton*                     _pBtnNewFolder;
     CheckBox*                       _pCbPassword;
     SvtURLBox*                      _pEdCurrentPath;
     CheckBox*                       _pCbAutoExtension;
@@ -182,7 +182,6 @@ public:
     bool                        _bMultiSelection;
 
     // remember fixsizes for resize
-    long                            _nFixDeltaHeight;
     Size                            _a6Size;
     Size                            _aDlgSize;
     OUString                        _aIniKey;
@@ -203,7 +202,6 @@ public:
     // access to the filter listbox only as Control* - we want to maintain the entries/userdata ourself
             Control*        GetFilterListControl()          { return _pLbFilter; }
             const Control*  GetFilterListControl() const    { return _pLbFilter; }
-            void            CreateFilterListControl( Window* _pParent, const ResId& _rId );
     inline  void            SetFilterListSelectHdl( const Link& _rHandler );
 
     // inits the listbox for the filters from the filter list (_pFilter)
diff --git a/fpicker/uiconfig/ui/explorerfiledialog.ui b/fpicker/uiconfig/ui/explorerfiledialog.ui
new file mode 100644
index 0000000..2a82568
--- /dev/null
+++ b/fpicker/uiconfig/ui/explorerfiledialog.ui
@@ -0,0 +1,541 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.16.1 -->
+<interface>
+  <requires lib="gtk+" version="3.0"/>
+  <!-- interface-requires LibreOffice 1.0 -->
+  <object class="GtkDialog" id="ExplorerFileDialog">
+    <property name="can_focus">False</property>
+    <property name="hexpand">True</property>
+    <property name="vexpand">True</property>
+    <property name="border_width">6</property>
+    <property name="type_hint">dialog</property>
+    <child internal-child="vbox">
+      <object class="GtkBox" id="dialog-vbox1">
+        <property name="can_focus">False</property>
+        <property name="hexpand">True</property>
+        <property name="vexpand">True</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">6</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area1">
+            <property name="can_focus">False</property>
+            <property name="hexpand">True</property>
+            <property name="layout_style">start</property>
+            <child>
+              <placeholder/>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkBox" id="box2">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="hexpand">True</property>
+            <property name="vexpand">True</property>
+            <property name="spacing">6</property>
+            <child>
+              <object class="GtkBox" id="box3">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="hexpand">True</property>
+                <property name="vexpand">True</property>
+                <property name="orientation">vertical</property>
+                <property name="spacing">12</property>
+                <child>
+                  <object class="GtkBox" id="box4">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="hexpand">True</property>
+                    <property name="spacing">6</property>
+                    <child>
+                      <object class="svtlo-SvtURLBox" id="current_path">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="hexpand">True</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkButton" id="connect_to_server">
+                        <property name="label" translatable="yes">Servers...</property>
+                        <property name="use_action_appearance">False</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">True</property>
+                        <property name="has_tooltip">True</property>
+                        <property name="tooltip_markup" translatable="yes">Connect To Server</property>
+                        <property name="tooltip_text" translatable="yes">Connect To Server</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkBox" id="up">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="orientation">vertical</property>
+                        <child>
+                          <placeholder/>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">2</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkButton" id="new_folder">
+                        <property name="use_action_appearance">False</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">True</property>
+                        <property name="has_tooltip">True</property>
+                        <property name="tooltip_markup" translatable="yes">Create New Folder</property>
+                        <property name="tooltip_text" translatable="yes">Create New Folder</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">3</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkDrawingArea" id="container">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="hexpand">True</property>
+                    <property name="vexpand">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkGrid" id="grid1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="valign">start</property>
+                    <property name="hexpand">True</property>
+                    <property name="column_spacing">24</property>
+                    <child>
+                      <object class="GtkButtonBox" id="buttonbox1">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="orientation">vertical</property>
+                        <property name="spacing">6</property>
+                        <property name="layout_style">start</property>
+                        <child>
+                          <object class="GtkButton" id="open">
+                            <property name="label">gtk-open</property>
+                            <property name="use_action_appearance">False</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="can_default">True</property>
+                            <property name="has_default">True</property>
+                            <property name="receives_default">True</property>
+                            <property name="use_underline">True</property>
+                            <property name="use_stock">True</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">True</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkButton" id="cancel">
+                            <property name="label">gtk-cancel</property>
+                            <property name="use_action_appearance">False</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">True</property>
+                            <property name="use_stock">True</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">True</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkButton" id="help">
+                            <property name="label">gtk-help</property>
+                            <property name="use_action_appearance">False</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">True</property>
+                            <property name="use_stock">True</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">True</property>
+                            <property name="position">2</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkButton" id="play">
+                            <property name="label">gtk-media-play</property>
+                            <property name="use_action_appearance">False</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">True</property>
+                            <property name="use_stock">True</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">True</property>
+                            <property name="position">3</property>
+                          </packing>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="top_attach">0</property>
+                        <property name="width">1</property>
+                        <property name="height">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkGrid" id="grid2">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="hexpand">True</property>
+                        <property name="row_spacing">6</property>
+                        <child>
+                          <object class="GtkGrid" id="grid3">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="valign">start</property>
+                            <property name="hexpand">True</property>
+                            <property name="row_spacing">6</property>
+                            <property name="column_spacing">12</property>
+                            <property name="row_homogeneous">True</property>
+                            <child>
+                              <object class="GtkLabel" id="file_name_label">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="halign">start</property>
+                                <property name="label" translatable="yes">File _name:</property>
+                                <property name="use_underline">True</property>
+                                <property name="mnemonic_widget">file_name</property>
+                              </object>
+                              <packing>
+                                <property name="left_attach">0</property>
+                                <property name="top_attach">0</property>
+                                <property name="width">1</property>
+                                <property name="height">1</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkLabel" id="shared_label">
+                                <property name="can_focus">False</property>
+                                <property name="halign">start</property>
+                                <property name="use_underline">True</property>
+                              </object>
+                              <packing>
+                                <property name="left_attach">0</property>
+                                <property name="top_attach">1</property>
+                                <property name="width">1</property>
+                                <property name="height">1</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkLabel" id="file_type_label">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="halign">start</property>
+                                <property name="label" translatable="yes">File _type:</property>
+                                <property name="use_underline">True</property>
+                                <property name="mnemonic_widget">file_type</property>
+                              </object>
+                              <packing>
+                                <property name="left_attach">0</property>
+                                <property name="top_attach">2</property>
+                                <property name="width">1</property>
+                                <property name="height">1</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="svtlo-SvtURLBox" id="file_name">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="hexpand">True</property>
+                              </object>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="top_attach">0</property>
+                                <property name="width">1</property>
+                                <property name="height">1</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkComboBox" id="shared">
+                                <property name="can_focus">False</property>
+                                <property name="hexpand">True</property>
+                              </object>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="top_attach">1</property>
+                                <property name="width">1</property>
+                                <property name="height">1</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkComboBox" id="file_type">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="hexpand">True</property>
+                              </object>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="top_attach">2</property>
+                                <property name="width">1</property>
+                                <property name="height">1</property>
+                              </packing>
+                            </child>
+                          </object>

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list