Bug 85102 - FORMATTING: Autoformat straight quotes using the Search and replace dialog
Summary: FORMATTING: Autoformat straight quotes using the Search and replace dialog
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Find&Replace-Dialog
  Show dependency treegraph
 
Reported: 2014-10-16 17:25 UTC by Adrià
Modified: 2021-03-01 08:21 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adrià 2014-10-16 17:25:49 UTC
==This is not a bug, it is an enhancement request==

Problem description: The problem is not related to the autocorrect options under the Tools menu, since this option applies to newly inserted quotation marks. The problem has to do with all the straight quotation marks (both double " and simple ') of a text and their replacement by formatted quotation marks using the Search and replace function.

Steps to reproduce:
(with straight quotation marks, simple or double, in a text)
1. Search and replace
2. Search with regular expressions ("\< for opening quotes and \>" for closing quotes)
3. Replace by formatted quotes (“ and ”)

Current behavior:
In order to replace straight quotes by formatted quotes using the Search and replace dialog, opening and closing quotes must be replaced separately, since otherwise all quotes (opening and closing) will be replaced by the same character. To this end, the only way as far as I know, is using regular expressions to find opening and closing quotes separately. I would search firstly the opening quotes of a text (and therefore, with characters to the right) by searching "\< (regular expressions enabled) and replace them with formatted opening quotes (“). After that I would search the closing quotes (or, at this point, the remaining straight quotes of a text) by searching \>" (regular expressions enabled) and replace them with formatted closing quotes (”).

Expected behavior:
It would be really handy if the search and replace function could automatically detect whether the straight quotes should have opening or closing format according to the presence or the absence of characters to the left and to right and format them automatically, without the need of regular expressions. MSWord allows users to autoformat quotes by searching and replacing quotes by the exactly same character. Please see the Note in the following link:
http://office.microsoft.com/en-us/word-help/change-curly-quotes-to-straight-quotes-and-vice-versa-HP005190124.aspx

Thank you very much for your attention and your time. This is my first submission and hope everything is understandable.
Comment 1 Adolfo Jayme Barrientos 2014-10-18 02:55:35 UTC
Thank you for your clear, detailed report.
Comment 2 Safeer Pasha 2021-03-01 08:21:59 UTC
please test again in:
 
Version: 7.1.0.3 / LibreOffice Community
Build ID: 10(Build:3)
CPU threads: 4; OS: Linux 5.10; UI render: default; VCL: kf5
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded