summaryrefslogtreecommitdiff
path: root/oox/source/drawingml
diff options
context:
space:
mode:
authorTibor Nagy <nagy.tibor2@nisz.hu>2022-08-22 10:54:53 +0200
committerNagy Tibor <nagy.tibor2@nisz.hu>2022-09-09 14:05:26 +0200
commitfabfa4bd23e89a2d5b6e232cd2eab61996534659 (patch)
tree0584d084074580998c3298a57e3b6f4b850fb38c /oox/source/drawingml
parent3a195e99b3e98b1784cad62531660e062e3c2df1 (diff)
tdf#150719 PPTX import: fix hyperlink format (lost underline)
Hypertext lost its formatting partially: e.g. underline character setting lost, except on the last word. Follow-up to commit commit a761a51d9db3a2771ca9fd6ab233c513aa5d8ecf "tdf#149311 PPTX export: fix internal hyperlink on texts". Clean-up of commit 855a56fea4561135a63cb729d7a625a950b210e7 "tdf#148965 PPTX import: fix internal hyperlinks on shapes" and commit cec1f712c87e557e1b7313e0dbef4a635f69d953 "tdf#144918 PPTX import: fix internal hyperlink on shapes" and commit 7eb0e52527e729a21973e70d5be8e0a6779ec748 "tdf#142648 PPTX: import long slide names to avoid broken link export". Change-Id: I1de8b06361c7b9529a70a039e194db88460cc27b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138669 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'oox/source/drawingml')
-rw-r--r--oox/source/drawingml/hyperlinkcontext.cxx4
-rw-r--r--oox/source/drawingml/textrun.cxx6
2 files changed, 3 insertions, 7 deletions
diff --git a/oox/source/drawingml/hyperlinkcontext.cxx b/oox/source/drawingml/hyperlinkcontext.cxx
index ab52c0f5e397..920d37609f8f 100644
--- a/oox/source/drawingml/hyperlinkcontext.cxx
+++ b/oox/source/drawingml/hyperlinkcontext.cxx
@@ -29,6 +29,8 @@
#include <oox/token/properties.hxx>
#include <oox/token/tokens.hxx>
#include <o3tl/string_view.hxx>
+#include <ooxresid.hxx>
+#include <strings.hrc>
using namespace ::oox::core;
using namespace ::com::sun::star::uno;
@@ -122,7 +124,7 @@ HyperLinkContext::HyperLinkContext( ContextHandler2Helper const & rParent,
{
const OUString aSlideType( sHref.copy( 0, nIndex2 ) );
if ( aSlideType.match( "slide" ) )
- sURL = "#Slide " + OUString::number( nPageNumber );
+ sURL = "#" + URLResId(STR_SLIDE_NAME) + " " + OUString::number( nPageNumber );
else if ( aSlideType.match( "notesSlide" ) )
sURL = "#Notes " + OUString::number( nPageNumber );
// else: todo for other types such as notesMaster or slideMaster as they can't be referenced easily
diff --git a/oox/source/drawingml/textrun.cxx b/oox/source/drawingml/textrun.cxx
index 339d50bb4ff0..6bfc3701fedb 100644
--- a/oox/source/drawingml/textrun.cxx
+++ b/oox/source/drawingml/textrun.cxx
@@ -163,12 +163,6 @@ sal_Int32 TextRun::insertAt(
PropertySet aFieldTextPropSet( xTextFieldCursor );
aTextCharacterProps.pushToPropSet( aFieldTextPropSet, rFilterBase );
-
- oox::core::TextField aTextField;
- aTextField.xText = xText;
- aTextField.xTextCursor = xTextFieldCursor;
- aTextField.xTextField = xField;
- rFilterBase.getTextFieldStack().push_back( aTextField );
}
else
{