I had the same problem (LibreOffice 7), found these entries in the registry:
- In HKEY_CLASSES_ROOT\.txt\OpenWithProgIDs: value “soffice.StarCalcDocument.6” REG_SZ “” and value “soffice.StarWriterDocument.6” REG_SZ “”
- In HKEY_LOCAL_MACHINE\SOFTWARE\The Document Foundation\LibreOffice\7.0\Capabilities\FileAssociations: value “.txt” REG_SZ “soffice.StarWriterDocument.6”
Removed both “soffice.Star…” values from HKEY_CLASSES_ROOT\.txt\OpenWithProgIDs, problem solved, only one entry remaining in Open with… sub-menu (and still opens Writer).
To be safe (if you feel uncomfortable with RegEdit), export HKEY_CLASSES_ROOT\.txt\OpenWithProgIDs before modifying its content (right-clic context menu on OpenWithProgIDs within HKEY_CLASSES_ROOT\.txt, Export) in a file, if something goes wrong, double-clic the exported file (don’t forget where you saved it) to restore the removed values.
Afterthought: removing only soffice.StarCalcDocument.6 from HKEY_CLASSES_ROOT\.txt\OpenWithProgIDs was enough, no more duplicate. The supprising thing is that both entries opened Writer, one should have opened Calc (StarCalcDocument) instead ???