include/svx/svdpntv.hxx | 5 +++++ sd/source/ui/unoidl/unomodel.cxx | 11 +++++++++-- svx/source/sdr/contact/viewobjectcontactofsdrpage.cxx | 5 +++++ svx/source/svdraw/svdpntv.cxx | 1 + sw/source/uibase/uno/unotxdoc.cxx | 2 ++ 5 files changed, 22 insertions(+), 2 deletions(-)
New commits: commit 51ad08e8b5f37807418ca744d4ddc16ca1735023 Author: Marco Cecchetti <[email protected]> Date: Thu Jan 7 15:57:21 2016 +0100 lool - page border shadow can be disabled Support for text documents and presentations. Added a command line option for gtktiledviewer: --hide-page-shadow. Reviewed on: https://gerrit.libreoffice.org/21210 (cherry picked from commit 6b7d41094d06bbb4c248927d02318cf1b5faba0a) Conflicts: include/svx/svdpntv.hxx libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx svx/source/svdraw/svdpntv.cxx Change-Id: I1e427693d7af40cb5731d1730ac5b7c486d45c29 diff --git a/include/svx/svdpntv.hxx b/include/svx/svdpntv.hxx index a9c2c45..afab1ce 100644 --- a/include/svx/svdpntv.hxx +++ b/include/svx/svdpntv.hxx @@ -168,6 +168,7 @@ protected: SvtOptionsDrawinglayer maDrawinglayerOpt; bool bPageVisible : 1; + bool mbPageShadowVisible : 1; bool bPageBorderVisible : 1; bool bBordVisible : 1; bool bGridVisible : 1; @@ -399,6 +400,9 @@ protected: public: bool IsPageVisible() const { return bPageVisible; } // Seite (weisse Flaeche) malen oder nicht + /// Draw Page shadow or not + bool IsPageShadowVisible() const { return mbPageShadowVisible; } + bool IsPageBorderVisible() const { return bPageBorderVisible; } // Seite (weisse Flaeche) malen oder nicht bool IsBordVisible() const { return bBordVisible; } // Seitenrandlinie malen oder nicht bool IsGridVisible() const { return bGridVisible; } // Rastergitter malen oder nicht @@ -408,6 +412,7 @@ public: bool IsGlueVisible() const { return bGlueVisible; } // Konnektoren der objekte sichtbar oder nicht Color GetGridColor() const { return maGridColor;} void SetPageVisible(bool bOn = true) { bPageVisible=bOn; InvalidateAllWin(); } + void SetPageShadowVisible(bool bOn = true) { mbPageShadowVisible=bOn; InvalidateAllWin(); } void SetPageBorderVisible(bool bOn = true) { bPageBorderVisible=bOn; InvalidateAllWin(); } void SetBordVisible(bool bOn = true) { bBordVisible=bOn; InvalidateAllWin(); } void SetGridVisible(bool bOn = true) { bGridVisible=bOn; InvalidateAllWin(); } diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index d5e9490..c744ea9 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -2370,7 +2370,7 @@ Size SdXImpressDocument::getDocumentSize() return Size(convertMm100ToTwip(aSize.getWidth()), convertMm100ToTwip(aSize.getHeight())); } -void SdXImpressDocument::initializeForTiledRendering(const css::uno::Sequence<css::beans::PropertyValue>& /*rArguments*/) +void SdXImpressDocument::initializeForTiledRendering(const css::uno::Sequence<css::beans::PropertyValue>& rArguments) { SolarMutexGuard aGuard; @@ -2382,6 +2382,13 @@ void SdXImpressDocument::initializeForTiledRendering(const css::uno::Sequence<cs if (DrawViewShell* pViewShell = GetViewShell()) { + DrawView* pDrawView = pViewShell->GetDrawView(); + for (sal_Int32 i = 0; i < rArguments.getLength(); ++i) + { + const beans::PropertyValue& rValue = rArguments[i]; + if (rValue.Name == ".uno:ShowBorderShadow" && rValue.Value.has<bool>()) + pDrawView->SetPageShadowVisible(rValue.Value.get<bool>()); + } // Disable map mode, so that it's possible to send mouse event coordinates // in logic units. if (sd::Window* pWindow = pViewShell->GetActiveWindow()) @@ -2394,7 +2401,7 @@ void SdXImpressDocument::initializeForTiledRendering(const css::uno::Sequence<cs // (whereas with async loading images start being loaded after // we have painted the tile, resulting in an invalidate, followed // by the tile being rerendered - which is wasteful and ugly). - pViewShell->GetDrawView()->SetSwapAsynchron(false); + pDrawView->SetSwapAsynchron(false); } // tdf#93154: in tiled rendering LO doesn't always detect changes SvtMiscOptions aMiscOpt; diff --git a/svx/source/sdr/contact/viewobjectcontactofsdrpage.cxx b/svx/source/sdr/contact/viewobjectcontactofsdrpage.cxx index dcb8325..162a537 100644 --- a/svx/source/sdr/contact/viewobjectcontactofsdrpage.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofsdrpage.cxx @@ -266,6 +266,11 @@ bool ViewObjectContactOfPageShadow::isPrimitiveVisible(const DisplayInfo& rDispl return false; } + if(!pSdrPageView->GetView().IsPageShadowVisible()) + { + return false; + } + // no page shadow for preview renderers if(GetObjectContact().IsPreviewRenderer()) { diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx index 74a93bf..5857452 100644 --- a/svx/source/svdraw/svdpntv.cxx +++ b/svx/source/svdraw/svdpntv.cxx @@ -164,6 +164,7 @@ void SdrPaintView::ImpClearVars() pItemBrowser=NULL; #endif bPageVisible=true; + mbPageShadowVisible=true; bPageBorderVisible=true; bBordVisible=true; bGridVisible=true; diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx index 0604279..6a0a216 100644 --- a/sw/source/uibase/uno/unotxdoc.cxx +++ b/sw/source/uibase/uno/unotxdoc.cxx @@ -3278,6 +3278,8 @@ void SwXTextDocument::initializeForTiledRendering(const css::uno::Sequence<css:: const beans::PropertyValue& rValue = rArguments[i]; if (rValue.Name == ".uno:HideWhitespace" && rValue.Value.has<bool>()) aViewOption.SetHideWhitespaceMode(rValue.Value.get<bool>()); + else if (rValue.Name == ".uno:ShowBorderShadow" && rValue.Value.has<bool>()) + SwViewOption::SetAppearanceFlag(VIEWOPT_SHADOW , rValue.Value.get<bool>()); } pViewShell->ApplyViewOptions(aViewOption); _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
