Bug 33467 - macOS: Default printer should be taken from the OS when printing
Summary: macOS: Default printer should be taken from the OS when printing
Status: RESOLVED INSUFFICIENTDATA
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
3.3.0 release
Hardware: All macOS (All)
: medium enhancement
Assignee: Naba
URL:
Whiteboard:
Keywords: difficultyMedium, skillCpp, topicUI
Depends on:
Blocks: macOS-UI-polish
  Show dependency treegraph
 
Reported: 2011-01-25 06:52 UTC by Vossman
Modified: 2020-11-24 04:18 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
A test Impress presentation (12.82 KB, application/vnd.oasis.opendocument.presentation)
2019-09-24 12:37 UTC, mirko.pieropan
Details
Another test Impress presentation (5.13 MB, application/vnd.oasis.opendocument.presentation)
2019-09-24 12:39 UTC, mirko.pieropan
Details
Print window in LO Impress on MacOS (356.53 KB, image/png)
2019-09-25 11:36 UTC, mirko.pieropan
Details
Print window in LO Writer on MacOS (418.35 KB, image/png)
2019-09-25 11:36 UTC, mirko.pieropan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vossman 2011-01-25 06:52:29 UTC
Under Mac OS X, it has an awesome feature that remember my default printer depending on my location (I have two offices each with their own laser printer). NeoOffice was setup to take this default printer choice from the system when I print. That way don't have to change it every time I want to print.

With LO, I end up printing to my unplugged ink jet (where can I change the default???) then I have to delete that job and submit again. Ugh.
Comment 1 Noel Power 2011-01-25 07:24:00 UTC
-> thorsten to evaluate this enhancement
Comment 2 Thorsten Behrens (allotropia) 2011-01-26 04:33:31 UTC
Probably just a question of calling http://www.cups.org/documentation.php/api-cups.html#cupsGetDefault if default printer is wanted -
Comment 3 Florian Reisinger 2012-05-18 09:53:54 UTC
Deleted "Easyhack" from summary.
Comment 4 Thorsten Behrens (allotropia) 2013-09-12 16:14:38 UTC
Apologies for not having gotten around fixing this bug yet; unfortunately in future I'll have even less time at my disposal for this, so I'm freeing up ownership for other volunteers to take over.
Comment 5 Björn Michaelsen 2013-10-04 18:46:04 UTC
adding LibreOffice developer list as CC to unresolved EasyHacks for better visibility.

see e.g. http://nabble.documentfoundation.org/minutes-of-ESC-call-td4076214.html for details
Comment 6 Hussian Alamri 2014-05-16 06:30:22 UTC
I want to volunteer and fix this.

Should I use OS X (Cocoa) APIs to find out the default printer? I think LibreOffice aims for cross-platform portability so unlike NeoOffice it doesn't include OS X specific code.

I will attempt fixing it using CUPS, maybe it can be fixed and maybe it is a CUPS limitation. If I can use OS X specific API/syscalls let me know.

One last question, where can I find the code related to printing?

Thank you.

-- Alamri Hussian
Comment 7 How can I remove my account? 2014-05-16 06:35:08 UTC
Nah, feel free to use OS X -specific code if it helps, obviously putting it inside an appropriare ifdef.

After all, the "U" in "CUPS" stands for "Unix", and our most important platform is Windows (number of users, and especially paying customers;). So it isn't as if using CUPS would be cross-platform either.

I would start looking in vcl. I think printing related functionality already *is* in platform-specific code in vcl.
Comment 8 Hussian Alamri 2014-05-16 06:57:23 UTC
Okay. I'm on it. I'm reading Apple Developer guide regarding printing right now.

git grep NSPrint revealed a number of files that I need to look into.

Is there a top-level view of the source code that can help me see how the source files are connected to one another?

I will reply back with progress updates.

-- Alamri Hussian.
Comment 9 Joel Madero 2015-02-09 04:48:13 UTC
Removing love keyword as it never really caught on and it duplicates what "EasyHack" means (code pointer + dev willing to assist if needed).
Comment 10 Robinson Tryon (qubit) 2015-12-14 06:18:13 UTC Comment hidden (obsolete)
Comment 11 Michael Stahl (allotropia) 2016-01-26 17:21:03 UTC
there really should be a code pointer for this easy hack
Comment 12 jani 2016-02-17 08:03:53 UTC
We miss code pointer?
Comment 13 Chris Sherlock 2016-02-17 09:10:56 UTC
NEEDINFO should only be set if we need more information to diagnose or replicate the issue. Best not to use it if we just need to provide code pointers. Therefore setting status to NEW.
Comment 14 jani 2016-04-29 05:50:03 UTC
NEEDINFO is also used to get code pointers, but no problem.

Removed easy hack keyword, due to missing code pointers.
Comment 15 Jack Denial 2018-08-29 12:21:10 UTC Comment hidden (spam)
Comment 16 Brother Printer Customer Service Phone Number 2019-07-15 10:31:33 UTC Comment hidden (spam)
Comment 17 jones smith 2019-08-29 07:34:28 UTC Comment hidden (spam)
Comment 18 james martin 2019-08-29 12:09:07 UTC Comment hidden (spam)
Comment 19 steve 2019-09-23 16:23:05 UTC
I think (TM) this is solved. Tested macOS 10.14.6 and LO 6.3.1.2. When printing in office, the office printer is pre-selected. When printing at home, the home printer is pre-selected.

Please re-open if I am mistaken or you are still seeing this problem, in which case , please provide details about your setup and how you are able to reproduce the problem.

Version: 6.3.1.2
Build ID: b79626edf0065ac373bd1df5c28bd630b4424273
CPU threads: 8; OS: Mac OS X 10.14.6; UI render: default; VCL: osx; 
Locale: de-DE (de_DE.UTF-8); UI-Language: en-US
Calc: threaded
Comment 20 mirko.pieropan 2019-09-24 12:28:44 UTC
I tried to test this on my Mac by attempting to print a document in LO Writer and another one in LO Impress.
In the first case my office printer was preselected. In the second case I tried to open two different presentations and in one case my home printer was preselected and in the other case the office printer was preselected.

Version: 6.3.1.2
Build ID: b79626edf0065ac373bd1df5c28bd630b4424273
CPU threads: 4; OS: Mac OS X 10.13.6; UI render: default; VCL: osx; 
Locale: it-IT (it_IT.UTF-8); UI-Language: en-US
Calc: threaded

(In reply to steve -_- from comment #19)
> I think (TM) this is solved. Tested macOS 10.14.6 and LO 6.3.1.2. When
> printing in office, the office printer is pre-selected. When printing at
> home, the home printer is pre-selected.
> 
> Please re-open if I am mistaken or you are still seeing this problem, in
> which case , please provide details about your setup and how you are able to
> reproduce the problem.
> 
> Version: 6.3.1.2
> Build ID: b79626edf0065ac373bd1df5c28bd630b4424273
> CPU threads: 8; OS: Mac OS X 10.14.6; UI render: default; VCL: osx; 
> Locale: de-DE (de_DE.UTF-8); UI-Language: en-US
> Calc: threaded
Comment 21 mirko.pieropan 2019-09-24 12:37:37 UTC
Created attachment 154430 [details]
A test Impress presentation

command+print leads to my home printer to be preselected in the menu popping up.
Comment 22 mirko.pieropan 2019-09-24 12:39:08 UTC
Created attachment 154431 [details]
Another test Impress presentation

In this case Command+P led to my office printer being preselected in the print menu.
Comment 23 mirko.pieropan 2019-09-24 12:39:46 UTC
Adding attachments, please let me know if you need further details and how to retrieve them.
Comment 24 mirko.pieropan 2019-09-25 11:36:08 UTC
Created attachment 154478 [details]
Print window in LO Impress on MacOS
Comment 25 mirko.pieropan 2019-09-25 11:36:54 UTC
Created attachment 154479 [details]
Print window in LO Writer on MacOS
Comment 26 Alex Thurgood 2020-01-10 11:34:00 UTC
From my perspective testing with the supplied test Impress files brings up the default printer for my office environment (I haven't tried with the default printer at home).

I would add, however, if it makes any difference, that all of my printers (2 at work, 1 at home) are networked and not physically connected to the Mac.
Comment 27 Alex Thurgood 2020-01-10 11:37:30 UTC
I tested with

Version: 6.3.3.2
Build ID: a64200df03143b798afd1ec74a12ab50359878ed
CPU threads: 8; OS: Mac OS X 10.14.6; UI render: default; VCL: osx; 
Locale: fr-FR (fr_FR.UTF-8); UI-Language: en-US
Calc: threaded

in my work environment.
Comment 28 steve 2020-04-26 07:40:51 UTC
@mirko.pieropan@studenti.polito.it could you retest with LO 6.4.3?
Comment 29 QA Administrators 2020-10-24 05:13:19 UTC Comment hidden (obsolete)
Comment 30 QA Administrators 2020-11-24 04:18:46 UTC
Dear Vossman,

Please read this message in its entirety before proceeding.

Your bug report is being closed as INSUFFICIENTDATA 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

Warm Regards,
QA Team

MassPing-NeedInfo-FollowUp