diff options
-rw-r--r-- | sw/source/core/text/EnhancedPDFExportHelper.cxx | 11 | ||||
-rw-r--r-- | sw/source/core/text/txthyph.cxx | 12 |
2 files changed, 11 insertions, 12 deletions
diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx index fe8b0bd7c9a2..462576aa49b4 100644 --- a/sw/source/core/text/EnhancedPDFExportHelper.cxx +++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx @@ -760,7 +760,8 @@ void SwTaggedPDFHelper::SetAttributes( vcl::PDFWriter::StructElement eType ) case vcl::PDFWriter::Span : case vcl::PDFWriter::Quote : case vcl::PDFWriter::Code : - if( POR_HYPHSTR == pPor->GetWhichPor() || POR_SOFTHYPHSTR == pPor->GetWhichPor() ) + if( POR_HYPHSTR == pPor->GetWhichPor() || POR_SOFTHYPHSTR == pPor->GetWhichPor() || + POR_HYPH == pPor->GetWhichPor() || POR_SOFTHYPH == pPor->GetWhichPor() ) bActualText = true; else { @@ -783,7 +784,11 @@ void SwTaggedPDFHelper::SetAttributes( vcl::PDFWriter::StructElement eType ) if ( bActualText ) { - const OUString aActualTxt = rInf.GetTxt().copy( rInf.GetIdx(), pPor->GetLen() ); + OUString aActualTxt; + if (pPor->GetWhichPor() == POR_SOFTHYPH || pPor->GetWhichPor() == POR_HYPH) + aActualTxt = OUString(0xad); // soft hyphen + else + aActualTxt = rInf.GetTxt().copy(rInf.GetIdx(), pPor->GetLen()); mpPDFExtOutDevData->SetActualText( aActualTxt ); } @@ -1364,6 +1369,8 @@ void SwTaggedPDFHelper::BeginInlineStructureElements() switch ( pPor->GetWhichPor() ) { + case POR_HYPH : + case POR_SOFTHYPH : // Check for alternative spelling: case POR_HYPHSTR : case POR_SOFTHYPHSTR : diff --git a/sw/source/core/text/txthyph.cxx b/sw/source/core/text/txthyph.cxx index 909f2ad42469..0a83abd94fb7 100644 --- a/sw/source/core/text/txthyph.cxx +++ b/sw/source/core/text/txthyph.cxx @@ -20,7 +20,6 @@ #include <hintids.hxx> #include <editeng/unolingu.hxx> #include <com/sun/star/i18n/WordType.hpp> -#include <EnhancedPDFExportHelper.hxx> #include <viewopt.hxx> #include <viewsh.hxx> #include <SwPortionHandler.hxx> @@ -370,16 +369,9 @@ sal_Bool SwTxtPortion::CreateHyphen( SwTxtFormatInfo &rInf, SwTxtGuess &rGuess ) * virtual SwHyphPortion::GetExpTxt() *************************************************************************/ -sal_Bool SwHyphPortion::GetExpTxt( const SwTxtSizeInfo &rInf, OUString &rTxt ) const +sal_Bool SwHyphPortion::GetExpTxt( const SwTxtSizeInfo &/*rInf*/, OUString &rTxt ) const { - // #i16816# tagged pdf support - const sal_Unicode cChar = rInf.GetVsh() && - rInf.GetVsh()->GetViewOptions()->IsPDFExport() && - SwTaggedPDFHelper::IsExportTaggedPDF( *rInf.GetOut() ) ? - 0xad : - '-'; - - rTxt = OUString(cChar); + rTxt = "-"; return sal_True; } |