summaryrefslogtreecommitdiff
path: root/include/svx
diff options
context:
space:
mode:
authorArmin Le Grand (allotropia) <armin.le.grand.extern@allotropia.de>2023-07-11 13:57:52 +0200
committerArmin Le Grand <Armin.Le.Grand@me.com>2023-07-12 17:59:46 +0200
commit3996eed1870ced736d9f4a01550f5c9f0568edfa (patch)
tree2a21ebaffe083c3bfd45dae854fd35087802e624 /include/svx
parent54a36dd93a97fb6f5d25e1dbdbe1ef95a7cbaf52 (diff)
tdf#105362 better support for transparency in PNG & GIF export
The granularity to decide at the SdrView what to paint was not fine enough, so I added code to get what we need: Do avoid page decorations (including PageBackgrund aka 'wiese'), but do include/process MasterPage content. Change-Id: I49df05abc89b4bcebc973c37d30be0a0c72e59ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154301 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
Diffstat (limited to 'include/svx')
-rw-r--r--include/svx/sdr/contact/displayinfo.hxx11
-rw-r--r--include/svx/sdr/contact/objectcontact.hxx6
-rw-r--r--include/svx/sdr/contact/objectcontactofpageview.hxx6
-rw-r--r--include/svx/svdpntv.hxx35
4 files changed, 41 insertions, 17 deletions
diff --git a/include/svx/sdr/contact/displayinfo.hxx b/include/svx/sdr/contact/displayinfo.hxx
index 7075b04ccf6f..b2229042a914 100644
--- a/include/svx/sdr/contact/displayinfo.hxx
+++ b/include/svx/sdr/contact/displayinfo.hxx
@@ -46,13 +46,6 @@ namespace sdr::contact
// painting when the control layer needs to be painted as last layer
bool mbControlLayerProcessingActive : 1;
- // Internal flag to decide if page stuff (background, border, MasterPage, grid, etc...)
- // will be processed at all. This flag is user-defined and will not be changed from the
- // processing mechanism. Default is true, thus set to false if PagePainting should be suppressed.
- // For more granular switching page stuff painting on and off, use the according flags at the
- // view (->Is*Visible())
- bool mbPageProcessingActive : 1;
-
// Internal flag to remember if EnteredGroupDrawMode is active. Default is true
// since this mode starts activated and gets switched off when reaching
// the current group level. Should only be changed by instances which do
@@ -83,10 +76,6 @@ namespace sdr::contact
void SetControlLayerProcessingActive(bool bDoPaint);
bool GetControlLayerProcessingActive() const { return mbControlLayerProcessingActive; }
- // Access to PageProcessingActive flag
- void SetPageProcessingActive(bool bDoPaint);
- bool GetPageProcessingActive() const { return mbPageProcessingActive; }
-
// Save the original DrawMode from outdev
void ClearGhostedDrawMode();
void SetGhostedDrawMode();
diff --git a/include/svx/sdr/contact/objectcontact.hxx b/include/svx/sdr/contact/objectcontact.hxx
index 40d631f3fae8..f38eb768c4ee 100644
--- a/include/svx/sdr/contact/objectcontact.hxx
+++ b/include/svx/sdr/contact/objectcontact.hxx
@@ -136,6 +136,12 @@ public:
// print? Default is false
virtual bool isOutputToPrinter() const;
+ // display page decoration? Default is true
+ virtual bool isPageDecorationActive() const;
+
+ // display mster page content (ViewContactOfMasterPage)? Default is true
+ virtual bool isMasterPageActive() const;
+
// recording MetaFile? Default is false
virtual bool isOutputToRecordingMetaFile() const;
diff --git a/include/svx/sdr/contact/objectcontactofpageview.hxx b/include/svx/sdr/contact/objectcontactofpageview.hxx
index 1512542dc395..bc99975f4347 100644
--- a/include/svx/sdr/contact/objectcontactofpageview.hxx
+++ b/include/svx/sdr/contact/objectcontactofpageview.hxx
@@ -87,6 +87,12 @@ namespace sdr::contact
// print? Default is false
virtual bool isOutputToPrinter() const override;
+ // display page decoration? Default is true
+ virtual bool isPageDecorationActive() const override;
+
+ // display mster page content (ViewContactOfMasterPage)? Default is true
+ virtual bool isMasterPageActive() const override;
+
// recording MetaFile? Default is false
virtual bool isOutputToRecordingMetaFile() const override;
diff --git a/include/svx/svdpntv.hxx b/include/svx/svdpntv.hxx
index f6be42ee1e9a..661c8e3b7406 100644
--- a/include/svx/svdpntv.hxx
+++ b/include/svx/svdpntv.hxx
@@ -177,8 +177,27 @@ protected:
// directly painted to OutDev. Default is sal_False.
bool mbBufferedOverlayAllowed : 1;
- // Allow page painting at all?
- bool mbPagePaintingAllowed : 1;
+ // Allow page decorations? Quick way to switch on/off all of page's decoration features,
+ // in addition to the more fine-granular other view settings (see *visible bools above).
+ // Default is true.
+ // This controls processing of the hierarchy elements:
+ // -ViewContactOfPageBackground: formally known as 'Wiese', the area behind the page
+ // -ViewContactOfPageShadow: page's shadow
+ // -ViewContactOfPageFill: the page's fill with PageColor/PaperColor
+ // (MasterPage content here, not affected by this flag)
+ // -ViewContactOfOuterPageBorder: the border around the page
+ // -ViewContactOfInnerPageBorder: The border inside the page, moved inside by PageBorder distances
+ // -ViewContactOfGrid: the page's grid visualisation (background)
+ // -ViewContactOfHelplines: the page's Helplines (background)
+ // (Page content here, not affected by this flag)
+ // -ViewContactOfGrid: the page's grid visualisation (foreground)
+ // -ViewContactOfHelplines: the page's Helplines (foreground)
+ // Note: background/foreground means that one is active, grid & helplines can be displayed in
+ // front of or behind obect visualisations/page content
+ bool mbPageDecorationAllowed : 1;
+
+ // Allow MasterPage visualization, default is true
+ bool mbMasterPageVisualizationAllowed : 1;
// Is this a preview renderer?
bool mbPreviewRenderer : 1;
@@ -191,7 +210,7 @@ protected:
bool mbPaintTextEdit : 1; // if should paint currently edited text
public:
- // Interface for PagePaintingAllowed flag
+ // Interface for BufferedOoutputAllowed flag
bool IsBufferedOutputAllowed() const;
void SetBufferedOutputAllowed(bool bNew);
@@ -199,9 +218,13 @@ public:
bool IsBufferedOverlayAllowed() const;
void SetBufferedOverlayAllowed(bool bNew);
- // Allow page painting at all?
- bool IsPagePaintingAllowed() const { return mbPagePaintingAllowed;}
- void SetPagePaintingAllowed(bool bNew);
+ // Allow page decorations? See details above at mbPageDecorationAllowed declaration
+ bool IsPageDecorationAllowed() const { return mbPageDecorationAllowed;}
+ void SetPageDecorationAllowed(bool bNew);
+
+ // Allow MasterPage visualization, default is true
+ bool IsMasterPageVisualizationAllowed() const { return mbMasterPageVisualizationAllowed;}
+ void SetMasterPageVisualizationAllowed(bool bNew);
virtual rtl::Reference<sdr::overlay::OverlayManager> CreateOverlayManager(OutputDevice& rDevice) const;