[Libreoffice-commits] core.git: 2 commits - desktop/source desktop/uiconfig extensions/source extensions/uiconfig include/vcl reportdesign/source reportdesign/uiconfig sc/uiconfig sfx2/uiconfig svtools/uiconfig svx/uiconfig vcl/source

Caolán McNamara caolanm at redhat.com
Wed Aug 20 06:01:34 PDT 2014


 desktop/source/deployment/gui/dp_gui_updatedialog.hxx |    2 
 desktop/uiconfig/ui/updatedialog.ui                   |    7 
 extensions/source/bibliography/bib.hrc                |   31 
 extensions/source/bibliography/bibview.cxx            |    1 
 extensions/source/bibliography/general.cxx            |  496 ++++--------
 extensions/source/bibliography/general.hxx            |   25 
 extensions/source/bibliography/sections.src           |  126 ---
 extensions/uiconfig/sbibliography/ui/generalpage.ui   |  697 +++++++++++++++++-
 include/vcl/layout.hxx                                |   11 
 reportdesign/source/ui/dlg/CondFormat.cxx             |    2 
 reportdesign/uiconfig/dbreport/ui/condformatdialog.ui |    5 
 sc/uiconfig/scalc/ui/retypepassdialog.ui              |   19 
 sc/uiconfig/scalc/ui/sortcriteriapage.ui              |   17 
 sfx2/uiconfig/ui/cmisinfopage.ui                      |   25 
 svtools/uiconfig/ui/addresstemplatedialog.ui          |    5 
 svx/uiconfig/ui/asianphoneticguidedialog.ui           |    5 
 vcl/source/window/builder.cxx                         |    6 
 vcl/source/window/layout.cxx                          |   29 
 18 files changed, 967 insertions(+), 542 deletions(-)

New commits:
commit a6c5f2ba6bca8ad95a3731e2770a1d216c9925a0
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Aug 18 14:01:32 2014 +0100

    rework RID_TP_GENERAL conversion to make widgets visible, etc.
    
    Change-Id: I93e30198e27631ad4a6865fd202af16094c26a41

diff --git a/extensions/source/bibliography/bib.hrc b/extensions/source/bibliography/bib.hrc
index f5370bc..96233b1 100644
--- a/extensions/source/bibliography/bib.hrc
+++ b/extensions/source/bibliography/bib.hrc
@@ -43,37 +43,6 @@
 #define RID_BIB_STR_FRAME_TITLE     (RID_BIB_STRING +  4)
 #define RID_MAP_QUESTION            (RID_BIB_STRING +  5)
 
-#define ST_IDENTIFIER               (RID_BIB_STRING +  6)
-#define ST_AUTHTYPE                 (RID_BIB_STRING +  7)
-#define ST_AUTHOR                   (RID_BIB_STRING +  8)
-#define ST_YEAR                     (RID_BIB_STRING +  9)
-#define ST_ISBN                     (RID_BIB_STRING +  10)
-#define ST_MONTH                    (RID_BIB_STRING +  11)
-#define ST_PUBLISHER                (RID_BIB_STRING +  12)
-#define ST_ADDRESS                  (RID_BIB_STRING +  13)
-#define ST_ANNOTE                   (RID_BIB_STRING +  14)
-#define ST_BOOKTITLE                (RID_BIB_STRING +  15)
-#define ST_CHAPTER                  (RID_BIB_STRING +  16)
-#define ST_EDITION                  (RID_BIB_STRING +  17)
-#define ST_EDITOR                   (RID_BIB_STRING +  18)
-#define ST_HOWPUBLISHED             (RID_BIB_STRING +  19)
-#define ST_INSTITUTION              (RID_BIB_STRING +  20)
-#define ST_JOURNAL                  (RID_BIB_STRING +  21)
-#define ST_NOTE                     (RID_BIB_STRING +  22)
-#define ST_NUMBER                   (RID_BIB_STRING +  23)
-#define ST_ORGANIZATION             (RID_BIB_STRING +  24)
-#define ST_PAGE                     (RID_BIB_STRING +  25)
-#define ST_SCHOOL                   (RID_BIB_STRING +  26)
-#define ST_SERIES                   (RID_BIB_STRING +  27)
-#define ST_TITLE                    (RID_BIB_STRING +  28)
-#define ST_REPORT                   (RID_BIB_STRING +  29)
-#define ST_VOLUME                   (RID_BIB_STRING +  30)
-#define ST_URL                      (RID_BIB_STRING +  31)
-#define ST_CUSTOM1                  (RID_BIB_STRING +  32)
-#define ST_CUSTOM2                  (RID_BIB_STRING +  33)
-#define ST_CUSTOM3                  (RID_BIB_STRING +  34)
-#define ST_CUSTOM4                  (RID_BIB_STRING +  35)
-#define ST_CUSTOM5                  (RID_BIB_STRING +  36)
 #define ST_ERROR_PREFIX             (RID_BIB_STRING +  37)
 #define ST_TYPE_ARTICLE             (RID_BIB_STRING +  38)
 #define ST_TYPE_BOOK                (RID_BIB_STRING +  39)
diff --git a/extensions/source/bibliography/bibview.cxx b/extensions/source/bibliography/bibview.cxx
index 341c3a9..1ecbe3d 100644
--- a/extensions/source/bibliography/bibview.cxx
+++ b/extensions/source/bibliography/bibview.cxx
@@ -113,6 +113,7 @@ namespace bib
         }
 
         m_xGeneralPage = m_pGeneralPage = new BibGeneralPage( this, m_pDatMan );
+        m_pGeneralPage->Show();
 
         Resize();
 
diff --git a/extensions/source/bibliography/general.cxx b/extensions/source/bibliography/general.cxx
index 3975bcb..d139d61 100644
--- a/extensions/source/bibliography/general.cxx
+++ b/extensions/source/bibliography/general.cxx
@@ -27,6 +27,7 @@
 #include <com/sun/star/awt/XWindow.hpp>
 #include <toolkit/helper/vclunohelper.hxx>
 #include <cppuhelper/implbase1.hxx>
+#include <vcl/builder.hxx>
 #include <vcl/settings.hxx>
 #include "general.hxx"
 #include "bibresid.hxx"
@@ -52,16 +53,6 @@ using namespace ::com::sun::star::form;
 using namespace ::com::sun::star::sdb;
 using namespace ::rtl;
 
-#define DISTANCE_CONTROL_TO_FIXEDTEXT 5
-
-static ::Point lcl_MovePoint(const FixedText& rFixedText)
-{
-    ::Point aRet(rFixedText.GetPosPixel());
-    aRet.X() += rFixedText.GetSizePixel().Width();
-    aRet.X() += DISTANCE_CONTROL_TO_FIXEDTEXT;
-    return aRet;
-}
-
 static OUString lcl_GetColumnName( const Mapping* pMapping, sal_uInt16 nIndexPos )
 {
     BibConfig* pBibConfig = BibModul::GetConfig();
@@ -177,43 +168,42 @@ void BibPosListener::disposing(const lang::EventObject& /*Source*/) throw( uno::
 
 BibGeneralPage::BibGeneralPage(Window* pParent, BibDataManager* pMan):
     BibTabPage(pParent, "GeneralPage", "modules/sbibliography/ui/generalpage.ui"),
-    pIdentifierFT(new FixedText(this)),
-    pAuthTypeFT(new FixedText(this)),
-    pYearFT(new FixedText(this)),
-    pAuthorFT(new FixedText(this)),
-    pTitleFT(new FixedText(this)),
-    pPublisherFT(new FixedText(this)),
-    pAddressFT(new FixedText(this)),
-    pISBNFT(new FixedText(this)),
-    pChapterFT(new FixedText(this)),
-    pPagesFT(new FixedText(this)),
-    pEditorFT(new FixedText(this)),
-    pEditionFT(new FixedText(this)),
-    pBooktitleFT(new FixedText(this)),
-    pVolumeFT(new FixedText(this)),
-    pHowpublishedFT(new FixedText(this)),
-    pOrganizationsFT(new FixedText(this)),
-    pInstitutionFT(new FixedText(this)),
-    pSchoolFT(new FixedText(this)),
-    pReportTypeFT(new FixedText(this)),
-    pMonthFT(new FixedText(this)),
-    pJournalFT(new FixedText(this)),
-    pNumberFT(new FixedText(this)),
-    pSeriesFT(new FixedText(this)),
-    pAnnoteFT(new FixedText(this)),
-    pNoteFT(new FixedText(this)),
-    pURLFT(new FixedText(this)),
-    pCustom1FT(new FixedText(this)),
-    pCustom2FT(new FixedText(this)),
-    pCustom3FT(new FixedText(this)),
-    pCustom4FT(new FixedText(this)),
-    pCustom5FT(new FixedText(this)),
-    aHoriScroll(this, WB_HORZ),
-    aVertScroll(this, WB_VERT),
     sErrorPrefix(BIB_RESSTR(ST_ERROR_PREFIX)),
     pDatMan(pMan)
 {
-    aStdSize = GetOutputSizePixel();
+    get(pIdentifierFT, "shortname");
+    get(pAuthTypeFT, "authtype");
+    get(pGrid, "grid");
+    get(pScrolledWindow, "scrolledwindow");
+    get(pYearFT, "year");
+    get(pAuthorFT, "authors");
+    get(pTitleFT, "title");
+    get(pPublisherFT, "publisher");
+    get(pAddressFT, "address");
+    get(pISBNFT, "isbn");
+    get(pChapterFT, "chapter");
+    get(pPagesFT, "pages");
+    get(pEditorFT, "editor");
+    get(pEditionFT, "edition");
+    get(pBooktitleFT, "booktitle");
+    get(pVolumeFT, "volume");
+    get(pHowpublishedFT, "publicationtype");
+    get(pOrganizationsFT, "organization");
+    get(pInstitutionFT, "institution");
+    get(pSchoolFT, "university");
+    get(pReportTypeFT, "reporttype");
+    get(pMonthFT, "month");
+    get(pJournalFT, "journal");
+    get(pNumberFT, "number");
+    get(pSeriesFT, "series");
+    get(pAnnoteFT, "annotation");
+    get(pNoteFT, "note");
+    get(pURLFT, "url");
+    get(pCustom1FT, "custom1");
+    get(pCustom2FT, "custom2");
+    get(pCustom3FT, "custom3");
+    get(pCustom4FT, "custom4");
+    get(pCustom5FT, "custom5");
 
     aBibTypeArr[0] = BIB_RESSTR(ST_TYPE_ARTICLE);
     aBibTypeArr[1] = BIB_RESSTR(ST_TYPE_BOOK);
@@ -240,8 +230,6 @@ BibGeneralPage::BibGeneralPage(Window* pParent, BibDataManager* pMan):
 
     InitFixedTexts();
 
-    aBasePos = pIdentifierFT->GetPosPixel();
-
     sal_Int16* pMap = nFT2CtrlMap;
     for( sal_uInt16 i = 0 ; i < FIELD_COUNT ; ++i, ++pMap )
     {
@@ -249,18 +237,6 @@ BibGeneralPage::BibGeneralPage(Window* pParent, BibDataManager* pMan):
         *pMap = -1;
     }
 
-    AdjustScrollbars();
-    Link aScrollLnk(LINK(this, BibGeneralPage, ScrollHdl));
-    aHoriScroll.SetScrollHdl( aScrollLnk );
-    aVertScroll.SetScrollHdl( aScrollLnk );
-    aHoriScroll.SetLineSize(10);
-    aVertScroll.SetLineSize(10);
-    aHoriScroll.SetPageSize( pIdentifierFT->GetSizePixel().Width());
-    aVertScroll.SetPageSize(
-        pPublisherFT->GetPosPixel().Y() - pIdentifierFT->GetPosPixel().Y());
-    aHoriScroll.Show();
-    aVertScroll.Show();
-
     BibConfig* pBibConfig = BibModul::GetConfig();
     BibDBDescriptor aDesc;
     aDesc.sDataSource = pDatMan->getActiveDataSource();
@@ -268,111 +244,107 @@ BibGeneralPage::BibGeneralPage(Window* pParent, BibDataManager* pMan):
     aDesc.nCommandType = CommandType::TABLE;
     const Mapping* pMapping = pBibConfig->GetMapping(aDesc);
 
-    xCtrlContnr = VCLUnoHelper::CreateControlContainer(this);
+    xCtrlContnr = VCLUnoHelper::CreateControlContainer(pGrid);
 
-    // the control should be a bit smaller than the fixed text
-    Size aControlSize(pIdentifierFT->GetSizePixel());
-    aControlSize.Width() = aControlSize.Width() * 8 / 10;
+    std::vector<Window*> aChildren;
 
-    AddControlWithError( lcl_GetColumnName( pMapping, IDENTIFIER_POS ), lcl_MovePoint( *pIdentifierFT ),
-        aControlSize, sTableErrorString, pIdentifierFT->GetText(),
-        HID_BIB_IDENTIFIER_POS, 0 );
+    AddControlWithError(lcl_GetColumnName(pMapping, IDENTIFIER_POS), *pIdentifierFT,
+        sTableErrorString,
+        HID_BIB_IDENTIFIER_POS, 0, aChildren);
 
     sTypeColumnName = lcl_GetColumnName(pMapping, AUTHORITYTYPE_POS);
 
-    AddControlWithError( sTypeColumnName, lcl_MovePoint(*pAuthTypeFT ), aControlSize, sTableErrorString,
-        pAuthTypeFT->GetText(), HID_BIB_AUTHORITYTYPE_POS, 1 );
+    AddControlWithError(sTypeColumnName, *pAuthTypeFT, sTableErrorString,
+        HID_BIB_AUTHORITYTYPE_POS, 1, aChildren);
 
-    ::Point aYearPos = lcl_MovePoint(*pYearFT);
-    AddControlWithError( lcl_GetColumnName( pMapping, YEAR_POS ), aYearPos,
-        aControlSize, sTableErrorString, pYearFT->GetText(), HID_BIB_YEAR_POS, 4 );
+    AddControlWithError(lcl_GetColumnName(pMapping, YEAR_POS), *pYearFT,
+        sTableErrorString, HID_BIB_YEAR_POS, 2, aChildren);
 
-    AddControlWithError( lcl_GetColumnName(pMapping, AUTHOR_POS), lcl_MovePoint(*pAuthorFT),
-        aControlSize, sTableErrorString, pAuthorFT->GetText(), HID_BIB_AUTHOR_POS, 2 );
+    AddControlWithError(lcl_GetColumnName(pMapping, AUTHOR_POS), *pAuthorFT,
+        sTableErrorString, HID_BIB_AUTHOR_POS, 3, aChildren);
 
-    ::Point aTitlePos( lcl_MovePoint( *pTitleFT ) );
-    ::Size aTitleSize = pTitleFT->GetSizePixel();
-    aTitleSize.Width() = aYearPos.X() + aControlSize.Width() - aTitlePos.X();
-    AddControlWithError( lcl_GetColumnName(pMapping, TITLE_POS), aTitlePos, aTitleSize, sTableErrorString,
-        pTitleFT->GetText(), HID_BIB_TITLE_POS, 22 );
+    AddControlWithError(lcl_GetColumnName(pMapping, TITLE_POS), *pTitleFT, sTableErrorString,
+        HID_BIB_TITLE_POS, 4, aChildren);
 
-    AddControlWithError( lcl_GetColumnName( pMapping, PUBLISHER_POS ), lcl_MovePoint( *pPublisherFT),
-        aControlSize, sTableErrorString, pPublisherFT->GetText(), HID_BIB_PUBLISHER_POS, 5 );
+    AddControlWithError(lcl_GetColumnName(pMapping, PUBLISHER_POS), *pPublisherFT,
+        sTableErrorString, HID_BIB_PUBLISHER_POS, 5, aChildren);
 
-    AddControlWithError( lcl_GetColumnName( pMapping, ADDRESS_POS ), lcl_MovePoint( *pAddressFT ),
-        aControlSize, sTableErrorString, pAddressFT->GetText(), HID_BIB_ADDRESS_POS, 7 );
+    AddControlWithError(lcl_GetColumnName(pMapping, ADDRESS_POS), *pAddressFT,
+        sTableErrorString, HID_BIB_ADDRESS_POS, 6, aChildren);
 
-    AddControlWithError( lcl_GetColumnName( pMapping, ISBN_POS ), lcl_MovePoint( *pISBNFT ),
-        aControlSize, sTableErrorString, pISBNFT->GetText(), HID_BIB_ISBN_POS, 6 );
+    AddControlWithError(lcl_GetColumnName(pMapping, ISBN_POS), *pISBNFT,
+        sTableErrorString, HID_BIB_ISBN_POS, 7, aChildren);
 
-    AddControlWithError( lcl_GetColumnName( pMapping, CHAPTER_POS ), lcl_MovePoint(*pChapterFT),
-        aControlSize, sTableErrorString, pChapterFT->GetText(), HID_BIB_CHAPTER_POS, 10 );
+    AddControlWithError(lcl_GetColumnName(pMapping, CHAPTER_POS), *pChapterFT,
+        sTableErrorString, HID_BIB_CHAPTER_POS, 8, aChildren);
 
-    AddControlWithError( lcl_GetColumnName( pMapping, PAGES_POS ), lcl_MovePoint( *pPagesFT ),
-        aControlSize, sTableErrorString, pPagesFT->GetText(), HID_BIB_PAGES_POS, 19 );
+    AddControlWithError(lcl_GetColumnName(pMapping, PAGES_POS), *pPagesFT,
+        sTableErrorString, HID_BIB_PAGES_POS, 9, aChildren);
 
-    AddControlWithError( lcl_GetColumnName( pMapping, EDITOR_POS ), lcl_MovePoint( *pEditorFT ),
-        aControlSize, sTableErrorString, pEditorFT->GetText(), HID_BIB_EDITOR_POS, 12 );
+    AddControlWithError(lcl_GetColumnName(pMapping, EDITOR_POS), *pEditorFT,
+        sTableErrorString, HID_BIB_EDITOR_POS, 10, aChildren);
 
-    AddControlWithError( lcl_GetColumnName( pMapping, EDITION_POS ), lcl_MovePoint(*pEditionFT),
-        aControlSize, sTableErrorString, pEditionFT->GetText(), HID_BIB_EDITION_POS, 11 );
+    AddControlWithError(lcl_GetColumnName(pMapping, EDITION_POS), *pEditionFT,
+        sTableErrorString, HID_BIB_EDITION_POS, 11, aChildren);
 
-    AddControlWithError( lcl_GetColumnName(pMapping, BOOKTITLE_POS), lcl_MovePoint(*pBooktitleFT),
-        aControlSize, sTableErrorString, pBooktitleFT->GetText(), HID_BIB_BOOKTITLE_POS, 9 );
+    AddControlWithError(lcl_GetColumnName(pMapping, BOOKTITLE_POS), *pBooktitleFT,
+        sTableErrorString, HID_BIB_BOOKTITLE_POS, 12, aChildren);
 
-    AddControlWithError( lcl_GetColumnName( pMapping, VOLUME_POS ), lcl_MovePoint( *pVolumeFT ),
-        aControlSize, sTableErrorString, pVolumeFT->GetText(), HID_BIB_VOLUME_POS, 24 );
+    AddControlWithError(lcl_GetColumnName(pMapping, VOLUME_POS), *pVolumeFT,
+        sTableErrorString, HID_BIB_VOLUME_POS, 13, aChildren);
 
-    AddControlWithError( lcl_GetColumnName( pMapping, HOWPUBLISHED_POS ), lcl_MovePoint( *pHowpublishedFT ),
-        aControlSize, sTableErrorString, pHowpublishedFT->GetText(), HID_BIB_HOWPUBLISHED_POS, 13 );
+    AddControlWithError(lcl_GetColumnName(pMapping, HOWPUBLISHED_POS), *pHowpublishedFT,
+        sTableErrorString, HID_BIB_HOWPUBLISHED_POS, 14, aChildren);
 
-    AddControlWithError( lcl_GetColumnName( pMapping, ORGANIZATIONS_POS ), lcl_MovePoint( *pOrganizationsFT ),
-        aControlSize, sTableErrorString, pOrganizationsFT->GetText(), HID_BIB_ORGANIZATIONS_POS, 18 );
+    AddControlWithError(lcl_GetColumnName(pMapping, ORGANIZATIONS_POS), *pOrganizationsFT,
+        sTableErrorString, HID_BIB_ORGANIZATIONS_POS, 15, aChildren);
 
-    AddControlWithError( lcl_GetColumnName( pMapping, INSTITUTION_POS ), lcl_MovePoint( *pInstitutionFT ),
-        aControlSize, sTableErrorString, pInstitutionFT->GetText(), HID_BIB_INSTITUTION_POS, 14 );
+    AddControlWithError(lcl_GetColumnName(pMapping, INSTITUTION_POS), *pInstitutionFT,
+        sTableErrorString, HID_BIB_INSTITUTION_POS, 16, aChildren);
 
-    AddControlWithError( lcl_GetColumnName( pMapping, SCHOOL_POS ), lcl_MovePoint( *pSchoolFT ),
-        aControlSize, sTableErrorString, pSchoolFT->GetText(), HID_BIB_SCHOOL_POS, 20 );
+    AddControlWithError(lcl_GetColumnName(pMapping, SCHOOL_POS), *pSchoolFT,
+        sTableErrorString, HID_BIB_SCHOOL_POS, 17, aChildren);
 
-    AddControlWithError( lcl_GetColumnName( pMapping, REPORTTYPE_POS ), lcl_MovePoint( *pReportTypeFT ),
-        aControlSize, sTableErrorString, pReportTypeFT->GetText(), HID_BIB_REPORTTYPE_POS, 23 );
+    AddControlWithError(lcl_GetColumnName(pMapping, REPORTTYPE_POS), *pReportTypeFT,
+        sTableErrorString, HID_BIB_REPORTTYPE_POS, 18, aChildren);
 
-    AddControlWithError( lcl_GetColumnName( pMapping, MONTH_POS ), lcl_MovePoint( *pMonthFT ),
-        aControlSize, sTableErrorString, pMonthFT->GetText(), HID_BIB_MONTH_POS, 3 );
+    AddControlWithError(lcl_GetColumnName(pMapping, MONTH_POS), *pMonthFT,
+        sTableErrorString, HID_BIB_MONTH_POS, 19, aChildren);
 
-    AddControlWithError( lcl_GetColumnName( pMapping, JOURNAL_POS ), lcl_MovePoint( *pJournalFT ),
-        aControlSize, sTableErrorString, pJournalFT->GetText(), HID_BIB_JOURNAL_POS, 15 );
+    AddControlWithError(lcl_GetColumnName(pMapping, JOURNAL_POS), *pJournalFT,
+        sTableErrorString, HID_BIB_JOURNAL_POS, 20, aChildren);
 
-    AddControlWithError( lcl_GetColumnName( pMapping, NUMBER_POS ), lcl_MovePoint( *pNumberFT ),
-        aControlSize, sTableErrorString, pNumberFT->GetText(), HID_BIB_NUMBER_POS, 17 );
+    AddControlWithError(lcl_GetColumnName(pMapping, NUMBER_POS), *pNumberFT,
+        sTableErrorString, HID_BIB_NUMBER_POS, 21, aChildren);
 
-    AddControlWithError( lcl_GetColumnName( pMapping, SERIES_POS ), lcl_MovePoint( *pSeriesFT ),
-        aControlSize, sTableErrorString, pSeriesFT->GetText(), HID_BIB_SERIES_POS, 21 );
+    AddControlWithError(lcl_GetColumnName(pMapping, SERIES_POS), *pSeriesFT,
+        sTableErrorString, HID_BIB_SERIES_POS, 22, aChildren);
 
-    AddControlWithError( lcl_GetColumnName( pMapping, ANNOTE_POS ), lcl_MovePoint( *pAnnoteFT ),
-        aControlSize, sTableErrorString, pAnnoteFT->GetText(), HID_BIB_ANNOTE_POS, 8 );
+    AddControlWithError(lcl_GetColumnName(pMapping, ANNOTE_POS), *pAnnoteFT,
+        sTableErrorString, HID_BIB_ANNOTE_POS, 23, aChildren);
 
-    AddControlWithError( lcl_GetColumnName( pMapping, NOTE_POS ), lcl_MovePoint( *pNoteFT ),
-        aControlSize, sTableErrorString, pNoteFT->GetText(), HID_BIB_NOTE_POS, 16 );
+    AddControlWithError(lcl_GetColumnName(pMapping, NOTE_POS),*pNoteFT,
+        sTableErrorString, HID_BIB_NOTE_POS, 24, aChildren);
 
-    AddControlWithError( lcl_GetColumnName( pMapping, URL_POS ), lcl_MovePoint( *pURLFT ),
-        aControlSize, sTableErrorString, pURLFT->GetText(), HID_BIB_URL_POS, 25 );
+    AddControlWithError(lcl_GetColumnName(pMapping, URL_POS), *pURLFT,
+        sTableErrorString, HID_BIB_URL_POS, 25, aChildren);
 
-    AddControlWithError( lcl_GetColumnName( pMapping, CUSTOM1_POS ), lcl_MovePoint( *pCustom1FT ),
-        aControlSize, sTableErrorString, pCustom1FT->GetText(), HID_BIB_CUSTOM1_POS, 26 );
+    AddControlWithError(lcl_GetColumnName(pMapping, CUSTOM1_POS), *pCustom1FT,
+        sTableErrorString, HID_BIB_CUSTOM1_POS, 26, aChildren);
 
-    AddControlWithError( lcl_GetColumnName( pMapping, CUSTOM2_POS ), lcl_MovePoint( *pCustom2FT ),
-        aControlSize, sTableErrorString, pCustom2FT->GetText(), HID_BIB_CUSTOM2_POS, 27 );
+    AddControlWithError(lcl_GetColumnName(pMapping, CUSTOM2_POS), *pCustom2FT,
+        sTableErrorString, HID_BIB_CUSTOM2_POS, 27, aChildren);
 
-    AddControlWithError( lcl_GetColumnName( pMapping, CUSTOM3_POS ), lcl_MovePoint( *pCustom3FT ),
-        aControlSize, sTableErrorString, pCustom3FT->GetText(), HID_BIB_CUSTOM3_POS, 28 );
+    AddControlWithError(lcl_GetColumnName(pMapping, CUSTOM3_POS), *pCustom3FT,
+        sTableErrorString, HID_BIB_CUSTOM3_POS, 28, aChildren);
 
-    AddControlWithError( lcl_GetColumnName( pMapping, CUSTOM4_POS ), lcl_MovePoint( *pCustom4FT ),
-        aControlSize, sTableErrorString, pCustom4FT->GetText(), HID_BIB_CUSTOM4_POS, 29 );
+    AddControlWithError(lcl_GetColumnName(pMapping, CUSTOM4_POS), *pCustom4FT,
+        sTableErrorString, HID_BIB_CUSTOM4_POS, 29, aChildren);
 
-    AddControlWithError( lcl_GetColumnName( pMapping, CUSTOM5_POS ), lcl_MovePoint( *pCustom5FT ),
-        aControlSize, sTableErrorString, pCustom5FT->GetText(), HID_BIB_CUSTOM5_POS, 30 );
+    AddControlWithError(lcl_GetColumnName(pMapping, CUSTOM5_POS), *pCustom5FT,
+        sTableErrorString, HID_BIB_CUSTOM5_POS, 30, aChildren);
+
+    VclBuilder::reorderWithinParent(aChildren, false);
 
     xPosListener = new BibPosListener(this);
     uno::Reference< sdbc::XRowSet >  xRowSet(pDatMan->getForm(), UNO_QUERY);
@@ -386,6 +358,9 @@ BibGeneralPage::BibGeneralPage(Window* pParent, BibDataManager* pMan):
         sTableErrorString = sErrorPrefix + sTableErrorString;
 
     SetText(BIB_RESSTR(ST_TYPE_TITLE));
+
+    Size aSize(LogicToPixel(Size(0, 209), MapMode(MAP_APPFONT)));
+    set_height_request(aSize.Height());
 }
 
 BibGeneralPage::~BibGeneralPage()
@@ -396,38 +371,6 @@ BibGeneralPage::~BibGeneralPage()
         if(xRowSet.is())
             xRowSet->removeRowSetListener(xPosListener);
     }
-
-    delete pIdentifierFT;
-    delete pAuthTypeFT;
-    delete pYearFT;
-    delete pAuthorFT;
-    delete pTitleFT;
-    delete pPublisherFT;
-    delete pAddressFT;
-    delete pISBNFT;
-    delete pChapterFT;
-    delete pPagesFT;
-    delete pEditorFT;
-    delete pEditionFT;
-    delete pBooktitleFT;
-    delete pVolumeFT;
-    delete pHowpublishedFT;
-    delete pOrganizationsFT;
-    delete pInstitutionFT;
-    delete pSchoolFT;
-    delete pReportTypeFT;
-    delete pMonthFT;
-    delete pJournalFT;
-    delete pNumberFT;
-    delete pSeriesFT;
-    delete pAnnoteFT;
-    delete pNoteFT;
-    delete pURLFT;
-    delete pCustom1FT;
-    delete pCustom2FT;
-    delete pCustom3FT;
-    delete pCustom4FT;
-    delete pCustom5FT;
 }
 
 void BibGeneralPage::RemoveListeners()
@@ -456,13 +399,14 @@ void BibGeneralPage::CommitActiveControl()
     }
 }
 
-void BibGeneralPage::AddControlWithError( const OUString& rColumnName, const ::Point& rPos, const ::Size& rSize,
-                                OUString& rErrorString, const OUString& aColumnUIName, const OString& sHelpId, sal_uInt16 nIndexInFTArray )
+void BibGeneralPage::AddControlWithError( const OUString& rColumnName, FixedText &rLabel,
+    OUString& rErrorString, const OString& sHelpId, sal_uInt16 nIndexInFTArray, std::vector<Window*> &rChildren)
 {
+    const OUString aColumnUIName(rLabel.GetText());
     // adds also the XControl and creates a map entry in nFT2CtrlMap[] for mapping between control and FT
 
     sal_Int16                                   nIndex = -1;
-    uno::Reference< awt::XControlModel >    xTmp = AddXControl(rColumnName, rPos, rSize, sHelpId, nIndex );
+    uno::Reference< awt::XControlModel >    xTmp = AddXControl(rColumnName, rLabel, sHelpId, nIndex, rChildren);
     if( xTmp.is() )
     {
         DBG_ASSERT( nIndexInFTArray < FIELD_COUNT, "*BibGeneralPage::AddControlWithError(): wrong array index!" );
@@ -481,7 +425,8 @@ void BibGeneralPage::AddControlWithError( const OUString& rColumnName, const ::P
 
 uno::Reference< awt::XControlModel >  BibGeneralPage::AddXControl(
         const OUString& rName,
-        ::Point rPos, ::Size rSize, const OString& sHelpId, sal_Int16& rIndex )
+        FixedText& rLabel, const OString& sHelpId, sal_Int16& rIndex,
+        std::vector<Window*>& rChildren)
 {
     uno::Reference< awt::XControlModel >  xCtrModel;
     try
@@ -565,17 +510,26 @@ uno::Reference< awt::XControlModel >  BibGeneralPage::AddXControl(
                             rIndex = sal_Int16( i );
                             break;
                         }
+                    // initially switch on the design mode - switch it off _after_ loading the form
                     xCtrWin->setVisible( sal_True );
                     xControl->setDesignMode( sal_True );
-                    // initially switch on the design mode - switch it off _after_ loading the form
 
-                    xCtrWin->setPosSize(rPos.X(), rPos.Y(), rSize.Width(),
-                        rSize.Height(), awt::PosSize::POSSIZE);
+                    Window* pWindow = VCLUnoHelper::GetWindow(xControl->getPeer());
+                    pWindow->set_grid_top_attach(rLabel.get_grid_top_attach());
+                    pWindow->set_grid_left_attach(rLabel.get_grid_left_attach()+1);
+                    pWindow->set_valign(VCL_ALIGN_CENTER);
+                    rLabel.set_mnemonic_widget(pWindow);
+                    if (&rLabel == pTitleFT)
+                        pWindow->set_grid_width(3);
+                    else
+                        pWindow->set_hexpand(true);
+                    rChildren.push_back(&rLabel);
+                    rChildren.push_back(pWindow);
                 }
             }
         }
     }
-    catch(Exception& rEx)
+    catch(const Exception& rEx)
     {
         (void) rEx; // make compiler happy
         OSL_FAIL("BibGeneralPage::AddXControl: something went wrong!");
@@ -583,124 +537,37 @@ uno::Reference< awt::XControlModel >  BibGeneralPage::AddXControl(
     return xCtrModel;
 }
 
-void BibGeneralPage::AdjustScrollbars()
-{
-    long nVertScrollWidth = aVertScroll.GetSizePixel().Width();
-    long nHoriScrollHeight = aHoriScroll.GetSizePixel().Height();
-    ::Size aOutSize(GetOutputSizePixel());
-    bool bHoriVisible = aOutSize.Width() <= aStdSize.Width();
-    bool bVertVisible = (aOutSize.Height()-(bHoriVisible ? nHoriScrollHeight : 0)) <= (aStdSize.Height());
-    aHoriScroll.Show(bHoriVisible);
-    aVertScroll.Show(bVertVisible);
-
-    if(bHoriVisible)
-    {
-        ::Size aHoriSize(aOutSize.Width() - (bVertVisible ? nVertScrollWidth : 0),
-                        nHoriScrollHeight);
-        aHoriScroll.SetSizePixel(aHoriSize);
-        aHoriScroll.SetRange( Range(0, aStdSize.Width()));
-        aHoriScroll.SetVisibleSize( aHoriSize.Width()  - (bVertVisible ? nVertScrollWidth : 0));
-    }
-    if(bVertVisible)
-    {
-        ::Size aVertSize(nHoriScrollHeight, aOutSize.Height() -
-                                            (bHoriVisible ? nHoriScrollHeight : 0));
-        aVertScroll.SetSizePixel(aVertSize);
-        aVertScroll.SetRange( Range(0, aStdSize.Height()));
-        aVertScroll.SetVisibleSize( aVertSize.Height() );
-    }
-
-    ::Size aSize(8, 8);
-    aSize = LogicToPixel(aSize, MapMode(MAP_APPFONT));
-    ::Size aScrollSize(aOutSize.Width() - aSize.Height(), aSize.Height());
-    ::Point aScrollPos(0, aOutSize.Height() - aSize.Height());
-    aHoriScroll.SetPosSizePixel(aScrollPos, aScrollSize);
-
-    aScrollPos.X() = aOutSize.Width() - aSize.Width();
-    aScrollPos.Y() = 0;
-    aScrollSize.Width() = aSize.Width();
-    aScrollSize.Height() = aOutSize.Height() - aSize.Height();
-    aVertScroll.SetPosSizePixel(aScrollPos, aScrollSize);
-
-    ::Size aControlParentWinSz(aOutSize);
-    if(bHoriVisible)
-        aControlParentWinSz.Height() -=  aSize.Height();
-    if(bVertVisible)
-        aControlParentWinSz.Width() -=  aSize.Width();
-    SetSizePixel(aControlParentWinSz);
-}
-
-void BibGeneralPage::Resize()
-{
-    AdjustScrollbars();
-    ScrollHdl(&aVertScroll);
-    ScrollHdl(&aHoriScroll);
-    Window::Resize();
-}
-
 void BibGeneralPage::InitFixedTexts( void )
 {
-    OUString      aFixedStrings[ FIELD_COUNT ] =
-    {
-        BIB_RESSTR( ST_IDENTIFIER     ),
-        BIB_RESSTR( ST_AUTHTYPE       ),
-        BIB_RESSTR( ST_AUTHOR         ),
-        BIB_RESSTR( ST_TITLE          ),
-        BIB_RESSTR( ST_MONTH          ),
-        BIB_RESSTR( ST_YEAR           ),
-        BIB_RESSTR( ST_ISBN           ),
-        BIB_RESSTR( ST_BOOKTITLE      ),
-        BIB_RESSTR( ST_CHAPTER        ),
-        BIB_RESSTR( ST_EDITION        ),
-        BIB_RESSTR( ST_EDITOR         ),
-        BIB_RESSTR( ST_HOWPUBLISHED   ),
-        BIB_RESSTR( ST_INSTITUTION    ),
-        BIB_RESSTR( ST_JOURNAL        ),
-        BIB_RESSTR( ST_NOTE           ),
-        BIB_RESSTR( ST_ANNOTE         ),
-        BIB_RESSTR( ST_NUMBER         ),
-        BIB_RESSTR( ST_ORGANIZATION   ),
-        BIB_RESSTR( ST_PAGE           ),
-        BIB_RESSTR( ST_PUBLISHER      ),
-        BIB_RESSTR( ST_ADDRESS        ),
-        BIB_RESSTR( ST_SCHOOL         ),
-        BIB_RESSTR( ST_SERIES         ),
-        BIB_RESSTR( ST_REPORT         ),
-        BIB_RESSTR( ST_VOLUME         ),
-        BIB_RESSTR( ST_URL            ),
-        BIB_RESSTR( ST_CUSTOM1        ),
-        BIB_RESSTR( ST_CUSTOM2        ),
-        BIB_RESSTR( ST_CUSTOM3        ),
-        BIB_RESSTR( ST_CUSTOM4        ),
-        BIB_RESSTR( ST_CUSTOM5        )
-    };
-
     aFixedTexts[0] = pIdentifierFT;
     aFixedTexts[1] = pAuthTypeFT;
-    aFixedTexts[2] = pAuthorFT;
-    aFixedTexts[3] = pTitleFT;
-    aFixedTexts[4] = pMonthFT;
-    aFixedTexts[5] = pYearFT;
-    aFixedTexts[6] = pISBNFT;
-    aFixedTexts[7] = pBooktitleFT;
+    aFixedTexts[2] = pYearFT;
+    aFixedTexts[3] = pAuthorFT;
+    aFixedTexts[4] = pTitleFT;
+    aFixedTexts[5] = pPublisherFT;
+    aFixedTexts[6] = pAddressFT;
+    aFixedTexts[7] = pISBNFT;
     aFixedTexts[8] = pChapterFT;
-    aFixedTexts[9] = pEditionFT;
+    aFixedTexts[9] = pPagesFT;
+
     aFixedTexts[10] = pEditorFT;
-    aFixedTexts[11] = pHowpublishedFT;
-    aFixedTexts[12] = pInstitutionFT;
-    aFixedTexts[13] = pJournalFT;
-    aFixedTexts[14] = pNoteFT;
-    aFixedTexts[15] = pAnnoteFT;
-    aFixedTexts[16] = pNumberFT;
-    aFixedTexts[17] = pOrganizationsFT;
-    aFixedTexts[18] = pPagesFT;
-    aFixedTexts[19] = pPublisherFT;
-    aFixedTexts[20] = pAddressFT;
-    aFixedTexts[21] = pSchoolFT;
+    aFixedTexts[11] = pEditionFT;
+    aFixedTexts[12] = pBooktitleFT;
+    aFixedTexts[13] = pVolumeFT;
+    aFixedTexts[14] = pHowpublishedFT;
+    aFixedTexts[15] = pOrganizationsFT;
+    aFixedTexts[16] = pInstitutionFT;
+    aFixedTexts[17] = pSchoolFT;
+    aFixedTexts[18] = pReportTypeFT;
+    aFixedTexts[19] = pMonthFT;
+
+    aFixedTexts[20] = pJournalFT;
+    aFixedTexts[21] = pNumberFT;
     aFixedTexts[22] = pSeriesFT;
-    aFixedTexts[23] = pReportTypeFT;
-    aFixedTexts[24] = pVolumeFT;
+    aFixedTexts[23] = pAnnoteFT;
+    aFixedTexts[24] = pNoteFT;
     aFixedTexts[25] = pURLFT;
+
     aFixedTexts[26] = pCustom1FT;
     aFixedTexts[27] = pCustom2FT;
     aFixedTexts[28] = pCustom3FT;
@@ -710,6 +577,11 @@ void BibGeneralPage::InitFixedTexts( void )
     int                 i;
 
     MnemonicGenerator   aMnemonicGenerator;
+
+    OUString aFixedStrings[ FIELD_COUNT ];
+    for( i = 0 ; i < FIELD_COUNT ; ++i )
+        aFixedStrings[i] = aFixedTexts[i]->GetText();
+
     // init mnemonics, first register all strings
     for( i = 0 ; i < FIELD_COUNT ; ++i )
         aMnemonicGenerator.RegisterMnemonic( aFixedStrings[ i ] );
@@ -723,72 +595,24 @@ void BibGeneralPage::InitFixedTexts( void )
         aFixedTexts[ i ]->SetText( aFixedStrings[ i ] );
 }
 
-IMPL_LINK(BibGeneralPage, ScrollHdl, ScrollBar*, pScroll)
-{
-    bool bVertical = &aVertScroll == pScroll;
-    long nOffset = 0;
-    long nCurrentOffset = 0;
-    if(bVertical)
-        nCurrentOffset = aFixedTexts[0]->GetPosPixel().Y() - aBasePos.Y();
-    else
-        nCurrentOffset = aFixedTexts[0]->GetPosPixel().X() - aBasePos.X();
-    nOffset = pScroll->IsVisible() ? pScroll->GetThumbPos() + nCurrentOffset : nCurrentOffset;
-
-    for(sal_uInt16 i = 0; i < FIELD_COUNT; i++)
-    {
-        ::Point aPos = aFixedTexts[i]->GetPosPixel();
-        if(bVertical)
-            aPos.Y() -= nOffset;
-        else
-            aPos.X() -= nOffset;
-        aFixedTexts[i]->SetPosPixel(aPos);
-        if(aControls[i].is())
-        {
-            awt::Rectangle aRect = aControls[i]->getPosSize();
-            long nX = aRect.X;
-            long nY = aRect.Y;
-            if(bVertical)
-                nY -= nOffset;
-            else
-                nX -= nOffset;
-            aControls[i]->setPosSize(nX, nY, 0, 0, awt::PosSize::POS);
-        }
-    }
-    return 0;
-}
-
 void BibGeneralPage::focusGained(const awt::FocusEvent& rEvent) throw( uno::RuntimeException, std::exception )
 {
     Reference<awt::XWindow> xCtrWin(rEvent.Source, UNO_QUERY );
     if(xCtrWin.is())
     {
-        ::Size aOutSize = GetOutputSizePixel();
+        ::Size aOutSize = pScrolledWindow->getVisibleChildSize();
         awt::Rectangle aRect = xCtrWin->getPosSize();
-        long nX = aRect.X;
-        if(nX < 0)
+        Point aOffset(pGrid->GetPosPixel());
+        long nX = aRect.X + aOffset.X();
+        if (nX < 0 || nX > aOutSize.Width())
         {
-            // left of the visible area
-            aHoriScroll.SetThumbPos(aHoriScroll.GetThumbPos() + nX);
-            ScrollHdl(&aHoriScroll);
+            pScrolledWindow->getHorzScrollBar().DoScroll(aRect.X);
         }
-        else if(nX > aOutSize.Width())
-        {
-            // right of the visible area
-            aHoriScroll.SetThumbPos(aHoriScroll.GetThumbPos() + nX - aOutSize.Width() + aFixedTexts[0]->GetSizePixel().Width());
-            ScrollHdl(&aHoriScroll);
-        }
-        long nY = aRect.Y;
-        if(nY < 0)
-        {
-            // below the visible area
-            aVertScroll.SetThumbPos(aVertScroll.GetThumbPos() + nY);
-            ScrollHdl(&aVertScroll);
-        }
-        else if(nY > aOutSize.Height())
+
+        long nY = aRect.Y + aOffset.Y();
+        if (nY < 0 || nY > aOutSize.Height())
         {
-            // over the visible area
-            aVertScroll.SetThumbPos(aVertScroll.GetThumbPos() + nY - aOutSize.Height()+ aFixedTexts[0]->GetSizePixel().Height());
-            ScrollHdl(&aVertScroll);
+            pScrolledWindow->getVertScrollBar().DoScroll(aRect.Y);
         }
     }
 }
diff --git a/extensions/source/bibliography/general.hxx b/extensions/source/bibliography/general.hxx
index 169cda6..409ccf5 100644
--- a/extensions/source/bibliography/general.hxx
+++ b/extensions/source/bibliography/general.hxx
@@ -26,6 +26,7 @@
 #include <com/sun/star/sdbc/XRowSetListener.hpp>
 #include <svtools/stdctrl.hxx>
 
+#include <vcl/layout.hxx>
 #include <vcl/lstbox.hxx>
 #include <vcl/group.hxx>
 #include <svtools/svmedit.hxx>
@@ -44,6 +45,9 @@ typedef cppu::WeakAggImplHelper1 < ::com::sun::star::awt::XFocusListener > BibGe
 
 class BibGeneralPage: public BibGeneralPageBaseClass, public BibTabPage
 {
+    VclGrid*            pGrid;
+    VclScrolledWindow*  pScrolledWindow;
+
     FixedText*          pIdentifierFT;
     FixedText*          pAuthTypeFT;
     FixedText*          pYearFT;
@@ -86,18 +90,12 @@ class BibGeneralPage: public BibGeneralPageBaseClass, public BibTabPage
     FixedText*          pCustom4FT;
     FixedText*          pCustom5FT;
 
-    ScrollBar           aHoriScroll;
-    ScrollBar           aVertScroll;
-
     FixedText*          aFixedTexts[ FIELD_COUNT ];
     sal_Int16           nFT2CtrlMap[ FIELD_COUNT ];
 
     ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >
                         aControls[ FIELD_COUNT ];
 
-    Size                aStdSize;
-    Point               aBasePos;
-
     OUString            aBibTypeArr[ TYPE_COUNT ];
     OUString            sErrorPrefix;
     OUString            sTableErrorString;
@@ -120,19 +118,14 @@ class BibGeneralPage: public BibGeneralPageBaseClass, public BibTabPage
     BibDataManager*     pDatMan;
 
     ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >
-                                AddXControl( const OUString& rName, Point aPos, Size aSize, const OString& sHelpId,
-                                            sal_Int16& rIndex );
-
-    void                        AddControlWithError( const OUString& rColumnName, const Point& rPos,
-                                            const Size& rSize, OUString& rErrorString, const OUString& aColumnUIName,
-                                            const OString& sHelpId, sal_uInt16 nIndexInFTArray );
-
-    void                        AdjustScrollbars();
+                                AddXControl( const OUString& rName, FixedText& rLabel, const OString& sHelpId,
+                                            sal_Int16& rIndex, std::vector<Window*>& rChildren );
 
-    DECL_LINK( ScrollHdl, ScrollBar* );
+    void                        AddControlWithError( const OUString& rColumnName, FixedText& rLabel,
+                                            OUString& rErrorString,
+                                            const OString& sHelpId, sal_uInt16 nIndexInFTArray, std::vector<Window*>& rChildren );
 
 protected:
-    virtual void                Resize() SAL_OVERRIDE;
     void                        InitFixedTexts( void );     // create mnemonics and set text an all fixed texts
 
 public:
diff --git a/extensions/source/bibliography/sections.src b/extensions/source/bibliography/sections.src
index e580a49..e15042b 100644
--- a/extensions/source/bibliography/sections.src
+++ b/extensions/source/bibliography/sections.src
@@ -115,130 +115,4 @@ String ST_TYPE_TITLE
 {
     Text [ en-US ] = "General";
 };
-String ST_IDENTIFIER
-{
-    Text [ en-US ] = "~Short name";
-};
-String ST_AUTHTYPE
-{
-    Text [ en-US ] = "~Type";
-};
-String ST_YEAR
-{
-    Text [ en-US ] = "~Year";
-};
-String ST_AUTHOR
-{
-    Text [ en-US ] = "Author(s)";
-};
-String ST_TITLE
-{
-    Text [ en-US ] = "Tit~le";
-};
-String ST_PUBLISHER
-{
-    Text [ en-US ] = "~Publisher";
-};
-String ST_ADDRESS
-{
-    Text [ en-US ] = "A~ddress";
-};
-String ST_ISBN
-{
-    Text [ en-US ] = "~ISBN";
-};
-String ST_CHAPTER
-{
-    Text [ en-US ] = "~Chapter";
-};
-String ST_PAGE
-{
-    Text [ en-US ] = "Pa~ge(s)";
-};
-String ST_EDITOR
-{
-    Text [ en-US ] = "Editor";
-};
-String ST_EDITION
-{
-    Text [ en-US ] = "Ed~ition";
-};
-String ST_BOOKTITLE
-{
-    Text [ en-US ] = "~Book title";
-};
-String ST_VOLUME
-{
-    Text [ en-US ] = "Volume";
-};
-String ST_HOWPUBLISHED
-{
-    Text [ en-US ] = "Publication t~ype";
-};
-String ST_ORGANIZATION
-{
-    Text [ en-US ] = "Organi~zation";
-};
-String ST_INSTITUTION
-{
-    Text [ en-US ] = "Instit~ution";
-};
-String ST_SCHOOL
-{
-    Text [ en-US ] = "University";
-};
-String ST_REPORT
-{
-    Text [ en-US ] = "Type of re~port";
-};
-String ST_MONTH
-{
-    Text [ en-US ] = "~Month";
-};
-String ST_JOURNAL
-{
-    Text [ en-US ] = "~Journal";
-};
-
-String ST_NUMBER
-{
-    Text [ en-US ] = "Numb~er";
-};
-String ST_SERIES
-{
-    Text [ en-US ] = "Se~ries";
-};
-String ST_ANNOTE
-{
-    Text [ en-US ] = "Ann~otation";
-};
-String ST_NOTE
-{
-    Text [ en-US ] = "~Note";
-};
-String ST_URL
-{
-    Text [ en-US ] = "URL";
-};
-String ST_CUSTOM1
-{
-    Text [ en-US ] = "User-defined field ~1";
-};
-String ST_CUSTOM2
-{
-    Text [ en-US ] = "User-defined field ~2";
-};
-String ST_CUSTOM3
-{
-    Text [ en-US ] = "User-defined field ~3";
-};
-String ST_CUSTOM4
-{
-    Text [ en-US ] = "User-defined field ~4";
-};
-String ST_CUSTOM5
-{
-    Text [ en-US ] = "User-defined field ~5";
-};
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/extensions/uiconfig/sbibliography/ui/generalpage.ui b/extensions/uiconfig/sbibliography/ui/generalpage.ui
index 9022620..44811dc 100644
--- a/extensions/uiconfig/sbibliography/ui/generalpage.ui
+++ b/extensions/uiconfig/sbibliography/ui/generalpage.ui
@@ -1,12 +1,705 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.16.1 -->
 <interface>
-  <!-- interface-requires gtk+ 3.0 -->
+  <requires lib="gtk+" version="3.0"/>
   <object class="GtkBox" id="GeneralPage">
     <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/>
+      <object class="GtkScrolledWindow" id="scrolledwindow">
+        <property name="visible">True</property>
+        <property name="can_focus">True</property>
+        <property name="hexpand">True</property>
+        <property name="vexpand">True</property>
+        <property name="vscrollbar_policy">always</property>
+        <property name="shadow_type">in</property>
+        <child>
+          <object class="GtkViewport" id="viewport2">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="hexpand">True</property>
+            <property name="border_width">6</property>
+            <child>
+              <object class="GtkGrid" id="grid">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="hexpand">True</property>
+                <property name="row_spacing">6</property>
+                <property name="column_spacing">12</property>
+                <child>
+                  <object class="GtkLabel" id="shortname">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">_Short name</property>
+                    <property name="use_underline">True</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="authtype">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="margin_left">12</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">_Type</property>
+                    <property name="use_underline">True</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">0</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="authors">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">Author(s)</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="publisher">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">_Publisher</property>
+                    <property name="use_underline">True</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="GtkLabel" id="chapter">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">_Chapter</property>
+                    <property name="use_underline">True</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">3</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="title">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="margin_left">12</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">Tit_le</property>
+                    <property name="use_underline">True</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">1</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="address">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="margin_left">12</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">A_ddress</property>
+                    <property name="use_underline">True</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">2</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="pages">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="margin_left">12</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">Pa_ge(s)</property>
+                    <property name="use_underline">True</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">3</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="year">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="margin_left">12</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">_Year</property>
+                    <property name="use_underline">True</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">4</property>
+                    <property name="top_attach">0</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="isbn">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="margin_left">12</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">_ISBN</property>
+                    <property name="use_underline">True</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">4</property>
+                    <property name="top_attach">2</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkBox" id="box1">
+                    <property name="width_request">12</property>
+                    <property name="height_request">12</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="orientation">vertical</property>
+                    <child>
+                      <placeholder/>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">4</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="editor">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">Editor</property>
+                    <property name="use_underline">True</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">5</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="booktitle">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">_Book title</property>
+                    <property name="use_underline">True</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">6</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="edition">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="margin_left">12</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">Ed_ition</property>
+                    <property name="use_underline">True</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">5</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="volume">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="margin_left">12</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">Volume</property>
+                    <property name="use_underline">True</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">6</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="institution">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="margin_left">12</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">Instit_ution</property>
+                    <property name="use_underline">True</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">7</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="month">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="margin_left">12</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">_Month</property>
+                    <property name="use_underline">True</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">8</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="publicationtype">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="margin_left">12</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">Publication t_ype</property>
+                    <property name="use_underline">True</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">4</property>
+                    <property name="top_attach">6</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="university">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="margin_left">12</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">University</property>
+                    <property name="use_underline">True</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">4</property>
+                    <property name="top_attach">7</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="reporttype">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">Type of re_port</property>
+                    <property name="use_underline">True</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">8</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="organization">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">Organi_zation</property>
+                    <property name="use_underline">True</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">7</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkBox" id="box2">
+                    <property name="width_request">12</property>
+                    <property name="height_request">12</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="orientation">vertical</property>
+                    <child>
+                      <placeholder/>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">9</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="journal">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">_Journal</property>
+                    <property name="use_underline">True</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">10</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="annotation">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">Ann_otation</property>
+                    <property name="use_underline">True</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">11</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="number">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="margin_left">12</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">Numb_er</property>
+                    <property name="use_underline">True</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">10</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="note">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="margin_left">12</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">_Note</property>
+                    <property name="use_underline">True</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">11</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="series">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="margin_left">12</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">Se_ries</property>
+                    <property name="use_underline">True</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">4</property>
+                    <property name="top_attach">10</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="url">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="margin_left">12</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">URL</property>
+                    <property name="use_underline">True</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">4</property>
+                    <property name="top_attach">11</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkBox" id="box3">
+                    <property name="width_request">12</property>
+                    <property name="height_request">12</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="orientation">vertical</property>
+                    <child>
+                      <placeholder/>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">12</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="custom1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">User-defined field _1</property>
+                    <property name="use_underline">True</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">13</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="custom4">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">User-defined field _4</property>
+                    <property name="use_underline">True</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">14</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="custom2">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="margin_left">12</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">User-defined field _2</property>
+                    <property name="use_underline">True</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">13</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="custom5">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="margin_left">12</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">User-defined field _5</property>
+                    <property name="use_underline">True</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">14</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="custom3">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="margin_left">12</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">User-defined field _3</property>
+                    <property name="use_underline">True</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">4</property>
+                    <property name="top_attach">13</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+              </object>
+            </child>
+          </object>
+        </child>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">True</property>
+        <property name="position">0</property>
+      </packing>
     </child>
   </object>
 </interface>
commit 4b339818bb036b409dd5dc00d645c62063e63de5
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Aug 20 12:01:14 2014 +0100

    add a VclViewport
    
    like GtkViewport so that the scrolled region will be clipped,
    which also has the side-effect of stopping glade clobbering
    the non view-port scrolled .ui files on editing
    
    Change-Id: Ic64174b3a35b77f068e0085cdc7721aeb33f1d82

diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.hxx b/desktop/source/deployment/gui/dp_gui_updatedialog.hxx
index adcc1895..e536549 100644
--- a/desktop/source/deployment/gui/dp_gui_updatedialog.hxx
+++ b/desktop/source/deployment/gui/dp_gui_updatedialog.hxx
@@ -172,7 +172,7 @@ private:
     FixedText* m_pchecking;
     Throbber* m_pthrobber;
     FixedText* m_pUpdate;
-    VclScrolledWindow* m_pContainer;
+    VclViewport* m_pContainer;
     UpdateDialog::CheckListBox* m_pUpdates;
     CheckBox* m_pAll;
     FixedText* m_pDescription;
diff --git a/desktop/uiconfig/ui/updatedialog.ui b/desktop/uiconfig/ui/updatedialog.ui
index 940b104..e385632 100644
--- a/desktop/uiconfig/ui/updatedialog.ui
+++ b/desktop/uiconfig/ui/updatedialog.ui
@@ -144,10 +144,15 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkScrolledWindow" id="UPDATES_CONTAINER">
+                  <object class="GtkScrolledWindow" id="scrolledwindow1">
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="shadow_type">in</property>
+                    <child>
+                      <object class="GtkViewport" id="UPDATES_CONTAINER">
+                        <property name="visible">True</property>
+                      </object>
+                    </child>
                   </object>
                   <packing>
                     <property name="expand">True</property>
diff --git a/include/vcl/layout.hxx b/include/vcl/layout.hxx
index a681038..6c4ce28 100644
--- a/include/vcl/layout.hxx
+++ b/include/vcl/layout.hxx
@@ -576,6 +576,17 @@ private:
     ScrollBarBox m_aScrollBarBox;
 };
 
+class VCL_DLLPUBLIC VclViewport : public VclBin
+{
+public:
+    VclViewport(Window *pParent, WinBits nStyle = WB_HIDE | WB_CLIPCHILDREN)
+        : VclBin(pParent, nStyle)
+    {
+    }
+protected:
+    virtual void setAllocation(const Size &rAllocation) SAL_OVERRIDE;
+};
+
 //Enforces that its children are always the same size as itself.
 //Intercepts any Commands intended for its children.
 //
diff --git a/reportdesign/source/ui/dlg/CondFormat.cxx b/reportdesign/source/ui/dlg/CondFormat.cxx
index 82fb0fd..7390352 100644
--- a/reportdesign/source/ui/dlg/CondFormat.cxx
+++ b/reportdesign/source/ui/dlg/CondFormat.cxx
@@ -321,7 +321,7 @@ namespace rptui
             return;
         long nConditionHeight = m_aConditions[0]->get_preferred_size().Height();
         Point aConditionPos(0, -1 * nConditionHeight * impl_getFirstVisibleConditionIndex());
-        m_pScrollWindow->get_child()->SetPosPixel(aConditionPos);
+        m_pConditionPlayground->SetPosPixel(aConditionPos);
     }
 
     void ConditionalFormattingDialog::impl_layoutAll()
diff --git a/reportdesign/uiconfig/dbreport/ui/condformatdialog.ui b/reportdesign/uiconfig/dbreport/ui/condformatdialog.ui
index 741ce74..a3ff67b 100644
--- a/reportdesign/uiconfig/dbreport/ui/condformatdialog.ui
+++ b/reportdesign/uiconfig/dbreport/ui/condformatdialog.ui
@@ -92,6 +92,9 @@
                 <property name="vscrollbar_policy">always</property>
                 <property name="shadow_type">in</property>
                 <child>
+                  <object class="GtkViewport" id="viewport1">
+                    <property name="visible">True</property>
+                    <child>
                       <object class="GtkBox" id="condPlaygroundDrawingarea">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
@@ -102,6 +105,8 @@
                           <placeholder/>
                         </child>
                       </object>
+                    </child>
+                  </object>
                 </child>
               </object>
               <packing>
diff --git a/sc/uiconfig/scalc/ui/retypepassdialog.ui b/sc/uiconfig/scalc/ui/retypepassdialog.ui
index 95459f2..88d3249 100644
--- a/sc/uiconfig/scalc/ui/retypepassdialog.ui
+++ b/sc/uiconfig/scalc/ui/retypepassdialog.ui
@@ -188,15 +188,20 @@
                         <property name="vexpand">True</property>
                         <property name="vscrollbar_policy">always</property>
                         <child>
-                          <object class="GtkBox" id="sheetsBox">
+                          <object class="GtkViewport" id="viewport1">
                             <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">6</property>
                             <child>
-                              <placeholder/>
+                              <object class="GtkBox" id="sheetsBox">
+                                <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">6</property>
+                                <child>
+                                  <placeholder/>
+                                </child>
+                              </object>
                             </child>
                           </object>
                         </child>
diff --git a/sc/uiconfig/scalc/ui/sortcriteriapage.ui b/sc/uiconfig/scalc/ui/sortcriteriapage.ui
index 6b92021..c7347ef 100644
--- a/sc/uiconfig/scalc/ui/sortcriteriapage.ui
+++ b/sc/uiconfig/scalc/ui/sortcriteriapage.ui
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.16.1 -->
 <interface>
-  <!-- interface-requires gtk+ 3.0 -->
+  <requires lib="gtk+" version="3.0"/>
   <object class="GtkScrolledWindow" id="SortCriteriaPage">
     <property name="visible">True</property>
     <property name="can_focus">True</property>
@@ -9,14 +10,22 @@
     <property name="hscrollbar_policy">never</property>
     <property name="shadow_type">in</property>
     <child>
-      <object class="GtkBox" id="SortKeyWindow">
+      <object class="GtkViewport" id="viewport2">
         <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/>
+          <object class="GtkBox" id="SortKeyWindow">
+            <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>
         </child>
       </object>
     </child>
diff --git a/sfx2/uiconfig/ui/cmisinfopage.ui b/sfx2/uiconfig/ui/cmisinfopage.ui
index 6fad683..dafcb96 100644
--- a/sfx2/uiconfig/ui/cmisinfopage.ui
+++ b/sfx2/uiconfig/ui/cmisinfopage.ui
@@ -25,14 +25,17 @@
     </child>
     <child>
       <object class="GtkScrolledWindow" id="CmisScroll">
-          <property name="visible">True</property>
-          <property name="can_focus">True</property>
-          <property name="hexpand">True</property>
-          <property name="vexpand">True</property>
-          <property name="hscrollbar_policy">never</property>
-          <property name="shadow_type">in</property>
-          <child>
-            <object class="GtkBox" id="CmisWindow">
+        <property name="visible">True</property>
+        <property name="can_focus">True</property>
+        <property name="hexpand">True</property>
+        <property name="vexpand">True</property>
+        <property name="hscrollbar_policy">never</property>
+        <property name="shadow_type">in</property>
+        <child>
+          <object class="GtkViewport" id="viewport1">
+            <property name="visible">True</property>
+            <child>
+              <object class="GtkBox" id="CmisWindow">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="hexpand">True</property>
@@ -41,8 +44,10 @@
                 <child>
                     <placeholder/>
                 </child>
-             </object>
-           </child>
+              </object>
+            </child>
+          </object>
+        </child>
       </object>
       <packing>
         <property name="left_attach">0</property>
diff --git a/svtools/uiconfig/ui/addresstemplatedialog.ui b/svtools/uiconfig/ui/addresstemplatedialog.ui
index 65e708c..50b3824 100644
--- a/svtools/uiconfig/ui/addresstemplatedialog.ui
+++ b/svtools/uiconfig/ui/addresstemplatedialog.ui
@@ -231,6 +231,9 @@
                         <property name="vexpand">True</property>
                         <property name="vscrollbar_policy">always</property>
                         <property name="shadow_type">in</property>
+                  <child>
+                    <object class="GtkViewport" id="viewport1">
+                      <property name="visible">True</property>
                         <child>
                           <object class="GtkGrid" id="grid4">
                             <property name="visible">True</property>
@@ -582,6 +585,8 @@
                             </child>
                           </object>
                         </child>
+                    </object>
+                  </child>
                       </object>
                     </child>
                   </object>
diff --git a/svx/uiconfig/ui/asianphoneticguidedialog.ui b/svx/uiconfig/ui/asianphoneticguidedialog.ui
index aa1cf2c..46f38e0 100644
--- a/svx/uiconfig/ui/asianphoneticguidedialog.ui
+++ b/svx/uiconfig/ui/asianphoneticguidedialog.ui
@@ -122,6 +122,9 @@
                 <property name="hscrollbar_policy">never</property>
                 <property name="vscrollbar_policy">always</property>
                 <property name="shadow_type">in</property>
+                  <child>
+                    <object class="GtkViewport" id="viewport1">
+                      <property name="visible">True</property>
                 <child>
                   <object class="GtkGrid" id="grid1">
                     <property name="visible">True</property>
@@ -230,6 +233,8 @@
                     </child>
                   </object>
                 </child>
+                   </object>
+                  </child>
               </object>
               <packing>
                 <property name="expand">False</property>
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index e336a05..ff88496 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -1159,7 +1159,7 @@ Window *VclBuilder::makeObject(Window *pParent, const OString &name, const OStri
         }
     }
 
-    if (bIsPlaceHolder || name == "GtkTreeSelection" || name == "GtkViewport")
+    if (bIsPlaceHolder || name == "GtkTreeSelection")
         return NULL;
 
     extractButtonImage(id, rMap, name == "GtkRadioButton");
@@ -1473,6 +1473,10 @@ Window *VclBuilder::makeObject(Window *pParent, const OString &name, const OStri
     {
         pWindow = new VclScrolledWindow(pParent);
     }
+    else if (name == "GtkViewport")
+    {
+        pWindow = new VclViewport(pParent);
+    }
     else if (name == "GtkEventBox")
     {
         pWindow = new VclEventBox(pParent);
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index 88823f1..0795ee8 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -1616,6 +1616,13 @@ IMPL_LINK_NOARG(VclScrolledWindow, ScrollBarHdl)
     if (!pChild)
         return 1;
 
+    assert(dynamic_cast<VclViewport*>(pChild) && "scrolledwindow child should be a Viewport");
+
+    pChild = pChild->GetWindow(WINDOW_FIRSTCHILD);
+
+    if (!pChild)
+        return 1;
+
     Point aWinPos;
 
     if (m_aHScroll.IsVisible())
@@ -1698,7 +1705,9 @@ void VclScrolledWindow::setAllocation(const Size &rAllocation)
     long nAvailWidth = rAllocation.Width();
     // vert. ScrollBar
     if (GetStyle() & WB_AUTOVSCROLL)
+    {
         m_aVScroll.Show(nAvailHeight < aChildReq.Height());
+    }
 
     if (m_aVScroll.IsVisible())
         nAvailWidth -= getLayoutRequisition(m_aVScroll).Width();
@@ -1754,12 +1763,8 @@ void VclScrolledWindow::setAllocation(const Size &rAllocation)
 
     if (pChild && pChild->IsVisible())
     {
-        Point aChildPos(pChild->GetPosPixel());
-        if (!m_aHScroll.IsVisible())
-            aChildPos.X() = 0;
-        if (!m_aVScroll.IsVisible())
-            aChildPos.Y() = 0;
-        setLayoutAllocation(*pChild, aChildPos, aChildAllocation);
+        assert(dynamic_cast<VclViewport*>(pChild) && "scrolledwindow child should be a Viewport");
+        setLayoutAllocation(*pChild, Point(0, 0), aInnerSize);
     }
 
     if (!m_bUserManagedScrolling)
@@ -1803,6 +1808,18 @@ bool VclScrolledWindow::Notify(NotifyEvent& rNEvt)
     return nDone || VclBin::Notify( rNEvt );
 }
 
+void VclViewport::setAllocation(const Size &rAllocation)
+{
+    Window *pChild = get_child();
+    if (pChild && pChild->IsVisible())
+    {
+        Size aReq(getLayoutRequisition(*pChild));
+        aReq.Width() = std::max(aReq.Width(), rAllocation.Width());
+        aReq.Height() = std::max(aReq.Height(), rAllocation.Height());
+        setLayoutAllocation(*pChild, Point(0, 0), aReq);
+    }
+}
+
 const Window *VclEventBox::get_child() const
 {
     const WindowImpl* pWindowImpl = ImplGetWindowImpl();


More information about the Libreoffice-commits mailing list