summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-04-17 00:47:00 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-04-17 09:27:47 +0100
commit18825a4d596f69793ee11e643f6ea34317a880c9 (patch)
tree3b8fe0ca46618e60b5296ba90048b02dffad0e69 /sc
parentfa4d647b480e9d855515cc3577b8a60ab615802a (diff)
callcatcher: update unused code list
Diffstat (limited to 'sc')
-rw-r--r--sc/source/filter/inc/addressconverter.hxx18
-rw-r--r--sc/source/filter/inc/richstring.hxx1
-rw-r--r--sc/source/filter/inc/stylesbuffer.hxx3
-rw-r--r--sc/source/filter/oox/addressconverter.cxx170
-rw-r--r--sc/source/filter/oox/richstring.cxx20
-rw-r--r--sc/source/filter/oox/stylesbuffer.cxx14
6 files changed, 0 insertions, 226 deletions
diff --git a/sc/source/filter/inc/addressconverter.hxx b/sc/source/filter/inc/addressconverter.hxx
index 3f772696d3b7..261752caf3e1 100644
--- a/sc/source/filter/inc/addressconverter.hxx
+++ b/sc/source/filter/inc/addressconverter.hxx
@@ -247,24 +247,6 @@ public:
sal_Int32 nStart = 0,
sal_Int32 nLength = SAL_MAX_INT32 );
- /** Tries to parse an encoded name of an external link target in BIFF
- documents, e.g. from EXTERNSHEET or SUPBOOK records.
-
- @param orClassName (out-parameter) DDE server name or OLE class name.
- @param orTargetUrl (out-parameter) Target URL, DDE topic or OLE object name.
- @param orSheetName (out-parameter) Sheet name in target document.
- @param rBiffEncoded Encoded name of the external link target.
- @param bFromDConRec True = path from DCONREF/DCONNAME/DCONBINAME records, false = other records.
-
- @return Type of the decoded target.
- */
- BiffTargetType parseBiffTargetUrl(
- ::rtl::OUString& orClassName,
- ::rtl::OUString& orTargetUrl,
- ::rtl::OUString& orSheetName,
- const ::rtl::OUString& rBiffTargetUrl,
- bool bFromDConRec = false );
-
// ------------------------------------------------------------------------
/** Returns the biggest valid cell address in the own Calc document. */
diff --git a/sc/source/filter/inc/richstring.hxx b/sc/source/filter/inc/richstring.hxx
index 7871af8af9a7..af42f640106a 100644
--- a/sc/source/filter/inc/richstring.hxx
+++ b/sc/source/filter/inc/richstring.hxx
@@ -118,7 +118,6 @@ struct FontPortionModel
mnPos( nPos ), mnFontId( nFontId ) {}
void read( SequenceInputStream& rStrm );
- void read( BiffInputStream& rStrm, BiffFontPortionMode eMode );
};
// ----------------------------------------------------------------------------
diff --git a/sc/source/filter/inc/stylesbuffer.hxx b/sc/source/filter/inc/stylesbuffer.hxx
index fb6c7eaac490..6be78e61cd6a 100644
--- a/sc/source/filter/inc/stylesbuffer.hxx
+++ b/sc/source/filter/inc/stylesbuffer.hxx
@@ -782,9 +782,6 @@ public:
/** Imports the DXF record from the passed stream. */
void importDxf( SequenceInputStream& rStrm );
- /** Imports font, border, and fill settings from the CFRULE record. */
- void importCfRule( BiffInputStream& rStrm, sal_uInt32 nFlags );
-
/** Final processing after import of all style settings. */
void finalizeImport();
diff --git a/sc/source/filter/oox/addressconverter.cxx b/sc/source/filter/oox/addressconverter.cxx
index ef7c0fae8209..9f1f6f1e8ff2 100644
--- a/sc/source/filter/oox/addressconverter.cxx
+++ b/sc/source/filter/oox/addressconverter.cxx
@@ -297,176 +297,6 @@ bool lclAppendUrlChar( OUStringBuffer& orUrl, sal_Unicode cChar, bool bEncodeSpe
} // namespace
-BiffTargetType AddressConverter::parseBiffTargetUrl(
- OUString& orClassName, OUString& orTargetUrl, OUString& orSheetName,
- const OUString& rBiffTargetUrl, bool bFromDConRec )
-{
- OUStringBuffer aTargetUrl;
- OUStringBuffer aSheetName;
- // default target type: some URL with/without sheet name, may be overridden below
- BiffTargetType eTargetType = BIFF_TARGETTYPE_URL;
- const ControlCharacters& rCChars = bFromDConRec ? maDConChars : maLinkChars;
-
- enum
- {
- STATE_START,
- STATE_ENCODED_PATH_START, /// Start of encoded file path.
- STATE_ENCODED_PATH, /// Inside encoded file path.
- STATE_ENCODED_DRIVE, /// DOS drive letter or start of UNC path.
- STATE_ENCODED_URL, /// Encoded URL, e.g. http links.
- STATE_UNENCODED, /// Unencoded URL, could be DDE or OLE.
- STATE_DDE_OLE, /// Second part of DDE or OLE link.
- STATE_FILENAME, /// File name enclosed in brackets.
- STATE_SHEETNAME, /// Sheet name following enclosed file name.
- STATE_UNSUPPORTED, /// Unsupported special paths.
- STATE_ERROR
- }
- eState = STATE_START;
-
- const sal_Unicode* pcChar = rBiffTargetUrl.getStr();
- const sal_Unicode* pcEnd = pcChar + rBiffTargetUrl.getLength();
- for( ; (eState != STATE_ERROR) && (pcChar < pcEnd); ++pcChar )
- {
- sal_Unicode cChar = *pcChar;
- switch( eState )
- {
- case STATE_START:
- if( (cChar == rCChars.mcThisWorkbook) || (cChar == rCChars.mcThisSheet) || (cChar == rCChars.mcSameSheet) )
- {
- if( pcChar + 1 < pcEnd )
- eState = STATE_ERROR;
- if( cChar == rCChars.mcSameSheet )
- eTargetType = BIFF_TARGETTYPE_SAMESHEET;
- }
- else if( cChar == rCChars.mcExternal )
- eState = (pcChar + 1 < pcEnd) ? STATE_ENCODED_PATH_START : STATE_ERROR;
- else if( cChar == rCChars.mcInternal )
- eState = (pcChar + 1 < pcEnd) ? STATE_SHEETNAME : STATE_ERROR;
- else
- eState = lclAppendUrlChar( aTargetUrl, cChar, true ) ? STATE_UNENCODED : STATE_ERROR;
- break;
-
- case STATE_ENCODED_PATH_START:
- if( cChar == BIFF_URL_DRIVE )
- eState = STATE_ENCODED_DRIVE;
- else if( cChar == BIFF_URL_ROOT )
- {
- aTargetUrl.append( sal_Unicode( '/' ) );
- eState = STATE_ENCODED_PATH;
- }
- else if( cChar == BIFF_URL_PARENT )
- aTargetUrl.appendAscii( "../" );
- else if( cChar == BIFF_URL_RAW )
- eState = STATE_ENCODED_URL;
- else if( cChar == BIFF_URL_INSTALL )
- eState = STATE_UNSUPPORTED;
- else if( cChar == BIFF_URL_INSTALL2 )
- eState = STATE_UNSUPPORTED;
- else if( cChar == BIFF_URL_LIBRARY )
- {
- eState = STATE_ENCODED_PATH;
- eTargetType = BIFF_TARGETTYPE_LIBRARY;
- }
- else if( (getBiff() == BIFF4) && (cChar == BIFF4_URL_SHEET) )
- eState = STATE_SHEETNAME;
- else if( cChar == '[' )
- eState = STATE_FILENAME;
- else if( lclAppendUrlChar( aTargetUrl, cChar, true ) )
- eState = STATE_ENCODED_PATH;
- else
- eState = STATE_ERROR;
- break;
-
- case STATE_ENCODED_PATH:
- if( cChar == BIFF_URL_SUBDIR )
- aTargetUrl.append( sal_Unicode( '/' ) );
- else if( cChar == '[' )
- eState = STATE_FILENAME;
- else if( !lclAppendUrlChar( aTargetUrl, cChar, true ) )
- eState = STATE_ERROR;
- break;
-
- case STATE_ENCODED_DRIVE:
- if( cChar == BIFF_URL_UNC )
- {
- aTargetUrl.appendAscii( "file://" );
- eState = STATE_ENCODED_PATH;
- }
- else
- {
- aTargetUrl.appendAscii( "file:///" );
- eState = lclAppendUrlChar( aTargetUrl, cChar, false ) ? STATE_ENCODED_PATH : STATE_ERROR;
- aTargetUrl.appendAscii( ":/" );
- }
- break;
-
- case STATE_ENCODED_URL:
- {
- sal_Int32 nLength = cChar;
- if( nLength + 1 == pcEnd - pcChar )
- aTargetUrl.append( pcChar + 1, nLength );
- else
- eState = STATE_ERROR;
- }
- break;
-
- case STATE_UNENCODED:
- if( cChar == BIFF_URL_SUBDIR )
- {
- orClassName = aTargetUrl.makeStringAndClear();
- eState = bFromDConRec ? STATE_ERROR : STATE_DDE_OLE;
- eTargetType = BIFF_TARGETTYPE_DDE_OLE;
- }
- else if( cChar == '[' )
- eState = STATE_FILENAME;
- else if( !lclAppendUrlChar( aTargetUrl, cChar, true ) )
- eState = STATE_ERROR;
- break;
-
- case STATE_DDE_OLE:
- if( !lclAppendUrlChar( aTargetUrl, cChar, true ) )
- eState = STATE_ERROR;
- break;
-
- case STATE_FILENAME:
- if( cChar == ']' )
- eState = STATE_SHEETNAME;
- else if( !lclAppendUrlChar( aTargetUrl, cChar, true ) )
- eState = STATE_ERROR;
- break;
-
- case STATE_SHEETNAME:
- if( !lclAppendUrlChar( aSheetName, cChar, false ) )
- eState = STATE_ERROR;
- break;
-
- case STATE_UNSUPPORTED:
- pcChar = pcEnd - 1;
- break;
-
- case STATE_ERROR:
- break;
- }
- }
-
- OSL_ENSURE( (eState != STATE_ERROR) && (pcChar == pcEnd),
- OStringBuffer( "AddressConverter::parseBiffTargetUrl - parser error in target \"" ).
- append( OUStringToOString( rBiffTargetUrl, RTL_TEXTENCODING_UTF8 ) ).append( '"' ).getStr() );
- bool bParserOk = (eState != STATE_ERROR) && (eState != STATE_UNSUPPORTED) && (pcChar == pcEnd);
-
- if( bParserOk )
- {
- orTargetUrl = aTargetUrl.makeStringAndClear();
- orSheetName = aSheetName.makeStringAndClear();
- }
- else
- {
- orClassName = orTargetUrl = orSheetName = OUString();
- }
-
- return bParserOk ? eTargetType : BIFF_TARGETTYPE_UNKNOWN;
-}
-
// ----------------------------------------------------------------------------
bool AddressConverter::checkCol( sal_Int32 nCol, bool bTrackOverflow )
diff --git a/sc/source/filter/oox/richstring.cxx b/sc/source/filter/oox/richstring.cxx
index 51f3f6b7adf2..bcc62f96fece 100644
--- a/sc/source/filter/oox/richstring.cxx
+++ b/sc/source/filter/oox/richstring.cxx
@@ -140,26 +140,6 @@ void FontPortionModel::read( SequenceInputStream& rStrm )
mnFontId = rStrm.readuInt16();
}
-void FontPortionModel::read( BiffInputStream& rStrm, BiffFontPortionMode eMode )
-{
- switch( eMode )
- {
- case BIFF_FONTPORTION_8BIT:
- mnPos = rStrm.readuInt8();
- mnFontId = rStrm.readuInt8();
- break;
- case BIFF_FONTPORTION_16BIT:
- mnPos = rStrm.readuInt16();
- mnFontId = rStrm.readuInt16();
- break;
- case BIFF_FONTPORTION_OBJ:
- mnPos = rStrm.readuInt16();
- mnFontId = rStrm.readuInt16();
- rStrm.skip( 4 );
- break;
- }
-}
-
// ----------------------------------------------------------------------------
void FontPortionModelList::appendPortion( const FontPortionModel& rPortion )
diff --git a/sc/source/filter/oox/stylesbuffer.cxx b/sc/source/filter/oox/stylesbuffer.cxx
index c5f555998e03..62d25080903c 100644
--- a/sc/source/filter/oox/stylesbuffer.cxx
+++ b/sc/source/filter/oox/stylesbuffer.cxx
@@ -2581,20 +2581,6 @@ void Dxf::importDxf( SequenceInputStream& rStrm )
mxNumFmt = getStyles().createNumFmt( nNumFmtId, aFmtCode );
}
-void Dxf::importCfRule( BiffInputStream& rStrm, sal_uInt32 nFlags )
-{
- if( getFlag( nFlags, BIFF_CFRULE_FONTBLOCK ) )
- createFont()->importCfRule( rStrm );
- if( getFlag( nFlags, BIFF_CFRULE_ALIGNBLOCK ) )
- rStrm.skip( 8 );
- if( getFlag( nFlags, BIFF_CFRULE_BORDERBLOCK ) )
- createBorder()->importCfRule( rStrm, nFlags );
- if( getFlag( nFlags, BIFF_CFRULE_FILLBLOCK ) )
- createFill()->importCfRule( rStrm, nFlags );
- if( getFlag( nFlags, BIFF_CFRULE_PROTBLOCK ) )
- rStrm.skip( 2 );
-}
-
void Dxf::finalizeImport()
{
if( mxFont.get() )