summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
Diffstat (limited to 'sw')
-rw-r--r--sw/source/filter/docx/swdocxreader.cxx18
1 files changed, 14 insertions, 4 deletions
diff --git a/sw/source/filter/docx/swdocxreader.cxx b/sw/source/filter/docx/swdocxreader.cxx
index 7a3cc9425bd5..8a20cf0d2a8a 100644
--- a/sw/source/filter/docx/swdocxreader.cxx
+++ b/sw/source/filter/docx/swdocxreader.cxx
@@ -111,6 +111,19 @@ bool SwDOCXReader::MakeEntries( SwDoc *pD, SwTextBlocks &rBlocks )
sal_uInt16 nGlosEntry = 0;
SwContentNode* pCNd = nullptr;
do {
+ // Get name - first paragraph
+ OUString aLNm;
+ {
+ SwPaM aPam( aStart );
+ SwNodeIndex& rIdx = aPam.GetPoint()->nNode;
+ ++rIdx;
+ aLNm = aPam.GetNode().GetTextNode()->GetText();
+ }
+
+ // Do not copy name
+ aStart++;
+
+ // Get content
SwPaM aPam( aStart );
{
SwNodeIndex& rIdx = aPam.GetPoint()->nNode;
@@ -139,10 +152,7 @@ bool SwDOCXReader::MakeEntries( SwDoc *pD, SwTextBlocks &rBlocks )
// Now we have the right selection for one entry
rBlocks.ClearDoc();
- // TODO: correct entry name
- const OUString rLNm = "ImportedAutoText";
-
- OUString sShortcut = rLNm;
+ OUString sShortcut = aLNm;
// Need to check make sure the shortcut is not already being used
sal_Int32 nStart = 0;