[Libreoffice-commits] .: 10 commits - basic/source extensions/source framework/inc framework/Library_fwk.mk framework/source sal/inc scripting/source sfx2/source solenv/gbuild solenv/inc svtools/inc svtools/source svx/source sw/qa unusedcode.easy
Caolán McNamara
caolan at kemper.freedesktop.org
Mon Sep 26 02:48:01 PDT 2011
basic/source/sbx/sbxscan.cxx | 11 ++--
extensions/source/plugin/unx/unxmgr.cxx | 20 +++----
framework/Library_fwk.mk | 1
framework/inc/services/layoutmanager.hxx | 1
framework/inc/uielement/panelwindow.hxx | 76 -----------------------------
framework/source/uielement/panelwindow.cxx | 54 --------------------
sal/inc/rtl/strbuf.hxx | 5 +
sal/inc/rtl/ustrbuf.hxx | 5 +
scripting/source/dlgprov/dlgprov.cxx | 5 -
scripting/source/dlgprov/dlgprov.hxx | 1
sfx2/source/appl/appuno.cxx | 16 ++----
solenv/gbuild/platform/unxgcc.mk | 19 ++++++-
solenv/inc/unxgcc.mk | 10 ++-
svtools/inc/svtools/filectrl.hxx | 1
svtools/source/control/filectrl.cxx | 10 ---
svx/source/svdraw/svdmodel.cxx | 12 ++--
svx/source/tbxctrls/fillctrl.cxx | 14 ++---
sw/qa/core/swdoc-test.cxx | 3 -
unusedcode.easy | 2
19 files changed, 67 insertions(+), 199 deletions(-)
New commits:
commit b68b16161777f87ad9436e7c65429e9413819b81
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Sep 26 10:46:54 2011 +0100
only allowed to create these via factory methods now
diff --git a/svx/source/tbxctrls/fillctrl.cxx b/svx/source/tbxctrls/fillctrl.cxx
index f3ecb1e..1de6293 100644
--- a/svx/source/tbxctrls/fillctrl.cxx
+++ b/svx/source/tbxctrls/fillctrl.cxx
@@ -428,14 +428,14 @@ void SvxFillToolBoxControl::Update( const SfxPoolItem* pState )
aTmpStr += TMP_STR_END;
XBitmapEntry* pEntry = new XBitmapEntry( pBitmapItem->GetBitmapValue(), aTmpStr );
- XBitmapList aBitmapList( String::CreateFromAscii("TmpList") );
- aBitmapList.Insert( pEntry );
- aBitmapList.SetDirty( sal_False );
- //Bitmap* pBmp = aBitmapList.GetBitmap( 0 );
- //( (ListBox*)pFillAttrLB )->InsertEntry( pEntry->GetName(), *pBmp );
- pFillAttrLB->Fill( &aBitmapList );
+ XBitmapListRef xBitmapList =
+ XPropertyList::CreatePropertyList(XBITMAP_LIST,
+ String::CreateFromAscii("TmpList"))->AsBitmapList();
+ xBitmapList->Insert( pEntry );
+ xBitmapList->SetDirty( sal_False );
+ pFillAttrLB->Fill( xBitmapList );
pFillAttrLB->SelectEntryPos( pFillAttrLB->GetEntryCount() - 1 );
- aBitmapList.Remove( 0 );
+ xBitmapList->Remove( 0 );
delete pEntry;
}
// NEU
commit d63a3b885a4e0026c5d26b56910f431b86acfa86
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Sep 24 15:57:04 2011 +0100
callcatcher: remove unused code
diff --git a/svtools/inc/svtools/filectrl.hxx b/svtools/inc/svtools/filectrl.hxx
index 40eace6..7a0f546 100644
--- a/svtools/inc/svtools/filectrl.hxx
+++ b/svtools/inc/svtools/filectrl.hxx
@@ -98,7 +98,6 @@ public:
//manipulate the Button-Text:
XubString GetButtonText() const { return maButtonText; }
void SetButtonText( const XubString& rStr );
- void ResetButtonText();
//------
//use this to manipulate the dialog bevore executing it:
diff --git a/svtools/source/control/filectrl.cxx b/svtools/source/control/filectrl.cxx
index c8d506a..a2e93e0 100644
--- a/svtools/source/control/filectrl.cxx
+++ b/svtools/source/control/filectrl.cxx
@@ -220,14 +220,4 @@ void FileControl::SetButtonText( const XubString& rStr )
Resize();
}
-// -----------------------------------------------------------------------
-
-void FileControl::ResetButtonText()
-{
- mnInternalFlags |= FILECTRL_ORIGINALBUTTONTEXT;
- maButtonText = XubString( SvtResId( STR_FILECTRL_BUTTONTEXT ) );
- Resize();
-}
-
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 0345310ec2cf0cf6a6b3864f36e7e8dfee6f0bf5
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Sep 24 11:27:40 2011 +0100
disambiguate ctor
diff --git a/sw/qa/core/swdoc-test.cxx b/sw/qa/core/swdoc-test.cxx
index 6c91095..4216b0c 100644
--- a/sw/qa/core/swdoc-test.cxx
+++ b/sw/qa/core/swdoc-test.cxx
@@ -313,7 +313,8 @@ getRandString()
"AAAAA BBBB CCC DD E \n"));
int s = getRand(aText.getLength());
int j = getRand(aText.getLength() - s);
- rtl::OUString aRet(aText + s, j);
+ const sal_Unicode *pStr = aText.getStr();
+ rtl::OUString aRet(pStr + s, j);
if (!getRand(5))
aRet += rtl::OUString(sal_Unicode('\n'));
// fprintf (stderr, "rand string '%s'\n", OUStringToOString(aRet, RTL_TEXTENCODING_UTF8).getStr());
commit 0dcaf6c6299f10f25623ac41e735b0d03d25894c
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Sep 24 00:38:37 2011 +0100
ByteString->rtl::OStringBuffer
diff --git a/extensions/source/plugin/unx/unxmgr.cxx b/extensions/source/plugin/unx/unxmgr.cxx
index 742cb26..7c77c83 100644
--- a/extensions/source/plugin/unx/unxmgr.cxx
+++ b/extensions/source/plugin/unx/unxmgr.cxx
@@ -256,26 +256,22 @@ Sequence<PluginDescription> XPluginManager_Impl::impl_getPluginDescriptions() th
static const char* pHome = getenv( "HOME" );
static const char* pNPXPluginPath = getenv( "NPX_PLUGIN_PATH" );
- ByteString aSearchPath( "/usr/lib/netscape/plugins" );
+ // netscape!, quick, beam me back to the 90's when Motif roamed the earth
+ rtl::OStringBuffer aSearchBuffer(RTL_CONSTASCII_STRINGPARAM("/usr/lib/netscape/plugins"));
if( pHome )
- {
- aSearchPath.Append( ':' );
- aSearchPath.Append( pHome );
- aSearchPath += "/.netscape/plugins";
- }
+ aSearchBuffer.append(':').append(pHome).append("/.netscape/plugins");
if( pNPXPluginPath )
- {
- aSearchPath.Append( ':' );
- aSearchPath += pNPXPluginPath;
- }
+ aSearchBuffer.append(':').append(pNPXPluginPath);
const Sequence< ::rtl::OUString >& rPaths( PluginManager::getAdditionalSearchPaths() );
for( i = 0; i < rPaths.getLength(); i++ )
{
- aSearchPath += ":";
- aSearchPath += ByteString( String( rPaths.getConstArray()[i] ), aEncoding );
+ aSearchBuffer.append(':').append(rtl::OUStringToOString(
+ rPaths.getConstArray()[i], aEncoding));
}
+ ByteString aSearchPath = aSearchBuffer.makeStringAndClear();
+
int nPaths = aSearchPath.GetTokenCount( ':' );
maxDirent u;
for( i = 0; i < nPaths; i++ )
diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx
index 56e6c7b..6d50fae 100644
--- a/svx/source/svdraw/svdmodel.cxx
+++ b/svx/source/svdraw/svdmodel.cxx
@@ -34,6 +34,7 @@
#include <com/sun/star/lang/XComponent.hpp>
#include <osl/endian.h>
#include <rtl/logfile.hxx>
+#include <rtl/strbuf.hxx>
#include <math.h>
#include <tools/urlobj.hxx>
#include <unotools/ucbstreamhelper.hxx>
@@ -302,12 +303,11 @@ SdrModel::~SdrModel()
#ifdef DBG_UTIL
if(pAktUndoGroup)
{
- ByteString aStr("Im Dtor des SdrModel steht noch ein offenes Undo rum: \"");
-
- aStr += ByteString(pAktUndoGroup->GetComment(), gsl_getSystemTextEncoding());
- aStr += '\"';
-
- OSL_FAIL(aStr.GetBuffer());
+ rtl::OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM(
+ "Im Dtor des SdrModel steht noch ein offenes Undo rum: \""));
+ aStr.append(rtl::OUStringToOString(pAktUndoGroup->GetComment(), gsl_getSystemTextEncoding()))
+ .append('\"');
+ OSL_FAIL(aStr.getStr());
}
#endif
if (pAktUndoGroup!=NULL)
commit ff6af4030a465cd9341c730ba575b9b2a1b50b69
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Sep 24 00:37:32 2011 +0100
callcatcher: unused code
diff --git a/scripting/source/dlgprov/dlgprov.cxx b/scripting/source/dlgprov/dlgprov.cxx
index 425229f..6cd1399 100644
--- a/scripting/source/dlgprov/dlgprov.cxx
+++ b/scripting/source/dlgprov/dlgprov.cxx
@@ -265,11 +265,6 @@ static ::rtl::OUString aResourceResolverPropName(RTL_CONSTASCII_USTRINGPARAM("Re
return xStringResourceManager;
}
- Reference< container::XNameContainer > DialogProviderImpl::createControlModel() throw ( Exception )
- {
- return lcl_createControlModel(m_xContext);
- }
-
Reference< container::XNameContainer > DialogProviderImpl::createDialogModel(
const Reference< io::XInputStream >& xInput,
const Reference< resource::XStringResourceManager >& xStringResourceManager,
diff --git a/scripting/source/dlgprov/dlgprov.hxx b/scripting/source/dlgprov/dlgprov.hxx
index 773cfe9..1621c18 100644
--- a/scripting/source/dlgprov/dlgprov.hxx
+++ b/scripting/source/dlgprov/dlgprov.hxx
@@ -104,7 +104,6 @@ namespace dlgprov
::com::sun::star::uno::Reference< ::com::sun::star::beans::XIntrospectionAccess > inspectHandler(
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& rxHandler );
// helper methods
- ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > createControlModel() throw ( ::com::sun::star::uno::Exception );
::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > createDialogModel(
const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& xInput,
const ::com::sun::star::uno::Reference< ::com::sun::star::resource::XStringResourceManager >& xStringResourceManager,
diff --git a/unusedcode.easy b/unusedcode.easy
index 7ad4567..eece014 100644
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -2202,7 +2202,6 @@ dbtools::StatementComposer::getDisposeComposer() const
dbtools::getComposedRowSetStatement(com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet> const&, com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory> const&, unsigned char, unsigned char)
dbtools::getConnection(rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory> const&)
dbtools::throwFunctionNotSupportedException(rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const&, com::sun::star::uno::Any const&)
-dlgprov::DialogProviderImpl::createControlModel()
dp_info::singleton_entries(com::sun::star::uno::Reference<com::sun::star::registry::XRegistryKey> const&)
dp_manager::factory::singleton_entries(com::sun::star::uno::Reference<com::sun::star::registry::XRegistryKey> const&)
drawinglayer::attribute::FillBitmapAttribute::FillBitmapAttribute()
commit 2a3ce6ac68151a5a63c5b41a70bde7d9ffcd7e96
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Sep 24 00:36:53 2011 +0100
ByteString->rtl::OStringBuffer
diff --git a/basic/source/sbx/sbxscan.cxx b/basic/source/sbx/sbxscan.cxx
index 0a127f4..406366d 100644
--- a/basic/source/sbx/sbxscan.cxx
+++ b/basic/source/sbx/sbxscan.cxx
@@ -51,6 +51,7 @@
#include "basrid.hxx"
#include "runtime.hxx"
+#include <rtl/strbuf.hxx>
#include <svl/zforlist.hxx>
#include <comphelper/processfactory.hxx>
@@ -112,13 +113,13 @@ SbxError ImpScan( const ::rtl::OUString& rWSrc, double& nVal, SbxDataType& rType
short comma = 0;
short ndig = 0;
short ncdig = 0; // number of digits after decimal point
- ByteString aSearchStr( "0123456789DEde" );
- aSearchStr += cNonIntntlComma;
+ rtl::OStringBuffer aSearchStr(RTL_CONSTASCII_STRINGPARAM("0123456789DEde"));
+ aSearchStr.append(cNonIntntlComma);
if( cIntntlComma != cNonIntntlComma )
- aSearchStr += cIntntlComma;
+ aSearchStr.append(cIntntlComma);
if( bOnlyIntntl )
- aSearchStr += cIntntl1000;
- const char* pSearchStr = aSearchStr.GetBuffer();
+ aSearchStr.append(cIntntl1000);
+ const char* pSearchStr = aSearchStr.getStr();
while( strchr( pSearchStr, *p ) && *p )
{
if( bOnlyIntntl && *p == cIntntl1000 )
commit 8712fbf2a6b1905697e4bbe3a1ff1ec375bc67b2
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Sep 23 22:33:44 2011 +0100
ByteString->rtl::OStringBuffer
diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx
index c3a545f..8fb93d2 100644
--- a/sfx2/source/appl/appuno.cxx
+++ b/sfx2/source/appl/appuno.cxx
@@ -283,11 +283,9 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
for ( nSub=0; nSub<nSubCount; nSub++ )
{
// search sub item by name
- ByteString aStr( pSlot->pUnoName );
- aStr += '.';
- aStr += ByteString( pType->aAttrib[nSub].pName );
- const char* pName = aStr.GetBuffer();
- if ( rPropValue.Name.compareToAscii( pName ) == COMPARE_EQUAL )
+ rtl::OStringBuffer aStr;
+ aStr.append(pSlot->pUnoName).append('.').append(pType->aAttrib[nSub].pName);
+ if ( rPropValue.Name.equalsAsciiL(aStr.getStr(), aStr.getLength()) )
{
sal_uInt8 nSubId = (sal_uInt8) (sal_Int8) pType->aAttrib[nSub].nAID;
if ( bConvertTwips )
@@ -417,11 +415,9 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
for ( sal_uInt16 nSub=0; nSub<nSubCount; nSub++ )
{
// search sub item by name
- ByteString aStr( rArg.pName );
- aStr += '.';
- aStr += pType->aAttrib[nSub].pName;
- const char* pName = aStr.GetBuffer();
- if ( rProp.Name.compareToAscii( pName ) == COMPARE_EQUAL )
+ rtl::OStringBuffer aStr;
+ aStr.append(rArg.pName).append('.').append(pType->aAttrib[nSub].pName);
+ if ( rProp.Name.equalsAsciiL(aStr.getStr(), aStr.getLength()) )
{
// at least one member found ...
bRet = sal_True;
commit 8ec3318688aabdca875e2671e68d5f31205bfe5d
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Sep 23 21:56:31 2011 +0100
make sure these are safe wrt embedded NULLs
something of a micro optimization as well I guess
diff --git a/sal/inc/rtl/strbuf.hxx b/sal/inc/rtl/strbuf.hxx
index 7079ddb..63ae448 100644
--- a/sal/inc/rtl/strbuf.hxx
+++ b/sal/inc/rtl/strbuf.hxx
@@ -298,7 +298,10 @@ public:
Return a OString instance reflecting the current content
of this OStringBuffer.
*/
- const OString toString() const { return OString(pData->buffer); }
+ const OString toString() const
+ {
+ return OString(pData->buffer, pData->length);
+ }
/**
The character at the specified index of this string buffer is set
diff --git a/sal/inc/rtl/ustrbuf.hxx b/sal/inc/rtl/ustrbuf.hxx
index e6e523b..a356309 100644
--- a/sal/inc/rtl/ustrbuf.hxx
+++ b/sal/inc/rtl/ustrbuf.hxx
@@ -278,7 +278,10 @@ public:
Return a OUString instance reflecting the current content
of this OUStringBuffer.
*/
- const OUString toString() const { return OUString(pData->buffer); }
+ const OUString toString() const
+ {
+ return OUString(pData->buffer, pData->length);
+ }
/**
The character at the specified index of this string buffer is set
commit dea0b22a4639a2ef9c75ed6f04d61ca9d99fcb95
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Sep 23 21:38:22 2011 +0100
callcatcher: panelwindow unused
diff --git a/framework/Library_fwk.mk b/framework/Library_fwk.mk
index abb96ce..fde1aa0 100644
--- a/framework/Library_fwk.mk
+++ b/framework/Library_fwk.mk
@@ -155,7 +155,6 @@ $(eval $(call gb_Library_add_exception_objects,fwk,\
framework/source/uielement/menubarmerger \
framework/source/uielement/menubarwrapper \
framework/source/uielement/objectmenucontroller \
- framework/source/uielement/panelwindow \
framework/source/uielement/progressbarwrapper \
framework/source/uielement/recentfilesmenucontroller \
framework/source/uielement/spinfieldtoolbarcontroller \
diff --git a/framework/inc/services/layoutmanager.hxx b/framework/inc/services/layoutmanager.hxx
index f5879f4..84931a3 100644
--- a/framework/inc/services/layoutmanager.hxx
+++ b/framework/inc/services/layoutmanager.hxx
@@ -51,7 +51,6 @@
#include <uielement/menubarmanager.hxx>
#include <uiconfiguration/windowstateconfiguration.hxx>
#include <framework/addonsoptions.hxx>
-#include <uielement/panelwindow.hxx>
#include <uielement/uielement.hxx>
#include <helper/ilayoutnotifications.hxx>
diff --git a/framework/inc/uielement/panelwindow.hxx b/framework/inc/uielement/panelwindow.hxx
deleted file mode 100644
index d0ff822..0000000
--- a/framework/inc/uielement/panelwindow.hxx
+++ /dev/null
@@ -1,76 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef __FRAMEWORK_LAYOUTMANAGER_PANELWINDOW_HXX_
-#define __FRAMEWORK_LAYOUTMANAGER_PANELWINDOW_HXX_
-
-//_________________________________________________________________________________________________________________
-// my own includes
-//_________________________________________________________________________________________________________________
-
-#include <vcl/dockwin.hxx>
-
-//_________________________________________________________________________________________________________________
-// namespace
-//_________________________________________________________________________________________________________________
-
-namespace framework
-{
-
-class PanelWindow : public DockingWindow
-{
- public:
- PanelWindow( Window* pParent, WinBits nWinBits =0);
- virtual ~PanelWindow();
-
- virtual void Command ( const CommandEvent& rCEvt );
- virtual void StateChanged( StateChangedType nType );
- virtual void DataChanged( const DataChangedEvent& rDCEvt );
- virtual void Resize();
-
- // Provide additional handlers to support external implementations
- void SetCommandHdl( const Link& aLink ) { m_aCommandHandler = aLink; }
- const Link& GetCommandHdl() const { return m_aCommandHandler; }
- void SetStateChangedHdl( const Link& aLink ) { m_aStateChangedHandler = aLink; }
- const Link& GetStateChangedHdl() const { return m_aStateChangedHandler; }
- void SetDataChangedHdl( const Link& aLink ) { m_aDataChangedHandler = aLink; }
- const Link& GetDataChangedHdl() { return m_aDataChangedHandler; }
-
- private:
- ::rtl::OUString m_aResourceURL;
- Link m_aCommandHandler;
- Link m_aStateChangedHandler;
- Link m_aDataChangedHandler;
- Window* m_pContentWindow;
-};
-
-}
-
-#endif // __FRAMEWORK_UIELEMENT_PANELWINDOW_HXX_
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/framework/source/uielement/panelwindow.cxx b/framework/source/uielement/panelwindow.cxx
deleted file mode 100644
index e24fbc3..0000000
--- a/framework/source/uielement/panelwindow.cxx
+++ /dev/null
@@ -1,54 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_framework.hxx"
-
-//_________________________________________________________________________________________________________________
-// my own includes
-//_________________________________________________________________________________________________________________
-
-#include <uielement/panelwindow.hxx>
-
-namespace framework
-{
-
-PanelWindow::PanelWindow( Window* pParent, WinBits nWinBits ) :
- DockingWindow( pParent, nWinBits )
-{
-}
-
-PanelWindow::~PanelWindow()
-{
-}
-
-void PanelWindow::Command( const CommandEvent& rCEvt )
-{
- if ( m_aCommandHandler.IsSet() )
- m_aCommandHandler.Call( (void *)( &rCEvt ));
- DockingWindow::Command( rCEvt );
-}
-
-void PanelWindow::StateChanged( StateChangedType nType )
-{
- DockingWindow::StateChanged( nType );
- if ( m_aStateChangedHandler.IsSet() )
- m_aStateChangedHandler.Call( &nType );
-}
-
-void PanelWindow::DataChanged( const DataChangedEvent& rDCEvt )
-{
- DockingWindow::DataChanged( rDCEvt );
- if ( m_aDataChangedHandler.IsSet() )
- m_aDataChangedHandler.Call( (void*)&rDCEvt );
-}
-
-void PanelWindow::Resize()
-{
- DockingWindow::Resize();
- if ( m_pContentWindow )
- m_pContentWindow->SetSizePixel( GetOutputSizePixel() );
-}
-
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/unusedcode.easy b/unusedcode.easy
index 3e7cc88..7ad4567 100644
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -2256,7 +2256,6 @@ formula::FormulaTokenIterator::First()
formula::ResourceManager::loadString(unsigned short, char const*, rtl::OUString const&)
formula::StructPage::GetSelectedEntryText()
formula::StructPage::GetSelectedToken()
-framework::PanelWindow::PanelWindow(Window*, long)
framework::ShareableMutex::getShareableOslMutex()
framework::StatusBarDescriptor::DeleteAndDestroy(unsigned short, unsigned short)
framework::TabWindow::impl_createFactory(com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory> const&)
commit 19549cfc22e9a5d442153d596d5db80efe819da7
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Sep 23 21:27:16 2011 +0100
take pity on the gcc 4.5.X users
diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk
index 22e3835..f1c1989 100644
--- a/solenv/gbuild/platform/unxgcc.mk
+++ b/solenv/gbuild/platform/unxgcc.mk
@@ -108,7 +108,11 @@ endif
endif
gb_CCVER := $(shell $(gb_CC) -dumpversion | $(gb_AWK) -F. -- '{ print $$1*10000+$$2*100+$$3 }')
-gb_StrictAliasingUnsafe := $(shell expr $(gb_CCVER) \< 40600)
+gb_GccLess460 := $(shell expr $(gb_CCVER) \< 40600)
+
+#At least SLED 10.2 gcc 4.3 overly agressively optimizes uno::Sequence into
+#junk, so only strict-alias on >= 4.6.0
+gb_StrictAliasingUnsafe := $(gb_GccLess460)
ifeq ($(gb_StrictAliasingUnsafe),1)
gb_CFLAGS += -fno-strict-aliasing
@@ -121,7 +125,20 @@ gb_CXXFLAGS_WERROR := -Werror
endif
ifeq ($(HAVE_CXX0X),TRUE)
+#Currently, as well as for its own merits, c++11/c++0x mode allows use to use
+#a template for SAL_N_ELEMENTS to detect at compiler time its misuse
gb_CXXFLAGS += -std=c++0x
+
+#We have so many std::auto_ptr uses that we need to be able to disable
+#warnings for those so that -Werror continues to be useful, seeing as moving
+#to unique_ptr isn't an option when we must support different compilers
+
+#When we are using 4.6.0 we can use gcc pragmas to selectively silence auto_ptr
+#warnings in isolation, but for <= 4.5.X we need to globally disable
+#deprecation
+ifeq ($(gb_GccLess460),1)
+gb_CXXFLAGS += -Wno-deprecated-declarations
+endif
endif
ifeq ($(ENABLE_LTO),TRUE)
diff --git a/solenv/inc/unxgcc.mk b/solenv/inc/unxgcc.mk
index ff4b4fa..a7eeaa4 100644
--- a/solenv/inc/unxgcc.mk
+++ b/solenv/inc/unxgcc.mk
@@ -89,6 +89,9 @@ CFLAGSCXX+=-fvisibility-inlines-hidden
.ENDIF # "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE"
.IF "$(HAVE_CXX0X)" == "TRUE"
CFLAGSCXX+=-std=c++0x
+.IF "$(GCCNUMVER)" <= "000400059999"
+CFLAGSCXX+=-Wno-deprecated-declarations
+.ENDIF
.ENDIF # "$(HAVE_CXX0X)" == "TRUE"
CFLAGS_CREATE_PCH=-x c++-header -I$(INCPCH) -DPRECOMPILED_HEADERS
@@ -115,10 +118,9 @@ GCCNUMVER:=$(shell @-$(CXX) $(GCCNUMVERSION_CMD))
# Compiler flags for enabling optimizations
.IF "$(PRODUCT)"!=""
CFLAGSOPT=$(CDEFAULTOPT) # optimizing for products
-.IF "$(GCCNUMVER)" <= "000400050000"
-#At least SLED 10.2 gcc 4.3 overly agressively optimizes
-#uno::Sequence into junk, so only strict-alias on compiler
-#later than 4.5.1
+.IF "$(GCCNUMVER)" <= "000400059999"
+#At least SLED 10.2 gcc 4.3 overly agressively optimizes uno::Sequence into
+#junk, so only strict-alias on >= 4.6.0
CFLAGSOPT+=-fno-strict-aliasing
.ENDIF
.ELSE # "$(PRODUCT)"!=""
More information about the Libreoffice-commits
mailing list