[Libreoffice-commits] .: 11 commits - basic/inc basic/source extensions/source filter/inc filter/source sc/inc sc/source sfx2/source sw/source unusedcode.easy
Caolán McNamara
caolan at kemper.freedesktop.org
Sun Nov 6 14:47:28 PST 2011
basic/inc/basic/sbxcore.hxx | 3
basic/source/classes/sbxmod.cxx | 2
basic/source/sbx/sbxbase.cxx | 14 ----
basic/source/sbx/sbxvar.cxx | 4 -
extensions/source/inc/componentmodule.cxx | 15 ++--
filter/inc/filter/msfilter/escherex.hxx | 6 -
filter/source/graphicfilter/epict/epict.cxx | 15 +---
filter/source/graphicfilter/idxf/dxf2mtf.cxx | 4 -
filter/source/graphicfilter/ipcd/ipcd.cxx | 2
filter/source/msfilter/escherex.cxx | 53 +++++++--------
filter/source/msfilter/msdffimp.cxx | 3
filter/source/xsltdialog/xmlfilterdialogcomponent.cxx | 4 -
sc/inc/column.hxx | 4 -
sc/inc/externalrefmgr.hxx | 6 -
sc/source/core/data/column.cxx | 13 ---
sc/source/core/data/column2.cxx | 26 -------
sc/source/ui/docshell/docfunc.cxx | 28 --------
sc/source/ui/docshell/externalrefmgr.cxx | 10 --
sc/source/ui/inc/docfunc.hxx | 11 ---
sfx2/source/appl/appcfg.cxx | 13 ++-
sfx2/source/appl/appuno.cxx | 54 +++++++--------
sfx2/source/appl/impldde.cxx | 9 +-
sfx2/source/appl/sfxhelp.cxx | 23 +++---
sfx2/source/dialog/basedlgs.cxx | 8 +-
sfx2/source/dialog/dockwin.cxx | 8 +-
sfx2/source/dialog/filedlghelper.cxx | 9 +-
sw/source/core/layout/dbg_lay.cxx | 61 +++++++++---------
unusedcode.easy | 54 ++++++++++++---
28 files changed, 190 insertions(+), 272 deletions(-)
New commits:
commit b23b004b18b52a20454b235533b24fe7baf63518
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Nov 6 22:38:27 2011 +0000
ByteString->rtl::OString
diff --git a/extensions/source/inc/componentmodule.cxx b/extensions/source/inc/componentmodule.cxx
index 407d2a2..4a7b649 100644
--- a/extensions/source/inc/componentmodule.cxx
+++ b/extensions/source/inc/componentmodule.cxx
@@ -31,6 +31,7 @@
#include <svl/solar.hrc>
#include <comphelper/sequence.hxx>
#include <tools/debug.hxx>
+#include <rtl/strbuf.hxx>
#define ENTER_MOD_METHOD() \
::osl::MutexGuard aGuard(s_aMutex); \
@@ -56,7 +57,7 @@ namespace COMPMOD_NAMESPACE
{
ResMgr* m_pRessources;
sal_Bool m_bInitialized;
- ByteString m_sFilePrefix;
+ rtl::OString m_sFilePrefix;
public:
/// ctor
@@ -88,15 +89,13 @@ namespace COMPMOD_NAMESPACE
// note that this method is not threadsafe, which counts for the whole class !
if (!m_pRessources && !m_bInitialized)
{
- DBG_ASSERT(m_sFilePrefix.Len(), "OModuleImpl::getResManager: no resource file prefix!");
+ DBG_ASSERT(m_sFilePrefix.getLength(), "OModuleImpl::getResManager: no resource file prefix!");
// create a manager with a fixed prefix
- ByteString aMgrName = m_sFilePrefix;
-
- m_pRessources = ResMgr::CreateResMgr(aMgrName.GetBuffer());
+ m_pRessources = ResMgr::CreateResMgr(m_sFilePrefix.getStr());
DBG_ASSERT(m_pRessources,
- (ByteString("OModuleImpl::getResManager: could not create the resource manager (file name: ")
- += aMgrName
- += ByteString(")!")).GetBuffer());
+ rtl::OStringBuffer("OModuleImpl::getResManager: could not create the resource manager (file name: ")
+ .append(m_sFilePrefix)
+ .append(")!").getStr());
m_bInitialized = sal_True;
}
commit 982259e35eed66b1cf270bf1ed802f2b14983e2d
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Nov 6 22:29:24 2011 +0000
make filter ByteString free
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx
index d1beb5b..21e6f2d 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -94,6 +94,7 @@
#include <toolkit/unohlp.hxx>
#include <vcl/virdev.hxx>
#include <rtl/crc.h>
+#include <rtl/strbuf.hxx>
using namespace ::rtl;
using namespace ::com::sun::star;
@@ -3922,16 +3923,17 @@ sal_uInt32 EscherConnectorListEntry::GetConnectorRule( sal_Bool bFirst )
::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >
aXShape( ( bFirst ) ? mXConnectToA : mXConnectToB );
- String aString( (::rtl::OUString)aXShape->getShapeType() );
- ByteString aType( aString, RTL_TEXTENCODING_UTF8 );
- aType.Erase( 0, 13 ); // removing "com.sun.star."
- sal_uInt16 nPos = aType.Search( "Shape" );
- aType.Erase( nPos, 5 );
+ rtl::OUString aString(aXShape->getShapeType());
+ rtl::OStringBuffer aBuf(rtl::OUStringToOString(aString, RTL_TEXTENCODING_UTF8));
+ aBuf.remove( 0, 13 ); // removing "com.sun.star."
+ sal_Int16 nPos = aBuf.toString().indexOf("Shape");
+ aBuf.remove(nPos, 5);
+ rtl::OString aType = aBuf.makeStringAndClear();
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >
aPropertySet( aXShape, ::com::sun::star::uno::UNO_QUERY );
- if ( aType == "drawing.PolyPolygon" || aType == "drawing.PolyLine" )
+ if (aType.equalsL(RTL_CONSTASCII_STRINGPARAM("drawing.PolyPolygon")) || aType.equalsL(RTL_CONSTASCII_STRINGPARAM("drawing.PolyLine")))
{
if ( aPropertySet.is() )
{
@@ -3971,8 +3973,8 @@ sal_uInt32 EscherConnectorListEntry::GetConnectorRule( sal_Bool bFirst )
}
}
}
- else if ( ( aType == "drawing.OpenBezier" ) || ( aType == "drawing.OpenFreeHand" ) || ( aType == "drawing.PolyLinePath" )
- || ( aType == "drawing.ClosedBezier" ) || ( aType == "drawing.ClosedFreeHand" ) || ( aType == "drawing.PolyPolygonPath" ) )
+ else if ( (aType.equalsL(RTL_CONSTASCII_STRINGPARAM("drawing.OpenBezier"))) || (aType.equalsL(RTL_CONSTASCII_STRINGPARAM("drawing.OpenFreeHand"))) || (aType.equalsL(RTL_CONSTASCII_STRINGPARAM("drawing.PolyLinePath")))
+ || (aType.equalsL(RTL_CONSTASCII_STRINGPARAM("drawing.ClosedBezier"))) || ( aType.equalsL(RTL_CONSTASCII_STRINGPARAM("drawing.ClosedFreeHand"))) || (aType.equalsL(RTL_CONSTASCII_STRINGPARAM("drawing.PolyPolygonPath"))) )
{
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >
aPropertySet2( aXShape, ::com::sun::star::uno::UNO_QUERY );
@@ -4030,7 +4032,7 @@ sal_uInt32 EscherConnectorListEntry::GetConnectorRule( sal_Bool bFirst )
{
bool bRectangularConnection = true;
- if ( aType == "drawing.Custom" )
+ if (aType.equalsL(RTL_CONSTASCII_STRINGPARAM("drawing.Custom")))
{
SdrObject* pCustoShape( GetSdrObjectFromXShape( aXShape ) );
if ( pCustoShape && pCustoShape->ISA( SdrObjCustomShape ) )
@@ -4132,7 +4134,7 @@ sal_uInt32 EscherConnectorListEntry::GetConnectorRule( sal_Bool bFirst )
aPoly.Rotate( aRect.TopLeft(), (sal_uInt16)( ( nAngle + 5 ) / 10 ) );
nRule = GetClosestPoint( aPoly, aRefPoint );
- if ( aType == "drawing.Ellipse" )
+ if (aType.equalsL(RTL_CONSTASCII_STRINGPARAM("drawing.Ellipse")))
nRule <<= 1; // In PPT hat eine Ellipse 8 M?glichkeiten sich zu connecten
}
}
commit 116b9d6bf1de605dc04160646f10d596dc6d898c
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Nov 6 22:19:21 2011 +0000
aString is always empty
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index a7e977d..c26f214 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -662,7 +662,6 @@ void DffPropertyReader::ReadPropSet( SvStream& rIn, void* pClientData ) const
nLen -= 6;
while ( nLen > 0 )
{
- ByteString aString;
for ( sal_uInt32 j = 0; nLen && ( j < ( nNumSize >> 1 ) ); j++ )
{
for ( sal_uInt32 k = 0; k < 2; k++ )
@@ -686,7 +685,7 @@ void DffPropertyReader::ReadPropSet( SvStream& rIn, void* pClientData ) const
}
*pOut << (char)( ' ' );
}
- pOut->WriteLine( aString );
+ pOut->WriteLine( rtl::OString() );
}
}
}
commit c61c0d4babcfb2a32030b622aa27c30a5d6506c9
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Nov 6 22:17:41 2011 +0000
ByteString->rtl::OString
diff --git a/filter/source/graphicfilter/idxf/dxf2mtf.cxx b/filter/source/graphicfilter/idxf/dxf2mtf.cxx
index 51eed68..a5e318a 100644
--- a/filter/source/graphicfilter/idxf/dxf2mtf.cxx
+++ b/filter/source/graphicfilter/idxf/dxf2mtf.cxx
@@ -451,7 +451,7 @@ void DXF2GDIMetaFile::DrawTextEntity(const DXFTextEntity & rE, const DXFTransfor
double fA;
sal_uInt16 nHeight;
short nAng;
- ByteString aStr( rE.sText );
+ rtl::OString aStr( rE.sText );
DXFTransform aT( DXFTransform(rE.fXScale,rE.fHeight,1.0,rE.fRotAngle,rE.aP0), rTransform );
aT.TransDir(DXFVector(0,1,0),aV);
nHeight=(sal_uInt16)(aV.Abs()+0.5);
@@ -510,7 +510,7 @@ void DXF2GDIMetaFile::DrawAttribEntity(const DXFAttribEntity & rE, const DXFTran
double fA;
sal_uInt16 nHeight;
short nAng;
- ByteString aStr( rE.sText );
+ rtl::OString aStr( rE.sText );
DXFTransform aT( DXFTransform( rE.fXScale, rE.fHeight, 1.0, rE.fRotAngle, rE.aP0 ), rTransform );
aT.TransDir(DXFVector(0,1,0),aV);
nHeight=(sal_uInt16)(aV.Abs()+0.5);
diff --git a/filter/source/graphicfilter/ipcd/ipcd.cxx b/filter/source/graphicfilter/ipcd/ipcd.cxx
index a8b91da..c35c347 100644
--- a/filter/source/graphicfilter/ipcd/ipcd.cxx
+++ b/filter/source/graphicfilter/ipcd/ipcd.cxx
@@ -199,7 +199,7 @@ void PCDReader::CheckPCDImagePacFile()
m_rPCD.Seek( 2048 );
m_rPCD.Read( Buf, 7 );
Buf[ 7 ] = 0;
- if ( ByteString( Buf ).CompareTo( "PCD_IPI" ) != COMPARE_EQUAL )
+ if (!rtl::OString(Buf).equalsL(RTL_CONSTASCII_STRINGPARAM("PCD_IPI")))
bStatus = sal_False;
}
commit ad9c65d0faac1df806dd19aab0452a84c8d4677c
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Nov 5 09:14:46 2011 +0000
ByteString->rtl::OString
diff --git a/filter/inc/filter/msfilter/escherex.hxx b/filter/inc/filter/msfilter/escherex.hxx
index edef722..5a03167 100644
--- a/filter/inc/filter/msfilter/escherex.hxx
+++ b/filter/inc/filter/msfilter/escherex.hxx
@@ -1098,7 +1098,7 @@ public:
sal_Bool bWritePictureOffset, sal_uInt32 nResize = 0);
sal_uInt32 GetBlibID(
SvStream& rPicOutStream,
- const ByteString& rGraphicId,
+ const rtl::OString& rGraphicId,
const Rectangle& rBoundRect,
const com::sun::star::awt::Rectangle* pVisArea = NULL,
const GraphicAttr* pGrafikAttr = NULL
diff --git a/filter/source/graphicfilter/epict/epict.cxx b/filter/source/graphicfilter/epict/epict.cxx
index aa00f1f..9f0b7c9 100644
--- a/filter/source/graphicfilter/epict/epict.cxx
+++ b/filter/source/graphicfilter/epict/epict.cxx
@@ -326,18 +326,15 @@ void PictWriter::WriteRGBColor(const Color & rColor)
*pPict << nR << nG << nB;
}
-
void PictWriter::WriteString( const String & rString )
{
- sal_uInt16 i,nLen;
-
- ByteString aByteString( rString, gsl_getSystemTextEncoding() );
- nLen = aByteString.Len();
+ rtl::OString aString(rtl::OUStringToOString(rString, osl_getThreadTextEncoding()));
+ sal_Int32 nLen = aString.getLength();
if ( nLen > 255 )
nLen = 255;
*pPict << ( (sal_uInt8)nLen );
- for ( i = 0; i < nLen; i++ )
- *pPict << aByteString.GetChar( i );
+ for (sal_Int32 i = 0; i < nLen; ++i)
+ *pPict << aString[i];
}
Rectangle PictWriter::MapRectangle( const Rectangle& rRect )
@@ -716,8 +713,8 @@ void PictWriter::WriteOpcode_FontName(const Font & rFont)
if (bDstFontNameValid==sal_False || nDstFontNameId!=nFontId || aDstFontName!=rFont.GetName())
{
- ByteString aByteString( rFont.GetName(), gsl_getSystemTextEncoding() );
- sal_uInt16 nFontNameLen = aByteString.Len();
+ rtl::OString aString(rtl::OUStringToOString(rFont.GetName(), osl_getThreadTextEncoding()));
+ sal_uInt16 nFontNameLen = aString.getLength();
if ( nFontNameLen )
{
nDataLen = 3 + nFontNameLen;
commit fff5bc8b3547f77e5294976d6f5a6387c23e8eff
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Nov 5 09:10:30 2011 +0000
no need for intermediate string here
diff --git a/filter/source/xsltdialog/xmlfilterdialogcomponent.cxx b/filter/source/xsltdialog/xmlfilterdialogcomponent.cxx
index e826ef5..5dfebe1 100644
--- a/filter/source/xsltdialog/xmlfilterdialogcomponent.cxx
+++ b/filter/source/xsltdialog/xmlfilterdialogcomponent.cxx
@@ -350,9 +350,7 @@ sal_Int16 SAL_CALL XMLFilterDialogComponent::execute( ) throw(RuntimeException)
if( NULL == mpResMgr )
{
- ByteString aResMgrName( "xsltdlg" );
-
- mpResMgr = ResMgr::CreateResMgr( aResMgrName.GetBuffer(), Application::GetSettings().GetUILocale() );
+ mpResMgr = ResMgr::CreateResMgr( "xsltdlg", Application::GetSettings().GetUILocale() );
}
if( NULL == mpDialog )
commit 4cdcf4918414f6d62a906bd91830b3ddf0b9fd63
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Nov 4 23:04:03 2011 +0000
ByteString->rtl::OString
diff --git a/filter/inc/filter/msfilter/escherex.hxx b/filter/inc/filter/msfilter/escherex.hxx
index de9d27e..edef722 100644
--- a/filter/inc/filter/msfilter/escherex.hxx
+++ b/filter/inc/filter/msfilter/escherex.hxx
@@ -1061,7 +1061,7 @@ public:
EscherBlibEntry(
sal_uInt32 nPictureOffset,
const GraphicObject& rObj,
- const ByteString& rId,
+ const rtl::OString& rId,
const GraphicAttr* pAttr = NULL
);
@@ -1190,7 +1190,7 @@ class MSFILTER_DLLPUBLIC EscherPropertyContainer
sal_uInt32 nBlibId,
sal_Bool bCreateCroppingAttributes
);
- sal_Bool ImplCreateEmbeddedBmp( const ByteString& rUniqueId );
+ sal_Bool ImplCreateEmbeddedBmp( const rtl::OString& rUniqueId );
void ImplInit();
public:
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx
index 47bac1c..d1beb5b 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -1131,8 +1131,8 @@ sal_Bool EscherPropertyContainer::CreateOLEGraphicProperties(
if ( pGraphic )
{
GraphicObject aGraphicObject( *pGraphic );
- ByteString aUniqueId( aGraphicObject.GetUniqueID() );
- if ( aUniqueId.Len() )
+ rtl::OString aUniqueId( aGraphicObject.GetUniqueID() );
+ if ( aUniqueId.getLength() )
{
AddOpt( ESCHER_Prop_fillType, ESCHER_FillPicture );
uno::Reference< beans::XPropertySet > aXPropSet( rXShape, uno::UNO_QUERY );
@@ -1164,9 +1164,9 @@ sal_Bool EscherPropertyContainer::CreateOLEGraphicProperties(
}
-sal_Bool EscherPropertyContainer::ImplCreateEmbeddedBmp( const ByteString& rUniqueId )
+sal_Bool EscherPropertyContainer::ImplCreateEmbeddedBmp( const rtl::OString& rUniqueId )
{
- if( rUniqueId.Len() > 0 )
+ if( rUniqueId.getLength() > 0 )
{
EscherGraphicProvider aProvider;
SvMemoryStream aMemStrm;
@@ -1198,7 +1198,7 @@ sal_Bool EscherPropertyContainer::CreateEmbeddedBitmapProperties(
nIndex = nIndex + aVndUrl.Len();
if( aBmpUrl.Len() > nIndex )
{
- ByteString aUniqueId( aBmpUrl.Copy(nIndex, aBmpUrl.Len() - nIndex), RTL_TEXTENCODING_UTF8 );
+ rtl::OString aUniqueId(rtl::OUStringToOString(aBmpUrl.Copy(nIndex, aBmpUrl.Len() - nIndex), RTL_TEXTENCODING_UTF8));
bRetValue = ImplCreateEmbeddedBmp( aUniqueId );
if( bRetValue )
{
@@ -1242,7 +1242,7 @@ GraphicObject lclDrawHatch( const ::com::sun::star::drawing::Hatch& rHatch, cons
sal_Bool EscherPropertyContainer::CreateEmbeddedHatchProperties( const ::com::sun::star::drawing::Hatch& rHatch, const Color& rBackColor, bool bFillBackground )
{
GraphicObject aGraphicObject = lclDrawHatch( rHatch, rBackColor, bFillBackground );
- ByteString aUniqueId = aGraphicObject.GetUniqueID();
+ rtl::OString aUniqueId = aGraphicObject.GetUniqueID();
sal_Bool bRetValue = ImplCreateEmbeddedBmp( aUniqueId );
if ( bRetValue )
AddOpt( ESCHER_Prop_fillType, ESCHER_FillTexture );
@@ -1263,7 +1263,7 @@ sal_Bool EscherPropertyContainer::CreateGraphicProperties(
GraphicAttr* pGraphicAttr = NULL;
GraphicObject aGraphicObject;
String aGraphicUrl;
- ByteString aUniqueId;
+ rtl::OString aUniqueId;
bool bIsGraphicMtf(false);
::com::sun::star::drawing::BitmapMode eBitmapMode( ::com::sun::star::drawing::BitmapMode_NO_REPEAT );
@@ -1367,7 +1367,7 @@ sal_Bool EscherPropertyContainer::CreateGraphicProperties(
{
nIndex = nIndex + aVndUrl.Len();
if ( aGraphicUrl.Len() > nIndex )
- aUniqueId = ByteString( aGraphicUrl.Copy(nIndex, aGraphicUrl.Len() - nIndex), RTL_TEXTENCODING_UTF8 );
+ aUniqueId = rtl::OUStringToOString(aGraphicUrl.Copy(nIndex, aGraphicUrl.Len() - nIndex), RTL_TEXTENCODING_UTF8);
}
else
{
@@ -1413,7 +1413,7 @@ sal_Bool EscherPropertyContainer::CreateGraphicProperties(
}
}
- if ( aGraphicUrl.Len() || aUniqueId.Len() )
+ if ( aGraphicUrl.Len() || aUniqueId.getLength() )
{
if ( bMirrored || nAngle )
{
@@ -1440,7 +1440,7 @@ sal_Bool EscherPropertyContainer::CreateGraphicProperties(
else
AddOpt( ESCHER_Prop_fillType, ESCHER_FillPicture );
- if ( aUniqueId.Len() )
+ if ( aUniqueId.getLength() )
{
// write out embedded graphic
if ( pGraphicProvider && pPicOutStrm && pShapeBoundRect )
@@ -3411,7 +3411,7 @@ sal_Bool EscherPropertyValueHelper::GetPropertyValue(
return eRetValue;
}
-EscherBlibEntry::EscherBlibEntry( sal_uInt32 nPictureOffset, const GraphicObject& rObject, const ByteString& rId,
+EscherBlibEntry::EscherBlibEntry( sal_uInt32 nPictureOffset, const GraphicObject& rObject, const rtl::OString& rId,
const GraphicAttr* pGraphicAttr ) :
mnPictureOffset ( nPictureOffset ),
mnRefCount ( 1 ),
@@ -3424,8 +3424,8 @@ EscherBlibEntry::EscherBlibEntry( sal_uInt32 nPictureOffset, const GraphicObject
meBlibType = UNKNOWN;
mnSize = 0;
- sal_uInt32 nLen = rId.Len();
- const sal_Char* pData = rId.GetBuffer();
+ sal_uInt32 nLen = static_cast<sal_uInt32>(rId.getLength());
+ const sal_Char* pData = rId.getStr();
GraphicType eType( rObject.GetType() );
if ( nLen && pData && ( eType != GRAPHIC_NONE ) )
{
@@ -3649,7 +3649,7 @@ sal_Bool EscherGraphicProvider::GetPrefSize( const sal_uInt32 nBlibId, Size& rPr
return bInRange;
}
-sal_uInt32 EscherGraphicProvider::GetBlibID( SvStream& rPicOutStrm, const ByteString& rId,
+sal_uInt32 EscherGraphicProvider::GetBlibID( SvStream& rPicOutStrm, const rtl::OString& rId,
const Rectangle& /* rBoundRect */, const com::sun::star::awt::Rectangle* pVisArea, const GraphicAttr* pGraphicAttr )
{
sal_uInt32 nBlibId = 0;
@@ -3729,8 +3729,7 @@ sal_uInt32 EscherGraphicProvider::GetBlibID( SvStream& rPicOutStrm, const ByteSt
{ // to store a animation, a gif has to be included into the msOG chunk of a png #I5583#
GraphicFilter &rFilter = GraphicFilter::GetGraphicFilter();
SvMemoryStream aGIFStream;
- ByteString aVersion( "MSOFFICE9.0" );
- aGIFStream.Write( aVersion.GetBuffer(), aVersion.Len() );
+ aGIFStream.Write(RTL_CONSTASCII_STRINGPARAM("MSOFFICE9.0"));
nErrCode = rFilter.ExportGraphic( aGraphic, String(), aGIFStream,
rFilter.GetExportFormatNumberForShortName( String( RTL_CONSTASCII_USTRINGPARAM( "GIF" ) ) ), NULL );
com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue > aFilterData( 1 );
commit 88072f1292facfcb586e4f8b8c9eb61f9d80e02c
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Nov 4 22:34:15 2011 +0000
make sfx2 ByteString free
diff --git a/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx
index ec9fb2d..aef5417 100644
--- a/sfx2/source/appl/appcfg.cxx
+++ b/sfx2/source/appl/appcfg.cxx
@@ -70,6 +70,7 @@
#include <vcl/toolbox.hxx>
#include <unotools/localfilehelper.hxx>
#include <comphelper/processfactory.hxx>
+#include <rtl/strbuf.hxx>
#include <rtl/ustrbuf.hxx>
#include <sfx2/app.hxx>
@@ -152,9 +153,9 @@ IMPL_LINK(SfxEventAsyncer_Impl, TimerHdl, Timer*, pAsyncTimer)
#ifdef DBG_UTIL
if (!xRef.Is())
{
- ByteString aTmp( "SfxEvent: ");
- aTmp += ByteString( String( aHint.GetEventName() ), RTL_TEXTENCODING_UTF8 );
- OSL_TRACE( "%s", aTmp.GetBuffer() );
+ rtl::OStringBuffer aTmp(RTL_CONSTASCII_STRINGPARAM("SfxEvent: "));
+ aTmp.append(rtl::OUStringToOString(aHint.GetEventName(), RTL_TEXTENCODING_UTF8));
+ OSL_TRACE( "%s", aTmp.getStr() );
}
#endif
SFX_APP()->Broadcast( aHint );
@@ -911,9 +912,9 @@ void SfxApplication::NotifyEvent( const SfxEventHint& rEventHint, bool bSynchron
#ifdef DBG_UTIL
if (!pDoc)
{
- ByteString aTmp( "SfxEvent: ");
- aTmp += ByteString( String( rEventHint.GetEventName() ), RTL_TEXTENCODING_UTF8 );
- OSL_TRACE( "%s", aTmp.GetBuffer() );
+ rtl::OStringBuffer aTmp(RTL_CONSTASCII_STRINGPARAM("SfxEvent: "));
+ aTmp.append(rtl::OUStringToOString(rEventHint.GetEventName(), RTL_TEXTENCODING_UTF8));
+ OSL_TRACE( "%s", aTmp.getStr() );
}
#endif
Broadcast(rEventHint);
diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx
index 8fb93d2..ac994e1 100644
--- a/sfx2/source/appl/appuno.cxx
+++ b/sfx2/source/appl/appuno.cxx
@@ -243,9 +243,9 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
#ifdef DBG_UTIL
else
{
- ByteString aStr( "Property not convertable: ");
- aStr += pSlot->pUnoName;
- OSL_FAIL( aStr.GetBuffer() );
+ rtl::OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM("Property not convertable: "));
+ aStr.append(pSlot->pUnoName);
+ OSL_FAIL( aStr.getStr() );
}
#endif
}
@@ -253,9 +253,9 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
else if ( nSubCount == 0 )
{
// for a simple property there can be only one parameter and its name *must* match
- ByteString aStr( "Property name does not match: ");
- aStr += ByteString( aName, RTL_TEXTENCODING_UTF8 );
- OSL_FAIL( aStr.GetBuffer() );
+ rtl::OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM("Property name does not match: "));
+ aStr.append(rtl::OUStringToOString(aName, RTL_TEXTENCODING_UTF8));
+ OSL_FAIL( aStr.getStr() );
}
#endif
else
@@ -295,9 +295,9 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
#ifdef DBG_UTIL
else
{
- ByteString aDbgStr( "Property not convertable: ");
- aDbgStr += pSlot->pUnoName;
- OSL_FAIL( aDbgStr.GetBuffer() );
+ rtl::OStringBuffer aDbgStr(RTL_CONSTASCII_STRINGPARAM("Property not convertable: "));
+ aDbgStr.append(pSlot->pUnoName);
+ OSL_FAIL( aDbgStr.getStr() );
}
#endif
break;
@@ -308,9 +308,9 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
if ( nSub >= nSubCount )
{
// there was a parameter with a name that didn't match to any of the members
- ByteString aStr( "Property name does not match: ");
- aStr += ByteString( String(rPropValue.Name), RTL_TEXTENCODING_UTF8 );
- OSL_FAIL( aStr.GetBuffer() );
+ rtl::OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM("Property name does not match: "));
+ aStr.append(rtl::OUStringToOString(rPropValue.Name, RTL_TEXTENCODING_UTF8));
+ OSL_FAIL( aStr.getStr() );
}
#endif
}
@@ -336,9 +336,9 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
if ( !pItem )
{
#ifdef DBG_UTIL
- ByteString aStr( "No creator method for argument: ");
- aStr += rArg.pName;
- OSL_FAIL( aStr.GetBuffer() );
+ rtl::OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM("No creator method for argument: "));
+ aStr.append(rArg.pName);
+ OSL_FAIL( aStr.getStr() );
#endif
return;
}
@@ -366,9 +366,9 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
#ifdef DBG_UTIL
else
{
- ByteString aStr( "Property not convertable: ");
- aStr += rArg.pName;
- OSL_FAIL( aStr.GetBuffer() );
+ rtl::OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM("Property not convertable: "));
+ aStr.append(rArg.pName);
+ OSL_FAIL( aStr.getStr() );
}
#endif
break;
@@ -395,9 +395,9 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
#ifdef DBG_UTIL
else
{
- ByteString aStr( "Property not convertable: ");
- aStr += rArg.pName;
- OSL_FAIL( aStr.GetBuffer() );
+ rtl::OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM("Property not convertable: "));
+ aStr.append(rArg.pName);
+ OSL_FAIL( aStr.getStr() );
}
#endif
}
@@ -432,9 +432,9 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
// ... but it was not convertable
bRet = sal_False;
#ifdef DBG_UTIL
- ByteString aDbgStr( "Property not convertable: ");
- aDbgStr += rArg.pName;
- OSL_FAIL( aDbgStr.GetBuffer() );
+ rtl::OStringBuffer aDbgStr(RTL_CONSTASCII_STRINGPARAM("Property not convertable: "));
+ aDbgStr.append(rArg.pName);
+ OSL_FAIL( aDbgStr.getStr() );
#endif
}
@@ -908,9 +908,9 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
if ( nFoundArgs == nCount )
{
// except for the "special" slots: assure that every argument was convertable
- ByteString aStr( "MacroPlayer: Some properties didn't match to any formal argument for slot: ");
- aStr += pSlot->pUnoName;
- DBG_WARNING( aStr.GetBuffer() );
+ rtl::OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM("MacroPlayer: Some properties didn't match to any formal argument for slot: "));
+ aStr.append(pSlot->pUnoName);
+ DBG_WARNING( aStr.getStr() );
}
#endif
}
diff --git a/sfx2/source/appl/impldde.cxx b/sfx2/source/appl/impldde.cxx
index 2d42397..d5c2ddf 100644
--- a/sfx2/source/appl/impldde.cxx
+++ b/sfx2/source/appl/impldde.cxx
@@ -42,6 +42,7 @@
#include <vcl/button.hxx>
#include <vcl/msgbox.hxx>
#include <sot/exchange.hxx>
+#include <rtl/strbuf.hxx>
#include <rtl/ustring.hxx>
#include "dde.hrc"
@@ -261,11 +262,11 @@ sal_Bool SvDDEObject::Connect( SvBaseLink * pSvLink )
// Server not up, try once more to start it.
if( !bInWinExec )
{
- ByteString aCmdLine( sServer, RTL_TEXTENCODING_ASCII_US );
- aCmdLine.Append( ".exe " );
- aCmdLine.Append( ByteString( sTopic, RTL_TEXTENCODING_ASCII_US ) );
+ rtl::OStringBuffer aCmdLine(rtl::OUStringToOString(sServer, RTL_TEXTENCODING_ASCII_US));
+ aCmdLine.append(RTL_CONSTASCII_STRINGPARAM(".exe "));
+ aCmdLine.append(rtl::OUStringToOString(sTopic, RTL_TEXTENCODING_ASCII_US));
- if( WinExec( aCmdLine.GetBuffer(), SW_SHOWMINIMIZED ) < 32 )
+ if( WinExec( aCmdLine.getStr(), SW_SHOWMINIMIZED ) < 32 )
nError = DDELINK_ERROR_APP;
else
{
diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx
index 6e37c16..ff92bf9 100644
--- a/sfx2/source/appl/sfxhelp.cxx
+++ b/sfx2/source/appl/sfxhelp.cxx
@@ -81,6 +81,7 @@
#include <sfx2/sfxuno.hxx>
#include <vcl/svapp.hxx>
#include <sfx2/frame.hxx>
+#include <rtl/strbuf.hxx>
#include <rtl/string.hxx>
using namespace ::com::sun::star::beans;
@@ -631,7 +632,7 @@ XubString SfxHelp::GetHelpText( const String& aCommandURL, const Window* pWindow
String sModuleName = GetHelpModuleName_Impl();
String sHelpText = pImp->GetHelpText( aCommandURL, sModuleName );
- ByteString aNewHelpId;
+ rtl::OString aNewHelpId;
if ( pWindow && !sHelpText.Len() )
{
@@ -640,7 +641,7 @@ XubString SfxHelp::GetHelpText( const String& aCommandURL, const Window* pWindow
while ( pParent )
{
aNewHelpId = pParent->GetHelpId();
- sHelpText = pImp->GetHelpText( String( aNewHelpId, RTL_TEXTENCODING_UTF8 ), sModuleName );
+ sHelpText = pImp->GetHelpText( rtl::OStringToOUString(aNewHelpId, RTL_TEXTENCODING_UTF8), sModuleName );
if ( sHelpText.Len() > 0 )
pParent = NULL;
else
@@ -648,7 +649,7 @@ XubString SfxHelp::GetHelpText( const String& aCommandURL, const Window* pWindow
}
if ( bIsDebug && !sHelpText.Len() )
- aNewHelpId.Erase();
+ aNewHelpId = rtl::OString();
}
// add some debug information?
@@ -658,10 +659,10 @@ XubString SfxHelp::GetHelpText( const String& aCommandURL, const Window* pWindow
sHelpText += String( sModuleName );
sHelpText += DEFINE_CONST_UNICODE(": ");
sHelpText += aCommandURL;
- if ( aNewHelpId.Len() )
+ if ( aNewHelpId.getLength() )
{
sHelpText += DEFINE_CONST_UNICODE(" - ");
- sHelpText += String( aNewHelpId, RTL_TEXTENCODING_UTF8 );
+ sHelpText += String(rtl::OStringToOUString(aNewHelpId, RTL_TEXTENCODING_UTF8));
}
}
@@ -762,8 +763,8 @@ sal_Bool SfxHelp::Start_Impl( const String& rURL, const Window* pWindow, const S
Window* pParent = pWindow->GetParent();
while ( pParent )
{
- ByteString aHelpId = pParent->GetHelpId();
- aHelpURL = CreateHelpURL( String( aHelpId, RTL_TEXTENCODING_UTF8 ), aHelpModuleName );
+ rtl::OString aHelpId = pParent->GetHelpId();
+ aHelpURL = CreateHelpURL( rtl::OStringToOUString(aHelpId, RTL_TEXTENCODING_UTF8), aHelpModuleName );
if ( !SfxContentHelper::IsHelpErrorDocument( aHelpURL ) )
break;
else
@@ -813,9 +814,9 @@ sal_Bool SfxHelp::Start_Impl( const String& rURL, const Window* pWindow, const S
return sal_False;
#ifdef DBG_UTIL
- ByteString aTmp("SfxHelp: HelpId = ");
- aTmp += ByteString( aHelpURL, RTL_TEXTENCODING_UTF8 );
- OSL_TRACE( aTmp.GetBuffer() );
+ rtl::OStringBuffer aTmp(RTL_CONSTASCII_STRINGPARAM("SfxHelp: HelpId = "));
+ aTmp.append(rtl::OUStringToOString(aHelpURL, RTL_TEXTENCODING_UTF8));
+ OSL_TRACE( aTmp.getStr() );
#endif
pHelpWindow->SetHelpURL( aHelpURL );
@@ -857,7 +858,7 @@ void SfxHelp::OpenHelpAgent( const rtl::OString& sHelpId )
try
{
URL aURL;
- aURL.Complete = CreateHelpURL_Impl( String( ByteString(sHelpId), RTL_TEXTENCODING_UTF8 ), GetHelpModuleName_Impl() );
+ aURL.Complete = CreateHelpURL_Impl( rtl::OStringToOUString(sHelpId, RTL_TEXTENCODING_UTF8), GetHelpModuleName_Impl() );
Reference < XURLTransformer > xTrans( ::comphelper::getProcessServiceFactory()->createInstance(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.util.URLTransformer")) ), UNO_QUERY );
xTrans->parseStrict(aURL);
diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx
index 84e9a8a..b23e6a8 100644
--- a/sfx2/source/dialog/basedlgs.cxx
+++ b/sfx2/source/dialog/basedlgs.cxx
@@ -61,7 +61,7 @@ using namespace ::rtl;
class SfxModelessDialog_Impl : public SfxListener
{
public:
- ByteString aWinState;
+ rtl::OString aWinState;
SfxChildWindow* pMgr;
sal_Bool bConstructed;
void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
@@ -85,7 +85,7 @@ void SfxModelessDialog_Impl::Notify( SfxBroadcaster&, const SfxHint& rHint )
class SfxFloatingWindow_Impl : public SfxListener
{
public:
- ByteString aWinState;
+ rtl::OString aWinState;
SfxChildWindow* pMgr;
sal_Bool bConstructed;
Timer aMoveTimer;
@@ -239,7 +239,7 @@ void SfxModelessDialog::StateChanged( StateChangedType nStateChange )
{
if ( nStateChange == STATE_CHANGE_INITSHOW )
{
- if ( pImp->aWinState.Len() )
+ if ( pImp->aWinState.getLength() )
{
SetWindowState( pImp->aWinState );
}
@@ -636,7 +636,7 @@ void SfxFloatingWindow::StateChanged( StateChangedType nStateChange )
if ( nStateChange == STATE_CHANGE_INITSHOW )
{
// FloatingWindows are not centered by default
- if ( pImp->aWinState.Len() )
+ if ( pImp->aWinState.getLength() )
SetWindowState( pImp->aWinState );
pImp->bConstructed = sal_True;
}
diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx
index a79099f..e1a835b 100644
--- a/sfx2/source/dialog/dockwin.cxx
+++ b/sfx2/source/dialog/dockwin.cxx
@@ -462,7 +462,7 @@ friend class SfxDockingWindow;
sal_uInt16 nDockPos;
sal_Bool bNewLine;
sal_Bool bDockingPrevented;
- ByteString aWinState;
+ rtl::OString aWinState;
SfxChildAlignment GetLastAlignment() const
{ return eLastAlignment; }
@@ -607,7 +607,7 @@ void SfxDockingWindow::ToggleFloatingMode()
if (IsFloatingMode())
{
SetAlignment(SFX_ALIGN_NOALIGNMENT);
- if ( pImp->aWinState.Len() )
+ if ( pImp->aWinState.getLength() )
GetFloatingWindow()->SetWindowState( pImp->aWinState );
else
GetFloatingWindow()->SetOutputSizePixel( GetFloatingSize() );
@@ -1123,7 +1123,7 @@ void SfxDockingWindow::Initialize(SfxChildWinInfo *pInfo)
SetFloatingMode( bFloatMode );
if ( bFloatMode )
{
- if ( pImp->aWinState.Len() )
+ if ( pImp->aWinState.getLength() )
GetFloatingWindow()->SetWindowState( pImp->aWinState );
else
GetFloatingWindow()->SetOutputSizePixel( GetFloatingSize() );
@@ -1202,7 +1202,7 @@ void SfxDockingWindow::Initialize_Impl()
if ( pFloatWin )
{
// initialize floating window
- if ( !pImp->aWinState.Len() )
+ if ( !pImp->aWinState.getLength() )
// window state never set before, get if from defaults
pImp->aWinState = pFloatWin->GetWindowState();
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index 35b2f62..0a64768 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -100,6 +100,7 @@
#include "filedlgimpl.hxx"
#include <helpid.hrc>
#include <sfxlocal.hrc>
+#include <rtl/strbuf.hxx>
//-----------------------------------------------------------------------------
@@ -279,7 +280,7 @@ OUString FileDialogHelper_Impl::handleHelpRequested( const FilePickerEvent& aEve
OUString aHelpText;
Help* pHelp = Application::GetHelp();
if ( pHelp )
- aHelpText = String( pHelp->GetHelpText( String( ByteString(sHelpId), RTL_TEXTENCODING_UTF8), NULL ) );
+ aHelpText = String( pHelp->GetHelpText( rtl::OStringToOUString(sHelpId, RTL_TEXTENCODING_UTF8), NULL ) );
return aHelpText;
}
@@ -1796,9 +1797,9 @@ void FileDialogHelper_Impl::addFilter( const OUString& rFilterName,
catch( const IllegalArgumentException& )
{
#ifdef DBG_UTIL
- ByteString aMsg( "Could not append Filter" );
- aMsg += ByteString( String( rFilterName ), RTL_TEXTENCODING_UTF8 );
- DBG_ERRORFILE( aMsg.GetBuffer() );
+ rtl::OStringBuffer aMsg(RTL_CONSTASCII_STRINGPARAM("Could not append Filter"));
+ aMsg.append(rtl::OUStringToOString(rFilterName, RTL_TEXTENCODING_UTF8));
+ DBG_ERRORFILE( aMsg.getStr() );
#endif
}
}
commit 778ef20d74ce499e4e0c4b0e3e4506b44938b975
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Nov 4 22:18:28 2011 +0000
sw now ByteString free except for windows related ones
diff --git a/sw/source/core/layout/dbg_lay.cxx b/sw/source/core/layout/dbg_lay.cxx
index c7780cd..fc35a61 100644
--- a/sw/source/core/layout/dbg_lay.cxx
+++ b/sw/source/core/layout/dbg_lay.cxx
@@ -132,6 +132,7 @@
#include <sortedobjs.hxx> // #i28701#
#include <rtl/strbuf.hxx>
+#include <comphelper/string.hxx>
sal_uLong SwProtocol::nRecord = 0;
SwImplProtocol* SwProtocol::pImpl = NULL;
@@ -162,7 +163,7 @@ class SwImplProtocol
// innerhalb einer Testformatierung aufgezeichnet.
void _Record( const SwFrm* pFrm, sal_uLong nFunction, sal_uLong nAct, void* pParam );
sal_Bool NewStream();
- void CheckLine( ByteString& rLine );
+ void CheckLine( rtl::OString& rLine );
void SectFunc( rtl::OStringBuffer& rOut, const SwFrm* pFrm, sal_uLong nAct, void* pParam );
public:
SwImplProtocol();
@@ -337,64 +338,66 @@ SwImplProtocol::~SwImplProtocol()
* SwImplProtocol::CheckLine analysiert eine Zeile der INI-Datei
* --------------------------------------------------*/
-void SwImplProtocol::CheckLine( ByteString& rLine )
+void SwImplProtocol::CheckLine( rtl::OString& rLine )
{
- rLine = rLine.ToLowerAscii(); // Gross/Kleinschreibung ist einerlei
- rLine.SearchAndReplaceAll( '\t', ' ' );
- if( '#' == rLine.GetChar(0) ) // Kommentarzeilen beginnen mit '#'
+ rLine = rLine.toAsciiLowerCase(); // Gross/Kleinschreibung ist einerlei
+ rLine = rLine.replace( '\t', ' ' );
+ if( '#' == rLine[0] ) // Kommentarzeilen beginnen mit '#'
return;
- if( '[' == rLine.GetChar(0) ) // Bereiche: FrmIds, Typen oder Funktionen
+ if( '[' == rLine[0] ) // Bereiche: FrmIds, Typen oder Funktionen
{
- ByteString aTmp = rLine.GetToken( 0, ']' );
- if( "[frmid" == aTmp ) // Bereich FrmIds
+ rtl::OString aTmp = comphelper::string::getToken(rLine, 0, ']');
+ if (aTmp.equalsL(RTL_CONSTASCII_STRINGPARAM("[frmid"))) // Bereich FrmIds
{
nInitFile = 1;
pFrmIds->clear();
delete pFrmIds;
pFrmIds = NULL; // Default: Alle Frames aufzeichnen
}
- else if( "[frmtype" == aTmp )// Bereich Typen
+ else if (aTmp.equalsL(RTL_CONSTASCII_STRINGPARAM("[frmtype")))// Bereich Typen
{
nInitFile = 2;
nTypes = USHRT_MAX; // Default: Alle FrmaeTypen aufzeichnen
}
- else if( "[record" == aTmp )// Bereich Funktionen
+ else if (aTmp.equalsL(RTL_CONSTASCII_STRINGPARAM("[record")))// Bereich Funktionen
{
nInitFile = 3;
SwProtocol::SetRecord( 0 );// Default: Keine Funktion wird aufgezeichnet
}
- else if( "[test" == aTmp )// Bereich Funktionen
+ else if (aTmp.equalsL(RTL_CONSTASCII_STRINGPARAM("[test")))// Bereich Funktionen
{
nInitFile = 4; // Default:
nTestMode = 0; // Ausserhalb der Testformatierung wird aufgezeichnet
}
- else if( "[max" == aTmp )// maximale Zeilenzahl
+ else if (aTmp.equalsL(RTL_CONSTASCII_STRINGPARAM("[max")))// maximale Zeilenzahl
{
nInitFile = 5; // Default:
nMaxLines = USHRT_MAX;
}
- else if( "[var" == aTmp )// variables
+ else if (aTmp.equalsL(RTL_CONSTASCII_STRINGPARAM("[var")))// variables
{
nInitFile = 6;
}
else
nInitFile = 0; // Nanu: Unbekannter Bereich?
- rLine.Erase( 0, aTmp.Len() + 1 );
+ rLine = rLine.copy(aTmp.getLength() + 1);
}
- sal_uInt16 nToks = rLine.GetTokenCount( ' ' ); // Blanks (oder Tabs) sind die Trenner
- for( sal_uInt16 i=0; i < nToks; ++i )
+
+ // Blanks (oder Tabs) sind die Trenner
+ sal_Int32 nIndex = 0;
+ do
{
- ByteString aTok = rLine.GetToken( i, ' ' );
+ rtl::OString aTok = rLine.getToken( 0, ' ', nIndex );
sal_Bool bNo = sal_False;
- if( '!' == aTok.GetChar(0) )
+ if( '!' == aTok[0] )
{
bNo = sal_True; // Diese(n) Funktion/Typ entfernen
- aTok.Erase( 0, 1 );
+ aTok = aTok.copy(1);
}
- if( aTok.Len() )
+ if( aTok.getLength() )
{
sal_uLong nVal;
- sscanf( aTok.GetBuffer(), "%li", &nVal );
+ sscanf( aTok.getStr(), "%li", &nVal );
switch ( nInitFile )
{
case 1: InsertFrm( sal_uInt16( nVal ) ); // FrmId aufnehmen
@@ -431,6 +434,7 @@ void SwImplProtocol::CheckLine( ByteString& rLine )
}
}
}
+ while ( nIndex >= 0 );
}
/* --------------------------------------------------
@@ -443,24 +447,23 @@ void SwImplProtocol::FileInit()
SvFileStream aStream( aName, STREAM_READ );
if( aStream.IsOpen() )
{
- ByteString aLine;
+ rtl::OString aLine;
nInitFile = 0;
- while( !aStream.IsEof() )
+ while( aStream.good() )
{
sal_Char c;
aStream >> c;
if( '\n' == c || '\r' == c ) // Zeilenende
{
- aLine.EraseLeadingChars();
- aLine.EraseTrailingChars();
- if( aLine.Len() )
+ aLine = aLine.trim();
+ if( aLine.getLength() )
CheckLine( aLine ); // Zeile auswerten
- aLine.Erase();
+ aLine = rtl::OString();
}
else
- aLine += c;
+ aLine = rtl::OString(c);
}
- if( aLine.Len() )
+ if( aLine.getLength() )
CheckLine( aLine ); // letzte Zeile auswerten
}
aStream.Close();
commit f017740f50cbb9f140d5ebb5e1fadbc50d337d9c
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Nov 4 21:54:43 2011 +0000
StaticIsEnabledBroadcasting can only be true
diff --git a/basic/inc/basic/sbxcore.hxx b/basic/inc/basic/sbxcore.hxx
index 3d42535..a4abca6 100644
--- a/basic/inc/basic/sbxcore.hxx
+++ b/basic/inc/basic/sbxcore.hxx
@@ -134,8 +134,6 @@ public:
static SbxBase* Create( sal_uInt16, sal_uInt32=SBXCR_SBX );
static SbxObject* CreateObject( const String& );
- // Sbx solution as replacement for SfxBroadcaster::Enable()
- static sal_Bool StaticIsEnabledBroadcasting( void );
};
#ifndef SBX_BASE_DECL_DEFINED
diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx
index 3c2f1f2..ea723ad 100644
--- a/basic/source/classes/sbxmod.cxx
+++ b/basic/source/classes/sbxmod.cxx
@@ -2157,7 +2157,7 @@ ErrCode SbMethod::Call( SbxValue* pRet, SbxVariable* pCaller )
// #100883 Own Broadcast for SbMethod
void SbMethod::Broadcast( sal_uIntPtr nHintId )
{
- if( pCst && !IsSet( SBX_NO_BROADCAST ) && StaticIsEnabledBroadcasting() )
+ if( pCst && !IsSet( SBX_NO_BROADCAST ) )
{
// Because the method could be called from outside, test here once again
// the authorisation
diff --git a/basic/source/sbx/sbxbase.cxx b/basic/source/sbx/sbxbase.cxx
index 718fa0e..1ca523c 100644
--- a/basic/source/sbx/sbxbase.cxx
+++ b/basic/source/sbx/sbxbase.cxx
@@ -246,13 +246,6 @@ SbxObject* SbxBase::CreateObject( const XubString& rClass )
return pNew;
}
-static sal_Bool bStaticEnableBroadcasting = sal_True;
-
-sal_Bool SbxBase::StaticIsEnabledBroadcasting( void )
-{
- return bStaticEnableBroadcasting;
-}
-
SbxBase* SbxBase::Load( SvStream& rStrm )
{
sal_uInt16 nSbxId, nFlags, nVer;
diff --git a/basic/source/sbx/sbxvar.cxx b/basic/source/sbx/sbxvar.cxx
index 012c643..f70cb39 100644
--- a/basic/source/sbx/sbxvar.cxx
+++ b/basic/source/sbx/sbxvar.cxx
@@ -174,7 +174,7 @@ SbxObject* SbxVariable::GetParent()
void SbxVariable::Broadcast( sal_uIntPtr nHintId )
{
- if( pCst && !IsSet( SBX_NO_BROADCAST ) && StaticIsEnabledBroadcasting() )
+ if( pCst && !IsSet( SBX_NO_BROADCAST ) )
{
// Because the method could be called from outside, check the Da die Methode von aussen aufrufbar ist, hier noch einmal
// rights here again
@@ -619,7 +619,7 @@ SbxAlias::~SbxAlias()
void SbxAlias::Broadcast( sal_uIntPtr nHt )
{
- if( xAlias.Is() && StaticIsEnabledBroadcasting() )
+ if( xAlias.Is() )
{
xAlias->SetParameters( GetParameters() );
if( nHt == SBX_HINT_DATAWANTED )
commit 97f2f76452dd116090e513239ca656bd432494d7
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Nov 4 21:52:16 2011 +0000
callcatcher: update and remove some more unused methods
diff --git a/basic/inc/basic/sbxcore.hxx b/basic/inc/basic/sbxcore.hxx
index fa3c576..3d42535 100644
--- a/basic/inc/basic/sbxcore.hxx
+++ b/basic/inc/basic/sbxcore.hxx
@@ -135,7 +135,6 @@ public:
static SbxBase* Create( sal_uInt16, sal_uInt32=SBXCR_SBX );
static SbxObject* CreateObject( const String& );
// Sbx solution as replacement for SfxBroadcaster::Enable()
- static void StaticEnableBroadcasting( sal_Bool bEnable );
static sal_Bool StaticIsEnabledBroadcasting( void );
};
diff --git a/basic/source/sbx/sbxbase.cxx b/basic/source/sbx/sbxbase.cxx
index 79c593e..718fa0e 100644
--- a/basic/source/sbx/sbxbase.cxx
+++ b/basic/source/sbx/sbxbase.cxx
@@ -248,18 +248,11 @@ SbxObject* SbxBase::CreateObject( const XubString& rClass )
static sal_Bool bStaticEnableBroadcasting = sal_True;
-// Sbx-Solution in exchange for SfxBroadcaster::Enable()
-void SbxBase::StaticEnableBroadcasting( sal_Bool bEnable )
-{
- bStaticEnableBroadcasting = bEnable;
-}
-
sal_Bool SbxBase::StaticIsEnabledBroadcasting( void )
{
return bStaticEnableBroadcasting;
}
-
SbxBase* SbxBase::Load( SvStream& rStrm )
{
sal_uInt16 nSbxId, nFlags, nVer;
diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx
index 7e21ba8..5daecd5 100644
--- a/sc/inc/column.hxx
+++ b/sc/inc/column.hxx
@@ -300,7 +300,6 @@ public:
void UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY );
void SetTabNo(SCTAB nNewTab);
- bool IsRangeNameInUse(SCROW nRow1, SCROW nRow2, sal_uInt16 nIndex) const;
void FindRangeNamesInUse(SCROW nRow1, SCROW nRow2, std::set<sal_uInt16>& rIndexes) const;
void ReplaceRangeNamesInUse( SCROW nRow1, SCROW nRow2, const ScRangeData::IndexMap& rMap );
@@ -375,9 +374,6 @@ public:
double nPPTX, double nPPTY,
const Fraction& rZoomX, const Fraction& rZoomY,
bool bShrink, sal_uInt16 nMinHeight, SCROW nMinStart );
-private:
- long GetSimpleTextNeededSize( SCSIZE nIndex, OutputDevice* pDev,
- bool bWidth );
public:
/// Including current, may return -1
diff --git a/sc/inc/externalrefmgr.hxx b/sc/inc/externalrefmgr.hxx
index 7de8232..15d5b92 100644
--- a/sc/inc/externalrefmgr.hxx
+++ b/sc/inc/externalrefmgr.hxx
@@ -529,12 +529,6 @@ public:
void setAllCacheTableReferencedStati( bool bReferenced );
/**
- * Set a table as permanently referenced, to be called if not in
- * mark-during-store-to-file cycle.
- */
- void setCacheTableReferencedPermanently( sal_uInt16 nFileId, const ::rtl::OUString& rTabName, size_t nSheets );
-
- /**
* @returns <TRUE/> if setAllCacheTableReferencedStati(false) was called,
* <FALSE/> if setAllCacheTableReferencedStati(true) was called.
*/
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
index fc1178f..df3276b 100644
--- a/sc/source/core/data/column.cxx
+++ b/sc/source/core/data/column.cxx
@@ -1852,19 +1852,6 @@ void ScColumn::SetTabNo(SCTAB nNewTab)
}
}
-
-bool ScColumn::IsRangeNameInUse(SCROW nRow1, SCROW nRow2, sal_uInt16 nIndex) const
-{
- bool bInUse = false;
- if (pItems)
- for (SCSIZE i = 0; !bInUse && (i < nCount); i++)
- if ((pItems[i].nRow >= nRow1) &&
- (pItems[i].nRow <= nRow2) &&
- (pItems[i].pCell->GetCellType() == CELLTYPE_FORMULA))
- bInUse = ((ScFormulaCell*)pItems[i].pCell)->IsRangeNameInUse(nIndex);
- return bInUse;
-}
-
void ScColumn::FindRangeNamesInUse(SCROW nRow1, SCROW nRow2, std::set<sal_uInt16>& rIndexes) const
{
if (pItems)
diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index 83ecd3c..ccd73db 100644
--- a/sc/source/core/data/column2.cxx
+++ b/sc/source/core/data/column2.cxx
@@ -524,32 +524,6 @@ long ScColumn::GetNeededSize( SCROW nRow, OutputDevice* pDev,
return nValue;
}
-long ScColumn::GetSimpleTextNeededSize( SCSIZE nIndex, OutputDevice* pDev,
- bool bWidth )
-{
- long nValue=0;
- if ( nIndex < nCount )
- {
- SCROW nRow = pItems[nIndex].nRow;
- const ScPatternAttr* pPattern = pAttrArray->GetPattern( nRow );
- ScBaseCell* pCell = pItems[nIndex].pCell;
- String aValStr;
- Color* pColor;
- SvNumberFormatter* pFormatter = pDocument->GetFormatTable();
- sal_uInt32 nFormat = pPattern->GetNumberFormat( pFormatter );
- ScCellFormat::GetString( pCell, nFormat, aValStr, &pColor,
- *pFormatter, true, false, ftCheck );
- if ( aValStr.Len() )
- {
- if ( bWidth )
- nValue = pDev->GetTextWidth( aValStr );
- else
- nValue = pDev->GetTextHeight();
- }
- }
- return nValue;
-}
-
sal_uInt16 ScColumn::GetOptimalColWidth( OutputDevice* pDev, double nPPTX, double nPPTY,
const Fraction& rZoomX, const Fraction& rZoomY,
bool bFormula, sal_uInt16 nOldWidth,
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index f218b8b..e8be035 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -4481,34 +4481,6 @@ bool ScDocFunc::ModifyRangeNames( const ScRangeName& rNewRanges, SCTAB nTab )
return SetNewRangeNames( new ScRangeName(rNewRanges), true, nTab );
}
-void ScDocFunc::ModifyAllRangeNames( const ScRangeName* pGlobal, const ScRangeName::TabNameCopyMap& rTabs )
-{
- ScDocShellModificator aModificator(rDocShell);
- ScDocument* pDoc = rDocShell.GetDocument();
-
- if (pDoc->IsUndoEnabled())
- {
- ScRangeName* pOldGlobal = pDoc->GetRangeName();
- ScRangeName::TabNameCopyMap aOldLocals;
- pDoc->GetAllTabRangeNames(aOldLocals);
- rDocShell.GetUndoManager()->AddUndoAction(
- new ScUndoAllRangeNames(&rDocShell, pOldGlobal, pGlobal, aOldLocals, rTabs));
- }
-
- pDoc->CompileNameFormula(true);
-
- // global names
- pDoc->SetRangeName(new ScRangeName(*pGlobal));
-
- // sheet-local names
- pDoc->SetAllTabRangeNames(rTabs);
-
- pDoc->CompileNameFormula(false);
-
- aModificator.SetDocumentModified();
- SFX_APP()->Broadcast(SfxSimpleHint(SC_HINT_AREAS_CHANGED));
-}
-
bool ScDocFunc::SetNewRangeNames( ScRangeName* pNewRanges, bool bModifyDoc, SCTAB nTab ) // takes ownership of pNewRanges
{
ScDocShellModificator aModificator( rDocShell );
diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx
index 408feb6..6f6e64e 100644
--- a/sc/source/ui/docshell/externalrefmgr.cxx
+++ b/sc/source/ui/docshell/externalrefmgr.cxx
@@ -1637,16 +1637,6 @@ bool ScExternalRefManager::setCacheTableReferenced( sal_uInt16 nFileId, const OU
return maRefCache.setCacheTableReferenced( nFileId, rTabName, nSheets, false);
}
-void ScExternalRefManager::setCacheTableReferencedPermanently( sal_uInt16 nFileId, const OUString& rTabName, size_t nSheets )
-{
- if (isInReferenceMarking())
- // Do all maintenance work.
- maRefCache.setCacheTableReferenced( nFileId, rTabName, nSheets, true);
- else
- // Set only the permanent flag.
- maRefCache.setCacheTableReferencedPermanently( nFileId, rTabName, nSheets);
-}
-
void ScExternalRefManager::setAllCacheTableReferencedStati( bool bReferenced )
{
mbInReferenceMarking = !bReferenced;
diff --git a/sc/source/ui/inc/docfunc.hxx b/sc/source/ui/inc/docfunc.hxx
index ec5925a..972ed94 100644
--- a/sc/source/ui/inc/docfunc.hxx
+++ b/sc/source/ui/inc/docfunc.hxx
@@ -185,17 +185,6 @@ public:
bool SetNewRangeNames( ScRangeName* pNewRanges, bool bModifyDoc = true, SCTAB nTab = -1 ); // takes ownership of pNewRanges //nTab = -1 for local range names
bool ModifyRangeNames( const ScRangeName& rNewRanges, SCTAB nTab = -1 );
- /**
- * Modify all range names, global scope names as well as sheet local ones,
- * in one go. Note that this method will <b>not</b> destroy the instances
- * passed as arguments (it creates copies); the caller is responsible for
- * destroying them.
- *
- * @param pGlobal global scope range names.
- * @param rTabs sheet local range names.
- */
- void ModifyAllRangeNames( const ScRangeName* pGlobal, const ScRangeName::TabNameCopyMap& rTabs );
-
sal_Bool CreateNames( const ScRange& rRange, sal_uInt16 nFlags, sal_Bool bApi, SCTAB nTab = -1 ); // -1 for global range names
sal_Bool InsertNameList( const ScAddress& rStartPos, sal_Bool bApi );
diff --git a/unusedcode.easy b/unusedcode.easy
index c041ca0..50f9025 100644
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -7,11 +7,51 @@ AtomPubSession::~AtomPubSession()
BufferNode::childAt(int) const
ByteString::Assign(char const*, unsigned short)
ByteString::Assign(char)
+CAT::Apply(float*, float const*) const
CAT::Inverse() const
CAT::makeChromaticAdaptationTag() const
-CLUT::Iterate(IIccCLUTExec*)
-CLUT::adaptedXYZToMeasuredXYZ(float*, float const*, float const*, float, CAT const*)
-CLUT::makeAToBxTag(unsigned int, float const*, float const*, float const*, CAT const*, float, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, float const*, bool)
+CIccCLUT::Interp3dTetra(float*, float const*)
+CIccCLUT::Iterate(IIccCLUTExec*)
+CIccFormulaCurveSegment::SetFunction(unsigned short, unsigned char, float*)
+CIccIO::ReadLine(void*, int)
+CIccInfo::GetSpotShapeName(icSpotShape)
+CIccMBB::Init(unsigned char, unsigned char)
+CIccMBB::NewCLUT(unsigned char*, unsigned char)
+CIccMBB::NewCLUT(unsigned char, unsigned char)
+CIccMemIO::Alloc(unsigned int, bool)
+CIccMpeCLUT::SetCLUT(CIccCLUT*)
+CIccMpeCreator::DoGetElementSigName(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, icElemTypeSignature)
+CIccMpeCurveSet::SetCurve(int, CIccCurveSetCurve*)
+CIccProfile::DeleteTag(unsigned int)
+CIccProfile::Detach()
+CIccProfile::GetSpaceSamples() const
+CIccProfileIdDesc::CIccProfileIdDesc(CIccProfile&)
+CIccProfileIdDesc::CIccProfileIdDesc(icProfileID, CIccTagMultiLocalizedUnicode)
+CIccSegmentedCurve::Insert(CIccCurveSegment*)
+CIccTagCurve::SetGamma(float)
+CIccTagFixedNum<int, (icTagTypeSignature)1936077618>::GetSize() const
+CIccTagFixedNum<unsigned int, (icTagTypeSignature)1969632050>::GetSize() const
+CIccTagMultiLocalizedUnicode::SetText(unsigned short const*, unsigned short, unsigned short)
+CIccTagMultiProcessElement::GetElement(int)
+CIccTagNamedColor2::FindColor(char const*)
+CIccTagNamedColor2::FindDeviceColor(float*)
+CIccTagNamedColor2::FindPCSColor(float*, float)
+CIccTagNamedColor2::FindRootColor(char const*)
+CIccTagNamedColor2::GetColorName(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, int)
+CIccTagNamedColor2::Lab4ToLab2(float*, float const*)
+CIccTagNamedColor2::NegClip(float)
+CIccTagNum<unsigned char, (icTagTypeSignature)1969827896>::GetSize() const
+CIccTagNum<unsigned int, (icTagTypeSignature)1969828658>::GetSize() const
+CIccTagNum<unsigned long, (icTagTypeSignature)1969829428>::GetSize() const
+CIccTagNum<unsigned short, (icTagTypeSignature)1969828150>::GetSize() const
+CIccTagProfileSequenceId::AddProfileDescription(CIccProfileIdDesc const&)
+CIccTagProfileSequenceId::GetFirst()
+CIccTagProfileSequenceId::GetLast()
+CIccTagProfileSequenceId::ParseMem(unsigned char*, unsigned int)
+CIccTagResponseCurveSet16::GetFirstCurves()
+CIccTagResponseCurveSet16::GetNextCurves()
+CIccTagResponseCurveSet16::NewResponseCurves(icMeasurementUnitSig)
+CIccTagResponseCurveSet16::SetNumChannels(unsigned short)
CNames::Insert(CNames const*, unsigned short, unsigned short)
CNames::Insert(ControlItem const*&, unsigned short&)
CNames::Insert(ControlItem const**, unsigned short)
@@ -364,7 +404,6 @@ ScAreaLinkSaveCollection::clear()
ScAttrArray::HasLines(int, int, Rectangle&, unsigned char, unsigned char) const
ScCellMergeOption::ScCellMergeOption()
ScChangeActionContent::SetNewValue(String const&, ScDocument*)
-ScColumn::GetSimpleTextNeededSize(unsigned long, OutputDevice*, bool)
ScCompressedArray<int, unsigned char>::GetEntryCount() const
ScCompressedArray<int, unsigned short>::CopyFrom(ScCompressedArray<int, unsigned short> const&, int, int, long)
ScCompressedArray<int, unsigned short>::GetValue(int) const
@@ -394,13 +433,8 @@ ScDPItemData::CreateTypeString()
ScDPItemData::GetNumFormat() const
ScDPSaveData::Refresh(com::sun::star::uno::Reference<com::sun::star::sheet::XDimensionsSupplier> const&)
ScDdeLink::ResetValue()
-ScDocFunc::ModifyAllRangeNames(ScRangeName const*, std::__debug::map<short, ScRangeName const*, std::less<short>, std::allocator<std::pair<short const, ScRangeName const*> > > const&)
ScDocRowHeightUpdater::TabRanges::TabRanges()
-ScDocument::HasControl(short, Rectangle const&)
-ScDocument::InvalidateControls(Window*, short, Rectangle const&)
-ScDocument::IsLoadingMedium() const
ScDocument::ValidNewTabName(std::__debug::vector<String, std::allocator<String> > const&) const
-ScExternalRefManager::setCacheTableReferencedPermanently(unsigned short, rtl::OUString const&, unsigned long)
ScFilterDetect::impl_createFactory(com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory> const&)
ScFiltersTest::testPassword()
ScFormulaCell::ScFormulaCell()
@@ -1349,8 +1383,6 @@ _ZSortFlys_SAR::_ForEach(unsigned short, unsigned short, unsigned char (*)(_ZSor
avmedia::priv::MediaWindowBaseImpl::getStopTime() const
avmedia::priv::MediaWindowBaseImpl::setRate(double)
avmedia::priv::MediaWindowBaseImpl::setStopTime(double)
-basebmp::BitmapDevice::getPaletteEntryCount() const
-basebmp::BitmapDevice::getPixelData(basegfx::B2IPoint const&)
basebmp::BitmapDevice::setDamageTracker(boost::shared_ptr<basebmp::IBitmapDeviceDamageTracker> const&)
basebmp::debugDump(boost::shared_ptr<basebmp::BitmapDevice> const&, std::basic_ostream<char, std::char_traits<char> >&)
basegfx::B1DRange::B1DRange(basegfx::B1IRange const&)
More information about the Libreoffice-commits
mailing list