[Libreoffice-commits] .: Branch 'feature/cmclayouttrans' - 2 commits - vcl/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Thu Aug 23 04:21:52 PDT 2012
vcl/source/window/builder.cxx | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
New commits:
commit 00348dbd4f98095a32fb026a2bd8f5d1d17b8f8f
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Aug 23 12:21:28 2012 +0100
map GtkImage to FixedImage
Change-Id: Ia5c3ab0099fc68e90450beaf4c9f836f2e790767
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 5f01dc4..83ddfc8 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -450,6 +450,8 @@ Window *VclBuilder::makeObject(Window *pParent, const rtl::OString &name, const
}
else if (name.equalsL(RTL_CONSTASCII_STRINGPARAM("GtkLabel")))
pWindow = new FixedText(pParent, WB_CENTER|WB_VCENTER|WB_3DLOOK);
+ else if (name.equalsL(RTL_CONSTASCII_STRINGPARAM("GtkImage")))
+ pWindow = new FixedImage(pParent, WB_CENTER|WB_VCENTER|WB_3DLOOK);
else if (name.equalsL(RTL_CONSTASCII_STRINGPARAM("GtkEntry")))
pWindow = new Edit(pParent, WB_LEFT|WB_VCENTER|WB_BORDER|WB_3DLOOK);
else if (name.equalsL(RTL_CONSTASCII_STRINGPARAM("GtkNotebook")))
@@ -500,8 +502,6 @@ Window *VclBuilder::insertObject(Window *pParent, const rtl::OString &rClass, co
else
{
pCurrentChild = makeObject(pParent, rClass, rID, rMap);
- if (!pCurrentChild)
- fprintf(stderr, "missing object!\n");
}
if (pCurrentChild)
@@ -517,10 +517,7 @@ Window *VclBuilder::insertObject(Window *pParent, const rtl::OString &rClass, co
rMap.clear();
if (!pCurrentChild)
- {
- fprintf(stderr, "missing object!\n");
pCurrentChild = m_aChildren.empty() ? pParent : m_aChildren.back().m_pWindow;
- }
return pCurrentChild;
}
commit e1fa67aa096b5b5d82c8a1ac8dec6141a555e8b1
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Aug 23 12:10:56 2012 +0100
recognize and silently handle placeholders
Change-Id: I6e825a1feff04bac3696c3e46a16d187cf048638
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 7b42362..5f01dc4 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -339,6 +339,8 @@ bool VclBuilder::extractModel(const rtl::OString &id, stringmap &rMap)
Window *VclBuilder::makeObject(Window *pParent, const rtl::OString &name, const rtl::OString &id, stringmap &rMap)
{
+ bool bIsPlaceHolder = name.isEmpty();
+
if (pParent && pParent->GetType() == WINDOW_TABCONTROL)
{
//We have to add a page
@@ -352,8 +354,6 @@ Window *VclBuilder::makeObject(Window *pParent, const rtl::OString &name, const
pTabControl->InsertPage(nNewPageId, rtl::OUString());
pTabControl->SetCurPageId(nNewPageId);
- bool bIsPlaceHolder = name.isEmpty();
-
if (!bIsPlaceHolder)
{
TabPage* pPage = new TabPage(pTabControl);
@@ -369,6 +369,9 @@ Window *VclBuilder::makeObject(Window *pParent, const rtl::OString &name, const
}
}
+ if (bIsPlaceHolder)
+ return NULL;
+
Window *pWindow = NULL;
if (name.equalsL(RTL_CONSTASCII_STRINGPARAM("GtkDialog")))
pWindow = new Dialog(pParent, WB_SIZEMOVE|WB_3DLOOK|WB_CLOSEABLE);
More information about the Libreoffice-commits
mailing list