[Libreoffice-commits] core.git: dtrans/source
Thorsten Behrens
Thorsten.Behrens at CIB.de
Thu Jul 14 00:42:35 UTC 2016
dtrans/source/win32/dtobj/FmtFilter.cxx | 108 --------------------------------
1 file changed, 108 deletions(-)
New commits:
commit de162ef3c7d447e1faf3bc8d0766fc0e34d80b49
Author: Thorsten Behrens <Thorsten.Behrens at CIB.de>
Date: Thu Jul 14 02:38:04 2016 +0200
dtrans: remove commented-out code
This was disabled since f87fd75f68148b9b5ddff7f62ce12c5ec1d7757a
INTEGRATION: CWS dtransfix (1.11.136)
Change-Id: Ica132a8b5ed13f5b70944c48e2ec5f6fdd88159e
diff --git a/dtrans/source/win32/dtobj/FmtFilter.cxx b/dtrans/source/win32/dtobj/FmtFilter.cxx
index aaa416f..ea66d37 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;
More information about the Libreoffice-commits
mailing list