Bug 69931 - [Writer] getString and setString lack symmetry : CR --> CRLF
Summary: [Writer] getString and setString lack symmetry : CR --> CRLF
Status: RESOLVED INVALID
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-29 14:12 UTC by j.tronel
Modified: 2015-04-01 14:52 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
GetString converts CR to CRLF (11.20 KB, application/vnd.oasis.opendocument.text)
2013-09-29 14:12 UTC, j.tronel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description j.tronel 2013-09-29 14:12:51 UTC
Created attachment 86802 [details]
GetString converts CR to CRLF

Hi,

Appended file uses following (very basic!) macro :

Sub Main
	doc = ThisComponent
	source = doc.CurrentSelection(0)
	dest = doc.Text.End
	dest.SetString(source.GetString)
End Sub

Selecting entire text and pushing button ought to append a second copy.

But a linefeed is added after each end of paragraph.

Seems that GetString converts CR to CRLF, but SetString does not reverse the process.

Not deadly indeed, but annoying for anybody unaware of the problem.

A possible workaround :

Sub Main
	doc = ThisComponent
	source = doc.CurrentSelection(0)
	dest = doc.Text.End
	dest.SetString(Join(Split(source.GetString,Chr(13)&Chr(10)),Chr(13)))
End Sub
Comment 1 Julien Nabet 2013-09-29 14:51:20 UTC
Comment on attachment 86802 [details]
GetString converts CR to CRLF

Mimetype fixed
Comment 2 ign_christian 2014-07-05 08:54:35 UTC
Hello..just a ping since it's been reported months ago. Does it still happen in 4.2.5.2 or 4.3.0.2 ?

If resolved please change status to RESOLVED WORKSFORME, unless UNCONFIRMED
Comment 3 QA Administrators 2015-02-19 04:39:56 UTC
Dear Bug Submitter,

This bug has been in NEEDINFO status with no change for at least 6 months. Please provide the requested information as soon as possible and mark the bug as UNCONFIRMED. Due to regular bug tracker maintenance, if the bug is still in NEEDINFO status with no change in 30 days the QA team will close the bug as INVALID due to lack of needed information.

For more information about our NEEDINFO policy please read the wiki located here: 
https://wiki.documentfoundation.org/QA/FDO/NEEDINFO

If you have already provided the requested information, please mark the bug as UNCONFIRMED so that the QA team knows that the bug is ready to be confirmed.


Thank you for helping us make LibreOffice even better for everyone!


Warm Regards,
QA Team

Message generated on: 2015-02-18
Comment 4 QA Administrators 2015-04-01 14:52:15 UTC
Dear Bug Submitter,

Please read this message in its entirety before proceeding.

Your bug report is being closed as INVALID due to inactivity and
a lack of information which is needed in order to accurately
reproduce and confirm the problem. We encourage you to retest
your bug against the latest release. If the issue is still
present in the latest stable release, we need the following
information (please ignore any that you've already provided):

a) Provide details of your system including your operating
   system and the latest version of LibreOffice that you have
   confirmed the bug to be present

b) Provide easy to reproduce steps – the simpler the better

c) Provide any test case(s) which will help us confirm the problem

d) Provide screenshots of the problem if you think it might help

e) Read all comments and provide any requested information

Once all of this is done, please set the bug back to UNCONFIRMED
and we will attempt to reproduce the issue. Please do not:

a) respond via email 

b) update the version field in the bug or any of the other details
   on the top section of our bug tracker

-- The LibreOffice QA Team This NEEDINFO Message was generated on: 2015-04-01

Warm Regards,
QA Team