summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
Diffstat (limited to 'svx')
-rw-r--r--svx/AllLangResTarget_svx.mk12
-rw-r--r--svx/inc/svx/svdpntv.hxx4
-rw-r--r--svx/source/svdraw/svdpntv.cxx106
3 files changed, 75 insertions, 47 deletions
diff --git a/svx/AllLangResTarget_svx.mk b/svx/AllLangResTarget_svx.mk
index 8b976275694a..ae19390676b3 100644
--- a/svx/AllLangResTarget_svx.mk
+++ b/svx/AllLangResTarget_svx.mk
@@ -106,18 +106,18 @@ $(call gb_SrsTarget_get_clean_target,svx/res) : $(WORKDIR)/inc/svx/globlmn.hrc_c
# hack !!!
# just a temporary - globlmn.hrc about to be removed!
ifeq ($(strip $(WITH_LANG)),)
-$(WORKDIR)/inc/svx/globlmn.hrc : $(SRCDIR)/svx/inc/globlmn_tmpl.hrc
+$(WORKDIR)/inc/svx/globlmn.hrc : $(realpath $(SRCDIR)/svx/inc/globlmn_tmpl.hrc)
echo copying $@
-mkdir -p $(WORKDIR)/inc/svx
- cp $(SRCDIR)/svx/inc/globlmn_tmpl.hrc $(WORKDIR)/inc/svx/globlmn.hrc
- cp $(SRCDIR)/svx/inc/globlmn_tmpl.hrc $(OUTDIR)/inc/svx/globlmn.hrc
+ cp $< $@
+ $(call gb_Deliver_deliver, $@, $(OUTDIR)/inc/svx/globlmn.hrc)
rm -f $(WORKDIR)/inc/svx/lastrun.mk
else
-include $(WORKDIR)/inc/svx/lastrun.mk
ifneq ($(gb_lastrun_globlmn),MERGED)
.PHONY : $(WORKDIR)/inc/svx/globlmn.hrc
endif
-$(WORKDIR)/inc/svx/globlmn.hrc : $(SRCDIR)/svx/inc/globlmn_tmpl.hrc $(gb_SrsPartMergeTarget_SDFLOCATION)/svx/inc/localize.sdf
+$(WORKDIR)/inc/svx/globlmn.hrc : $(realpath $(SRCDIR)/svx/inc/globlmn_tmpl.hrc) $(realpath $(gb_SrsPartMergeTarget_SDFLOCATION)/svx/inc/localize.sdf)
echo merging $@
-mkdir -p $(WORKDIR)/inc/svx
rm -f $(WORKDIR)/inc/svx/lastrun.mk
@@ -125,8 +125,8 @@ $(WORKDIR)/inc/svx/globlmn.hrc : $(SRCDIR)/svx/inc/globlmn_tmpl.hrc $(gb_SrsPart
$(call gb_Helper_abbreviate_dirs_native, \
$(gb_SrsPartMergeTarget_TRANSEXCOMMAND) \
-p svx \
- -i $< -o $@ -m $(gb_SrsPartMergeTarget_SDFLOCATION)/svx/inc/localize.sdf -l all)
- cp $(WORKDIR)/inc/svx/globlmn.hrc $(OUTDIR)/inc/svx/globlmn.hrc
+ -i $< -o $@ -m $(realpath $(gb_SrsPartMergeTarget_SDFLOCATION)/svx/inc/localize.sdf) -l all)
+ $(call gb_Deliver_deliver, $@, $(OUTDIR)/inc/svx/globlmn.hrc)
endif
.PHONY : $(WORKDIR)/inc/svx/globlmn.hrc_clean
diff --git a/svx/inc/svx/svdpntv.hxx b/svx/inc/svx/svdpntv.hxx
index 259fe62b720a..e345093bc5f4 100644
--- a/svx/inc/svx/svdpntv.hxx
+++ b/svx/inc/svx/svdpntv.hxx
@@ -400,6 +400,8 @@ public:
// #i74769# Interface change to use common BeginCompleteRedraw/EndCompleteRedraw
// #i76114# bDisableIntersect disables intersecting rReg with the Window's paint region
SdrPaintWindow* BeginDrawLayers(OutputDevice* pOut, const Region& rReg, bool bDisableIntersect = false);
+ // used when the region passed to BeginDrawLayers needs to be changed
+ void UpdateDrawLayersRegion(OutputDevice* pOut, const Region& rReg, bool bDisableIntersect = false);
void EndDrawLayers(SdrPaintWindow& rPaintWindow, bool bPaintFormLayer);
protected:
@@ -412,6 +414,8 @@ protected:
// used to paint the form layer after the PreRender device is flushed (painted) to the window.
void ImpFormLayerDrawing(SdrPaintWindow& rPaintWindow) const;
+ Region OptimizeDrawLayersRegion(OutputDevice* pOut, const Region& rReg, bool bDisableIntersect);
+
public:
sal_Bool IsPageVisible() const { return bPageVisible; } // Seite (weisse Flaeche) malen oder nicht
sal_Bool IsPageBorderVisible() const { return bPageBorderVisible; } // Seite (weisse Flaeche) malen oder nicht
diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx
index 3350a33d23c9..a04ab26d949d 100644
--- a/svx/source/svdraw/svdpntv.cxx
+++ b/svx/source/svdraw/svdpntv.cxx
@@ -964,47 +964,7 @@ SdrPaintWindow* SdrPaintView::BeginDrawLayers(OutputDevice* pOut, const Region&
if(pKnownTarget)
{
- // #i74769# check if pOut is a win and has a ClipRegion. If Yes, the Region
- // rReg may be made more granular (fine) with using it. Normally, rReg
- // does come from Window::Paint() anyways and thus is based on a single
- // rectangle which was derived from exactly that repaint region
- Region aOptimizedRepaintRegion(rReg);
-
- // #i76114# Intersecting the region with the Window's paint region is disabled
- // for print preview in Calc, because the intersection can be empty (if the paint
- // region is outside of the table area of the page), and then no clip region
- // would be set.
- if(pOut && OUTDEV_WINDOW == pOut->GetOutDevType() && !bDisableIntersect)
- {
- Window* pWindow = (Window*)pOut;
-
- if(pWindow->IsInPaint())
- {
- if(!pWindow->GetPaintRegion().IsEmpty())
- {
- aOptimizedRepaintRegion.Intersect(pWindow->GetPaintRegion());
-
-#ifdef DBG_UTIL
- // #i74769# test-paint repaint region
- static bool bDoPaintForVisualControl(false);
- if(bDoPaintForVisualControl)
- {
- RegionHandle aRegionHandle(aOptimizedRepaintRegion.BeginEnumRects());
- Rectangle aRegionRectangle;
-
- while(aOptimizedRepaintRegion.GetEnumRects(aRegionHandle, aRegionRectangle))
- {
- pWindow->SetLineColor(COL_LIGHTGREEN);
- pWindow->SetFillColor();
- pWindow->DrawRect(aRegionRectangle);
- }
-
- aOptimizedRepaintRegion.EndEnumRects(aRegionHandle);
- }
-#endif
- }
- }
- }
+ Region aOptimizedRepaintRegion = OptimizeDrawLayersRegion( pOut, rReg, bDisableIntersect );
// prepare redraw
pKnownTarget->PrepareRedraw(aOptimizedRepaintRegion);
@@ -1029,6 +989,70 @@ void SdrPaintView::EndDrawLayers(SdrPaintWindow& rPaintWindow, bool bPaintFormLa
}
}
+void SdrPaintView::UpdateDrawLayersRegion(OutputDevice* pOut, const Region& rReg, bool bDisableIntersect)
+{
+ SdrPaintWindow* pPaintWindow = FindPaintWindow(*pOut);
+ OSL_ENSURE(pPaintWindow, "SdrPaintView::UpdateDrawLayersRegion: No SdrPaintWindow (!)");
+
+ if(mpPageView)
+ {
+ SdrPageWindow* pKnownTarget = mpPageView->FindPageWindow(*pPaintWindow);
+
+ if(pKnownTarget)
+ {
+ Region aOptimizedRepaintRegion = OptimizeDrawLayersRegion( pOut, rReg, bDisableIntersect );
+ pKnownTarget->GetPaintWindow().SetRedrawRegion(aOptimizedRepaintRegion);
+ mpPageView->setPreparedPageWindow(pKnownTarget); // already set actually
+ }
+ }
+}
+
+Region SdrPaintView::OptimizeDrawLayersRegion(OutputDevice* pOut, const Region& rReg, bool bDisableIntersect)
+{
+ // #i74769# check if pOut is a win and has a ClipRegion. If Yes, the Region
+ // rReg may be made more granular (fine) with using it. Normally, rReg
+ // does come from Window::Paint() anyways and thus is based on a single
+ // rectangle which was derived from exactly that repaint region
+ Region aOptimizedRepaintRegion(rReg);
+
+ // #i76114# Intersecting the region with the Window's paint region is disabled
+ // for print preview in Calc, because the intersection can be empty (if the paint
+ // region is outside of the table area of the page), and then no clip region
+ // would be set.
+ if(pOut && OUTDEV_WINDOW == pOut->GetOutDevType() && !bDisableIntersect)
+ {
+ Window* pWindow = (Window*)pOut;
+
+ if(pWindow->IsInPaint())
+ {
+ if(!pWindow->GetPaintRegion().IsEmpty())
+ {
+ aOptimizedRepaintRegion.Intersect(pWindow->GetPaintRegion());
+
+#ifdef DBG_UTIL
+ // #i74769# test-paint repaint region
+ static bool bDoPaintForVisualControl(false);
+ if(bDoPaintForVisualControl)
+ {
+ RegionHandle aRegionHandle(aOptimizedRepaintRegion.BeginEnumRects());
+ Rectangle aRegionRectangle;
+
+ while(aOptimizedRepaintRegion.GetEnumRects(aRegionHandle, aRegionRectangle))
+ {
+ pWindow->SetLineColor(COL_LIGHTGREEN);
+ pWindow->SetFillColor();
+ pWindow->DrawRect(aRegionRectangle);
+ }
+
+ aOptimizedRepaintRegion.EndEnumRects(aRegionHandle);
+ }
+#endif
+ }
+ }
+ }
+ return aOptimizedRepaintRegion;
+}
+
////////////////////////////////////////////////////////////////////////////////////////////////////
void SdrPaintView::ImpTextEditDrawing(SdrPaintWindow& rPaintWindow) const