Index: sw/source/ui/fldui/fldref.cxx =================================================================== --- sw/source/ui/fldui/fldref.cxx (revision 1504336) +++ sw/source/ui/fldui/fldref.cxx (working copy) @@ -55,6 +55,7 @@ #include #include // <-- +#include // sw/inc/expfld.hxx SV_IMPL_PTRARR( _SwSeqFldList, _SeqFldLstElem* ) @@ -124,6 +125,7 @@ aSelectionToolTipLB.SetSpaceBetweenEntries(1); aSelectionToolTipLB.SetHighlightRange(); // <-- + SetLayout(); } /*-------------------------------------------------------------------- @@ -720,6 +722,7 @@ aNameED.SetText(sOldSel); } // <-- + getLayout()->resize(); } /*-------------------------------------------------------------------- @@ -1067,3 +1070,49 @@ SetUserData(sData); } + +void SwFldRefPage::SetLayout() +{ + ::boost::shared_ptr< ::vcl::RowOrColumn > xLayout = + ::boost::dynamic_pointer_cast< ::vcl::RowOrColumn >( getLayout() ); + ::boost::shared_ptr< ::vcl::RowOrColumn > xTabPart( + new ::vcl::RowOrColumn( xLayout.get(), false ) ); + size_t nIndex = xLayout->addChild( xTabPart, 1 ); + xLayout->setBorders( nIndex, -1, -1, -1, 0 ); + xTabPart->setOuterBorder( 1 ); + + // left part + Size aListMinSize( aTypeLB.GetSizePixel() ); + ::boost::shared_ptr< ::vcl::RowOrColumn > xLeftPart( + new ::vcl::RowOrColumn( xLayout.get(), true ) ); + xTabPart->addChild( xLeftPart, 0 ); + xLeftPart->addWindow( &aTypeFT, 0 ); + xLeftPart->setMinimumSize( xLeftPart->addWindow( &aTypeLB, 8 ), aListMinSize ); + xLeftPart->addWindow( &aFormatFT, 0 ); + xLeftPart->setMinimumSize( xLeftPart->addWindow( &aFormatLB, 8 ), aListMinSize ); + + Size aEditMinSize( aNameED.GetSizePixel() ); + // right part + ::boost::shared_ptr< ::vcl::RowOrColumn > xRightPart( + new ::vcl::RowOrColumn( xLayout.get(), true ) ); + xTabPart->addChild( xRightPart, 10 ); + + ::boost::shared_ptr< ::vcl::RowOrColumn > xSelectionPart( + new ::vcl::RowOrColumn( xRightPart.get(), true ) ); + + ::boost::shared_ptr< ::vcl::MatrixArranger > xValuePart( + new ::vcl::MatrixArranger( xRightPart.get(), 4, 2 ) ); + + xRightPart->addChild( xSelectionPart, 10 ); + xRightPart->addChild( xValuePart, 0 ); + + xSelectionPart->addWindow( &aSelectionFT, 0 ); + xSelectionPart->setMinimumSize( xSelectionPart->addWindow( &aSelectionLB, 10 ), aListMinSize ); + xSelectionPart->setMinimumSize( xSelectionPart->addWindow( &aSelectionToolTipLB, 10 ), aListMinSize ); + + xValuePart->setMinimumSize( xValuePart->addWindow( &aNameFT, 0, 0 ), aEditMinSize ); + xValuePart->setMinimumSize( xValuePart->addWindow( &aNameED, 0, 1 ), aEditMinSize ); + xValuePart->setMinimumSize( xValuePart->addWindow( &aValueFT, 1, 0 ), aEditMinSize ); + xValuePart->setMinimumSize( xValuePart->addWindow( &aValueED, 1, 1 ), aEditMinSize ); +} + Index: sw/source/ui/fldui/fldtdlg.src =================================================================== --- sw/source/ui/fldui/fldtdlg.src (revision 1504336) +++ sw/source/ui/fldui/fldtdlg.src (working copy) @@ -31,6 +31,7 @@ SVLook = TRUE ; Moveable = TRUE ; Closeable = TRUE ; + Sizeable = TRUE ; TabControl 1 { OutputSize = TRUE ; Index: sw/source/ui/fldui/fldref.hxx =================================================================== --- sw/source/ui/fldui/fldref.hxx (revision 1504336) +++ sw/source/ui/fldui/fldref.hxx (working copy) @@ -88,6 +88,7 @@ const SwTxtNode* GetSavedSelectedTxtNode() const; sal_uInt16 GetSavedSelectedPos() const; // <-- + void SetLayout(); protected: virtual sal_uInt16 GetGroup(); Index: sw/source/ui/fldui/fldtdlg.cxx =================================================================== --- sw/source/ui/fldui/fldtdlg.cxx (revision 1504336) +++ sw/source/ui/fldui/fldtdlg.cxx (working copy) @@ -53,6 +53,7 @@ #include #include #include +#include #include #include @@ -124,6 +125,7 @@ RemoveTabPage(TP_FLD_FUNC); RemoveTabPage(TP_FLD_DB); } + SetLayout(); } /*-------------------------------------------------------------------- @@ -380,3 +382,34 @@ } +void SwFldDlg::SetLayout() +{ + Window* pChild = GetWindow( WINDOW_FIRSTCHILD ); + if ( pChild ) + { + if ( pChild->GetType() == WINDOW_TABCONTROL ) + { + ::boost::shared_ptr< ::vcl::RowOrColumn > xLayout = + ::boost::dynamic_pointer_cast< ::vcl::RowOrColumn >( getLayout() ); + xLayout->setOuterBorder( 0 ); + + size_t nIndex = xLayout->addWindow( pChild, 3 ); + xLayout->setMinimumSize( nIndex, pChild->GetSizePixel() ); + xLayout->setBorders( nIndex, -1, -1, -1, 0 ); + + // button part + ::boost::shared_ptr< ::vcl::RowOrColumn > xButtons( + new ::vcl::RowOrColumn( xLayout.get(), false ) ); + nIndex = xLayout->addChild( xButtons ); + xLayout->setBorders( nIndex, -1, 0, -1, -1 ); + + xButtons->addChild( new ::vcl::Spacer( xLayout.get(), 2 ) ); + + Size aMinSize( GetCancelButton().GetSizePixel() ); + xButtons->setMinimumSize( xButtons->addWindow( &GetOKButton() ), aMinSize ); + xButtons->setMinimumSize( xButtons->addWindow( &GetCancelButton() ), aMinSize ); + xButtons->setMinimumSize( xButtons->addWindow( &GetHelpButton() ), aMinSize ); + } + } +} +