[Libreoffice] vcl/unx: remove duplicate printer code

Joachim joachim.tremouroux at gmail.com
Fri Dec 17 05:25:32 PST 2010


On 12/17/2010 11:22 AM, Caolán McNamara wrote:
> On Wed, 2010-12-15 at 19:58 +0100, Joachim wrote:
>>
>> - The following removed methods were not strictly identical to the
>> existing:
>> BOOL PspSalInfoPrinter::Setup( SalFrame* pFrame, ImplJobSetup* pJobSetup )
>> void vcl_sal::PrinterUpdate::doUpdate()
>> void vcl_sal::PrinterUpdate::update()
> Hmm, I don't think that's going to fly. They are different, and need to
> be different seeing as one pumps the events into the X11 event loop and
> the headless one doesn't have such a loop.
>
Hey, it seems I was not very awake when I detected they were not 
*strictly* identical...

>   What is a problem however is that there are two different
> vcl_sal::PrinterUpdate so that needs to be retweaked to be something
> that can be different per vclplug.
>
> Let me poke at this a bit and see if I can reorganize it to make it easy
> to do this.
>

I was busy writing a  common base class for SvpSalInstance and 
X11SalInstance for the Printer methods, and possibly the Mutex ones.
Of course I need to take into account your above remark for the 
xxxSalInfoPrinter class.

If I look at the different create_SalInstance functions, there is always 
an instance of xxxSalInstance. Right?

So we can move the the PrinterUpdate code in the xxxSalInstances 
classes, keep a static pointer to the instance and make PrinterUpdate 
forward the methods to that instance?


Regards,
Joachim.




More information about the LibreOffice mailing list