writer vs calc behaviour in LO 6.0.1.1

I'm using the version in the subject line on Linux Mint. In calc if I
insert the date using the insert menu and the date option I get a cell
with today's date, formatted comprehensibly. If I do the same thing in
Writer I can't, the option isn't there. I must (as far as I know)
choose field then date. That gives me text that looks like "Date
(fixed)" which is not what I want. I can do a print preview and see
that it will render as one might wish but that's not what I want. I
really want to be able to simply insert today's date as a character
string.

I think the behaviour I'm seeing breaks wysiwyg.

Can anyone tell me a simple way to insert the data as characters rather
than a field?

TIA

Dave

I'm using the version in the subject line on Linux Mint. In calc if I insert the date using the insert menu and the date option I get a cell with today's date, formatted comprehensibly.

I'm not sure what you mean here. If you are using the =TODAY() or =NOW() functions, what you have is not today's date but the current date whenever your spreadsheet is reopened.

If I do the same thing in Writer I can't, the option isn't there. I must (as far as I know) choose field then date. That gives me text that looks like "Date (fixed)" which is not what I want. I can do a print preview and see
that it will render as one might wish but that's not what I want. I really want to be able to simply insert today's date as a character string.

I think your only problem here is that you have fields set to show the field name instead of their value. You can toggle this display at View | Field Names (or Ctrl+F9). Then you will see the date value as text in the editing display as well as in Page Preview and actual printout.

Can anyone tell me a simple way to insert the data as characters rather than a field?

o Copy the field.
o Paste it back over itself, but using Edit | Paste Special... (or right-click | Paste Special... or Ctrl+Shift+V) and selecting "Unformatted text" in the Paste Special dialogue.

Er, or just type the date: the default format is only eight characters (in my locale).

I think the behaviour I'm seeing breaks wysiwyg.

I hope so. Wysiwyg was always a bad idea: what you need in the editing display is a clear indication of the structure of your document, not necessarily its appearance. That way, you can see and have some control over what will happen when it is displayed on another system or you (or others) make any change.

I trust this helps.

Brian Barker

Hi,

I'm using the version in the subject line on Linux Mint. In calc if I
insert the date using the insert menu and the date option I get a cell
with today's date, formatted comprehensibly. If I do the same thing in
Writer I can't, the option isn't there. I must (as far as I know)
choose field then date. That gives me text that looks like "Date
(fixed)" which is not what I want. I can do a print preview and see
that it will render as one might wish but that's not what I want. I
really want to be able to simply insert today's date as a character
string.

I think the behaviour I'm seeing breaks wysiwyg.

Can anyone tell me a simple way to insert the data as characters rather
than a field?

not exactly what you're looking for, but here we go: as the shortcut to get a date in a Calc cell is Ctrl + ; you might duplicate that behaviour in Writer.

Here's how: create a new shortcut that does that, too.

In Writer:
1. Go to Tools > Customize
2. Select the Keyboard tab
3. Check that Writer is the option selected (top right radiobutton)
4. In the Shortcut keys panel, select the Ctrl + ; shortcut
5. Select :
category: Insert
function: Date
6. Click Modify
The selected shortcut appears in the Keys panel
7. OK

From now on, hitting Ctrl + ; in Writer inserts a date field (yes, sorry).

Now, if you want to actually insert a string, you'll need a macro :

1. Add the following macro to MyMacros & Dialogs.Standard.Module1 (for instance)

8< --------------------------------------------
Sub InsertTodaysDate()

  Dim oVCur As Object 'visible cursor
  Dim oWCur As Object 'writing cursor
  Dim l_Str As String

  'get the date
  l_Str = CStr(Date)
  'get the view cursor
  oVCur = ThisComponent.CurrentController.ViewCursor
  'set a writing cursor at the visible cursor place
  oWCur = oVCur.Text.CreateTextCursorByRange(oVCur)
  'write...
  oWCur.String = l_Str
  
End Sub 'InsertTodaysDate
------------------------------------------- >8

2. Set the shortcut (as shown above) to the said macro, with
category: select LibreOffice Macros > MyMacros > (your macro library) > (your macro module)
function: your macro name

Now Ctrl + ; inserts todays date at the cursor position.

HTH,

Maybe use this process.

1. Insert the field date (fixed) in the format required
2. Select the inserted field date (fixed)
3. Cut the selected data
4. Paste (unformatted)

if this is too cumbersome code something as a macro and link it to the tool bar.

Alex

>I'm using the version in the subject line on Linux Mint. In calc if
>I insert the date using the insert menu and the date option I get a
>cell with today's date, formatted comprehensibly.

I'm not sure what you mean here. If you are using the =TODAY() or
=NOW() functions, what you have is not today's date but the current
date whenever your spreadsheet is reopened.

I'm not using a function. In calc I pull down the insert menu and click
on date. Then the cell contents are text characters with today's
date. Not a function. This is what I'd like to be able to do in Writer.

Thanks to those who suggested workarounds.

Dave