diff options
-rw-r--r-- | include/svx/svdpntv.hxx | 5 | ||||
-rw-r--r-- | libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx | 21 | ||||
-rw-r--r-- | sd/source/ui/unoidl/unomodel.cxx | 11 | ||||
-rw-r--r-- | svx/source/sdr/contact/viewobjectcontactofsdrpage.cxx | 5 | ||||
-rw-r--r-- | svx/source/svdraw/svdpntv.cxx | 1 | ||||
-rw-r--r-- | sw/source/uibase/uno/unotxdoc.cxx | 2 |
6 files changed, 36 insertions, 9 deletions
diff --git a/include/svx/svdpntv.hxx b/include/svx/svdpntv.hxx index 49029ceee764..3b52d2aca1aa 100644 --- a/include/svx/svdpntv.hxx +++ b/include/svx/svdpntv.hxx @@ -162,6 +162,7 @@ protected: SvtOptionsDrawinglayer maDrawinglayerOpt; bool mbPageVisible : 1; + bool mbPageShadowVisible : 1; bool mbPageBorderVisible : 1; bool mbBordVisible : 1; bool mbGridVisible : 1; @@ -372,6 +373,9 @@ public: /// Draw Page as a white area or not bool IsPageVisible() const { return mbPageVisible; } + /// Draw Page shadow or not + bool IsPageShadowVisible() const { return mbPageShadowVisible; } + /// Draw Page as a white area or not bool IsPageBorderVisible() const { return mbPageBorderVisible; } @@ -392,6 +396,7 @@ public: Color GetGridColor() const { return maGridColor;} void SetPageVisible(bool bOn = true) { mbPageVisible=bOn; InvalidateAllWin(); } + void SetPageShadowVisible(bool bOn = true) { mbPageShadowVisible=bOn; InvalidateAllWin(); } void SetPageBorderVisible(bool bOn = true) { mbPageBorderVisible=bOn; InvalidateAllWin(); } void SetBordVisible(bool bOn = true) { mbBordVisible=bOn; InvalidateAllWin(); } void SetGridVisible(bool bOn = true) { mbGridVisible=bOn; InvalidateAllWin(); } diff --git a/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx b/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx index 04d74d6646c3..7c2cc56c283b 100644 --- a/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx +++ b/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx @@ -32,8 +32,9 @@ static int help() { fprintf(stderr, "Usage: gtktiledviewer <absolute-path-to-libreoffice-install's-program-directory> <path-to-document> [<options> ... ]\n\n"); fprintf(stderr, "Options:\n\n"); - fprintf(stderr, "--hide-whitespace: Hide whitespace between pages in text documents.\n"); fprintf(stderr, "--background-color <color>: Set custom background color, e.g. 'yellow'.\n"); + fprintf(stderr, "--hide-page-shadow: Hide page/slide shadow.\n"); + fprintf(stderr, "--hide-whitespace: Hide whitespace between pages in text documents.\n"); return 1; } @@ -507,12 +508,7 @@ static void createModelAndView(const char* pLOPath, const char* pDocPath, const for (size_t i = 0; i < rArguments.size(); ++i) { const std::string& rArgument = rArguments[i]; - if (rArgument == "--hide-whitespace") - { - aTree.put(boost::property_tree::ptree::path_type(".uno:HideWhitespace/type", '/'), "boolean"); - aTree.put(boost::property_tree::ptree::path_type(".uno:HideWhitespace/value", '/'), true); - } - else if (rArgument == "--background-color" && i + 1 < rArguments.size()) + if (rArgument == "--background-color" && i + 1 < rArguments.size()) { GdkRGBA color; gdk_rgba_parse(&color, rArguments[i + 1].c_str()); @@ -520,7 +516,18 @@ static void createModelAndView(const char* pLOPath, const char* pDocPath, const gtk_widget_override_background_color(gtk_widget_get_toplevel(pDocView), GTK_STATE_FLAG_NORMAL, &color); SAL_WNODEPRECATED_DECLARATIONS_POP } + else if (rArgument == "--hide-page-shadow") + { + aTree.put(boost::property_tree::ptree::path_type(".uno:ShowBorderShadow/type", '/'), "boolean"); + aTree.put(boost::property_tree::ptree::path_type(".uno:ShowBorderShadow/value", '/'), false); + } + else if (rArgument == "--hide-whitespace") + { + aTree.put(boost::property_tree::ptree::path_type(".uno:HideWhitespace/type", '/'), "boolean"); + aTree.put(boost::property_tree::ptree::path_type(".uno:HideWhitespace/value", '/'), true); + } } + std::stringstream aStream; boost::property_tree::write_json(aStream, aTree); std::string aArguments = aStream.str(); diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index 6e23890be488..36fbeec22d79 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -2359,7 +2359,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; @@ -2371,6 +2371,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()) @@ -2383,7 +2390,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); } } diff --git a/svx/source/sdr/contact/viewobjectcontactofsdrpage.cxx b/svx/source/sdr/contact/viewobjectcontactofsdrpage.cxx index fcf2ae153b7e..27f951fb43e1 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 27eba2b9d5a0..b14262d8bae3 100644 --- a/svx/source/svdraw/svdpntv.cxx +++ b/svx/source/svdraw/svdpntv.cxx @@ -163,6 +163,7 @@ void SdrPaintView::ImpClearVars() mpItemBrowser=nullptr; #endif mbPageVisible=true; + mbPageShadowVisible=true; mbPageBorderVisible=true; mbBordVisible=true; mbGridVisible=true; diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx index 26f9b694eecd..2a7d9d29a6f6 100644 --- a/sw/source/uibase/uno/unotxdoc.cxx +++ b/sw/source/uibase/uno/unotxdoc.cxx @@ -3225,6 +3225,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); |