[Libreoffice-commits] .: 14 commits - basic/inc basic/Library_sb.mk basic/source connectivity/source dbaccess/source idl/inc idl/source l10ntools/inc l10ntools/source sc/source sfx2/inc sfx2/source svl/source svtools/inc svtools/source unusedcode.easy vcl/generic vcl/inc vcl/source vcl/unx
Caolán McNamara
caolan at kemper.freedesktop.org
Tue Dec 13 02:12:19 PST 2011
basic/Library_sb.mk | 1
basic/inc/basic/sbdef.hxx | 49 -
basic/inc/basic/sbmod.hxx | 1
basic/inc/basic/sbstar.hxx | 1
basic/source/classes/disas.cxx | 642 ------------------------
basic/source/classes/sb.cxx | 4
basic/source/comp/sbcomp.cxx | 15
basic/source/comp/scanner.cxx | 3
basic/source/comp/token.cxx | 44 -
basic/source/inc/disas.hxx | 73 --
basic/source/inc/scanner.hxx | 1
basic/source/inc/token.hxx | 2
connectivity/source/drivers/dbase/DIndex.cxx | 2
dbaccess/source/core/resource/core_resource.cxx | 4
idl/inc/slot.hxx | 2
idl/inc/types.hxx | 14
idl/source/objects/slot.cxx | 6
idl/source/objects/types.cxx | 18
l10ntools/inc/lngmerge.hxx | 2
l10ntools/source/lngmerge.cxx | 21
sc/source/ui/unoobj/chart2uno.cxx | 5
sfx2/inc/sfx2/basedlgs.hxx | 5
sfx2/source/dialog/basedlgs.cxx | 1
svl/source/filepicker/pickerhistory.cxx | 18
svtools/inc/svtools/fixedhyper.hxx | 91 ---
svtools/inc/svtools/taskbar.hxx | 4
svtools/inc/svtools/ttprops.hxx | 1
svtools/source/control/fixedhyper.cxx | 82 ---
svtools/source/control/roadmap.cxx | 8
svtools/source/control/taskstat.cxx | 64 --
svtools/source/dialogs/filedlg2.cxx | 34 -
svtools/source/dialogs/filedlg2.hxx | 4
svtools/source/plugapp/ttprops.cxx | 12
unusedcode.easy | 51 -
vcl/generic/fontmanager/fontmanager.cxx | 30 -
vcl/inc/vcl/splitwin.hxx | 1
vcl/inc/vcl/status.hxx | 4
vcl/source/window/splitwin.cxx | 42 -
vcl/source/window/status.cxx | 48 -
vcl/unx/generic/printer/ppdparser.cxx | 8
vcl/unx/generic/printer/printerinfomanager.cxx | 18
41 files changed, 66 insertions(+), 1370 deletions(-)
New commits:
commit 70c315620e09113026a07982884e8e222973afe5
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Dec 13 09:30:20 2011 +0000
unused inline RemoveStatusField
diff --git a/svtools/inc/svtools/taskbar.hxx b/svtools/inc/svtools/taskbar.hxx
index c60a0aa..c776e0d 100644
--- a/svtools/inc/svtools/taskbar.hxx
+++ b/svtools/inc/svtools/taskbar.hxx
@@ -69,7 +69,6 @@ Liefert die Position zurueck, wo das Contextmenu angezeigt werden soll.
TaskStatusBar
=============
-InsertStatusField()/RemoveStatusField()
Fuegt ein Statusfeld ein, wo die aktuelle Uhrzeit angezeigt wird. In
dieses Feld koennen dann mit AddStatusFielItem(), ModifyStatusFielItem()
und RemoveStatusFielItem() Status-Items eingefuegt werden. Bei diesen
@@ -305,8 +304,6 @@ public:
virtual void RequestHelp( const HelpEvent& rHEvt );
virtual void UserDraw( const UserDrawEvent& rUDEvt );
- void RemoveStatusField()
- { maTimer.Stop(); RemoveItem( TASKSTATUSBAR_STATUSFIELDID ); }
sal_uInt16 GetFieldFlags() const { return mnFieldFlags; }
void SetNotifyObject( ITaskStatusNotify* pNotify ) { mpNotify = pNotify; }
ITaskStatusNotify* GetNotifyObject() const { return mpNotify; }
commit 220b97fd143da72a8c9f56cdee30bb31e7180a07
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Dec 13 09:16:54 2011 +0000
SbTextPortions, etc can completely go
diff --git a/basic/inc/basic/sbdef.hxx b/basic/inc/basic/sbdef.hxx
index 513f241..baa8d50 100644
--- a/basic/inc/basic/sbdef.hxx
+++ b/basic/inc/basic/sbdef.hxx
@@ -64,48 +64,6 @@ struct SbTextPortion
SbTextType eType; // Type of the portion
};
-typedef sal_Bool (*FnForEach_SbTextPortions)( const SbTextPortion &, void* );
-class BASIC_DLLPUBLIC SbTextPortions
-{
-protected:
- SbTextPortion *pData;
- sal_uInt16 nFree;
- sal_uInt16 nA;
-
- void _resize(size_t n);
-
-public:
- SbTextPortions( sal_uInt16= 16, sal_uInt8= 16 );
- ~SbTextPortions() { rtl_freeMemory( pData ); }
-
- _SVVARARR_DEF_GET_OP_INLINE(SbTextPortions, SbTextPortion )
- SbTextPortion & GetObject(sal_uInt16 nP) const { return (*this)[nP]; }
-
- void Insert( const SbTextPortion & aE, sal_uInt16 nP );
- void Insert( const SbTextPortion *pE, sal_uInt16 nL, sal_uInt16 nP );
- void Remove( sal_uInt16 nP, sal_uInt16 nL = 1 );
- void Replace( const SbTextPortion & aE, sal_uInt16 nP );
- void Replace( const SbTextPortion *pE, sal_uInt16 nL, sal_uInt16 nP );
- sal_uInt16 Count() const { return nA; }
- const SbTextPortion* GetData() const { return (const SbTextPortion*)pData; }
-
- void ForEach( CONCAT( FnForEach_, SbTextPortions ) fnForEach, void* pArgs = 0 )
- {
- _ForEach( 0, nA, fnForEach, pArgs );
- }
- void ForEach( sal_uInt16 nS, sal_uInt16 nE,
- CONCAT( FnForEach_, SbTextPortions ) fnForEach, void* pArgs = 0 )
- {
- _ForEach( nS, nE, fnForEach, pArgs );
- }
-
- void _ForEach( sal_uInt16 nStt, sal_uInt16 nE,
- CONCAT( FnForEach_, SbTextPortions ) fnCall, void* pArgs = 0 );
-private:
- BASIC_DLLPRIVATE SbTextPortions( const SbTextPortions& );
- BASIC_DLLPRIVATE SbTextPortions& operator=( const SbTextPortions& );
-};
-
// Returns type name for Basic type, array flag is ignored
// implementation: basic/source/runtime/methods.cxx
BASIC_DLLPUBLIC String getBasicTypeName( SbxDataType eType );
diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx
index 85cc410..7214987 100644
--- a/basic/source/classes/sb.cxx
+++ b/basic/source/classes/sb.cxx
@@ -63,8 +63,6 @@
#include <com/sun/star/script/ModuleInfo.hpp>
using namespace ::com::sun::star::script;
-SV_IMPL_VARARR(SbTextPortions,SbTextPortion)
-
TYPEINIT1(StarBASIC,SbxObject)
#define RTLNAME "@SBRTL"
diff --git a/svtools/source/dialogs/filedlg2.cxx b/svtools/source/dialogs/filedlg2.cxx
index 4bad2d5..319848f 100644
--- a/svtools/source/dialogs/filedlg2.cxx
+++ b/svtools/source/dialogs/filedlg2.cxx
@@ -1168,29 +1168,6 @@ void ImpFileDialog::SetPath( Edit const& rEdit )
SetPath( aPresetText );
}
-void ImpFileDialog::SetCurFilter( const UniString& rFilter )
-{
- if( !pTypeList )
- return;
-
- for ( size_t i = 0, n = aFilterList.size(); i < n; ++i ) {
- if ( aFilterList[ i ]->aName == rFilter ) {
- pTypeList->SelectEntryPos( sal_uInt16( i ) );
- return;
- }
- }
-
- pTypeList->SetNoSelection();
-}
-
-UniString ImpFileDialog::GetCurFilter() const
-{
- UniString aFilter;
- if ( pTypeList )
- aFilter = pTypeList->GetSelectEntry();
- return aFilter;
-}
-
void ImpFileDialog::PreExecute()
{
// ListBoxen erst unmittelbar vor Execute fuellen
diff --git a/svtools/source/dialogs/filedlg2.hxx b/svtools/source/dialogs/filedlg2.hxx
index 694fa01..39edd05 100644
--- a/svtools/source/dialogs/filedlg2.hxx
+++ b/svtools/source/dialogs/filedlg2.hxx
@@ -158,9 +158,6 @@ public:
ImpFileDialog( PathDialog* pDlg, WinBits nStyle, RESOURCE_TYPE nType );
virtual ~ImpFileDialog();
- void SetCurFilter( const String& rFilter );
- String GetCurFilter() const;
-
size_t GetFilterCount() const { return aFilterList.size(); }
inline String GetFilterName( size_t nPos ) const;
inline String GetFilterType( size_t nPos ) const;
diff --git a/unusedcode.easy b/unusedcode.easy
index f2482b3..c84d3f1 100644
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -277,12 +277,6 @@ SalI18N_InputContext::SetPreeditState(int)
SanExtensionImpl::extractCertExt()
SanExtensionImpl::setCertExtn(com::sun::star::uno::Sequence<signed char>, com::sun::star::uno::Sequence<signed char>, unsigned char)
SanExtensionImpl::setCertExtn(unsigned char*, unsigned int, unsigned char*, unsigned int, unsigned char)
-SbTextPortions::Insert(SbTextPortions const*, unsigned short, unsigned short, unsigned short)
-SbTextPortions::Remove(unsigned short, unsigned short)
-SbTextPortions::Replace(SbTextPortion const&, unsigned short)
-SbTextPortions::Replace(SbTextPortion const*, unsigned short, unsigned short)
-SbTextPortions::SbTextPortions(unsigned short, unsigned char)
-SbTextPortions::_ForEach(unsigned short, unsigned short, unsigned char (*)(SbTextPortion const&, void*), void*)
SbiExprNode::IsString()
SbiExpression::SbiExpression(SbiParser*, SbiToken)
SbiExpression::SbiExpression(SbiParser*, String const&)
diff --git a/vcl/inc/vcl/status.hxx b/vcl/inc/vcl/status.hxx
index 19a4801..52d2863 100644
--- a/vcl/inc/vcl/status.hxx
+++ b/vcl/inc/vcl/status.hxx
@@ -140,7 +140,6 @@ public:
StatusBarItemBits nBits = SIB_CENTER | SIB_IN,
long nOffset = STATUSBAR_OFFSET,
sal_uInt16 nPos = STATUSBAR_APPEND );
- void RemoveItem( sal_uInt16 nItemId );
sal_Bool IsItemVisible( sal_uInt16 nItemId ) const;
sal_Bool AreItemsVisible() const { return mbVisibleItems; }
@@ -155,8 +154,6 @@ public:
Point GetItemTextPos( sal_uInt16 nItemId ) const;
sal_uInt16 GetCurItemId() const { return mnCurItemId; }
- long GetItemOffset( sal_uInt16 nItemId ) const;
-
void SetItemText( sal_uInt16 nItemId, const XubString& rText );
const XubString& GetItemText( sal_uInt16 nItemId ) const;
diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx
index 9ce138a..f048719 100644
--- a/vcl/source/window/status.cxx
+++ b/vcl/source/window/status.cxx
@@ -1018,24 +1018,6 @@ void StatusBar::InsertItem( sal_uInt16 nItemId, sal_uLong nWidth,
// -----------------------------------------------------------------------
-void StatusBar::RemoveItem( sal_uInt16 nItemId )
-{
- sal_uInt16 nPos = GetItemPos( nItemId );
- if ( nPos != STATUSBAR_ITEM_NOTFOUND )
- {
- delete (*mpItemList)[ nPos ];
- mpItemList->erase( mpItemList->begin() + nPos );
-
- mbFormat = sal_True;
- if ( ImplIsItemUpdate() )
- Invalidate();
-
- ImplCallEventListeners( VCLEVENT_STATUSBAR_ITEMREMOVED, (void*) sal_IntPtr(nItemId) );
- }
-}
-
-// -----------------------------------------------------------------------
-
sal_Bool StatusBar::IsItemVisible( sal_uInt16 nItemId ) const
{
sal_uInt16 nPos = GetItemPos( nItemId );
@@ -1169,18 +1151,6 @@ Point StatusBar::GetItemTextPos( sal_uInt16 nItemId ) const
// -----------------------------------------------------------------------
-long StatusBar::GetItemOffset( sal_uInt16 nItemId ) const
-{
- sal_uInt16 nPos = GetItemPos( nItemId );
-
- if ( nPos != STATUSBAR_ITEM_NOTFOUND )
- return (*mpItemList)[ nPos ]->mnOffset;
-
- return 0;
-}
-
-// -----------------------------------------------------------------------
-
void StatusBar::SetItemText( sal_uInt16 nItemId, const XubString& rText )
{
sal_uInt16 nPos = GetItemPos( nItemId );
commit 0d486af418b8141ffe25f05a33570abd1e93d13e
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Dec 13 09:15:02 2011 +0000
_BASIC_TEXTPORTIONS always defined
diff --git a/basic/inc/basic/sbdef.hxx b/basic/inc/basic/sbdef.hxx
index 90ef1d4..513f241 100644
--- a/basic/inc/basic/sbdef.hxx
+++ b/basic/inc/basic/sbdef.hxx
@@ -36,8 +36,6 @@
using rtl::OUString;
-#define _BASIC_TEXTPORTIONS
-
// Type of a text token (syntax highlighting)
enum SbTextType
{
@@ -59,7 +57,6 @@ enum SbLanguageMode
SB_LANG_JAVASCRIPT // JavaScript
};
-#ifdef _BASIC_TEXTPORTIONS
struct SbTextPortion
{ // Syntax Highlighting: a text portion
xub_StrLen nLine; // Line number
@@ -109,10 +106,6 @@ private:
BASIC_DLLPRIVATE SbTextPortions& operator=( const SbTextPortions& );
};
-#else
-class SbTextPortions;
-#endif
-
// Returns type name for Basic type, array flag is ignored
// implementation: basic/source/runtime/methods.cxx
BASIC_DLLPUBLIC String getBasicTypeName( SbxDataType eType );
diff --git a/basic/inc/basic/sbstar.hxx b/basic/inc/basic/sbstar.hxx
index 4efb5ec..6a27ebe 100644
--- a/basic/inc/basic/sbstar.hxx
+++ b/basic/inc/basic/sbstar.hxx
@@ -45,7 +45,6 @@ class SbiInstance; // runtime instance
class SbiRuntime; // currently running procedure
class SbiImage; // compiled image
class BasicLibInfo; // info block for basic manager
-class SbTextPortions;
class SbMethod;
class BasicManager;
class DocBasicItem;
commit a15cdba6efb0c4ddb563b538cccdd78d8722a986
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Dec 13 09:12:50 2011 +0000
disassembler unused
diff --git a/basic/Library_sb.mk b/basic/Library_sb.mk
index 5f5d3db..04dad27 100644
--- a/basic/Library_sb.mk
+++ b/basic/Library_sb.mk
@@ -68,7 +68,6 @@ $(eval $(call gb_Library_add_exception_objects,sb,\
basic/source/basmgr/basicmanagerrepository \
basic/source/basmgr/basmgr \
basic/source/basmgr/vbahelper \
- basic/source/classes/disas \
basic/source/classes/errobject \
basic/source/classes/eventatt \
basic/source/classes/image \
diff --git a/basic/source/classes/disas.cxx b/basic/source/classes/disas.cxx
deleted file mode 100644
index 101ed3d..0000000
--- a/basic/source/classes/disas.cxx
+++ /dev/null
@@ -1,630 +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 2000, 2010 Oracle and/or its affiliates.
- *
- * 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.
- *
- ************************************************************************/
-
-
-#include <stdio.h>
-#include <string.h>
-#include <tools/stream.hxx>
-#include <basic/sbx.hxx>
-#include "sb.hxx"
-#include "iosys.hxx"
-#include "disas.hxx"
-
-
-static const char* pOp1[] = {
- "NOP",
-
- // Operators
- // the following operators have the same order as in
- // enum SbxVarOp
- "EXP", "MUL", "DIV", "MOD", "PLUS", "MINUS", "NEG",
- "EQ", "NE", "LT", "GT", "LE", "GE",
- "IDIV", "AND", "OR", "XOR", "EQV", "IMP", "NOT",
- "CAT",
- // End enum SbxVarOp
- "LIKE", "IS",
- // Load/Store
- "ARGC", // Create new Argv
- "ARGV", // TOS ==> current Argv
- "INPUT", // Input ==> TOS
- "LINPUT", // Line Input ==> TOS
- "GET", // get TOS
- "SET", // Save Object TOS ==> TOS-1
- "PUT", // TOS ==> TOS-1
- "CONST", // TOS ==> TOS-1, then ReadOnly
- "DIM", // DIM
- "REDIM", // REDIM
- "REDIMP", // REDIM PRESERVE
- "ERASE", // delete TOS
- // Branch
- "STOP", // End of program
- "INITFOR", // FOR-Variable init
- "NEXT", // FOR-Variable increment
- "CASE", // Begin CASE
- "ENDCASE", // End CASE
- "STDERR", // Default error handling
- "NOERROR", // No error handling
- "LEAVE", // leave UP
- // I/O
- "CHANNEL", // TOS = Channelnumber
- "PRINT", // print TOS
- "PRINTF", // print TOS in field
- "WRITE", // write TOS
- "RENAME", // Rename Tos+1 to Tos
- "PROMPT", // TOS = Prompt for Input
- "RESTART", // Define restart point
- "STDIO", // Switch to I/O channel 0
- // Misc
- "EMPTY", // Empty statement to stack
- "ERROR", // TOS = error code
- "LSET", // Save object TOS ==> TOS-1
- "RSET", // Save object TOS ==> TOS-1 (TODO: Same as above?)
- "REDIMP_ERASE",
- "INITFOREACH",
- "VBASET",
- "ERASE_CLEAR",
- "ARRAYACCESS",
- "BYVAL"
-};
-
-static const char* pOp2[] = {
- "NUMBER", // Load a numeric constant (+ID)
- "STRING", // Load a string constant (+ID)
- "CONSTANT", // Immediate Load (+value)
- "ARGN", // Save named args in argv (+StringID)
- "PAD", // Pad String to defined length (+length)
- // Branches
- "JUMP", // Jump to target (+Target)
- "JUMP.T", // evaluate TOS, conditional jump (+Target)
- "JUMP.F", // evaluate TOS, conditional jump (+Target)
- "ONJUMP", // evaluate TOS, jump into JUMP-table (+MaxVal)
- "GOSUB", // UP-Call (+Target)
- "RETURN", // UP-Return (+0 or Target)
- "TESTFOR", // Test FOR-Variable, increment (+Endlabel)
- "CASETO", // Tos+1 <= Case <= Tos, 2xremove (+Target)
- "ERRHDL", // Error-Handler (+Offset)
- "RESUME", // Resume after errors (+0 or 1 or Label)
- // I/O
- "CLOSE", // (+channel/0)
- "PRCHAR", // (+char)
- // Objects
- "SETCLASS", // Test Set + Classname (+StringId)
- "TESTCLASS", // Check TOS class (+StringId)
- "LIB", // Set Libname for Declare-Procs (+StringId)
- // New since Beta 3 (TODO: Which Beta3?)
- "BASED", // TOS is incremted about BASE, push BASE before
- "ARGTYP", // Convert last parameter in argv (+Type)
- "VBASETCLASS",
-};
-
-static const char* pOp3[] = {
- // All opcodes with two operands
- "RTL", // Load from RTL (+StringID+Typ)
- "FIND", // Load (+StringID+Typ)
- "ELEM", // Load element (+StringID+Typ)
- "PARAM", // Parameter (+Offset+Typ)
-
- // Branching
- "CALL", // Call DECLARE method (+StringID+Typ)
- "CALL.C", // Call Cdecl-DECLARE method (+StringID+Typ)
- "CASEIS", // Case-Test (+Test-Opcode+False-Target)
- "STMNT", // Start of a statement (+Line+Col)
-
- // I/O
- "OPEN", // (+SvStreamFlags+Flags)
-
- // Objects and variables
- "LOCAL", // Local variables (+StringID+Typ)
- "PUBLIC", // Modul global var (+StringID+Typ)
- "GLOBAL", // Global var (+StringID+Typ)
- "CREATE", // Create object (+StringId+StringId)
- "STATIC", // Create static object (+StringId+StringId)
- "TCREATE", // Create User defined Object (+StringId+StringId)
- "DCREATE", // Create User defined Object-Array kreieren (+StringId+StringId)
- "GLOBAL_P", // Define persistent global var (existing after basic restart)
- // P=PERSIST (+StringID+Typ)
- "FIND_G", // Searches for global var with special handling due to _GLOBAL_P
- "DCREATE_REDIMP", // Change dimensions of a user defined Object-Array (+StringId+StringId)
- "FIND_CM", // Search inside a class module (CM) to enable global search in time
- "PUBLIC_P", // Module global Variable (persisted between calls)(+StringID+Typ)
- "FIND_STATIC", // local static var lookup (+StringID+Typ)
-};
-
-static const char** pOps[3] = { pOp1, pOp2, pOp3 };
-
-typedef void( SbiDisas::*Func )( String& ); // Processing routines
-
-static const Func pOperand2[] = {
- &SbiDisas::StrOp, // Load a numeric constant (+ID)
- &SbiDisas::StrOp, // Load a string constant (+ID)
- &SbiDisas::ImmOp, // Immediate Load (+Wert)
- &SbiDisas::StrOp, // Save a named argument (+ID)
- &SbiDisas::ImmOp, // Strip String to fixed size (+length)
-
- // Branches
- &SbiDisas::LblOp, // Jump (+Target)
- &SbiDisas::LblOp, // eval TOS, conditional jump (+Target)
- &SbiDisas::LblOp, // eval TOS, conditional jump (+Target)
- &SbiDisas::OnOp, // eval TOS, jump in JUMP table (+MaxVal)
- &SbiDisas::LblOp, // UP call (+Target)
- &SbiDisas::ReturnOp, // UP Return (+0 or Target)
- &SbiDisas::LblOp, // test FOR-Variable, increment (+Endlabel)
- &SbiDisas::LblOp, // Tos+1 <= Case <= Tos), 2xremove (+Target)
- &SbiDisas::LblOp, // Error handler (+Offset)
- &SbiDisas::ResumeOp, // Resume after errors (+0 or 1 or Label)
-
- // I/O
- &SbiDisas::CloseOp, // (+channel/0)
- &SbiDisas::CharOp, // (+char)
-
- // Objects
- &SbiDisas::StrOp, // Test classname (+StringId)
- &SbiDisas::StrOp, // TESTCLASS, Check TOS class (+StringId)
- &SbiDisas::StrOp, // Set libname for declare procs (+StringId)
- &SbiDisas::ImmOp, // TOS is incremented about BASE erhoeht, BASE pushed before
- &SbiDisas::TypeOp, // Convert last parameter to/in(?) argv (+Typ)
- &SbiDisas::StrOp, // VBASETCLASS (+StringId)
-};
-
-static const Func pOperand3[] = {
- // All opcodes with two operands
- &SbiDisas::VarOp, // Load from RTL (+StringID+Typ)
- &SbiDisas::VarOp, // Load (+StringID+Typ)
- &SbiDisas::VarOp, // Load Element (+StringID+Typ)
- &SbiDisas::OffOp, // Parameter (+Offset+Typ)
-
- // Branch
- &SbiDisas::VarOp, // Call DECLARE-Method (+StringID+Typ)
- &SbiDisas::VarOp, // Call CDecl-DECLARE-Methode (+StringID+Typ)
- &SbiDisas::CaseOp, // Case-Test (+Test-Opcode+False-Target)
- &SbiDisas::StmntOp, // Statement (+Row+Column)
-
- // I/O
- &SbiDisas::StrmOp, // (+SvStreamFlags+Flags)
-
- // Objects
- &SbiDisas::VarDefOp, // Define local var (+StringID+Typ)
- &SbiDisas::VarDefOp, // Define Module global var (+StringID+Typ)
- &SbiDisas::VarDefOp, // Define global var (+StringID+Typ)
- &SbiDisas::Str2Op, // Create object (+StringId+StringId)
- &SbiDisas::VarDefOp, // Define static object (+StringID+Typ)
- &SbiDisas::Str2Op, // Create User defined Object (+StringId+StringId)
- &SbiDisas::Str2Op, // Create User defined Object-Array (+StringId+StringId)
- &SbiDisas::VarDefOp, // Define persistent global var P=PERSIST (+StringID+Typ)
- &SbiDisas::VarOp, // Searches for global var with special handling due to _GLOBAL_P
- &SbiDisas::Str2Op, // Redimensionate User defined Object-Array (+StringId+StringId)
- &SbiDisas::VarOp, // FIND_CM
- &SbiDisas::VarDefOp, // PUBLIC_P
- &SbiDisas::VarOp, // FIND_STATIC
-};
-
-// TODO: Why as method? Isn't a simple define sufficient?
-static const char* _crlf()
-{
-#if defined (UNX)
- return "\n";
-#else
- return "\r\n";
-#endif
-}
-
-SbiDisas::SbiDisas( SbModule* p, const SbiImage* q ) : rImg( *q ), pMod( p )
-{
- memset( cLabels, 0, 8192 );
- nLine = 0;
- nOff = 0;
- nPC = 0;
- nOp1 = nOp2 = nParts = 0;
- eOp = _NOP;
- // Set Label-Bits
- nOff = 0;
- while( Fetch() )
- {
- switch( eOp )
- {
- case _RESUME: if( nOp1 <= 1 ) break;
- case _RETURN: if( !nOp1 ) break;
- case _JUMP:
- case _JUMPT:
- case _JUMPF:
- case _GOSUB:
- case _TESTFOR:
- case _CASEIS:
- case _CASETO:
- case _ERRHDL:
- cLabels[ (nOp1 & 0xffff) >> 3 ] |= ( 1 << ( nOp1 & 7 ) );
- break;
- default: break;
- }
- }
- nOff = 0;
- // Add the publics
- for( sal_uInt16 i = 0; i < pMod->GetMethods()->Count(); i++ )
- {
- SbMethod* pMeth = PTR_CAST(SbMethod,pMod->GetMethods()->Get( i ));
- if( pMeth )
- {
- sal_uInt16 nPos = (sal_uInt16) (pMeth->GetId());
- cLabels[ nPos >> 3 ] |= ( 1 << ( nPos & 7 ) );
- }
- }
-}
-
-// Read current opcode
-sal_Bool SbiDisas::Fetch()
-{
- nPC = nOff;
- if( nOff >= rImg.GetCodeSize() )
- return sal_False;
- const unsigned char* p = (const unsigned char*)( rImg.GetCode() + nOff );
- eOp = (SbiOpcode) ( *p++ & 0xFF );
- if( eOp <= SbOP0_END )
- {
- nOp1 = nOp2 = 0;
- nParts = 1;
- nOff++;
- return sal_True;
- }
- else if( eOp <= SbOP1_END )
- {
- nOff += 5;
- if( nOff > rImg.GetCodeSize() )
- return sal_False;
- nOp1 = *p++; nOp1 |= *p++ << 8; nOp1 |= *p++ << 16; nOp1 |= *p++ << 24;
- nParts = 2;
- return sal_True;
- }
- else if( eOp <= SbOP2_END )
- {
- nOff += 9;
- if( nOff > rImg.GetCodeSize() )
- return sal_False;
- nOp1 = *p++; nOp1 |= *p++ << 8; nOp1 |= *p++ << 16; nOp1 |= *p++ << 24;
- nOp2 = *p++; nOp2 |= *p++ << 8; nOp2 |= *p++ << 16; nOp2 |= *p++ << 24;
- nParts = 3;
- return sal_True;
- }
- else
- return sal_False;
-}
-
-void SbiDisas::Disas( String& r )
-{
- r.Erase();
- String aText;
- nOff = 0;
- while( DisasLine( aText ) )
- {
- r += aText;
- r.AppendAscii( _crlf() );
- }
- aText.ConvertLineEnd();
-}
-
-sal_Bool SbiDisas::DisasLine( String& rText )
-{
- char cBuf[ 100 ];
- const char* pMask[] = {
- "%08" SAL_PRIXUINT32 " ",
- "%08" SAL_PRIXUINT32 " %02X ",
- "%08" SAL_PRIXUINT32 " %02X %08X ",
- "%08" SAL_PRIXUINT32 " %02X %08X %08X " };
- rText.Erase();
- if( !Fetch() )
- return sal_False;
-
- // New line?
- if( eOp == _STMNT && nOp1 != nLine )
- {
- // Find line
- String aSource = rImg.aOUSource;
- nLine = nOp1;
- sal_uInt16 n = 0;
- sal_uInt16 l = (sal_uInt16)nLine;
- while( --l ) {
- n = aSource.SearchAscii( "\n", n );
- if( n == STRING_NOTFOUND ) break;
- else n++;
- }
- // Show position
- if( n != STRING_NOTFOUND )
- {
- sal_uInt16 n2 = aSource.SearchAscii( "\n", n );
- if( n2 == STRING_NOTFOUND ) n2 = aSource.Len() - n;
- String s( aSource.Copy( n, n2 - n + 1 ) );
- sal_Bool bDone;
- do {
- bDone = sal_True;
- n = s.Search( '\r' );
- if( n != STRING_NOTFOUND ) bDone = sal_False, s.Erase( n, 1 );
- n = s.Search( '\n' );
- if( n != STRING_NOTFOUND ) bDone = sal_False, s.Erase( n, 1 );
- } while( !bDone );
- rText.AppendAscii( "; " );
- rText += s;
- rText.AppendAscii( _crlf() );
- }
- }
-
- // Label?
- const char* p = "";
- if( cLabels[ nPC >> 3 ] & ( 1 << ( nPC & 7 ) ) )
- {
- // Public?
- rtl::OString aByteMethName;
- for( sal_uInt16 i = 0; i < pMod->GetMethods()->Count(); i++ )
- {
- SbMethod* pMeth = PTR_CAST(SbMethod,pMod->GetMethods()->Get( i ));
- if( pMeth )
- {
- aByteMethName = rtl::OUStringToOString(pMeth->GetName(), osl_getThreadTextEncoding());
- if( pMeth->GetId() == nPC )
- {
- p = aByteMethName.getStr();
- break;
- }
- if( pMeth->GetId() >= nPC )
- break;
- }
- }
- snprintf( cBuf, sizeof(cBuf), pMask[ 0 ], nPC );
- rText.AppendAscii( cBuf );
- if( p && *p )
- {
- rText.AppendAscii( p );
- }
- else
- {
- // fix warning (now error) for "Lbl%04lX" format
- snprintf( cBuf, sizeof(cBuf), "Lbl%08" SAL_PRIXUINT32, nPC );
- rText.AppendAscii( cBuf );
- }
- rText += ':';
- rText.AppendAscii( _crlf() );
- }
- snprintf( cBuf, sizeof(cBuf), pMask[ nParts ], nPC, (sal_uInt16) eOp, nOp1, nOp2 );
-
- String aPCodeStr;
- aPCodeStr.AppendAscii( cBuf );
- int n = eOp;
- if( eOp >= SbOP2_START )
- n -= SbOP2_START;
- else if( eOp >= SbOP1_START )
- n -= SbOP1_START;
- aPCodeStr += '\t';
- aPCodeStr.AppendAscii( pOps[ nParts-1 ][ n ] );
- aPCodeStr += '\t';
- switch( nParts )
- {
- case 2: (this->*( pOperand2[ n ] ) )( aPCodeStr ); break;
- case 3: (this->*( pOperand3[ n ] ) )( aPCodeStr ); break;
- }
-
- rText += aPCodeStr;
-
- return sal_True;
-}
-
-// Read from StringPool
-void SbiDisas::StrOp( String& rText )
-{
- String aStr = rImg.GetString( (sal_uInt16)nOp1 );
- rtl::OString aByteString(rtl::OUStringToOString(aStr, RTL_TEXTENCODING_ASCII_US));
- const char* p = aByteString.getStr();
- if( p )
- {
- rText += '"';
- rText.AppendAscii( p );
- rText += '"';
- }
- else
- {
- rText.AppendAscii( "?String? " );
- rText += (sal_uInt16)nOp1;
- }
-}
-
-void SbiDisas::Str2Op( String& rText )
-{
- StrOp( rText );
- rText += ',';
- String s;
- nOp1 = nOp2;
- StrOp( s );
- rText += s;
-}
-
-// Immediate Operand
-void SbiDisas::ImmOp( String& rText )
-{
- rText += String::CreateFromInt32(nOp1);
-}
-
-// OnGoto Operand
-void SbiDisas::OnOp( String& rText )
-{
- rText += String::CreateFromInt32(nOp1 & 0x7FFF);
- if( nOp1 & 0x800 )
- rText.AppendAscii( "\t; Gosub" );
-}
-
-// Label
-void SbiDisas::LblOp( String& rText )
-{
- char cBuf[ 10 ];
- snprintf( cBuf, sizeof(cBuf), "Lbl%04" SAL_PRIXUINT32, nOp1 );
- rText.AppendAscii( cBuf );
-}
-
-// 0 or Label
-void SbiDisas::ReturnOp( String& rText )
-{
- if( nOp1 )
- LblOp( rText );
-}
-
-// 0, 1 or Label
-void SbiDisas::ResumeOp( String& rText )
-{
- switch( nOp1 )
- {
- case 1: rText.AppendAscii( "NEXT" ); break;
- case 2: LblOp( rText );
- }
-}
-
-// 0 or 1
-void SbiDisas::CloseOp( String& rText )
-{
- rText.AppendAscii( nOp1 ? "Channel" : "All" );
-}
-
-// Print character
-void SbiDisas::CharOp( String& rText )
-{
- const char* p = NULL;
- switch( nOp1 )
- {
- case 7: p = "'\\a'"; break;
- case 9: p = "'\\t'"; break;
- case 10: p = "'\\n'"; break;
- case 12: p = "'\\f'"; break;
- case 13: p = "'\\r'"; break;
- }
- if( p ) rText.AppendAscii( p );
- else if( nOp1 >= ' ' )
- rText += '\'',
- rText += (char) nOp1,
- rText += '\'';
- else
- rText.AppendAscii( "char " ),
- rText += (sal_uInt16)nOp1;
-}
-
-// Print var: String-ID and type
-void SbiDisas::VarOp( String& rText )
-{
- rText += rImg.GetString( (sal_uInt16)(nOp1 & 0x7FFF) );
- rText.AppendAscii( "\t; " );
- // The type
- sal_uInt32 n = nOp1;
- nOp1 = nOp2;
- TypeOp( rText );
- if( n & 0x8000 )
- rText.AppendAscii( ", Args" );
-}
-
-// Define variable: String-ID and type
-void SbiDisas::VarDefOp( String& rText )
-{
- rText += rImg.GetString( (sal_uInt16)(nOp1 & 0x7FFF) );
- rText.AppendAscii( "\t; " );
- // The Typ
- nOp1 = nOp2;
- TypeOp( rText );
-}
-
-// Print variable: Offset and Typ
-void SbiDisas::OffOp( String& rText )
-{
- rText += String::CreateFromInt32( nOp1 & 0x7FFF );
- rText.AppendAscii( "\t; " );
- // The type
- sal_uInt32 n = nOp1;
- nOp1 = nOp2;
- TypeOp( rText );
- if( n & 0x8000 )
- rText.AppendAscii( ", Args" );
-}
-
-// Data type
-void SbiDisas::TypeOp( String& rText )
-{
- // From 1996-01-19: type can contain flag for BYVAL (StepARGTYP)
- if( nOp1 & 0x8000 )
- {
- nOp1 &= 0x7FFF; // filter away the flag
- rText.AppendAscii( "BYVAL " );
- }
- if( nOp1 < 13 )
- {
- static char pTypes[][13] = {
- "Empty","Null","Integer","Long","Single","Double",
- "Currency","Date","String","Object","Error","Boolean",
- "Variant" };
-
- rText.AppendAscii( pTypes[ nOp1 ] );
- }
- else
- {
- rText.AppendAscii( "type " );
- rText += (sal_uInt16)nOp1;
- }
-}
-
-// sal_True-Label, condition Opcode
-void SbiDisas::CaseOp( String& rText )
-{
- LblOp( rText );
- rText += ',';
- rText.AppendAscii( pOp1[ nOp2 - SbxEQ + _EQ ] );
-}
-
-// Row, column
-void SbiDisas::StmntOp( String& rText )
-{
- rText += String::CreateFromInt32( nOp1 );
- rText += ',';
- sal_uInt32 nCol = nOp2 & 0xFF;
- sal_uInt32 nFor = nOp2 / 0x100;
- rText += String::CreateFromInt32( nCol );
- rText.AppendAscii( " (For-Level: " );
- rText += String::CreateFromInt32( nFor );
- rText += ')';
-}
-
-// open mode, flags
-void SbiDisas::StrmOp( String& rText )
-{
- char cBuf[ 10 ];
- snprintf( cBuf, sizeof(cBuf), "%04" SAL_PRIXUINT32, nOp1 );
- rText.AppendAscii( cBuf );
- if( nOp2 & SBSTRM_INPUT )
- rText.AppendAscii( ", Input" );
- if( nOp2 & SBSTRM_OUTPUT )
- rText.AppendAscii( ", Output" );
- if( nOp2 & SBSTRM_APPEND )
- rText.AppendAscii( ", Append" );
- if( nOp2 & SBSTRM_RANDOM )
- rText.AppendAscii( ", Random" );
- if( nOp2 & SBSTRM_BINARY )
- rText.AppendAscii( ", Binary" );
-}
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx
index 09be4c7..85cc410 100644
--- a/basic/source/classes/sb.cxx
+++ b/basic/source/classes/sb.cxx
@@ -39,11 +39,11 @@
#include <tools/rc.hxx>
#include <vcl/svapp.hxx>
#include <comphelper/processfactory.hxx>
+#include "image.hxx"
#include "sbunoobj.hxx"
#include "sbjsmeth.hxx"
#include "sbjsmod.hxx"
#include "sbintern.hxx"
-#include "disas.hxx"
#include "runtime.hxx"
#include <basic/sbuno.hxx>
#include <basic/sbobjmod.hxx>
diff --git a/basic/source/inc/disas.hxx b/basic/source/inc/disas.hxx
deleted file mode 100644
index c1f42e9..0000000
--- a/basic/source/inc/disas.hxx
+++ /dev/null
@@ -1,73 +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 2000, 2010 Oracle and/or its affiliates.
- *
- * 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 _DISAS_HXX
-#define _DISAS_HXX
-
-#include "image.hxx"
-#include "opcodes.hxx"
-// find a place for this limit ( also used in
-class SvStream;
-#define MAX_LABELS 0x2000L
-class SbiDisas {
- const SbiImage& rImg;
- SbModule* pMod;
- char cLabels[ MAX_LABELS ]; // bit vector for labels
- sal_uInt32 nOff; // current position
- sal_uInt32 nPC; // position of the opcode
- SbiOpcode eOp; // opcode
- sal_uInt32 nOp1, nOp2; // operands
- sal_uInt32 nParts; // 1, 2 or 3
- sal_uInt32 nLine; // current line
- sal_Bool DisasLine( String& );
- sal_Bool Fetch(); // next opcode
-public:
- SbiDisas( SbModule*, const SbiImage* );
- void Disas( String& );
- // DO NOT CALL
- void StrOp( String& );
- void Str2Op( String& );
- void ImmOp( String& );
- void OnOp( String& );
- void LblOp( String& );
- void ReturnOp( String& );
- void ResumeOp( String& );
- void CloseOp( String& );
- void CharOp( String& );
- void VarOp( String& );
- void VarDefOp( String& );
- void OffOp( String& );
- void TypeOp( String& );
- void CaseOp( String& );
- void StmntOp( String& );
- void StrmOp( String& );
-};
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 90ca7d9e2423afccfaece5f7ffef7fcdd3b5b1e7
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Dec 13 08:04:26 2011 +0000
callcatcher: remove newly unused code
diff --git a/basic/inc/basic/sbmod.hxx b/basic/inc/basic/sbmod.hxx
index 346dbf7..443ecde 100644
--- a/basic/inc/basic/sbmod.hxx
+++ b/basic/inc/basic/sbmod.hxx
@@ -118,7 +118,6 @@ public:
void SetSource32( const ::rtl::OUString& r );
virtual sal_Bool Compile();
- sal_Bool Disassemble( String& rText );
virtual sal_Bool IsCompiled() const;
const SbxObject* FindType( String aTypeName ) const;
diff --git a/basic/source/classes/disas.cxx b/basic/source/classes/disas.cxx
index 2f31c59..101ed3d 100644
--- a/basic/source/classes/disas.cxx
+++ b/basic/source/classes/disas.cxx
@@ -233,18 +233,6 @@ static const char* _crlf()
#endif
}
-// This method exists because we want to load the file as own segment
-sal_Bool SbModule::Disassemble( String& rText )
-{
- rText.Erase();
- if( pImage )
- {
- SbiDisas aDisas( this, pImage );
- aDisas.Disas( rText );
- }
- return sal_Bool( rText.Len() != 0 );
-}
-
SbiDisas::SbiDisas( SbModule* p, const SbiImage* q ) : rImg( *q ), pMod( p )
{
memset( cLabels, 0, 8192 );
diff --git a/basic/source/comp/sbcomp.cxx b/basic/source/comp/sbcomp.cxx
index 19d6484..42871d6 100644
--- a/basic/source/comp/sbcomp.cxx
+++ b/basic/source/comp/sbcomp.cxx
@@ -241,21 +241,6 @@ typedef std::hash_map< ::rtl::OUString, PCToTextDataMap*, ::rtl::OUStringHash, :
ModuleTraceMap GaModuleTraceMap;
ModuleTraceMap& rModuleTraceMap = GaModuleTraceMap;
-static void lcl_PrepareTraceForModule( SbModule* pModule )
-{
- String aModuleName = pModule->GetName();
- ModuleTraceMap::iterator it = rModuleTraceMap.find( aModuleName );
- if( it != rModuleTraceMap.end() )
- {
- PCToTextDataMap* pInnerMap = it->second;
- delete pInnerMap;
- rModuleTraceMap.erase( it );
- }
-
- String aDisassemblyStr;
- pModule->Disassemble( aDisassemblyStr );
-}
-
static FILE* GpGlobalFile = NULL;
static void lcl_lineOut( const char* pStr, const char* pPreStr = NULL, const char* pPostStr = NULL )
diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx
index 3852e3b..97dca67 100644
--- a/sc/source/ui/unoobj/chart2uno.cxx
+++ b/sc/source/ui/unoobj/chart2uno.cxx
@@ -144,11 +144,6 @@ uno::Reference< frame::XModel > lcl_GetXModel( ScDocument * pDoc )
return xModel;
}
-uno::Reference< sheet::XSpreadsheetDocument > lcl_GetSpreadSheetDocument( ScDocument * pDoc )
-{
- return uno::Reference< sheet::XSpreadsheetDocument >( lcl_GetXModel( pDoc ), uno::UNO_QUERY );
-}
-
struct TokenTable : boost::noncopyable
{
SCROW mnRowCount;
diff --git a/svl/source/filepicker/pickerhistory.cxx b/svl/source/filepicker/pickerhistory.cxx
index f4b8b1b..5570788 100644
--- a/svl/source/filepicker/pickerhistory.cxx
+++ b/svl/source/filepicker/pickerhistory.cxx
@@ -86,24 +86,6 @@ namespace svt
// then push_back the picker
_rHistory.push_back( InterfaceAdapter( _rxPicker ) );
}
-
- //-----------------------------------------------------------------
- Reference< XInterface > implGetTopMostPicker( const InterfaceArray& _rHistory )
- {
- Reference< XInterface > xTopMostAlive;
-
- //=============================================================
- // search the first picker which is still alive ...
- for ( InterfaceArray::const_reverse_iterator aLoop = _rHistory.rbegin();
- ( aLoop != _rHistory.rend() ) && !xTopMostAlive.is();
- ++aLoop
- )
- {
- xTopMostAlive = aLoop->get();
- }
-
- return xTopMostAlive;
- }
}
//---------------------------------------------------------------------
diff --git a/svtools/inc/svtools/fixedhyper.hxx b/svtools/inc/svtools/fixedhyper.hxx
index b12a839..b138d57 100644
--- a/svtools/inc/svtools/fixedhyper.hxx
+++ b/svtools/inc/svtools/fixedhyper.hxx
@@ -132,97 +132,6 @@ namespace svt
/** sets new text and recalculates the text length. */
virtual void SetDescription( const String& rNewDescription );
};
-
- //=====================================================================
- //= FixedHyperlinkImage
- //=====================================================================
- class SVT_DLLPUBLIC FixedHyperlinkImage : public FixedImage
- {
- private:
- Pointer m_aOldPointer;
- Link m_aClickHdl;
- String m_sURL;
-
- /** initializes the font (link color and underline).
-
- Called by the Ctors.
- */
- void Initialize();
-
- protected:
- /** overwrites Window::MouseMove().
-
- Changes the pointer only over the text.
- */
- virtual void MouseMove( const MouseEvent& rMEvt );
-
- /** overwrites Window::MouseButtonUp().
-
- Calls the set link if the mouse is over the text.
- */
- virtual void MouseButtonUp( const MouseEvent& rMEvt );
-
- /** overwrites Window::RequestHelp().
-
- Shows tooltip only if the mouse is over the text.
- */
- virtual void RequestHelp( const HelpEvent& rHEvt );
-
- public:
- /** ctors
-
- With ResId or WinBits.
- */
- FixedHyperlinkImage( Window* pParent, WinBits nWinStyle = 0 );
-
- /** dtor
-
- */
- virtual ~FixedHyperlinkImage();
-
- /** overwrites Window::GetFocus().
-
- Changes the color of the text and shows a focus rectangle.
- */
- virtual void GetFocus();
-
- /** overwrites Window::LoseFocus().
-
- Changes the color of the text and hides the focus rectangle.
- */
- virtual void LoseFocus();
-
- /** overwrites Window::KeyInput().
-
- KEY_RETURN and KEY_SPACE calls the link handler.
- */
- virtual void KeyInput( const KeyEvent& rKEvt );
-
- /** sets <member>m_aClickHdl</member> with <arg>rLink</arg>.
-
- <member>m_aClickHdl</member> is called if the text is clicked.
- */
- inline void SetClickHdl( const Link& rLink ) { m_aClickHdl = rLink; }
-
- /** returns <member>m_aClickHdl</member>.
-
- @return
- <member>m_aClickHdl</member>
- */
- inline const Link& GetClickHdl() const { return m_aClickHdl; }
-
- // ::toolkit::FixedHyperbaseLink
-
- /** sets the URL of the hyperlink and uses it as tooltip. */
- virtual void SetURL( const String& rNewURL );
-
- /** returns the URL of the hyperlink.
-
- @return
- <member>m_sURL</member>
- */
- virtual String GetURL() const;
- };
//.........................................................................
} // namespace svt
//.........................................................................
diff --git a/svtools/inc/svtools/taskbar.hxx b/svtools/inc/svtools/taskbar.hxx
index 9d2ed86..c60a0aa 100644
--- a/svtools/inc/svtools/taskbar.hxx
+++ b/svtools/inc/svtools/taskbar.hxx
@@ -291,7 +291,6 @@ private:
SVT_DLLPRIVATE ImplTaskSBFldItem* ImplGetFieldItem( const Point& rPos, sal_Bool& rFieldRect ) const;
SVT_DLLPRIVATE sal_Bool ImplUpdateClock();
SVT_DLLPRIVATE sal_Bool ImplUpdateFlashItems();
- SVT_DLLPRIVATE void ImplUpdateField( sal_Bool bItems );
DECL_DLLPRIVATE_LINK( ImplTimerHdl, Timer* );
#endif
diff --git a/svtools/inc/svtools/ttprops.hxx b/svtools/inc/svtools/ttprops.hxx
index 6d07b14..dc43c54 100644
--- a/svtools/inc/svtools/ttprops.hxx
+++ b/svtools/inc/svtools/ttprops.hxx
@@ -62,7 +62,6 @@ class Bitmap;
class SVT_DLLPUBLIC TTProperties : public ApplicationProperty
{
sal_uInt16 nDonePRs; // Verwaltung f�r die Properties, die nur einmal gerufen werden mussen.
- SVT_DLLPRIVATE sal_Bool RequestProperty( sal_uInt16 nRequest );
sal_Bool HasSlots(){ return nPropertyVersion == TT_PROPERTIES_VERSION; }
diff --git a/svtools/source/control/fixedhyper.cxx b/svtools/source/control/fixedhyper.cxx
index 2fa3fd5..598218f 100644
--- a/svtools/source/control/fixedhyper.cxx
+++ b/svtools/source/control/fixedhyper.cxx
@@ -136,88 +136,6 @@ void FixedHyperlink::SetDescription( const String& rNewDescription )
m_nTextLen = GetCtrlTextWidth( GetText() );
}
-FixedHyperlinkImage::FixedHyperlinkImage( Window* pParent, WinBits nWinStyle ) :
- FixedImage( pParent, nWinStyle )
-{
- Initialize();
-}
-
-FixedHyperlinkImage::~FixedHyperlinkImage()
-{
-}
-
-void FixedHyperlinkImage::Initialize()
-{
- // saves the old pointer
- m_aOldPointer = GetPointer();
-}
-
-void FixedHyperlinkImage::MouseMove( const MouseEvent& rMEvt )
-{
- // changes the pointer if the control is enabled and the mouse is over the text.
- if ( !rMEvt.IsLeaveWindow() && IsEnabled() )
- SetPointer( POINTER_REFHAND );
- else
- SetPointer( m_aOldPointer );
-}
-
-void FixedHyperlinkImage::MouseButtonUp( const MouseEvent& )
-{
- // calls the link if the control is enabled and the mouse is over the text.
- if ( IsEnabled() )
- ImplCallEventListenersAndHandler( VCLEVENT_BUTTON_CLICK, m_aClickHdl, this );
-
- Size aSize = GetSizePixel();
- Size aImgSz = GetImage().GetSizePixel();
- if ( aSize.Width() < aImgSz.Width() )
- {
- DBG_ERRORFILE("xxx");
- }
-}
-
-void FixedHyperlinkImage::RequestHelp( const HelpEvent& rHEvt )
-{
- if ( IsEnabled() )
- FixedImage::RequestHelp( rHEvt );
-}
-
-void FixedHyperlinkImage::GetFocus()
-{
- Paint( Rectangle( Point(), GetSizePixel() ) );
- ShowFocus( Rectangle( Point( 1, 1 ), Size( GetSizePixel().Width() - 2, GetSizePixel().Height() - 2 ) ) );
-}
-
-void FixedHyperlinkImage::LoseFocus()
-{
- Paint( Rectangle( Point(), GetSizePixel() ) );
- HideFocus();
-}
-
-void FixedHyperlinkImage::KeyInput( const KeyEvent& rKEvt )
-{
- switch ( rKEvt.GetKeyCode().GetCode() )
- {
- case KEY_SPACE:
- case KEY_RETURN:
- m_aClickHdl.Call( this );
- break;
-
- default:
- FixedImage::KeyInput( rKEvt );
- }
-}
-
-void FixedHyperlinkImage::SetURL( const String& rNewURL )
-{
- m_sURL = rNewURL;
- SetQuickHelpText( m_sURL );
-}
-
-String FixedHyperlinkImage::GetURL() const
-{
- return m_sURL;
-}
-
//.........................................................................
} // namespace svt
//.........................................................................
diff --git a/svtools/source/control/roadmap.cxx b/svtools/source/control/roadmap.cxx
index 4460ccc..60c5853 100644
--- a/svtools/source/control/roadmap.cxx
+++ b/svtools/source/control/roadmap.cxx
@@ -107,8 +107,6 @@ namespace svt
void SetIndex( ItemIndex _Index );
ItemIndex GetIndex() const;
- ::rtl::OUString GetLabel( );
-
void Update( ItemIndex _RMIndex, const ::rtl::OUString& _rText );
void SetPosition( RoadmapItem* OldHyperLabel );
@@ -792,12 +790,6 @@ namespace svt
}
//---------------------------------------------------------------------
- ::rtl::OUString RoadmapItem::GetLabel( )
- {
- return mpDescription ? mpDescription->GetText() : String();
- }
-
- //---------------------------------------------------------------------
void RoadmapItem::SetPosition( RoadmapItem* _pOldItem )
{
Point aIDPos;
diff --git a/svtools/source/control/taskstat.cxx b/svtools/source/control/taskstat.cxx
index 594163e..a074cf3 100644
--- a/svtools/source/control/taskstat.cxx
+++ b/svtools/source/control/taskstat.cxx
@@ -240,70 +240,6 @@ sal_Bool TaskStatusBar::ImplUpdateFlashItems()
// -----------------------------------------------------------------------
-void TaskStatusBar::ImplUpdateField( sal_Bool bItems )
-{
- maTimer.Stop();
-
- if ( bItems )
- {
- mnItemWidth = 0;
- mbFlashItems = sal_False;
- mbOutInterval = sal_False;
- for ( size_t i = 0, n = mpFieldItemList->size(); i < n; ++i ) {
- ImplTaskSBFldItem* pItem = (*mpFieldItemList)[ i ];
- mnItemWidth += TASKSTATUSBAR_IMAGEOFFX;
- pItem->mnOffX = mnItemWidth;
- mnItemWidth += pItem->maItem.GetImage().GetSizePixel().Width();
- if ( pItem->maItem.GetFlags() & TASKSTATUSFIELDITEM_FLASH ) {
- mbFlashItems = sal_True;
- }
- }
- }
- else
- {
- if ( mnFieldFlags & TASKSTATUSFIELD_CLOCK )
- {
- XubString aStr = SvtSysLocale().GetLocaleData().getTime( Time( 23, 59, 59 ), sal_False, sal_False );
- mnClockWidth = GetTextWidth( aStr )+(TASKSTATUSBAR_CLOCXOFFX*2);
- }
- else
- mnClockWidth = 0;
- }
-
- long nNewWidth = mnItemWidth+mnClockWidth;
- if ( mnItemWidth && !mnClockWidth )
- nNewWidth += TASKSTATUSBAR_IMAGEOFFX;
- if ( nNewWidth != mnFieldWidth )
- {
- RemoveItem( TASKSTATUSBAR_STATUSFIELDID );
-
- if ( mnItemWidth || mnClockWidth )
- {
- mnFieldWidth = nNewWidth;
- long nOffset = GetItemOffset( TASKSTATUSBAR_STATUSFIELDID );
- sal_uInt16 nItemPos = GetItemPos( TASKSTATUSBAR_STATUSFIELDID );
- InsertItem( TASKSTATUSBAR_STATUSFIELDID, nNewWidth, SIB_RIGHT | SIB_IN | SIB_USERDRAW, nOffset, nItemPos );
- }
- else
- mnFieldWidth = 0;
-
- if ( mpNotifyTaskBar )
- mpNotifyTaskBar->Resize();
- }
- else
- SetItemData( TASKSTATUSBAR_STATUSFIELDID, NULL );
-
- if ( mbFlashItems || (mnFieldFlags & TASKSTATUSFIELD_CLOCK) )
- {
- ImplUpdateClock();
- mbOutInterval = sal_True;
- ImplUpdateFlashItems();
- maTimer.Start();
- }
-}
-
-// -----------------------------------------------------------------------
-
void TaskStatusBar::MouseButtonDown( const MouseEvent& rMEvt )
{
sal_Bool bFieldRect;
diff --git a/svtools/source/dialogs/filedlg2.cxx b/svtools/source/dialogs/filedlg2.cxx
index 80ae25b..4bad2d5 100644
--- a/svtools/source/dialogs/filedlg2.cxx
+++ b/svtools/source/dialogs/filedlg2.cxx
@@ -1168,17 +1168,6 @@ void ImpFileDialog::SetPath( Edit const& rEdit )
SetPath( aPresetText );
}
-
-void ImpFileDialog::AddFilter( const UniString& rFilter, const UniString& rMask )
-{
- aFilterList.push_back( new ImpFilterItem( rFilter, rMask ) );
- if( pTypeList )
- pTypeList->InsertEntry( rFilter, LISTBOX_APPEND );
-
- if( !GetCurFilter().Len() )
- SetCurFilter( rFilter );
-}
-
void ImpFileDialog::SetCurFilter( const UniString& rFilter )
{
if( !pTypeList )
diff --git a/svtools/source/dialogs/filedlg2.hxx b/svtools/source/dialogs/filedlg2.hxx
index 7492c4b..694fa01 100644
--- a/svtools/source/dialogs/filedlg2.hxx
+++ b/svtools/source/dialogs/filedlg2.hxx
@@ -158,7 +158,6 @@ public:
ImpFileDialog( PathDialog* pDlg, WinBits nStyle, RESOURCE_TYPE nType );
virtual ~ImpFileDialog();
- void AddFilter( const String& rFilter, const String& rMask );
void SetCurFilter( const String& rFilter );
String GetCurFilter() const;
diff --git a/svtools/source/plugapp/ttprops.cxx b/svtools/source/plugapp/ttprops.cxx
index 6efb367..c050df6 100644
--- a/svtools/source/plugapp/ttprops.cxx
+++ b/svtools/source/plugapp/ttprops.cxx
@@ -33,16 +33,4 @@
TYPEINIT1( TTProperties, ApplicationProperty )
-sal_Bool TTProperties::RequestProperty( sal_uInt16 nRequest )
-{
- if ( (( nRequest & TT_PR_ONCE ) == 0) || (nDonePRs & (nRequest & 0x0ff)) == 0 )
- {
- nActualPR = nRequest;
- nDonePRs |= nRequest;
- GetpApp()->Property( *this );
- return nActualPR == 0;
- }
- return sal_True;
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/unusedcode.easy b/unusedcode.easy
index 2164932..f2482b3 100644
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -4,10 +4,10 @@ AtomFolder::AtomFolder(AtomPubSession*, std::basic_string<char, std::char_traits
AtomPubSession::getCollectionUrl(Collection::Type)
AtomPubSession::~AtomPubSession()
BitmapWriteAccess::DrawPolygon(Polygon const&)
-BreakPointList::push_back(BreakPoint*)
BufferNode::childAt(int) const
ByteString::Assign(char const*, unsigned short)
ByteString::Assign(char)
+ByteString::ByteString(String const&, unsigned short, unsigned int)
CIccCLUT::Interp3dTetra(float*, float const*)
CIccCLUT::Iterate(IIccCLUTExec*)
CIccFormulaCurveSegment::SetFunction(unsigned short, unsigned char, float*)
@@ -95,7 +95,6 @@ ElementCollector::setSecurityId(int)
ExtraKernInfo::HasKernPairs() const
FieldEntry::GetBookmarkType()
FileControl::SetButtonText(String const&)
-FileDialog::FileDialog(Window*, long)
FileList::GetFormat()
FileStat::FileStat()
FileStat::FileStat(void const*, void const*)
@@ -240,23 +239,8 @@ OUStringsSort_Impl::Remove(rtl::OUString* const&, unsigned short)
OUStringsSort_Impl::Remove(unsigned short, unsigned short)
Octree::AddColor(BitmapColor const&)
Octree::Octree(unsigned long)
-OutputDevice::DrawNativeControlText(unsigned int, unsigned int, Rectangle const&, unsigned int, ImplControlValue const&, rtl::OUString)
-OutputDevice::GetMinKashida(Font const&) const
-OutputDevice::GetPixel(Polygon const&) const
-OutputDevice::ImplFloatDevicePixelToLogicHeight(float) const
-OutputDevice::ImplFloatDevicePixelToLogicWidth(float) const
-OutputDevice::ImplFloatLogicWidthToDevicePixel(float) const
-OutputDevice::ImplGetTextWidth(SalLayout const&) const
-OutputDevice::IsTextUnderlineAbove(Font const&)
-OutputDevice::LogicToLogic(basegfx::B2DPolyPolygon const&, MapMode const&, MapMode const&)
-OutputDevice::LogicToLogic(long*, unsigned short, MapMode const*, MapMode const*) const
-OutputDevice::LogicToPixel(Region const&, MapMode const&) const
-OutputDevice::LogicToPixel(basegfx::B2DPolyPolygon const&) const
-OutputDevice::LogicToPixel(basegfx::B2DPolygon const&) const
-OutputDevice::LogicToPixel(basegfx::B2DPolygon const&, MapMode const&) const
-OutputDevice::PixelToLogic(Region const&, MapMode const&) const
-OutputDevice::PixelToLogic(basegfx::B2DPolyPolygon const&) const
-OutputDevice::PixelToLogic(basegfx::B2DPolygon const&) const
+OutputDevice::LogicToPixel(PolyPolygon const&, MapMode const&) const
+OutputDevice::PixelToLogic(PolyPolygon const&, MapMode const&) const
PageSpan::getMarginLeft() const
PageSpan::getMarginRight() const
ParagraphObj::ParagraphObj(ParagraphObj&)
@@ -284,6 +268,7 @@ SalColormap::SalColormap(BitmapPalette const&)
SalColormap::SetPalette(BitmapPalette const&)
SalDisplay::IsLocal()
SalGraphics::DrawBitmap(SalTwoRect const*, SalBitmap const&, unsigned int, OutputDevice const*)
+SalGraphics::DrawNativeControlText(unsigned int, unsigned int, Rectangle const&, unsigned int, ImplControlValue const&, rtl::OUString const&, OutputDevice const*)
SalGraphics::drawAlphaBitmap(SalTwoRect const&, SalBitmap const&, SalBitmap const&)
SalGraphics::drawPolyLine(basegfx::B2DPolygon const&, double, basegfx::B2DVector const&, basegfx::B2DLineJoin)
SalGraphics::drawPolyPolygon(basegfx::B2DPolyPolygon const&, double)
@@ -298,8 +283,6 @@ SbTextPortions::Replace(SbTextPortion const&, unsigned short)
SbTextPortions::Replace(SbTextPortion const*, unsigned short, unsigned short)
SbTextPortions::SbTextPortions(unsigned short, unsigned char)
SbTextPortions::_ForEach(unsigned short, unsigned short, unsigned char (*)(SbTextPortion const&, void*), void*)
-SbiBuffer::Add(void const*, unsigned short)
-SbiBuffer::Align(int)
SbiExprNode::IsString()
SbiExpression::SbiExpression(SbiParser*, SbiToken)
SbiExpression::SbiExpression(SbiParser*, String const&)
@@ -320,11 +303,6 @@ SbxDecimal::getUShort(unsigned short&)
SbxDecimal::setShort(short)
SbxDecimal::setString(rtl::OUString*)
SbxDecimal::setUShort(unsigned short)
-SbxItem::SetDocument(basctl::ScriptDocument const&)
-SbxItem::SetLibName(rtl::OUString const&)
-SbxItem::SetMethodName(rtl::OUString const&)
-SbxItem::SetName(rtl::OUString const&)
-SbxItem::SetType(BasicIDEType)
SbxValue::PutDecimal(SbxDecimal*)
ScAddInAsyncs::Insert(ScAddInAsync* const&, unsigned short&)
ScAddInAsyncs::Insert(ScAddInAsync* const*, unsigned short)
@@ -390,7 +368,6 @@ ScLeftFooterEditPage::GetRanges()
ScLeftHeaderEditPage::GetRanges()
ScMatrix::CalcOffset(unsigned long, unsigned long) const
ScModule::Find1RefWindow(Window*)
-ScMultiTextWnd::GetLineCount()
ScMyCellInfo::ScMyCellInfo()
ScMyStyleRanges::SetStylesToRanges(ScRangeList*, rtl::OUString const*, short, rtl::OUString const*, ScXMLImport&)
ScMyStyleRanges::SetStylesToRanges(ScRangeListRef, rtl::OUString const*, short, rtl::OUString const*, ScXMLImport&)
@@ -567,18 +544,6 @@ SpinButton::SpinButton(Window*, ResId const&)
SrchAttrItemList::Replace(SearchAttrItem const&, unsigned short)
SrchAttrItemList::Replace(SearchAttrItem const*, unsigned short, unsigned short)
SrchAttrItemList::_ForEach(unsigned short, unsigned short, unsigned char (*)(SearchAttrItem const&, void*), void*)
-StatusBar::CopyItems(StatusBar const&)
-StatusBar::GetItemBits(unsigned short) const
-StatusBar::GetItemData(unsigned short) const
-StatusBar::GetItemWidth(unsigned short) const
-StatusBar::HideItem(unsigned short)
-StatusBar::HideItems()
-StatusBar::ResetProgressMode()
-StatusBar::SetBottomBorder(unsigned char)
-StatusBar::SetTopBorder(unsigned char)
-StatusBar::ShowItem(unsigned short)
-StatusBar::ShowItems()
-StatusBar::StatusBar(Window*, ResId const&)
StgAvlIterator::Last()
StgCache::Pos2Page(int)
StgHeader::SetClassId(ClsId const&)
@@ -2219,8 +2184,6 @@ std::__cxx1998::vector<CntHTTPCookie*, std::allocator<CntHTTPCookie*> >::~vector
std::__cxx1998::vector<OrderedEntry*, std::allocator<OrderedEntry*> >::~vector()
std::__cxx1998::vector<ServiceInfo*, std::allocator<ServiceInfo*> >::~vector()
std::__cxx1998::vector<SfxFilter*, std::allocator<SfxFilter*> >::~vector()
-std::__cxx1998::vector<SotFactory*, std::allocator<SotFactory*> >::~vector()
-std::__cxx1998::vector<com::sun::star::datatransfer::DataFlavor*, std::allocator<com::sun::star::datatransfer::DataFlavor*> >::~vector()
svgi::(anonymous namespace)::appendChar(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, char)
svt::table::TableControl::GoTo(int, int)
svx::SvxShowCharSetItem::~SvxShowCharSetItem()
diff --git a/vcl/inc/vcl/splitwin.hxx b/vcl/inc/vcl/splitwin.hxx
index be20f39..f60de25 100644
--- a/vcl/inc/vcl/splitwin.hxx
+++ b/vcl/inc/vcl/splitwin.hxx
@@ -118,7 +118,6 @@ private:
SAL_DLLPRIVATE void ImplInitSettings();
SAL_DLLPRIVATE void ImplCalcLayout();
SAL_DLLPRIVATE void ImplUpdate();
- SAL_DLLPRIVATE void ImplUpdateSet( ImplSplitSet* pSet );
SAL_DLLPRIVATE void ImplSetWindowSize( long nDelta );
SAL_DLLPRIVATE void ImplSplitMousePos( Point& rMousePos );
SAL_DLLPRIVATE void ImplGetButtonRect( Rectangle& rRect, long nEx, sal_Bool bTest ) const;
diff --git a/vcl/inc/vcl/status.hxx b/vcl/inc/vcl/status.hxx
index 56cf7c7..19a4801 100644
--- a/vcl/inc/vcl/status.hxx
+++ b/vcl/inc/vcl/status.hxx
@@ -118,7 +118,6 @@ private:
SAL_DLLPRIVATE void ImplCalcProgressRect();
SAL_DLLPRIVATE Rectangle ImplGetItemRectPos( sal_uInt16 nPos ) const;
SAL_DLLPRIVATE sal_uInt16 ImplGetFirstVisiblePos() const;
- SAL_DLLPRIVATE void ImplCalcBorder();
public:
StatusBar( Window* pParent,
diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx
index 7d13123..f5da206 100644
--- a/vcl/source/window/splitwin.cxx
+++ b/vcl/source/window/splitwin.cxx
@@ -1629,48 +1629,6 @@ void SplitWindow::ImplUpdate()
// -----------------------------------------------------------------------
-void SplitWindow::ImplUpdateSet( ImplSplitSet* pSet )
-{
- if ( IsReallyShown() && IsUpdateMode() && mbRecalc )
- {
- // Wenn wir noch berechnen muessen, dann alles invalidieren.
- if ( mbCalc )
- {
- // Wenn nicht NOSPLITDRAW gesetzt ist, koennen wir uns das
- // invalidieren sparen, da bei ImplCalcSet2() die freien flaechen
- // sowieso invalidiert werden
- if ( !mpMainSet->mpItems || (mnWinStyle & WB_NOSPLITDRAW) )
- pSet = mpMainSet;
- else
- return;
- }
-
- Rectangle aRect;
- if ( pSet == mpMainSet )
- {
- aRect.Left() = mnLeftBorder;
- aRect.Top() = mnTopBorder;
- aRect.Right() = mnDX-mnRightBorder-1;
- aRect.Bottom() = mnDY-mnBottomBorder-1;
- }
- else
- {
- ImplSplitItem* pItem;
- sal_uInt16 nPos;
-
- pSet = ImplFindItem( mpMainSet, pSet->mnId, nPos );
- pItem = &(pSet->mpItems[nPos]);
- aRect.Left() = pItem->mnLeft;
- aRect.Top() = pItem->mnTop;
- aRect.Right() = aRect.Left()+pItem->mnWidth;
- aRect.Bottom() = aRect.Top()+pItem->mnHeight;
- }
- Invalidate( aRect );
- }
-}
-
-// -----------------------------------------------------------------------
-
void SplitWindow::ImplSplitMousePos( Point& rMousePos )
{
if ( mnSplitTest & SPLIT_HORZ )
diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx
index b701697..9ce138a 100644
--- a/vcl/source/window/status.cxx
+++ b/vcl/source/window/status.cxx
@@ -1368,24 +1368,6 @@ rtl::OString StatusBar::GetHelpId( sal_uInt16 nItemId ) const
return aRet;
}
-// -----------------------------------------------------------------------
-
-void StatusBar::ImplCalcBorder( )
-{
- mnCalcHeight = mnDY;
- // subtract border
- if( IsTopBorder() )
- {
- mnCalcHeight -= 2;
- mnTextY += 2;
- mnItemY += 2;
- }
- if ( IsBottomBorder() )
- mnCalcHeight -= 2;
- mbFormat = sal_True;
- Invalidate();
-}
-
sal_Bool StatusBar::IsTopBorder() const
{
return mpImplData->mbTopBorder;
commit a796b8ae135861101df9e0af1c0ff40151d8b5c2
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Dec 13 07:51:44 2011 +0000
m_pInfoImage never constructed or used
diff --git a/sfx2/inc/sfx2/basedlgs.hxx b/sfx2/inc/sfx2/basedlgs.hxx
index 64d26b1..c668c4e 100644
--- a/sfx2/inc/sfx2/basedlgs.hxx
+++ b/sfx2/inc/sfx2/basedlgs.hxx
@@ -166,19 +166,16 @@ public:
// class SfxSingleTabDialog --------------------------------------------------
-namespace svt { class FixedHyperlinkImage; }
-
struct SingleTabDlgImpl
{
TabPage* m_pTabPage;
SfxTabPage* m_pSfxPage;
FixedLine* m_pLine;
- ::svt::FixedHyperlinkImage* m_pInfoImage;
String m_sInfoURL;
Link m_aInfoLink;
SingleTabDlgImpl() :
- m_pTabPage( NULL ), m_pSfxPage( NULL ), m_pLine( NULL ), m_pInfoImage( NULL ) {}
+ m_pTabPage( NULL ), m_pSfxPage( NULL ), m_pLine( NULL ) {}
};
typedef sal_uInt16* (*GetTabPageRanges)(); // liefert internationale Which-Werte
diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx
index 49429e4..eb8aed4 100644
--- a/sfx2/source/dialog/basedlgs.cxx
+++ b/sfx2/source/dialog/basedlgs.cxx
@@ -786,7 +786,6 @@ SfxSingleTabDialog::~SfxSingleTabDialog()
delete pImpl->m_pTabPage;
delete pImpl->m_pSfxPage;
delete pImpl->m_pLine;
- delete pImpl->m_pInfoImage;
delete pImpl;
}
commit 5258afdc70f47f9dbaba5953214d3f312739faa5
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Dec 13 07:44:28 2011 +0000
bUsedForHilite always false
diff --git a/basic/source/comp/scanner.cxx b/basic/source/comp/scanner.cxx
index e1a5c75..1c49f98 100644
--- a/basic/source/comp/scanner.cxx
+++ b/basic/source/comp/scanner.cxx
@@ -52,7 +52,6 @@ SbiScanner::SbiScanner( const ::rtl::OUString& rBuf, StarBASIC* p ) : aBuf( rBuf
bSpaces =
bNumber =
bSymbol =
- bUsedForHilite =
bCompatible =
bVBASupportOn =
bPrevLineExtentsComment = sal_False;
@@ -260,7 +259,7 @@ bool SbiScanner::NextSym()
// replace closing '_' by space when end of line is following
// (wrong line continuation otherwise)
- if( !bUsedForHilite && !*pLine && *(pLine-1) == '_' )
+ if( !*pLine && *(pLine-1) == '_' )
{
// We are going to modify a potentially shared string, so force
// a copy, so that aSym is not modified by the following operation
diff --git a/basic/source/inc/scanner.hxx b/basic/source/inc/scanner.hxx
index 1bb554b..96b0658 100644
--- a/basic/source/inc/scanner.hxx
+++ b/basic/source/inc/scanner.hxx
@@ -69,7 +69,6 @@ protected:
bool bAbort;
bool bHash; // sal_True: # has been read in
bool bError; // sal_True: generate error
- bool bUsedForHilite;
bool bCompatible; // sal_True: OPTION compatible
bool bVBASupportOn; // sal_True: OPTION VBASupport 1 otherwise default False
bool bPrevLineExtentsComment; // sal_True: Previous line is comment and ends on "... _"
commit e008580f6559ccf5d6cda08802020bb92e1cb21a
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Dec 13 07:43:26 2011 +0000
SbiTokenizer::Hilite unused
diff --git a/basic/source/comp/token.cxx b/basic/source/comp/token.cxx
index f8cc89a..d18953d 100644
--- a/basic/source/comp/token.cxx
+++ b/basic/source/comp/token.cxx
@@ -505,48 +505,4 @@ sal_Bool SbiTokenizer::MayBeLabel( sal_Bool bNeedsColon )
#endif
-void SbiTokenizer::Hilite( SbTextPortions& rList )
-{
- bErrors = sal_False;
- bUsedForHilite = sal_True;
- SbiToken eLastTok = NIL;
- for( ;; )
- {
- Next();
- if( IsEof() )
- break;
- SbTextPortion aRes;
- aRes.nLine = nLine;
- aRes.nStart = nCol1;
- aRes.nEnd = nCol2;
- switch( eCurTok )
- {
- case REM:
- aRes.eType = SB_COMMENT; break;
- case SYMBOL:
- aRes.eType = SB_SYMBOL; break;
- case FIXSTRING:
- aRes.eType = SB_STRING; break;
- case NUMBER:
- aRes.eType = SB_NUMBER; break;
- default:
- if( ( eCurTok >= FIRSTKWD && eCurTok <= LASTKWD )
- || (eCurTok >= _CDECL_ ) )
- aRes.eType = SB_KEYWORD;
- else
- aRes.eType = SB_PUNCTUATION;
- }
- // the sequence xxx.Keyword should not be flagged as Kwd
- if( aRes.eType == SB_KEYWORD
- && ( eLastTok == DOT|| eLastTok == EXCLAM ) )
- aRes.eType = SB_SYMBOL;
- if( eCurTok != EOLN && aRes.nStart <= aRes.nEnd )
- rList.Insert( aRes, rList.Count() );
- if( aRes.eType == SB_COMMENT )
- break;
- eLastTok = eCurTok;
- }
- bUsedForHilite = sal_False;
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/source/inc/token.hxx b/basic/source/inc/token.hxx
index 1048176..d5bb4a2 100644
--- a/basic/source/inc/token.hxx
+++ b/basic/source/inc/token.hxx
@@ -161,8 +161,6 @@ public:
SbiToken Next(); // read a token
sal_Bool MayBeLabel( sal_Bool= sal_False );
- void Hilite( SbTextPortions& );
-
void Error( SbError c ) { GenError( c ); }
void Error( SbError, SbiToken );
void Error( SbError, const char* );
commit 2338a8c9c53d84e269ee85843bf7bb6a0015ea2d
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Dec 13 07:40:27 2011 +0000
convert GetMangleName
diff --git a/idl/inc/slot.hxx b/idl/inc/slot.hxx
index b4036ea..69b589f 100644
--- a/idl/inc/slot.hxx
+++ b/idl/inc/slot.hxx
@@ -189,7 +189,7 @@ public:
virtual sal_Bool IsVariable() const;
virtual sal_Bool IsMethod() const;
- virtual ByteString GetMangleName( sal_Bool bVariable ) const;
+ virtual rtl::OString GetMangleName( sal_Bool bVariable ) const;
SvMetaAttribute * GetMethod() const;
SvMetaType * GetSlotType() const;
diff --git a/idl/inc/types.hxx b/idl/inc/types.hxx
index 4ee6889..2fe4e26 100644
--- a/idl/inc/types.hxx
+++ b/idl/inc/types.hxx
@@ -103,7 +103,7 @@ public:
virtual sal_Bool IsMethod() const;
virtual sal_Bool IsVariable() const;
- virtual ByteString GetMangleName( sal_Bool bVariable ) const;
+ virtual rtl::OString GetMangleName( sal_Bool bVariable ) const;
#ifdef IDL_COMPILER
@@ -178,12 +178,12 @@ protected:
public:
SV_DECL_META_FACTORY1( SvMetaType, SvMetaExtern, 18 )
SvMetaType();
- SvMetaType( const ByteString & rTypeName, char cParserChar,
- const ByteString & rCName );
- SvMetaType( const ByteString & rTypeName, const ByteString & rSbxName,
- const ByteString & rOdlName, char cParserChar,
- const ByteString & rCName, const ByteString & rBasicName,
- const ByteString & rBasicPostfix );
+ SvMetaType( const rtl::OString& rTypeName, char cParserChar,
+ const rtl::OString& rCName );
+ SvMetaType( const rtl::OString& rTypeName, const rtl::OString& rSbxName,
+ const rtl::OString& rOdlName, char cParserChar,
+ const rtl::OString& rCName, const rtl::OString& rBasicName,
+ const rtl::OString& rBasicPostfix );
SvMetaAttributeMemberList & GetAttrList() const;
sal_uLong GetAttrCount() const
diff --git a/idl/source/objects/slot.cxx b/idl/source/objects/slot.cxx
index 36115d9..d24a2a2 100644
--- a/idl/source/objects/slot.cxx
+++ b/idl/source/objects/slot.cxx
@@ -300,7 +300,7 @@ sal_Bool SvMetaSlot::IsMethod() const
return b;
}
-ByteString SvMetaSlot::GetMangleName( sal_Bool bVariable ) const
+rtl::OString SvMetaSlot::GetMangleName( sal_Bool bVariable ) const
{
if( !bVariable )
{
@@ -1393,7 +1393,7 @@ void SvMetaSlot::WriteSlot( const ByteString & rShellName, sal_uInt16 nCount,
rOutStm << '.';
if ( !IsVariable() || !GetType() ||
GetType()->GetBaseType()->GetType() != TYPE_STRUCT )
- rOutStm << GetMangleName( sal_False ).GetBuffer();
+ rOutStm << GetMangleName( sal_False ).getStr();
rOutStm << "\",";
}
else
@@ -1414,7 +1414,7 @@ void SvMetaSlot::WriteSlot( const ByteString & rShellName, sal_uInt16 nCount,
{
rOutStm << ",\"";
- rOutStm << GetMangleName( sal_False ).GetBuffer();
+ rOutStm << GetMangleName( sal_False ).getStr();
rOutStm << "\"";
}
diff --git a/idl/source/objects/types.cxx b/idl/source/objects/types.cxx
index 6f364fc..fa6d473 100644
--- a/idl/source/objects/types.cxx
+++ b/idl/source/objects/types.cxx
@@ -183,7 +183,7 @@ sal_Bool SvMetaAttribute::IsVariable() const
return pType->GetType() != TYPE_METHOD;
}
-ByteString SvMetaAttribute::GetMangleName( sal_Bool ) const
+rtl::OString SvMetaAttribute::GetMangleName( sal_Bool ) const
{
return GetName();
}
@@ -769,8 +769,8 @@ SvMetaType::SvMetaType()
{
}
-SvMetaType::SvMetaType( const ByteString & rName, char cPC,
- const ByteString & rCName )
+SvMetaType::SvMetaType( const rtl::OString& rName, char cPC,
+ const rtl::OString& rCName )
CTOR
{
SetName( rName );
@@ -778,13 +778,13 @@ SvMetaType::SvMetaType( const ByteString & rName, char cPC,
aCName = rCName;
}
-SvMetaType::SvMetaType( const ByteString & rName,
- const ByteString & rSbxName,
- const ByteString & rOdlName,
+SvMetaType::SvMetaType( const rtl::OString& rName,
+ const rtl::OString& rSbxName,
+ const rtl::OString& rOdlName,
char cPc,
- const ByteString & rCName,
- const ByteString & rBasicName,
- const ByteString & rBasicPostfix )
+ const rtl::OString& rCName,
+ const rtl::OString& rBasicName,
+ const rtl::OString& rBasicPostfix )
CTOR
{
SetName( rName );
commit 34cbfad1b27cf28c10974f8170abe00e824f4a9d
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Dec 12 23:24:18 2011 +0000
replace ByteString(String ctor
diff --git a/vcl/generic/fontmanager/fontmanager.cxx b/vcl/generic/fontmanager/fontmanager.cxx
index c048741..f8a082b 100644
--- a/vcl/generic/fontmanager/fontmanager.cxx
+++ b/vcl/generic/fontmanager/fontmanager.cxx
@@ -1706,7 +1706,7 @@ OString PrintFontManager::getXLFD( PrintFont* pFont ) const
OStringBuffer aXLFD( 128 );
aXLFD.append( "-misc-" );
- ByteString aFamily( String( m_pAtoms->getString( ATOM_FAMILYNAME, pFont->m_nFamilyName ) ), RTL_TEXTENCODING_UTF8 );
+ ByteString aFamily(rtl::OUStringToOString(m_pAtoms->getString( ATOM_FAMILYNAME, pFont->m_nFamilyName ), RTL_TEXTENCODING_UTF8));
aFamily.SearchAndReplaceAll( '-',' ' );
aFamily.SearchAndReplaceAll( '?',' ' );
aFamily.SearchAndReplaceAll( '*',' ' );
@@ -3209,7 +3209,7 @@ int PrintFontManager::importFonts( const ::std::list< OString >& rFiles, bool bL
if( pCallback && pCallback->isCanceled() )
break;
- if( ! access( ByteString( String(aTo.PathToFileName()), aEncoding ).GetBuffer(), F_OK ) )
+ if (!access( rtl::OUStringToOString(aTo.PathToFileName(), aEncoding).getStr(), F_OK))
{
if( ! ( pCallback ? pCallback->queryOverwriteFile( aTo.PathToFileName() ) : false ) )
continue;
@@ -3222,19 +3222,19 @@ int PrintFontManager::importFonts( const ::std::list< OString >& rFiles, bool bL
{
INetURLObject aFromAfm( aFrom );
aFromAfm.setExtension( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "afm" ) ) );
- if( access( ByteString( String(aFromAfm.PathToFileName()), aEncoding ).GetBuffer(), F_OK ) )
+ if (access(rtl::OUStringToOString(aFromAfm.PathToFileName(), aEncoding).getStr(), F_OK))
{
aFromAfm.setExtension( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "AFM" ) ) );
- if( access( ByteString( String(aFromAfm.PathToFileName()), aEncoding ).GetBuffer(), F_OK ) )
+ if (access(rtl::OUStringToOString(aFromAfm.PathToFileName(), aEncoding).getStr(), F_OK))
{
aFromAfm.removeSegment();
aFromAfm.Append( String( RTL_CONSTASCII_USTRINGPARAM( "afm" ) ) );
aFromAfm.Append( aTo.GetName() );
aFromAfm.setExtension( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "afm" ) ) );
- if( access( ByteString( String(aFromAfm.PathToFileName()), aEncoding ).GetBuffer(), F_OK ) )
+ if (access(rtl::OUStringToOString(aFromAfm.PathToFileName(), aEncoding).getStr(), F_OK))
{
aFromAfm.setExtension( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "AFM" ) ) );
- if( access( ByteString( String(aFromAfm.PathToFileName()), aEncoding ).GetBuffer(), F_OK ) )
+ if (access(rtl::OUStringToOString(aFromAfm.PathToFileName(), aEncoding).getStr(), F_OK))
{
// give up
if( pCallback )
@@ -3249,11 +3249,11 @@ int PrintFontManager::importFonts( const ::std::list< OString >& rFiles, bool bL
OUString aFromPath, aToPath;
if( bLinkOnly )
{
- ByteString aLinkFromPath( String(aFromAfm.PathToFileName()),
- aEncoding );
- ByteString aLinkToPath( String(aToAfm.PathToFileName()),
- aEncoding );
- nError = (FileBase::RC)symlink( aLinkFromPath.GetBuffer(), aLinkToPath.GetBuffer() );
+ rtl::OString aLinkFromPath(rtl::OUStringToOString(aFromAfm.PathToFileName(),
+ aEncoding));
+ rtl::OString aLinkToPath(rtl::OUStringToOString(aToAfm.PathToFileName(),
+ aEncoding));
+ nError = (FileBase::RC)symlink(aLinkFromPath.getStr(), aLinkToPath.getStr());
}
else
nError = File::copy( aFromAfm.GetMainURL(INetURLObject::DECODE_TO_IURI), aToAfm.GetMainURL(INetURLObject::DECODE_TO_IURI) );
@@ -3267,11 +3267,9 @@ int PrintFontManager::importFonts( const ::std::list< OString >& rFiles, bool bL
}
if( bLinkOnly )
{
- ByteString aFromPath( String(aFrom.PathToFileName()),
- aEncoding );
- ByteString aToPath( String(aTo.PathToFileName()), aEncoding );
- nError = (FileBase::RC)symlink( aFromPath.GetBuffer(),
- aToPath.GetBuffer() );
+ rtl::OString aFromPath(rtl::OUStringToOString(aFrom.PathToFileName(), aEncoding));
+ rtl::OString aToPath(rtl::OUStringToOString(aTo.PathToFileName(), aEncoding));
+ nError = (FileBase::RC)symlink(aFromPath.getStr(), aToPath.getStr());
}
else
nError = File::copy( aFrom.GetMainURL(INetURLObject::DECODE_TO_IURI), aTo.GetMainURL(INetURLObject::DECODE_TO_IURI) );
diff --git a/vcl/unx/generic/printer/ppdparser.cxx b/vcl/unx/generic/printer/ppdparser.cxx
index 1fde949..3aec406 100644
--- a/vcl/unx/generic/printer/ppdparser.cxx
+++ b/vcl/unx/generic/printer/ppdparser.cxx
@@ -1871,12 +1871,12 @@ char* PPDContext::getStreamableBuffer( sal_uLong& rBytes ) const
hash_type::const_iterator it;
for( it = m_aCurrentValues.begin(); it != m_aCurrentValues.end(); ++it )
{
- ByteString aCopy( it->first->getKey(), RTL_TEXTENCODING_MS_1252 );
+ ByteString aCopy(rtl::OUStringToOString(it->first->getKey(), RTL_TEXTENCODING_MS_1252));
rBytes += aCopy.Len();
rBytes += 1; // for ':'
if( it->second )
{
- aCopy = ByteString( it->second->m_aOption, RTL_TEXTENCODING_MS_1252 );
+ aCopy = rtl::OUStringToOString(it->second->m_aOption, RTL_TEXTENCODING_MS_1252);
rBytes += aCopy.Len();
}
else
@@ -1889,13 +1889,13 @@ char* PPDContext::getStreamableBuffer( sal_uLong& rBytes ) const
char* pRun = pBuffer;
for( it = m_aCurrentValues.begin(); it != m_aCurrentValues.end(); ++it )
{
- ByteString aCopy( it->first->getKey(), RTL_TEXTENCODING_MS_1252 );
+ ByteString aCopy(rtl::OUStringToOString(it->first->getKey(), RTL_TEXTENCODING_MS_1252));
int nBytes = aCopy.Len();
memcpy( pRun, aCopy.GetBuffer(), nBytes );
pRun += nBytes;
*pRun++ = ':';
if( it->second )
- aCopy = ByteString( it->second->m_aOption, RTL_TEXTENCODING_MS_1252 );
+ aCopy = rtl::OUStringToOString(it->second->m_aOption, RTL_TEXTENCODING_MS_1252);
else
aCopy = "*nil";
nBytes = aCopy.Len();
diff --git a/vcl/unx/generic/printer/printerinfomanager.cxx b/vcl/unx/generic/printer/printerinfomanager.cxx
index 0f6f221..d8a7f79 100644
--- a/vcl/unx/generic/printer/printerinfomanager.cxx
+++ b/vcl/unx/generic/printer/printerinfomanager.cxx
@@ -631,7 +631,7 @@ void PrinterInfoManager::initialize()
aPrinter.m_aInfo.m_aComment = it->m_aComment;
aPrinter.m_aInfo.m_aLocation = it->m_aLocation;
aPrinter.m_bModified = false;
- aPrinter.m_aGroup = ByteString( aPrinterName, aEncoding ); //provide group name in case user makes this one permanent in padmin
+ aPrinter.m_aGroup = rtl::OUStringToOString(aPrinterName, aEncoding); //provide group name in case user makes this one permanent in padmin
m_aPrinters[ aPrinterName ] = aPrinter;
}
@@ -780,11 +780,11 @@ bool PrinterInfoManager::writePrinterConfig()
aValue.append(rtl::OUStringToOString(it->first, RTL_TEXTENCODING_UTF8));
pConfig->WriteKey("Printer", aValue.makeStringAndClear());
pConfig->WriteKey( "DefaultPrinter", it->first == m_aDefaultPrinter ? "1" : "0" );
- pConfig->WriteKey( "Location", ByteString( String( it->second.m_aInfo.m_aLocation ), RTL_TEXTENCODING_UTF8 ) );
- pConfig->WriteKey( "Comment", ByteString( String( it->second.m_aInfo.m_aComment ), RTL_TEXTENCODING_UTF8 ) );
- pConfig->WriteKey( "Command", ByteString( String( it->second.m_aInfo.m_aCommand ), RTL_TEXTENCODING_UTF8 ) );
- pConfig->WriteKey( "QuickCommand", ByteString( String( it->second.m_aInfo.m_aQuickCommand ), RTL_TEXTENCODING_UTF8 ) );
- pConfig->WriteKey( "Features", ByteString( String( it->second.m_aInfo.m_aFeatures ), RTL_TEXTENCODING_UTF8 ) );
+ pConfig->WriteKey( "Location", rtl::OUStringToOString(it->second.m_aInfo.m_aLocation, RTL_TEXTENCODING_UTF8) );
+ pConfig->WriteKey( "Comment", rtl::OUStringToOString(it->second.m_aInfo.m_aComment, RTL_TEXTENCODING_UTF8) );
+ pConfig->WriteKey( "Command", rtl::OUStringToOString(it->second.m_aInfo.m_aCommand, RTL_TEXTENCODING_UTF8) );
+ pConfig->WriteKey( "QuickCommand", rtl::OUStringToOString(it->second.m_aInfo.m_aQuickCommand, RTL_TEXTENCODING_UTF8) );
+ pConfig->WriteKey( "Features", rtl::OUStringToOString(it->second.m_aInfo.m_aFeatures, RTL_TEXTENCODING_UTF8) );
pConfig->WriteKey("Copies", rtl::OString::valueOf(static_cast<sal_Int32>(it->second.m_aInfo.m_nCopies)));
pConfig->WriteKey( "Orientation", it->second.m_aInfo.m_eOrientation == orientation::Landscape ? "Landscape" : "Portrait" );
pConfig->WriteKey("PSLevel", rtl::OString::valueOf(static_cast<sal_Int32>(it->second.m_aInfo.m_nPSLevel)));
@@ -806,15 +806,15 @@ bool PrinterInfoManager::writePrinterConfig()
for( int i = 0; i < it->second.m_aInfo.m_aContext.countValuesModified(); i++ )
{
const PPDKey* pKey = it->second.m_aInfo.m_aContext.getModifiedKey( i );
- ByteString aKey( "PPD_" );
- aKey += ByteString( pKey->getKey(), RTL_TEXTENCODING_ISO_8859_1 );
+ rtl::OStringBuffer aKey(RTL_CONSTASCII_STRINGPARAM("PPD_"));
+ aKey.append(rtl::OUStringToOString(pKey->getKey(), RTL_TEXTENCODING_ISO_8859_1));
const PPDValue* pValue = it->second.m_aInfo.m_aContext.getValue( pKey );
if (pValue)
aValue.append(rtl::OUStringToOString(pValue->m_aOption, RTL_TEXTENCODING_ISO_8859_1));
else
aValue.append(RTL_CONSTASCII_STRINGPARAM("*nil"));
- pConfig->WriteKey(aKey, aValue.makeStringAndClear());
+ pConfig->WriteKey(aKey.makeStringAndClear(), aValue.makeStringAndClear());
}
}
commit 41f59c6cf2e27a38e3cc4465582ba154be65086d
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Dec 12 22:09:17 2011 +0000
this line doesn't do anything
diff --git a/l10ntools/source/lngmerge.cxx b/l10ntools/source/lngmerge.cxx
index f63e7d2..e61b36d 100644
--- a/l10ntools/source/lngmerge.cxx
+++ b/l10ntools/source/lngmerge.cxx
@@ -273,8 +273,6 @@ sal_Bool LngParser::Merge(
}
if( bULF && pEntrys )
{
- // this is a valid text line
- ByteString sText = getToken(getToken(sLine, 1, '\"'), 0, '\"');
if( sLang.Len() )
{
ByteString sNewText;
commit 73d76958fd626ab55cbaf5264247cee10ec85fd6
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Dec 12 22:07:41 2011 +0000
ByteString->rtl::OString
diff --git a/l10ntools/inc/lngmerge.hxx b/l10ntools/inc/lngmerge.hxx
index 285f129..fce88be 100644
--- a/l10ntools/inc/lngmerge.hxx
+++ b/l10ntools/inc/lngmerge.hxx
@@ -53,7 +53,7 @@ private:
bool bQuiet;
std::vector<ByteString> aLanguages;
- bool isNextGroup( ByteString &sGroup_out , ByteString &sLine_in);
+ bool isNextGroup(rtl::OString &sGroup_out, rtl::OString &sLine_in);
void ReadLine(const rtl::OString &rLine_in,
ByteStringHashMap &rText_inout);
void WriteSDF(SvFileStream &aSDFStream, ByteStringHashMap &rText_inout,
diff --git a/l10ntools/source/lngmerge.cxx b/l10ntools/source/lngmerge.cxx
index cb59f07..f63e7d2 100644
--- a/l10ntools/source/lngmerge.cxx
+++ b/l10ntools/source/lngmerge.cxx
@@ -110,10 +110,9 @@ sal_Bool LngParser::CreateSDF(const rtl::OString &rSDFFile,
size_t nPos = 0;
sal_Bool bStart = true;
- ByteString sGroup;
+ rtl::OString sGroup, sLine;
ByteStringHashMap Text;
ByteString sID;
- ByteString sLine;
while( nPos < pLines->size() ) {
sLine = *(*pLines)[ nPos++ ];
@@ -164,12 +163,11 @@ void LngParser::WriteSDF(SvFileStream &aSDFStream,
}
}
-bool LngParser::isNextGroup( ByteString &sGroup_out , ByteString &sLine_in )
+bool LngParser::isNextGroup(rtl::OString &sGroup_out, rtl::OString &sLine_in)
{
sLine_in = comphelper::string::stripStart(sLine_in, ' ');
sLine_in = comphelper::string::stripEnd(sLine_in, ' ');
- if (( sLine_in.GetChar( 0 ) == '[' ) &&
- ( sLine_in.GetChar( sLine_in.Len() - 1 ) == ']' ))
+ if ((sLine_in[0] == '[') && (sLine_in[sLine_in.getLength() - 1] == ']'))
{
sGroup_out = getToken(getToken(sLine_in, 1, '['), 0, ']');
sGroup_out = comphelper::string::stripStart(sGroup_out, ' ');
@@ -211,16 +209,16 @@ sal_Bool LngParser::Merge(
size_t nPos = 0;
sal_Bool bGroup = sal_False;
- ByteString sGroup;
+ rtl::OString sGroup;
// seek to next group
while ( nPos < pLines->size() && !bGroup )
{
- ByteString sLine( *(*pLines)[ nPos ] );
+ rtl::OString sLine( *(*pLines)[ nPos ] );
sLine = comphelper::string::stripStart(sLine, ' ');
sLine = comphelper::string::stripEnd(sLine, ' ');
- if (( sLine.GetChar( 0 ) == '[' ) &&
- ( sLine.GetChar( sLine.Len() - 1 ) == ']' ))
+ if (( sLine[0] == '[' ) &&
+ ( sLine[sLine.getLength() - 1] == ']' ))
{
sGroup = getToken(getToken(sLine, 1, '['), 0, ']');
sGroup = comphelper::string::stripStart(sGroup, ' ');
@@ -277,7 +275,8 @@ sal_Bool LngParser::Merge(
{
// this is a valid text line
ByteString sText = getToken(getToken(sLine, 1, '\"'), 0, '\"');
- if( sLang.Len() ){
+ if( sLang.Len() )
+ {
ByteString sNewText;
pEntrys->GetText( sNewText, STRING_TYP_TEXT, sLang, sal_True );
commit da5f9b7c29ee86c4fc235fa1281477161271f7c9
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Dec 12 21:57:43 2011 +0000
use RTL_CONSTASCII_STRINGPARAM
diff --git a/connectivity/source/drivers/dbase/DIndex.cxx b/connectivity/source/drivers/dbase/DIndex.cxx
index c5a0e4c..e8e4750 100644
--- a/connectivity/source/drivers/dbase/DIndex.cxx
+++ b/connectivity/source/drivers/dbase/DIndex.cxx
@@ -452,7 +452,7 @@ sal_Bool ODbaseIndex::DropImpl()
{
// References the Key to an Index-file?
aKeyName = aInfFile.GetKeyName( nKey );
- if (aKeyName.copy(0,3) == "NDX")
+ if (aKeyName.copy(0,3).equalsL(RTL_CONSTASCII_STRINGPARAM("NDX")))
{
if(sEntry == String(rtl::OStringToOUString(aInfFile.ReadKey(aKeyName),m_pTable->getConnection()->getTextEncoding())))
{
commit c732a811fc2bacad148c326e32f110a203eef608
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Dec 12 21:55:25 2011 +0000
intermediate string object unnecessary
diff --git a/dbaccess/source/core/resource/core_resource.cxx b/dbaccess/source/core/resource/core_resource.cxx
index a7cd085..fdaa168 100644
--- a/dbaccess/source/core/resource/core_resource.cxx
+++ b/dbaccess/source/core/resource/core_resource.cxx
@@ -56,9 +56,7 @@ namespace dbaccess
::com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILocale();
- rtl::OString sFileName("dba");
-
- m_pImpl = ResMgr::CreateResMgr(sFileName.getStr(), aLocale);
+ m_pImpl = ResMgr::CreateResMgr("dba", aLocale);
}
//------------------------------------------------------------------
More information about the Libreoffice-commits
mailing list