diff options
author | Tibor Nagy <tibor.nagy.extern@allotropia.de> | 2024-01-31 16:49:24 +0100 |
---|---|---|
committer | Nagy Tibor <tibor.nagy.extern@allotropia.de> | 2024-02-09 12:06:01 +0100 |
commit | a67cd7b3cf03163f87811f7080cabc49750c4fd5 (patch) | |
tree | dcafe31ec7a97310ae2d94b822924769d50f9cb9 /sc/source/ui/inc | |
parent | 7327752ef5d1fa2239cdd8355fb78da41c282717 (diff) |
tdf#155218 sc: fix different page orientation in print dialog
The page orientation is correct if you set it in the page style first.
However, if you change it in the Print dialog the page layout and size
refresh but the content orientation remains the same.
Change-Id: I5e494a0714e398221bee00744d7e25c419a41df7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162845
Tested-by: Jenkins
Reviewed-by: Nagy Tibor <tibor.nagy.extern@allotropia.de>
Diffstat (limited to 'sc/source/ui/inc')
-rw-r--r-- | sc/source/ui/inc/pfuncache.hxx | 7 | ||||
-rw-r--r-- | sc/source/ui/inc/printfun.hxx | 18 |
2 files changed, 20 insertions, 5 deletions
diff --git a/sc/source/ui/inc/pfuncache.hxx b/sc/source/ui/inc/pfuncache.hxx index 5621cd2628ac..7cd286f39223 100644 --- a/sc/source/ui/inc/pfuncache.hxx +++ b/sc/source/ui/inc/pfuncache.hxx @@ -90,10 +90,13 @@ class ScPrintFuncCache std::vector<tools::Long> nFirstAttr; std::vector<ScPrintPageLocation> aLocations; bool bLocInitialized; + Size aPrintPageSize; // print page size in Print dialog + bool bPrintPageLandscape; // print page orientation in Print dialog + bool bUsePrintDialogSetting; // use Print dialog setting public: - ScPrintFuncCache( ScDocShell* pD, const ScMarkData& rMark, - ScPrintSelectionStatus aStatus ); + ScPrintFuncCache(ScDocShell* pD, const ScMarkData& rMark, ScPrintSelectionStatus aStatus, + Size aPageSize = {}, bool bLandscape = false, bool bUse = false); ~ScPrintFuncCache(); bool IsSameSelection( const ScPrintSelectionStatus& rStatus ) const; diff --git a/sc/source/ui/inc/printfun.hxx b/sc/source/ui/inc/printfun.hxx index f9780bd0e53c..2e9dd7bb49d1 100644 --- a/sc/source/ui/inc/printfun.hxx +++ b/sc/source/ui/inc/printfun.hxx @@ -312,15 +312,25 @@ private: ScPageBreakData* pPageData; // for recording the breaks etc. + Size aPrintPageSize; // print page size in Print dialog + bool bPrintPageLandscape; // print page orientation in Print dialog + bool bUsePrintDialogSetting; // use Print dialog setting + public: ScPrintFunc( ScDocShell* pShell, SfxPrinter* pNewPrinter, SCTAB nTab, tools::Long nPage = 0, tools::Long nDocP = 0, const ScRange* pArea = nullptr, const ScPrintOptions* pOptions = nullptr, - ScPageBreakData* pData = nullptr ); + ScPageBreakData* pData = nullptr, + Size aPrintPageSize = {}, + bool bPrintPageLandscape = false, + bool bUsePrintDialogSetting = false ); ScPrintFunc( ScDocShell* pShell, SfxPrinter* pNewPrinter, - const ScPrintState& rState, const ScPrintOptions* pOptions ); + const ScPrintState& rState, const ScPrintOptions* pOptions, + Size aPrintPageSize = {}, + bool bPrintPageLandscape = false, + bool bUsePrintDialogSetting = false ); // ctors for device other than printer - for preview and pdf: @@ -331,7 +341,9 @@ public: ScPrintFunc( OutputDevice* pOutDev, ScDocShell* pShell, const ScPrintState& rState, - const ScPrintOptions* pOptions ); + const ScPrintOptions* pOptions, Size aPrintPageSize = {}, + bool bPrintPageLandscape = false, + bool bUsePrintDialogSetting = false); ~ScPrintFunc(); |