summaryrefslogtreecommitdiff
path: root/dtrans
diff options
context:
space:
mode:
authorThorsten Behrens <Thorsten.Behrens@CIB.de>2016-07-14 02:38:04 +0200
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2016-07-14 02:41:35 +0200
commitde162ef3c7d447e1faf3bc8d0766fc0e34d80b49 (patch)
tree879b1fbcad96550a172c32a3e360cf5c612b9aa0 /dtrans
parentb93cfe09c21b996cd3f1c40037e0ebf712922006 (diff)
dtrans: remove commented-out code
This was disabled since f87fd75f68148b9b5ddff7f62ce12c5ec1d7757a INTEGRATION: CWS dtransfix (1.11.136) Change-Id: Ica132a8b5ed13f5b70944c48e2ec5f6fdd88159e
Diffstat (limited to 'dtrans')
-rw-r--r--dtrans/source/win32/dtobj/FmtFilter.cxx108
1 files changed, 0 insertions, 108 deletions
diff --git a/dtrans/source/win32/dtobj/FmtFilter.cxx b/dtrans/source/win32/dtobj/FmtFilter.cxx
index aaa416fe4a8d..ea66d37a17c0 100644
--- a/dtrans/source/win32/dtobj/FmtFilter.cxx
+++ b/dtrans/source/win32/dtobj/FmtFilter.cxx
@@ -222,114 +222,6 @@ Sequence< sal_Int8 > SAL_CALL OOBmpToWinDIB( Sequence< sal_Int8 >& aOOBmp )
return winDIBStream;
}
-// converts the openoffice text/html clipboard format to the HTML Format
-// well known under MS Windows
-// the MS HTML Format has a header before the real html data
-//
-// Version:1.0 Version number of the clipboard. Staring is 0.9
-// StartHTML: Byte count from the beginning of the clipboard to the start
-// of the context, or -1 if no context
-// EndHTML: Byte count from the beginning of the clipboard to the end
-// of the context, or -1 if no context
-// StartFragment: Byte count from the beginning of the clipboard to the
-// start of the fragment
-// EndFragment: Byte count from the beginning of the clipboard to the
-// end of the fragment
-// StartSelection: Byte count from the beginning of the clipboard to the
-// start of the selection
-// EndSelection: Byte count from the beginning of the clipboard to the
-// end of the selection
-//
-// StartSelection and EndSelection are optional
-// The fragment should be preceded and followed by the HTML comments
-// <!--StartFragment--> and <!--EndFragment--> (no space between !-- and the
-// text
-
-/*
-Sequence< sal_Int8 > SAL_CALL TextHtmlToHTMLFormat( Sequence< sal_Int8 >& aTextHtml )
-{
- OSL_ASSERT( aTextHtml.getLength( ) > 0 );
-
- // check parameter
- if ( !(aTextHtml.getLength( ) > 0) )
- return Sequence< sal_Int8 >( );
-
- // we create a buffer with the approximated size of
- // the HTML Format header
- char aHTMLFmtHdr[120];
-
- memset( aHTMLFmtHdr, 0, sizeof( aHTMLFmtHdr ) );
-
- // fill the buffer with dummy values to calc the
- // exact length
-
- wsprintf(
- aHTMLFmtHdr,
- "Version:1.0\nStartHTML:%010d\r\nnEndHTML:%010d\r\nStartFragment:%010\r\nnEndFragment:%010d\r\n", 0, 0, 0, 0 );
-
- sal_uInt32 lHTMLFmtHdr = rtl_str_getLength( aHTMLFmtHdr );
-
- // the office always writes the start
- // and end html tag in upper cases and
- // without spaces
- // both tags don't allow parameters
- OString startHtmlTag( "<HTML>" );
- OString endHtmlTag( "</HTML>" );
-
- // we don't include '>' into the search
- // because the body tag allows parameters
- // e.g. <BODY param>
- OString startBodyTag( "<BODY" );
- OString endBodyTag( "</BODY" );
-
- OString textHtml(
- reinterpret_cast< const sal_Char* >( aTextHtml.getConstArray( ) ),
- aTextHtml.getLength( ) );
-
- sal_Int32 nStartHtml = textHtml.indexOf( startHtmlTag );
- sal_Int32 nEndHtml = textHtml.indexOf( endHtmlTag );
- sal_Int32 nStartFrgmt = textHtml.indexOf( startBodyTag );
- sal_Int32 nEndFrgmt = textHtml.indexOf( endBodyTag );
-
- OSL_ASSERT( (nStartHtml >= 0) && (nEndHtml > nStartHtml) && (nStartFrgmt > nStartHtml) && (nEndFrgmt > nStartFrgmt) );
-
- Sequence< sal_Int8 > aHTMLFmtSequence;
-
- if ( (nStartHtml > -1) && (nEndHtml > -1) && (nStartFrgmt > -1) && (nEndFrgmt > -1) )
- {
- nStartHtml = nStartHtml + lHTMLFmtHdr - 1; // we start one before <HTML> Word 2000 does also so
- nEndHtml = nEndHtml + lHTMLFmtHdr + endHtmlTag.getLength( ) + 1; // our SOffice 5.2 wants 2 behind </HTML>?
- nStartFrgmt = nStartFrgmt + startBodyTag.getLength( ) + lHTMLFmtHdr; // after the <BODY> tag
- nEndFrgmt = nEndFrgmt + lHTMLFmtHdr;
-
- // fill the html header
- memset( aHTMLFmtHdr, 0, sizeof( aHTMLFmtHdr ) );
-
- wsprintf(
- aHTMLFmtHdr,
- "Version:1.0\nStartHTML:%010d\r\nEndHTML:%010d\r\nStartFragment:%010d\r\nEndFragment:%010d\r\n",
- nStartHtml, nEndHtml, nStartFrgmt, nEndFrgmt );
-
- // we add space for a trailing \0
- aHTMLFmtSequence.realloc( lHTMLFmtHdr + aTextHtml.getLength( ) + 1 );
- memset( aHTMLFmtSequence.getArray( ), 0, aHTMLFmtSequence.getLength( ) );
-
- // copy the HTML Format header
- memcpy(
- static_cast< LPVOID >( aHTMLFmtSequence.getArray( ) ),
- static_cast< LPVOID >( aHTMLFmtHdr ), lHTMLFmtHdr );
-
- // concat the text/html
- memcpy(
- static_cast< LPVOID >( aHTMLFmtSequence.getArray( ) + lHTMLFmtHdr ),
- static_cast< LPVOID >( aTextHtml.getArray( ) ),
- aTextHtml.getLength( ) );
- }
-
- return aHTMLFmtSequence;
-}
-*/
-
std::string GetHtmlFormatHeader(size_t startHtml, size_t endHtml, size_t startFragment, size_t endFragment)
{
std::ostringstream htmlHeader;