From 8ab5c2d747e6bb04e31f59be9bcfc6fc2f51ef6f Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Fri, 7 Oct 2011 10:43:01 +0200 Subject: [PATCH] Patches to build with GCC 6.4.1 --- libreoffice.spec | 7 +- libreoffice34-gcc461.patch | 352 +++++++++++++++++++++++++++++++++++++ 2 files changed, 358 insertions(+), 1 deletion(-) create mode 100644 libreoffice34-gcc461.patch diff --git a/libreoffice.spec b/libreoffice.spec index 76f9155..ceedc58 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -27,7 +27,7 @@ Summary: Free Software Productivity Suite Name: libreoffice Epoch: 1 Version: 3.4.3.2 -Release: 12%{?dist} +Release: 13%{?dist} License: LGPLv3 and LGPLv2+ and BSD and (MPLv1.1 or GPLv2 or LGPLv2 or Netscape) and (CDDL or GPLv2) and Public Domain Group: Applications/Productivity URL: http://www.documentfoundation.org/develop @@ -125,6 +125,7 @@ Patch30: 0001-Resolves-rhbz-735182-libreoffice-doesn-t-build-with-.patch Patch31: 0001-Resolves-rhbz-738255-avoid-crash-on-NULL-pointer.patch Patch32: fdo40856.bn.discard.patch Patch33: 0001-Fix-for-fdo-35513-avoid-crash-while-processing-incor.patch +Patch34: libreoffice34-gcc461.patch %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} %define instdir %{_libdir} @@ -800,6 +801,7 @@ mv -f redhat.soc extras/source/palettes/standard.soc %patch31 -p1 -b .rhbz738255-avoid-crash-on-NULL-pointer.patch %patch32 -p1 -b .fdo40856.bn.discard.patch %patch33 -p1 -b .fdo35513-avoid-crash-while-processing-incor.patch +%patch34 -p1 -b .libreoffice34-gcc461.patch # these are horribly incomplete--empty translations and copied english # strings with spattering of translated strings @@ -2101,6 +2103,9 @@ update-desktop-database %{_datadir}/applications &> /dev/null || : %{basisinstdir}/program/kde-open-url %changelog +* Fri Oct 07 2011 Stephan Bergmann - 3.4.3.2-13 +- Patches to build with GCC 6.4.1 + * Fri Sep 30 2011 Marek Kasik - 3.4.3.2-12 - Rebuild (poppler-0.18.0) diff --git a/libreoffice34-gcc461.patch b/libreoffice34-gcc461.patch new file mode 100644 index 0000000..59c33d7 --- /dev/null +++ b/libreoffice34-gcc461.patch @@ -0,0 +1,352 @@ +commit 18744f661be29d5f41421c5b71b2434097e8ef4c +Author: Caolán McNamara +Date: Thu Sep 29 21:59:28 2011 +0100 + + help gcc 4.6.1 out with ambiguity + +diff --git a/vcl/unx/gtk/a11y/atkutil.cxx b/vcl/unx/gtk/a11y/atkutil.cxx +index 68bb949..e662f6e 100644 +--- a/vcl/unx/gtk/a11y/atkutil.cxx ++++ b/vcl/unx/gtk/a11y/atkutil.cxx +@@ -312,8 +312,12 @@ void DocumentFocusListener::attachRecursive( + uno::Reference< accessibility::XAccessibleEventBroadcaster > xBroadcaster = + uno::Reference< accessibility::XAccessibleEventBroadcaster >(xContext, uno::UNO_QUERY); + ++ if (!xBroadcaster.is()) ++ return; ++ + // If not already done, add the broadcaster to the list and attach as listener. +- if( xBroadcaster.is() && m_aRefList.insert(xBroadcaster).second ) ++ uno::Reference< uno::XInterface > xInterface = xBroadcaster; ++ if( m_aRefList.insert(xInterface).second ) + { + xBroadcaster->addEventListener(static_cast< accessibility::XAccessibleEventListener *>(this)); + +commit 3c7a0b5d5455805210262529fbd9815aed6fe267 +Author: Caolán McNamara +Date: Thu Sep 29 23:02:56 2011 +0100 + + tweak ambiguities for F-15 gcc 4.6.1-9 + +diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx b/dbaccess/source/core/dataaccess/databasedocument.cxx +index c72d7f7..e1c7347 100644 +--- a/dbaccess/source/core/dataaccess/databasedocument.cxx ++++ b/dbaccess/source/core/dataaccess/databasedocument.cxx +@@ -1696,10 +1696,13 @@ void ODatabaseDocument::disposing() + ::osl::ClearableMutexGuard aGuard( m_aMutex ); + + OSL_ENSURE( m_aControllers.empty(), "ODatabaseDocument::disposing: there still are controllers!" ); +- // normally, nobody should explicitly dispose, but only XCloseable::close the document. And upon +- // closing, our controllers are closed, too ++ // normally, nobody should explicitly dispose, but only XCloseable::close ++ // the document. And upon closing, our controllers are closed, too + +- aKeepAlive.push_back( m_xUIConfigurationManager ); ++ { ++ uno::Reference xUIInterface = m_xUIConfigurationManager; ++ aKeepAlive.push_back( xUIInterface ); ++ } + m_xUIConfigurationManager = NULL; + + clearObjectContainer( m_xForms ); +@@ -1721,10 +1724,16 @@ void ODatabaseDocument::disposing() + OSL_ENSURE( m_aControllers.empty(), "ODatabaseDocument::disposing: there still are controllers!" ); + impl_disposeControllerFrames_nothrow(); + +- aKeepAlive.push_back( m_xModuleManager ); ++ { ++ uno::Reference xModuleInterface = m_xModuleManager; ++ aKeepAlive.push_back( xModuleInterface ); ++ } + m_xModuleManager.clear(); + +- aKeepAlive.push_back( m_xTitleHelper ); ++ { ++ uno::Reference xTitleInterface = m_xTitleHelper; ++ aKeepAlive.push_back( xTitleInterface ); ++ } + m_xTitleHelper.clear(); + + m_pImpl.clear(); +diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx +index 017794d..37f0880 100644 +--- a/dbaccess/source/ui/browser/unodatbr.cxx ++++ b/dbaccess/source/ui/browser/unodatbr.cxx +@@ -781,7 +781,7 @@ sal_Bool SbaTableQueryBrowser::InitializeGridModel(const Reference< ::com::sun:: + if ( xSupplier.is() ) + aInitialValues.push_back( NamedValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FormatsSupplier")), makeAny( xSupplier ) ) ); + aInitialValues.push_back( NamedValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TreatAsNumber")), makeAny( (sal_Bool)bFormattedIsNumeric ) ) ); +- aCopyProperties.push_back( PROPERTY_FORMATKEY ); ++ aCopyProperties.push_back( static_cast(PROPERTY_FORMATKEY) ); + break; + } + +@@ -814,8 +814,8 @@ sal_Bool SbaTableQueryBrowser::InitializeGridModel(const Reference< ::com::sun:: + aInitialValues.push_back( NamedValue( sDefaultProperty, aDefault ) ); + + // transfer properties from the definition to the UNO-model : +- aCopyProperties.push_back( PROPERTY_HIDDEN ); +- aCopyProperties.push_back( PROPERTY_WIDTH ); ++ aCopyProperties.push_back( static_cast(PROPERTY_HIDDEN) ); ++ aCopyProperties.push_back( static_cast(PROPERTY_WIDTH) ); + + // help text to display for the column + Any aDescription; +diff --git a/dbaccess/source/ui/querydesign/TableWindowAccess.cxx b/dbaccess/source/ui/querydesign/TableWindowAccess.cxx +index 9ffe63e..eac0c75 100644 +--- a/dbaccess/source/ui/querydesign/TableWindowAccess.cxx ++++ b/dbaccess/source/ui/querydesign/TableWindowAccess.cxx +@@ -254,7 +254,11 @@ namespace dbaui + ::std::vector< Reference > aRelations; + aRelations.reserve(5); // just guessing + for (; aIter != aEnd ; ++aIter ) +- aRelations.push_back(getParentChild(aIter - pConnectionList->begin())); ++ { ++ uno::Reference xInterface = ++ getParentChild(aIter - pConnectionList->begin()); ++ aRelations.push_back(xInterface); ++ } + + Reference *pRelations = aRelations.empty() ? 0 : &aRelations[0]; + Sequence< Reference > aSeq(pRelations, aRelations.size()); +diff --git a/reportdesign/source/filter/xml/xmlExport.cxx b/reportdesign/source/filter/xml/xmlExport.cxx +index b0f6db2..1f37f3a 100644 +--- a/reportdesign/source/filter/xml/xmlExport.cxx ++++ b/reportdesign/source/filter/xml/xmlExport.cxx +@@ -1201,15 +1201,15 @@ void ORptExport::exportAutoStyle(XPropertySet* _xProp,const Reference(PROPERTY_BORDERRIGHT)); + } + else + { + sBorderProp = PROPERTY_BORDERRIGHT; +- aProps.push_back(PROPERTY_BORDERLEFT); ++ aProps.push_back(static_cast(PROPERTY_BORDERLEFT)); + } +- aProps.push_back(PROPERTY_BORDERTOP); +- aProps.push_back(PROPERTY_BORDERBOTTOM); ++ aProps.push_back(static_cast(PROPERTY_BORDERTOP)); ++ aProps.push_back(static_cast(PROPERTY_BORDERBOTTOM)); + } + else // horizontal + { +@@ -1217,15 +1217,15 @@ void ORptExport::exportAutoStyle(XPropertySet* _xProp,const Reference(PROPERTY_BORDERTOP)); + } + else + { + sBorderProp = PROPERTY_BORDERTOP; +- aProps.push_back(PROPERTY_BORDERBOTTOM); ++ aProps.push_back(static_cast(PROPERTY_BORDERBOTTOM)); + } +- aProps.push_back(PROPERTY_BORDERRIGHT); +- aProps.push_back(PROPERTY_BORDERLEFT); ++ aProps.push_back(static_cast(PROPERTY_BORDERRIGHT)); ++ aProps.push_back(static_cast(PROPERTY_BORDERLEFT)); + } + + xBorderProp->setPropertyValue(sBorderProp,uno::makeAny(aValue)); +diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx +index 2ff973f..38407f1 100644 +--- a/reportdesign/source/ui/report/ReportController.cxx ++++ b/reportdesign/source/ui/report/ReportController.cxx +@@ -257,7 +257,8 @@ void lcl_getReportControlFormat(const Sequence< PropertyValue >& aArgs, + } + else + { +- _rControlsFormats.push_back(xReportControlFormat); ++ uno::Reference xInterface = xReportControlFormat; ++ _rControlsFormats.push_back(xInterface); + } + + if ( !_xWindow.is() ) +diff --git a/reportdesign/source/ui/report/ReportSection.cxx b/reportdesign/source/ui/report/ReportSection.cxx +index 66b5658..af6947f 100644 +--- a/reportdesign/source/ui/report/ReportSection.cxx ++++ b/reportdesign/source/ui/report/ReportSection.cxx +@@ -726,7 +726,11 @@ void OReportSection::fillControlModelSelection(::std::vector< uno::Reference< un + const SdrObject* pDlgEdObj = rMarkList.GetMark(i)->GetMarkedSdrObj(); + const OObjectBase* pObj = dynamic_cast(pDlgEdObj); + if ( pObj ) +- _rSelection.push_back(pObj->getReportComponent()); ++ { ++ uno::Reference xInterface = ++ pObj->getReportComponent(); ++ _rSelection.push_back(xInterface); ++ } + } + } + } +commit 242f1bee6e0df3c58c257178058d61a1c349c2ed +Author: Caolán McNamara +Date: Thu Sep 29 21:32:08 2011 +0100 + + get this building with gcc 4.6.1 + +diff --git a/extensions/source/propctrlr/editpropertyhandler.cxx b/extensions/source/propctrlr/editpropertyhandler.cxx +index a1693ae..363f685 100644 +--- a/extensions/source/propctrlr/editpropertyhandler.cxx ++++ b/extensions/source/propctrlr/editpropertyhandler.cxx +@@ -248,13 +248,13 @@ namespace pcr + ::std::vector< ::rtl::OUString > aSuperseded; + if ( implHaveBothScrollBarProperties() ) + { +- aSuperseded.push_back( PROPERTY_HSCROLL ); +- aSuperseded.push_back( PROPERTY_VSCROLL ); ++ aSuperseded.push_back( static_cast(PROPERTY_HSCROLL) ); ++ aSuperseded.push_back( static_cast(PROPERTY_VSCROLL) ); + } + if ( implHaveTextTypeProperty() ) + { +- aSuperseded.push_back( PROPERTY_RICHTEXT ); +- aSuperseded.push_back( PROPERTY_MULTILINE ); ++ aSuperseded.push_back( static_cast(PROPERTY_RICHTEXT) ); ++ aSuperseded.push_back( static_cast(PROPERTY_MULTILINE) ); + } + if ( aSuperseded.empty() ) + return Sequence< ::rtl::OUString >(); +@@ -267,8 +267,8 @@ namespace pcr + ::osl::MutexGuard aGuard( m_aMutex ); + ::std::vector< ::rtl::OUString > aInterestingActuatingProps; + if ( implHaveTextTypeProperty() ) +- aInterestingActuatingProps.push_back( PROPERTY_TEXTTYPE ); +- aInterestingActuatingProps.push_back( PROPERTY_MULTILINE ); ++ aInterestingActuatingProps.push_back( static_cast(PROPERTY_TEXTTYPE) ); ++ aInterestingActuatingProps.push_back( static_cast(PROPERTY_MULTILINE) ); + return Sequence< ::rtl::OUString >( &(*aInterestingActuatingProps.begin()), aInterestingActuatingProps.size() );; + } + +diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx +index 48d0bbe..a006ab5 100644 +--- a/extensions/source/propctrlr/formcomponenthandler.cxx ++++ b/extensions/source/propctrlr/formcomponenthandler.cxx +@@ -947,28 +947,28 @@ namespace pcr + { + ::osl::MutexGuard aGuard( m_aMutex ); + ::std::vector< ::rtl::OUString > aInterestingProperties; +- aInterestingProperties.push_back( PROPERTY_DATASOURCE ); +- aInterestingProperties.push_back( PROPERTY_COMMAND ); +- aInterestingProperties.push_back( PROPERTY_COMMANDTYPE ); +- aInterestingProperties.push_back( PROPERTY_LISTSOURCE ); +- aInterestingProperties.push_back( PROPERTY_LISTSOURCETYPE ); +- aInterestingProperties.push_back( PROPERTY_SUBMIT_ENCODING ); +- aInterestingProperties.push_back( PROPERTY_REPEAT ); +- aInterestingProperties.push_back( PROPERTY_TABSTOP ); +- aInterestingProperties.push_back( PROPERTY_BORDER ); +- aInterestingProperties.push_back( PROPERTY_CONTROLSOURCE ); +- aInterestingProperties.push_back( PROPERTY_DROPDOWN ); +- aInterestingProperties.push_back( PROPERTY_IMAGE_URL ); +- aInterestingProperties.push_back( PROPERTY_TARGET_URL ); +- aInterestingProperties.push_back( PROPERTY_STRINGITEMLIST ); +- aInterestingProperties.push_back( PROPERTY_BUTTONTYPE ); +- aInterestingProperties.push_back( PROPERTY_ESCAPE_PROCESSING ); +- aInterestingProperties.push_back( PROPERTY_TRISTATE ); +- aInterestingProperties.push_back( PROPERTY_DECIMAL_ACCURACY ); +- aInterestingProperties.push_back( PROPERTY_SHOWTHOUSANDSEP ); +- aInterestingProperties.push_back( PROPERTY_FORMATKEY ); +- aInterestingProperties.push_back( PROPERTY_EMPTY_IS_NULL ); +- aInterestingProperties.push_back( PROPERTY_TOGGLE ); ++ aInterestingProperties.push_back( static_cast(PROPERTY_DATASOURCE) ); ++ aInterestingProperties.push_back( static_cast(PROPERTY_COMMAND) ); ++ aInterestingProperties.push_back( static_cast(PROPERTY_COMMANDTYPE) ); ++ aInterestingProperties.push_back( static_cast(PROPERTY_LISTSOURCE) ); ++ aInterestingProperties.push_back( static_cast(PROPERTY_LISTSOURCETYPE) ); ++ aInterestingProperties.push_back( static_cast(PROPERTY_SUBMIT_ENCODING) ); ++ aInterestingProperties.push_back( static_cast(PROPERTY_REPEAT) ); ++ aInterestingProperties.push_back( static_cast(PROPERTY_TABSTOP) ); ++ aInterestingProperties.push_back( static_cast(PROPERTY_BORDER) ); ++ aInterestingProperties.push_back( static_cast(PROPERTY_CONTROLSOURCE) ); ++ aInterestingProperties.push_back( static_cast(PROPERTY_DROPDOWN) ); ++ aInterestingProperties.push_back( static_cast(PROPERTY_IMAGE_URL) ); ++ aInterestingProperties.push_back( static_cast(PROPERTY_TARGET_URL) ); ++ aInterestingProperties.push_back( static_cast(PROPERTY_STRINGITEMLIST) ); ++ aInterestingProperties.push_back( static_cast(PROPERTY_BUTTONTYPE) ); ++ aInterestingProperties.push_back( static_cast(PROPERTY_ESCAPE_PROCESSING) ); ++ aInterestingProperties.push_back( static_cast(PROPERTY_TRISTATE) ); ++ aInterestingProperties.push_back( static_cast(PROPERTY_DECIMAL_ACCURACY) ); ++ aInterestingProperties.push_back( static_cast(PROPERTY_SHOWTHOUSANDSEP) ); ++ aInterestingProperties.push_back( static_cast(PROPERTY_FORMATKEY) ); ++ aInterestingProperties.push_back( static_cast(PROPERTY_EMPTY_IS_NULL) ); ++ aInterestingProperties.push_back( static_cast(PROPERTY_TOGGLE) ); + return Sequence< ::rtl::OUString >( &(*aInterestingProperties.begin()), aInterestingProperties.size() ); + } + +diff --git a/extensions/source/propctrlr/xsdvalidationhelper.cxx b/extensions/source/propctrlr/xsdvalidationhelper.cxx +index 4ade7c5..54338a3 100644 +--- a/extensions/source/propctrlr/xsdvalidationhelper.cxx ++++ b/extensions/source/propctrlr/xsdvalidationhelper.cxx +@@ -271,7 +271,7 @@ namespace pcr + Reference< XPropertySet > xNewType( getDataType( _rName ), UNO_QUERY ); + + // fire any changes in the properties which result from this new type +- std::set< ::rtl::OUString > aFilter; aFilter.insert( PROPERTY_NAME ); ++ std::set< ::rtl::OUString > aFilter; aFilter.insert( static_cast(PROPERTY_NAME) ); + firePropertyChanges( xOldType, xNewType, aFilter ); + + // fire the change in the Data Type property +diff --git a/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx b/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx +index b9ca345..31c6ba2 100644 +--- a/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx ++++ b/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx +@@ -247,27 +247,27 @@ namespace pcr + ::std::vector< ::rtl::OUString > aSuperfluous; + if ( m_pHelper.get() ) + { +- aSuperfluous.push_back( PROPERTY_CONTROLSOURCE ); +- aSuperfluous.push_back( PROPERTY_EMPTY_IS_NULL ); +- aSuperfluous.push_back( PROPERTY_FILTERPROPOSAL ); +- aSuperfluous.push_back( PROPERTY_LISTSOURCETYPE ); +- aSuperfluous.push_back( PROPERTY_LISTSOURCE ); +- aSuperfluous.push_back( PROPERTY_BOUNDCOLUMN ); ++ aSuperfluous.push_back( static_cast(PROPERTY_CONTROLSOURCE) ); ++ aSuperfluous.push_back( static_cast(PROPERTY_EMPTY_IS_NULL) ); ++ aSuperfluous.push_back( static_cast(PROPERTY_FILTERPROPOSAL) ); ++ aSuperfluous.push_back( static_cast(PROPERTY_LISTSOURCETYPE) ); ++ aSuperfluous.push_back( static_cast(PROPERTY_LISTSOURCE) ); ++ aSuperfluous.push_back( static_cast(PROPERTY_BOUNDCOLUMN) ); + + bool bAllowBinding = m_pHelper->canBindToAnyDataType(); + + if ( bAllowBinding ) + { +- aSuperfluous.push_back( PROPERTY_MAXTEXTLEN ); +- aSuperfluous.push_back( PROPERTY_VALUEMIN ); +- aSuperfluous.push_back( PROPERTY_VALUEMAX ); +- aSuperfluous.push_back( PROPERTY_DECIMAL_ACCURACY ); +- aSuperfluous.push_back( PROPERTY_TIMEMIN ); +- aSuperfluous.push_back( PROPERTY_TIMEMAX ); +- aSuperfluous.push_back( PROPERTY_DATEMIN ); +- aSuperfluous.push_back( PROPERTY_DATEMAX ); +- aSuperfluous.push_back( PROPERTY_EFFECTIVE_MIN ); +- aSuperfluous.push_back( PROPERTY_EFFECTIVE_MAX ); ++ aSuperfluous.push_back( static_cast(PROPERTY_MAXTEXTLEN) ); ++ aSuperfluous.push_back( static_cast(PROPERTY_VALUEMIN) ); ++ aSuperfluous.push_back( static_cast(PROPERTY_VALUEMAX) ); ++ aSuperfluous.push_back( static_cast(PROPERTY_DECIMAL_ACCURACY) ); ++ aSuperfluous.push_back( static_cast(PROPERTY_TIMEMIN) ); ++ aSuperfluous.push_back( static_cast(PROPERTY_TIMEMAX) ); ++ aSuperfluous.push_back( static_cast(PROPERTY_DATEMIN) ); ++ aSuperfluous.push_back( static_cast(PROPERTY_DATEMAX) ); ++ aSuperfluous.push_back( static_cast(PROPERTY_EFFECTIVE_MIN) ); ++ aSuperfluous.push_back( static_cast(PROPERTY_EFFECTIVE_MAX) ); + } + } + +@@ -283,8 +283,8 @@ namespace pcr + ::std::vector< ::rtl::OUString > aInterestedInActuations( 2 ); + if ( m_pHelper.get() ) + { +- aInterestedInActuations.push_back( PROPERTY_XSD_DATA_TYPE ); +- aInterestedInActuations.push_back( PROPERTY_XML_DATA_MODEL ); ++ aInterestedInActuations.push_back( static_cast(PROPERTY_XSD_DATA_TYPE) ); ++ aInterestedInActuations.push_back( static_cast(PROPERTY_XML_DATA_MODEL) ); + } + if ( aInterestedInActuations.empty() ) + return Sequence< ::rtl::OUString >();