diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2021-07-25 15:05:51 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-07-25 20:05:10 +0200 |
commit | 28993c0a8d8628c650b661767fd8ab2228c507d9 (patch) | |
tree | 74777bc270aae8bf1e7c5dc866a0817aea8c71e1 /cui | |
parent | 2b71e0683cf8a34aaddce3558b941ba62b1b4ec5 (diff) |
use officecfg for drawing options
Change-Id: Idba40d9816f29c0e4bc4a468b8c0a2cbb74d09d3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119481
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/dialogs/screenshotannotationdlg.cxx | 7 | ||||
-rw-r--r-- | cui/source/options/optgdlg.cxx | 9 | ||||
-rw-r--r-- | cui/source/options/optgdlg.hxx | 2 | ||||
-rw-r--r-- | cui/source/tabpages/grfpage.cxx | 7 | ||||
-rw-r--r-- | cui/source/tabpages/page.cxx | 17 |
5 files changed, 17 insertions, 25 deletions
diff --git a/cui/source/dialogs/screenshotannotationdlg.cxx b/cui/source/dialogs/screenshotannotationdlg.cxx index 4a93d7b16aad..bdae7f003b8d 100644 --- a/cui/source/dialogs/screenshotannotationdlg.cxx +++ b/cui/source/dialogs/screenshotannotationdlg.cxx @@ -440,10 +440,9 @@ void ScreenshotAnnotationDlg_Impl::RepaintToBuffer( bUseDimmed ? maDimmedDialogBitmap : maParentDialogBitmap); // get various options - const SvtOptionsDrawinglayer aSvtOptionsDrawinglayer; - const Color aHilightColor(aSvtOptionsDrawinglayer.getHilightColor()); - const double fTransparence(aSvtOptionsDrawinglayer.GetTransparentSelectionPercent() * 0.01); - const bool bIsAntiAliasing(aSvtOptionsDrawinglayer.IsAntiAliasing()); + const Color aHilightColor(SvtOptionsDrawinglayer::getHilightColor()); + const double fTransparence(SvtOptionsDrawinglayer::GetTransparentSelectionPercent() * 0.01); + const bool bIsAntiAliasing(SvtOptionsDrawinglayer::IsAntiAliasing()); const AntialiasingFlags nOldAA(mxVirtualBufferDevice->GetAntialiasing()); if (bIsAntiAliasing) diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx index f1f46e144701..30ca6b79a068 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -522,7 +522,6 @@ OfaViewTabPage::OfaViewTabPage(weld::Container* pPage, weld::DialogController* p , nStyleLB_InitialSelection(0) , pAppearanceCfg(new SvtTabAppearanceCfg) , pCanvasSettings(new CanvasSettings) - , mpDrawinglayerOpt(new SvtOptionsDrawinglayer) , m_xIconSizeLB(m_xBuilder->weld_combo_box("iconsize")) , m_xSidebarIconSizeLB(m_xBuilder->weld_combo_box("sidebariconsize")) , m_xNotebookbarIconSizeLB(m_xBuilder->weld_combo_box("notebookbariconsize")) @@ -808,9 +807,9 @@ bool OfaViewTabPage::FillItemSet( SfxItemSet* ) // #i95644# if disabled, do not use value, see in ::Reset() if (m_xUseAntiAliase->get_sensitive()) { - if (m_xUseAntiAliase->get_active() != mpDrawinglayerOpt->IsAntiAliasing()) + if (m_xUseAntiAliase->get_active() != SvtOptionsDrawinglayer::IsAntiAliasing()) { - mpDrawinglayerOpt->SetAntiAliasing(m_xUseAntiAliase->get_active()); + SvtOptionsDrawinglayer::SetAntiAliasing(m_xUseAntiAliase->get_active(), /*bTemporary*/false); bModified = true; bRepaintWindows = true; } @@ -940,9 +939,9 @@ void OfaViewTabPage::Reset( const SfxItemSet* ) m_xUseHardwareAccell->save_state(); { // #i95644# AntiAliasing - if(mpDrawinglayerOpt->IsAAPossibleOnThisSystem()) + if(SvtOptionsDrawinglayer::IsAAPossibleOnThisSystem()) { - m_xUseAntiAliase->set_active(mpDrawinglayerOpt->IsAntiAliasing()); + m_xUseAntiAliase->set_active(SvtOptionsDrawinglayer::IsAntiAliasing()); } else { diff --git a/cui/source/options/optgdlg.hxx b/cui/source/options/optgdlg.hxx index 3d4c342a73a6..ffdfdb423195 100644 --- a/cui/source/options/optgdlg.hxx +++ b/cui/source/options/optgdlg.hxx @@ -22,7 +22,6 @@ #include <svx/langbox.hxx> class CanvasSettings; -class SvtOptionsDrawinglayer; namespace vcl { class IconThemeInfo; @@ -83,7 +82,6 @@ private: std::unique_ptr<SvtTabAppearanceCfg> pAppearanceCfg; std::unique_ptr<CanvasSettings> pCanvasSettings; - std::unique_ptr<SvtOptionsDrawinglayer> mpDrawinglayerOpt; std::vector<vcl::IconThemeInfo> mInstalledIconThemes; diff --git a/cui/source/tabpages/grfpage.cxx b/cui/source/tabpages/grfpage.cxx index beb8bc207ddd..644859790e32 100644 --- a/cui/source/tabpages/grfpage.cxx +++ b/cui/source/tabpages/grfpage.cxx @@ -726,10 +726,9 @@ void SvxCropExample::Paint(vcl::RenderContext& rRenderContext, const ::tools::Re // PolygonMarkerPrimitive2D, may be changed to that primitive later. // Use this to guarantee good visibility - that was the purpose of // the former used XOR paint. - const SvtOptionsDrawinglayer aSvtOptionsDrawinglayer; - const Color aColA(aSvtOptionsDrawinglayer.GetStripeColorA().getBColor()); - const Color aColB(aSvtOptionsDrawinglayer.GetStripeColorB().getBColor()); - const double fStripeLength(aSvtOptionsDrawinglayer.GetStripeLength()); + const Color aColA(SvtOptionsDrawinglayer::GetStripeColorA().getBColor()); + const Color aColB(SvtOptionsDrawinglayer::GetStripeColorB().getBColor()); + const double fStripeLength(SvtOptionsDrawinglayer::GetStripeLength()); const basegfx::B2DVector aDashVector(rRenderContext.GetInverseViewTransformation() * basegfx::B2DVector(fStripeLength, 0.0)); const double fLogicDashLength(aDashVector.getX()); diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx index 83014c794eb3..44f29780904c 100644 --- a/cui/source/tabpages/page.cxx +++ b/cui/source/tabpages/page.cxx @@ -272,21 +272,18 @@ SvxPageDescPage::SvxPageDescPage(weld::Container* pPage, weld::DialogController* nLastTopMargin = m_xTopMarginEdit->convert_value_from(m_xTopMarginEdit->normalize(aPrintOffset.Y() + aPrintSize.Height()), FieldUnit::TWIP); nLastBottomMargin = m_xBottomMarginEdit->convert_value_from(m_xBottomMarginEdit->normalize(aPrintOffset.Y() + aPrintSize.Height()), FieldUnit::TWIP); - // #i4219# get DrawingLayer options - const SvtOptionsDrawinglayer aDrawinglayerOpt; - // #i4219# take Maximum now from configuration (1/100th cm) // was: 11900 -> 119 cm ;new value 3 meters -> 300 cm -> 30000 - m_xPaperWidthEdit->set_max(m_xPaperWidthEdit->normalize(aDrawinglayerOpt.GetMaximumPaperWidth()), FieldUnit::CM); - m_xPaperHeightEdit->set_max(m_xPaperHeightEdit->normalize(aDrawinglayerOpt.GetMaximumPaperHeight()), FieldUnit::CM); + m_xPaperWidthEdit->set_max(m_xPaperWidthEdit->normalize(SvtOptionsDrawinglayer::GetMaximumPaperWidth()), FieldUnit::CM); + m_xPaperHeightEdit->set_max(m_xPaperHeightEdit->normalize(SvtOptionsDrawinglayer::GetMaximumPaperHeight()), FieldUnit::CM); // #i4219# also for margins (1/100th cm). Was: 9999, keeping. - m_xLeftMarginEdit->set_max(m_xLeftMarginEdit->normalize(aDrawinglayerOpt.GetMaximumPaperLeftMargin()), FieldUnit::MM); - m_xRightMarginEdit->set_max(m_xRightMarginEdit->normalize(aDrawinglayerOpt.GetMaximumPaperRightMargin()), FieldUnit::MM); - m_xTopMarginEdit->set_max(m_xTopMarginEdit->normalize(aDrawinglayerOpt.GetMaximumPaperTopMargin()), FieldUnit::MM); - m_xBottomMarginEdit->set_max(m_xBottomMarginEdit->normalize(aDrawinglayerOpt.GetMaximumPaperBottomMargin()), FieldUnit::MM); + m_xLeftMarginEdit->set_max(m_xLeftMarginEdit->normalize(SvtOptionsDrawinglayer::GetMaximumPaperLeftMargin()), FieldUnit::MM); + m_xRightMarginEdit->set_max(m_xRightMarginEdit->normalize(SvtOptionsDrawinglayer::GetMaximumPaperRightMargin()), FieldUnit::MM); + m_xTopMarginEdit->set_max(m_xTopMarginEdit->normalize(SvtOptionsDrawinglayer::GetMaximumPaperTopMargin()), FieldUnit::MM); + m_xBottomMarginEdit->set_max(m_xBottomMarginEdit->normalize(SvtOptionsDrawinglayer::GetMaximumPaperBottomMargin()), FieldUnit::MM); m_xGutterMarginEdit->set_max( - m_xGutterMarginEdit->normalize(aDrawinglayerOpt.GetMaximumPaperLeftMargin()), + m_xGutterMarginEdit->normalize(SvtOptionsDrawinglayer::GetMaximumPaperLeftMargin()), FieldUnit::MM); // Get the i18n framework numberings and add them to the listbox. |