[Libreoffice-commits] core.git: 5 commits - mysqlc/Extension_mysql-connector-ooo.mk mysqlc/Library_mysqlc.mk mysqlc/Module_mysqlc.mk mysqlcppconn/Library_mysqlcppconn.mk mysqlc/Rdb_mysqlc.mk mysqlc/source solenv/gdb sw/source vcl/unx
Michael Stahl
mstahl at redhat.com
Thu Feb 7 05:39:35 PST 2013
mysqlc/Extension_mysql-connector-ooo.mk | 2 +
mysqlc/Library_mysqlc.mk | 2 +
mysqlc/Module_mysqlc.mk | 1
mysqlc/Rdb_mysqlc.mk | 16 ++++++++++
mysqlc/source/META-INF/manifest.xml | 4 +-
mysqlc/source/mysqlc.component | 15 ++++++++++
mysqlc/source/mysqlc_services.cxx | 48 --------------------------------
mysqlcppconn/Library_mysqlcppconn.mk | 9 ------
solenv/gdb/libreoffice/cppu.py | 12 +++++---
sw/source/core/layout/flylay.cxx | 28 +++++++++++-------
vcl/unx/gtk/a11y/atklistener.cxx | 9 +++++-
11 files changed, 72 insertions(+), 74 deletions(-)
New commits:
commit db9823414d91386b01187d5945f08ac8385bd575
Author: Michael Stahl <mstahl at redhat.com>
Date: Thu Feb 7 14:23:57 2013 +0100
gdb: UnoReferencePrinter: prevent ambiguity problems differently
With gdb 7.5.1 the dynamic_cast may cause "Couldn't determine value's
most derived type for dynamic_cast", which isn't helpful either.
So just print the current XInterface value in case the cast fails.
Change-Id: I453b1a8eecbb056853293280195f6475f8852f2b
diff --git a/solenv/gdb/libreoffice/cppu.py b/solenv/gdb/libreoffice/cppu.py
index 31f1da6..dd5ff2d 100644
--- a/solenv/gdb/libreoffice/cppu.py
+++ b/solenv/gdb/libreoffice/cppu.py
@@ -63,10 +63,14 @@ class UnoReferencePrinter(object):
def to_string(self):
iface = self.value['_pInterface']
if iface:
- # dynamic_cast hopefully avoids this problem:
- # base class 'com::sun::star::uno::XInterface' is ambiguous
- impl = iface.dynamic_cast(self._itype()).dereference()
- return '%s to %s' % (self.typename, str(impl))
+ try:
+ impl = iface.cast(_itype).dereference()
+ return '%s to %s' % (self.typename, str(impl))
+ except:
+ # fallback for potential problem:
+ # base class 'com::sun::star::uno::XInterface' is ambiguous
+ return '%s to (XInterface) %s' % (self.typename, str(iface))
+
else:
return "empty %s" % self.typename
commit b058abc39aaa34d81ebb36cc2405b221fb055418
Author: Michael Stahl <mstahl at redhat.com>
Date: Thu Feb 7 14:22:01 2013 +0100
AtkListener::updateChildList: assert when getAccessibleChild ...
... throws IndexOutOfBoundsException, since it's not supposed to happen.
Change-Id: I876e6cede88f86d12543d3ce65e1b0a0ca5389a7
diff --git a/vcl/unx/gtk/a11y/atklistener.cxx b/vcl/unx/gtk/a11y/atklistener.cxx
index 0e94908..8d1b1bd 100644
--- a/vcl/unx/gtk/a11y/atklistener.cxx
+++ b/vcl/unx/gtk/a11y/atklistener.cxx
@@ -114,7 +114,14 @@ void AtkListener::updateChildList(accessibility::XAccessibleContext* pContext)
m_aChildList.resize(nChildren);
for(sal_Int32 n = 0; n < nChildren; n++)
{
- m_aChildList[n] = pContext->getAccessibleChild(n);
+ try
+ {
+ m_aChildList[n] = pContext->getAccessibleChild(n);
+ }
+ catch (lang::IndexOutOfBoundsException const&)
+ {
+ assert(false); // not consistent with getAccessibleChildCount
+ }
OSL_ASSERT(m_aChildList[n].is());
}
}
commit 8960f0de2e8b957f383ec659b308cc459dcf475b
Author: Michael Stahl <mstahl at redhat.com>
Date: Thu Feb 7 13:38:35 2013 +0100
mysqlcppconn: export sql_mysql_get_driver_instance on all platforms
It was only exported in an MSVC build before, which is a regression from
the gbuild conversion (c322d509231f9e1220fb86be68f13c5f4b135ccb).
Change-Id: I46783dc5fff5383bad8f8292c615ba8daa071cf9
diff --git a/mysqlcppconn/Library_mysqlcppconn.mk b/mysqlcppconn/Library_mysqlcppconn.mk
index 6ebc036..f71e3a3 100644
--- a/mysqlcppconn/Library_mysqlcppconn.mk
+++ b/mysqlcppconn/Library_mysqlcppconn.mk
@@ -26,15 +26,8 @@ $(eval $(call gb_Library_set_include,mysqlcppconn,\
-I$(call gb_UnpackedTarball_get_dir,mysqlcppconn)/cppconn \
))
-# HACK: generate import lib for msvc
-ifeq ($(COM),MSC)
-$(eval $(call gb_Library_add_ldflags,mysqlcppconn,\
- /EXPORT:sql_mysql_get_driver_instance \
-))
-endif
-
$(eval $(call gb_Library_add_defs,mysqlcppconn,\
- -DCPPCONN_LIB_BUILD \
+ -Dmysqlcppconn_EXPORTS \
$(if $(filter WNT,$(OS)),\
-DCPPDBC_WIN32 \
-D_CRT_SECURE_NO_WARNINGS \
commit 9d74d1f7c1e0588540e2b6c8408aacdc5ca59d7b
Author: Michael Stahl <mstahl at redhat.com>
Date: Thu Feb 7 12:45:20 2013 +0100
mysqlc: remove component_writeInfo with passive registration
Change-Id: I8ffa5ba2bbbd15533ea5097e0b018be3766ecc8b
diff --git a/mysqlc/Extension_mysql-connector-ooo.mk b/mysqlc/Extension_mysql-connector-ooo.mk
index 23e769f..ad94a2f 100644
--- a/mysqlc/Extension_mysql-connector-ooo.mk
+++ b/mysqlc/Extension_mysql-connector-ooo.mk
@@ -11,6 +11,8 @@ $(eval $(call gb_Extension_Extension,mysql-connector-ooo,mysqlc/source))
$(eval $(call gb_Extension_add_library,mysql-connector-ooo,mysqlc))
+$(eval $(call gb_Extension_add_file,mysql-connector-ooo,components.rdb,$(call gb_Rdb_get_target,mysqlc)))
+
$(eval $(call gb_Extension_add_file,mysql-connector-ooo,registry/data/org/openoffice/Office/DataAccess/Drivers.xcu,$(call gb_XcuFile_for_extension,mysqlc/source/registry/data/org/openoffice/Office/DataAccess/Drivers.xcu)))
$(eval $(call gb_Extension_add_files,mysql-connector-ooo,images,\
diff --git a/mysqlc/Library_mysqlc.mk b/mysqlc/Library_mysqlc.mk
index edcc366..246e4ec 100644
--- a/mysqlc/Library_mysqlc.mk
+++ b/mysqlc/Library_mysqlc.mk
@@ -61,4 +61,6 @@ $(eval $(call gb_Library_add_exception_objects,mysqlc,\
mysqlc/source/mysqlc_propertyids \
))
+$(eval $(call gb_Library_set_componentfile,mysqlc,mysqlc/source/mysqlc))
+
# vim: set noet sw=4 ts=4:
diff --git a/mysqlc/Module_mysqlc.mk b/mysqlc/Module_mysqlc.mk
index f4fa114..6a605be 100644
--- a/mysqlc/Module_mysqlc.mk
+++ b/mysqlc/Module_mysqlc.mk
@@ -14,6 +14,7 @@ ifeq ($(ENABLE_MYSQLC),YES)
$(eval $(call gb_Module_add_targets,mysqlc,\
Configuration_mysql \
Library_mysqlc \
+ Rdb_mysqlc \
Extension_mysql-connector-ooo \
))
diff --git a/mysqlc/Rdb_mysqlc.mk b/mysqlc/Rdb_mysqlc.mk
new file mode 100644
index 0000000..bbcde68
--- /dev/null
+++ b/mysqlc/Rdb_mysqlc.mk
@@ -0,0 +1,16 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_Rdb_Rdb,mysqlc))
+
+$(eval $(call gb_Rdb_add_components,mysqlc,\
+ mysqlc/source/mysqlc \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/mysqlc/source/META-INF/manifest.xml b/mysqlc/source/META-INF/manifest.xml
index 2a54d84..b3a94ac 100644
--- a/mysqlc/source/META-INF/manifest.xml
+++ b/mysqlc/source/META-INF/manifest.xml
@@ -18,8 +18,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
-->
<manifest:manifest xmlns:manifest="http://openoffice.org/2001/manifest">
- <manifest:file-entry manifest:media-type="application/vnd.sun.star.uno-component;type=native"
- manifest:full-path="mysqlc.uno at SHARED_EXTENSION@"/>
+ <manifest:file-entry manifest:media-type="application/vnd.sun.star.uno-components;platform=@PLATFORM@"
+ manifest:full-path="components.rdb"/>
<manifest:file-entry manifest:media-type="application/vnd.sun.star.configuration-data"
manifest:full-path="registry/data/org/openoffice/Office/DataAccess/Drivers.xcu"/>
</manifest:manifest>
diff --git a/mysqlc/source/mysqlc.component b/mysqlc/source/mysqlc.component
new file mode 100644
index 0000000..e429511
--- /dev/null
+++ b/mysqlc/source/mysqlc.component
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+-->
+<component xmlns="http://openoffice.org/2010/uno-components"
+ loader="com.sun.star.loader.SharedLibrary">
+ <implementation name="com.sun.star.comp.sdbc.mysqlc.MysqlCDriver">
+ <service name="com.sun.star.sdbc.Driver"/>
+ </implementation>
+</component>
diff --git a/mysqlc/source/mysqlc_services.cxx b/mysqlc/source/mysqlc_services.cxx
index 47a5ffd..8f3add7 100644
--- a/mysqlc/source/mysqlc_services.cxx
+++ b/mysqlc/source/mysqlc_services.cxx
@@ -40,33 +40,6 @@ typedef Reference< XSingleServiceFactory > (SAL_CALL *createFactoryFunc)
rtl_ModuleCount* _pTemp
);
-//***************************************************************************************
-//
-// Die vorgeschriebene C-API muss erfuellt werden!
-// Sie besteht aus drei Funktionen, die von dem Modul exportiert werden muessen.
-//
-
-//---------------------------------------------------------------------------------------
-void REGISTER_PROVIDER(
- const OUString& aServiceImplName,
- const Sequence< OUString>& Services,
- const Reference< XRegistryKey > & xKey)
-{
- ::rtl::OUStringBuffer aMainKeyName;
- aMainKeyName.append( sal_Unicode( '/' ) );
- aMainKeyName.append( aServiceImplName );
- aMainKeyName.appendAscii( "/UNO/SERVICES" );
-
- Reference< XRegistryKey > xNewKey( xKey->createKey( aMainKeyName.makeStringAndClear() ) );
- OSL_ENSURE(xNewKey.is(), "SKELETON::component_writeInfo : could not create a registry key !");
-
- for (sal_Int32 i = 0; i < Services.getLength(); ++i) {
- xNewKey->createKey(Services[i]);
- }
-}
-
-
-//---------------------------------------------------------------------------------------
struct ProviderRequest
{
Reference< XSingleServiceFactory > xRet;
@@ -103,27 +76,6 @@ struct ProviderRequest
/* }}} */
-/* {{{ component_writeInfo -I- */
-extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo(void * /* pServiceManager */, void * pRegistryKey)
-{
- if (pRegistryKey) {
- try {
- Reference< XRegistryKey > xKey(reinterpret_cast< XRegistryKey*>(pRegistryKey));
-
- REGISTER_PROVIDER(
- MysqlCDriver::getImplementationName_Static(),
- MysqlCDriver::getSupportedServiceNames_Static(), xKey);
-
- return sal_True;
- } catch (::com::sun::star::registry::InvalidRegistryException& ) {
- OSL_FAIL("SKELETON::component_writeInfo : could not create a registry key ! ## InvalidRegistryException !");
- }
- }
- return sal_False;
-}
-/* }}} */
-
-
/* {{{ component_getFactory -I- */
extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory(
const sal_Char * pImplementationName,
commit 6bef95d0da47edf33f4c3fe3c7380977f8c1cf67
Author: Michael Stahl <mstahl at redhat.com>
Date: Thu Feb 7 00:08:00 2013 +0100
SwPageFrm::RemoveFlyFromPage: fix a11y problem:
This problem can be reproduced with the bugdoc from fdo#60234, by
dragging and dropping the lower left drawing object.
The ATK bridge is notified of the change, and updates its list of
children by calling getAccessibleChildCount() and then
getAccessibleChild() in a loop. Unfortunately the count returned does
not match the available children (the difference is the object that is
being dragged). The implementations in
SwAccessibleFrame::GetChildCount() and SwAccessibleFrame::GetChild()
use slightly different iterators for the SwPageFrm, and the
SwAccessibleChildMap one is implemented as a std::map, using the OrdNum
of the drawing object as a key. On the dragged object, that OrdNum has
been reset to 0 in RemoveFlyFromPage, but it is still in the pSortedObjs
of the SwPageFrm, and so it is not inserted into the map, and iteration
over the map is missing one element.
149 return _SwAccessibleChildMap::insert( aEntry );
Value returned is $22 = {first = {first = {eLayerId =
SwAccessibleChildMapKey::HELL, nOrdNum = 0}, second = ...}, second = false}
Fix this by removing the object from pSortedObjs before disposing
the a11y frames.
Change-Id: I4e4bb37759382e32150cff6def02d80a55e4a702
diff --git a/sw/source/core/layout/flylay.cxx b/sw/source/core/layout/flylay.cxx
index 5d8f77b..6f7a283 100644
--- a/sw/source/core/layout/flylay.cxx
+++ b/sw/source/core/layout/flylay.cxx
@@ -701,6 +701,23 @@ void SwPageFrm::RemoveFlyFromPage( SwFlyFrm *pToRemove )
if ( pToRemove->IsFlyInCntFrm() )
return;
+ // Don't delete collections just yet. This will happen at the end of the
+ // action in the RemoveSuperfluous of the page, kicked off by a method of
+ // the same name in the root.
+ // The FlyColl might be gone already, because the page's dtor is being
+ // executed.
+ // Remove it _before_ disposing accessible frames to avoid accesses to
+ // the Frm from event handlers.
+ if (pSortedObjs)
+ {
+ pSortedObjs->Remove(*pToRemove);
+ if (!pSortedObjs->Count())
+ {
+ delete pSortedObjs;
+ pSortedObjs = 0;
+ }
+ }
+
// Notify accessible layout. That's required at this place for
// frames only where the anchor is moved. Creation of new frames
// is additionally handled by the SwFrmNotify class.
@@ -712,17 +729,6 @@ void SwPageFrm::RemoveFlyFromPage( SwFlyFrm *pToRemove )
->DisposeAccessibleFrm( pToRemove, sal_True );
}
- // Don't delete collections just yet. This will happen at the end of the
- // action in the RemoveSuperfluous of the page, kicked off by a method of
- // the same name in the root.
- // The FlyColl might be gone already, because the page's dtor is being executed.
- if ( pSortedObjs )
- {
- pSortedObjs->Remove( *pToRemove );
- if ( !pSortedObjs->Count() )
- { DELETEZ( pSortedObjs );
- }
- }
// #i28701# - use new method <SetPageFrm(..)>
pToRemove->SetPageFrm( 0L );
}
More information about the Libreoffice-commits
mailing list