summaryrefslogtreecommitdiff
path: root/sd/source/ui/dlg
diff options
context:
space:
mode:
authorArmin Le Grand <Armin.Le.Grand@cib.de>2016-07-21 16:12:47 +0200
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2016-08-18 02:39:12 +0200
commitdc1e30095fa02fa4116fa96783bd4d51fe912473 (patch)
tree8383d5253dda2c340b4de2ebf90969f907bf54e3 /sd/source/ui/dlg
parentd098f0c957824bd5dec89a799398d587ce9fb96f (diff)
screenshots: fallback screenshot to ui files
Besides the already existing methods to dump adapted dialogs and create and dump fallback dialogs I added a possibility to process a given input file which may contain a list of UXMLDescription files (*.ui files), one per line. This file is processed (empty lines and comment lines using '#' allowed) and for each descriptor first tries to find a known, adapted dialog. If found it gets used, else fallback is tried. Added ui-definition files for sd and sc which contain all ui-files from these dialogs. Adapted the test base class to hold the needed functionality. Change-Id: I1d4c64af8cd5d9c89a53b193951c3e49669f5852
Diffstat (limited to 'sd/source/ui/dlg')
-rw-r--r--sd/source/ui/dlg/headerfooterdlg.cxx41
1 files changed, 22 insertions, 19 deletions
diff --git a/sd/source/ui/dlg/headerfooterdlg.cxx b/sd/source/ui/dlg/headerfooterdlg.cxx
index 84e5216f83f6..ccab84b8cfa3 100644
--- a/sd/source/ui/dlg/headerfooterdlg.cxx
+++ b/sd/source/ui/dlg/headerfooterdlg.cxx
@@ -796,25 +796,28 @@ void PresLayoutPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangl
rRenderContext.DrawRect(maOutRect);
// paint presentation objects from masterpage
- SdrTextObj* pMasterTitle = static_cast<SdrTextObj*>(mpMaster->GetPresObj( PRESOBJ_TITLE ));
- SdrTextObj* pMasterOutline = static_cast<SdrTextObj*>(mpMaster->GetPresObj( mpMaster->GetPageKind()==PK_NOTES ? PRESOBJ_NOTES : PRESOBJ_OUTLINE ));
- SdrTextObj* pHeader = static_cast<SdrTextObj*>(mpMaster->GetPresObj( PRESOBJ_HEADER ));
- SdrTextObj* pFooter = static_cast<SdrTextObj*>(mpMaster->GetPresObj( PRESOBJ_FOOTER ));
- SdrTextObj* pDate = static_cast<SdrTextObj*>(mpMaster->GetPresObj( PRESOBJ_DATETIME ));
- SdrTextObj* pNumber = static_cast<SdrTextObj*>(mpMaster->GetPresObj( PRESOBJ_SLIDENUMBER ));
-
- if (pMasterTitle)
- Paint(rRenderContext, pMasterTitle, true, true);
- if (pMasterOutline)
- Paint(rRenderContext, pMasterOutline, true, true);
- if (pHeader)
- Paint(rRenderContext, pHeader, maSettings.mbHeaderVisible);
- if (pFooter)
- Paint(rRenderContext, pFooter, maSettings.mbFooterVisible);
- if (pDate)
- Paint(rRenderContext, pDate, maSettings.mbDateTimeVisible);
- if (pNumber)
- Paint(rRenderContext, pNumber, maSettings.mbSlideNumberVisible);
+ if (nullptr != mpMaster)
+ {
+ SdrTextObj* pMasterTitle = static_cast<SdrTextObj*>(mpMaster->GetPresObj(PRESOBJ_TITLE));
+ SdrTextObj* pMasterOutline = static_cast<SdrTextObj*>(mpMaster->GetPresObj(mpMaster->GetPageKind() == PK_NOTES ? PRESOBJ_NOTES : PRESOBJ_OUTLINE));
+ SdrTextObj* pHeader = static_cast<SdrTextObj*>(mpMaster->GetPresObj(PRESOBJ_HEADER));
+ SdrTextObj* pFooter = static_cast<SdrTextObj*>(mpMaster->GetPresObj(PRESOBJ_FOOTER));
+ SdrTextObj* pDate = static_cast<SdrTextObj*>(mpMaster->GetPresObj(PRESOBJ_DATETIME));
+ SdrTextObj* pNumber = static_cast<SdrTextObj*>(mpMaster->GetPresObj(PRESOBJ_SLIDENUMBER));
+
+ if (pMasterTitle)
+ Paint(rRenderContext, pMasterTitle, true, true);
+ if (pMasterOutline)
+ Paint(rRenderContext, pMasterOutline, true, true);
+ if (pHeader)
+ Paint(rRenderContext, pHeader, maSettings.mbHeaderVisible);
+ if (pFooter)
+ Paint(rRenderContext, pFooter, maSettings.mbFooterVisible);
+ if (pDate)
+ Paint(rRenderContext, pDate, maSettings.mbDateTimeVisible);
+ if (pNumber)
+ Paint(rRenderContext, pNumber, maSettings.mbSlideNumberVisible);
+ }
rRenderContext.Pop();
}