diff options
author | Katarina Behrens <Katarina.Behrens@cib.de> | 2015-07-02 15:34:11 +0200 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2015-07-06 23:26:56 +0000 |
commit | 0251e61640b94094918406b33ee7b05564409feb (patch) | |
tree | 06149a67ca4d2afbb87c80316fc78eca2e4ee198 /vcl | |
parent | cd4bbac0a866432adf7a7104add3a55f43636576 (diff) |
tdf#91362: Make "printer was modified" status persistent
To test:
Scenario 1:
* go to Writer -> Format -> Page
* select page format and orientation, if possible a different one than the default
in your env.
* File -> Print -> Properties should now show those values (and not the default
values from the printer)
Scenario 2 (aka Scenario 2 from tdf#61186)
* now go to File -> Printer settings
* change page format and orientation, if possible to yet a different one than the
printer default and a page one
* File -> Print -> Properties should now show what was selected in Printer settings
and not the format of the page
Change-Id: Ibc84540f428b79dbec2587c50eefe526a62751b3
Reviewed-on: https://gerrit.libreoffice.org/16716
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/generic/print/prtsetup.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/print3.cxx | 16 |
2 files changed, 14 insertions, 4 deletions
diff --git a/vcl/generic/print/prtsetup.cxx b/vcl/generic/print/prtsetup.cxx index 1d69db445b53..25fddc4e07ef 100644 --- a/vcl/generic/print/prtsetup.cxx +++ b/vcl/generic/print/prtsetup.cxx @@ -282,11 +282,11 @@ IMPL_LINK( RTSPaperPage, SelectHdl, ListBox*, pBox ) } if( pKey ) { - m_pParent->SetDataModified( true ); PPDValue* pValue = static_cast<PPDValue*>(pBox->GetSelectEntryData()); m_pParent->m_aJobData.m_aContext.setValue( pKey, pValue ); update(); } + m_pParent->SetDataModified( true ); return 0; } diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx index edbae14c0dc9..be73eaa509d9 100644 --- a/vcl/source/gdi/print3.cxx +++ b/vcl/source/gdi/print3.cxx @@ -152,6 +152,7 @@ public: bool mbLastPage; bool mbReversePageOrder; bool mbPapersizeFromSetup; + bool mbPrinterModified; view::PrintableState meJobState; vcl::PrinterController::MultiPageSetup maMultiPage; @@ -186,6 +187,7 @@ public: mbLastPage( false ), mbReversePageOrder( false ), mbPapersizeFromSetup( false ), + mbPrinterModified( false ), meJobState( view::PrintableState_JOB_STARTED ), mpProgress( NULL ), mnDefaultPaperBin( -1 ), @@ -817,7 +819,7 @@ bool PrinterController::setupPrinter( vcl::Window* i_pParent ) // whatever happens to be the current page // (but only if the printer config has changed, otherwise // don't override printer page auto-detection - tdf#91362) - if (!mpImplData->mxPrinter->IsDefPrinter()) + if (getPrinterModified()) { resetPaperToLastConfigured(); } @@ -849,8 +851,6 @@ bool PrinterController::setupPrinter( vcl::Window* i_pParent ) { mpImplData->maPageCache.invalidate(); } - // Settings have been modified (i.e. this printer is no longer default ) - mpImplData->mxPrinter->SetDefPrinter( false ); } else { @@ -1374,6 +1374,16 @@ bool PrinterController::getPapersizeFromSetup() const return mpImplData->mbPapersizeFromSetup; } +void PrinterController::setPrinterModified( bool i_bPrinterModified ) +{ + mpImplData->mbPrinterModified = i_bPrinterModified; +} + +bool PrinterController::getPrinterModified() const +{ + return mpImplData->mbPrinterModified; +} + Sequence< PropertyValue > PrinterController::getJobProperties( const Sequence< PropertyValue >& i_rMergeList ) const { std::unordered_set< OUString, OUStringHash > aMergeSet; |