[Libreoffice-commits] .: Branch 'feature/cmclayouttrans' - 3 commits - sw/uiconfig vcl/inc vcl/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Wed Aug 29 06:19:42 PDT 2012
sw/uiconfig/swriter/ui/linenumbering.ui | 2 +-
vcl/inc/vcl/dialog.hxx | 1 +
vcl/source/control/fixed.cxx | 2 ++
vcl/source/window/builder.cxx | 26 +++++++++++++++++++++-----
vcl/source/window/dialog.cxx | 7 ++++++-
5 files changed, 31 insertions(+), 7 deletions(-)
New commits:
commit cd4d85b161096ed124258a236be73c1018305108
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Aug 29 14:16:04 2012 +0100
GetProcAddress doesn't work like dlsym with executable's handle
underlying GetProcAddress on windows, unlike dlsym, doesn't search
through all loaded .dlls searching for the symbol when given the
default module. So load the module by name.
Change-Id: I148250c9d8dd5aa2b802581d049533f2c5e83caf
diff --git a/sw/uiconfig/swriter/ui/linenumbering.ui b/sw/uiconfig/swriter/ui/linenumbering.ui
index 35a8965..045bf88 100644
--- a/sw/uiconfig/swriter/ui/linenumbering.ui
+++ b/sw/uiconfig/swriter/ui/linenumbering.ui
@@ -207,7 +207,7 @@
</packing>
</child>
<child>
- <object class="SwNumberingTypeListBox" id="formatdropdown">
+ <object class="swlo:SwNumberingTypeListBox" id="formatdropdown">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index c45494f..fdf6a49 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -26,7 +26,7 @@
* instead of those above.
*/
-#include <osl/module.h>
+#include <osl/module.hxx>
#include <vcl/builder.hxx>
#include <vcl/button.hxx>
#include <vcl/dialog.hxx>
@@ -342,6 +342,8 @@ bool VclBuilder::extractModel(const rtl::OString &id, stringmap &rMap)
return false;
}
+extern "C" { static void SAL_CALL thisModule() {} }
+
Window *VclBuilder::makeObject(Window *pParent, const rtl::OString &name, const rtl::OString &id, stringmap &rMap)
{
bool bIsPlaceHolder = name.isEmpty();
@@ -472,10 +474,24 @@ Window *VclBuilder::makeObject(Window *pParent, const rtl::OString &name, const
pWindow = new Window(pParent);
else
{
- rtl::OString sFunction = rtl::OString("make") + name;
- customMakeWidget pFunction = (customMakeWidget)osl_getAsciiFunctionSymbol(NULL, sFunction.getStr());
- if (pFunction)
- pWindow = (*pFunction)(pParent);
+ sal_Int32 nDelim = name.indexOf(':');
+ if (nDelim != -1)
+ {
+ rtl::OUStringBuffer sModule;
+#ifdef SAL_DLLPREFIX
+ sModule.append(SAL_DLLPREFIX);
+#endif
+ sModule.append(rtl::OStringToOUString(name.copy(0, nDelim), RTL_TEXTENCODING_UTF8));
+#ifdef SAL_DLLEXTENSION
+ sModule.append(SAL_DLLEXTENSION);
+#endif
+ rtl::OUString sFunction(rtl::OStringToOUString(rtl::OString("make") + name.copy(nDelim+1), RTL_TEXTENCODING_UTF8));
+ osl::Module aModule;
+ aModule.loadRelative(&thisModule, sModule.makeStringAndClear());
+ customMakeWidget pFunction = (customMakeWidget)aModule.getFunctionSymbol(sFunction);
+ if (pFunction)
+ pWindow = (*pFunction)(pParent);
+ }
}
if (!pWindow)
fprintf(stderr, "TO-DO, implement %s or add a make%s function\n", name.getStr(), name.getStr());
commit c644065868e7e4e981bc11eabdd3e86fd333bf3e
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Aug 27 09:33:40 2012 +0100
seperate layout from resize
so layout can be triggered by queue_resize without calling
virtual overrides of Resize
Change-Id: Ibf7a4b763d05d9aa401cb15e510632410aeca30b
diff --git a/vcl/inc/vcl/dialog.hxx b/vcl/inc/vcl/dialog.hxx
index a56f12b..aa3c9cd 100644
--- a/vcl/inc/vcl/dialog.hxx
+++ b/vcl/inc/vcl/dialog.hxx
@@ -101,6 +101,7 @@ public:
virtual void Resize();
bool isLayoutEnabled() const;
void setInitialLayoutSize();
+ void queue_layout();
virtual bool set_property(const rtl::OString &rKey, const rtl::OString &rValue);
virtual sal_Bool Close();
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index 6c94a17..13e1c12 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -1233,7 +1233,7 @@ IMPL_LINK( Dialog, ImplHandleLayoutTimerHdl, void*, EMPTYARG )
return 0;
}
-void Dialog::Resize()
+void Dialog::queue_layout()
{
if (hasPendingLayout())
return;
@@ -1244,6 +1244,11 @@ void Dialog::Resize()
maLayoutTimer.Start();
}
+void Dialog::Resize()
+{
+ queue_layout();
+}
+
bool Dialog::set_property(const rtl::OString &rKey, const rtl::OString &rValue)
{
if (rKey.equalsL(RTL_CONSTASCII_STRINGPARAM("border-width")))
commit 8f29e5b7001753dc2f65d358c221f2b20c5def6c
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Aug 27 09:07:14 2012 +0100
queue_resize on fixedimage graphic change
Change-Id: I6de743a290b2a08d4c90be706ea28daae94c2e74
diff --git a/vcl/source/control/fixed.cxx b/vcl/source/control/fixed.cxx
index 7857f56..a63eb3e 100644
--- a/vcl/source/control/fixed.cxx
+++ b/vcl/source/control/fixed.cxx
@@ -922,6 +922,7 @@ void FixedBitmap::SetBitmap( const Bitmap& rBitmap )
{
maBitmap = rBitmap;
StateChanged( STATE_CHANGE_DATA );
+ queue_resize();
}
// =======================================================================
@@ -1145,6 +1146,7 @@ void FixedImage::SetImage( const Image& rImage )
{
maImage = rImage;
StateChanged( STATE_CHANGE_DATA );
+ queue_resize();
}
}
More information about the Libreoffice-commits
mailing list