filter/source/pdf/pdfexport.cxx | 3 +++ sc/source/filter/oox/workbookfragment.cxx | 4 ++++ sc/source/ui/docshell/docsh.cxx | 4 ++++ sc/source/ui/optdlg/calcoptionsdlg.cxx | 5 +++++ sc/source/ui/optdlg/tpformula.cxx | 12 ++++++++++++ 5 files changed, 28 insertions(+)
New commits: commit 32f28dfa4c1de2b92664a5c0c3eca4fffecc0b28 Author: Muhammet Kara <[email protected]> AuthorDate: Tue Oct 1 11:22:21 2019 +0200 Commit: Muhammet Kara <[email protected]> CommitDate: Tue Oct 1 21:56:25 2019 +0200 Avoid unnecessary iterations in for loop Change-Id: I9f2d0fba4754b8d4db906012dc1429640fe444b5 Reviewed-on: https://gerrit.libreoffice.org/79944 Tested-by: Jenkins Reviewed-by: Muhammet Kara <[email protected]> diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx index 9c023010f9ac..7368512293bf 100644 --- a/filter/source/pdf/pdfexport.cxx +++ b/filter/source/pdf/pdfexport.cxx @@ -200,7 +200,10 @@ bool PDFExport::ExportSelection( vcl::PDFWriter& rPDFWriter, for( sal_Int32 nProperty = 0, nPropertyCount = aRenderer.getLength(); nProperty < nPropertyCount; ++nProperty ) { if ( aRenderer[ nProperty ].Name == "PageSize" ) + { aRenderer[ nProperty].Value >>= aPageSize; + break; + } } rPDFExtOutDevData.SetCurrentPageNumber( nCurrentPage ); commit dc1f304de78ccf20b3264cbc904d65f78864ec63 Author: Gabor Kelemen <[email protected]> AuthorDate: Thu Aug 2 01:02:56 2018 +0200 Commit: Eike Rathke <[email protected]> CommitDate: Tue Oct 1 21:56:22 2019 +0200 tdf#119021 Support lock down settings of Formula tab page Change-Id: I3131e8fd98b43cf4073970444589e8fae9553bc1 Reviewed-on: https://gerrit.libreoffice.org/75402 Tested-by: Jenkins Reviewed-by: Eike Rathke <[email protected]> diff --git a/sc/source/filter/oox/workbookfragment.cxx b/sc/source/filter/oox/workbookfragment.cxx index 540c2b3b89de..7e7edc655a59 100644 --- a/sc/source/filter/oox/workbookfragment.cxx +++ b/sc/source/filter/oox/workbookfragment.cxx @@ -525,6 +525,7 @@ public: { } bool get_active() const { return m_xWarningOnBox->get_active(); } + void hide_ask() const { m_xWarningOnBox->set_visible(false); }; }; } @@ -547,6 +548,9 @@ void WorkbookFragment::recalcFormulaCells() aQueryBox.set_primary_text(ScResId(STR_QUERY_FORMULA_RECALC_ONLOAD_XLS)); aQueryBox.set_default_response(RET_YES); + if ( officecfg::Office::Calc::Formula::Load::OOXMLRecalcMode::isReadOnly() ) + aQueryBox.hide_ask(); + bHardRecalc = aQueryBox.run() == RET_YES; if (aQueryBox.get_active()) diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index 42b538035405..0fce15e67a72 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -433,6 +433,7 @@ public: { } bool get_active() const { return m_xWarningOnBox->get_active(); } + void hide_ask() const { m_xWarningOnBox->set_visible(false); }; }; @@ -511,6 +512,9 @@ bool ScDocShell::LoadXML( SfxMedium* pLoadMedium, const css::uno::Reference< css aQueryBox.set_primary_text(ScResId(STR_QUERY_FORMULA_RECALC_ONLOAD_ODS)); aQueryBox.set_default_response(RET_YES); + if ( officecfg::Office::Calc::Formula::Load::OOXMLRecalcMode::isReadOnly() ) + aQueryBox.hide_ask(); + bHardRecalc = aQueryBox.run() == RET_YES; if (aQueryBox.get_active()) diff --git a/sc/source/ui/optdlg/calcoptionsdlg.cxx b/sc/source/ui/optdlg/calcoptionsdlg.cxx index 43533c4df530..a3e9d73935d1 100644 --- a/sc/source/ui/optdlg/calcoptionsdlg.cxx +++ b/sc/source/ui/optdlg/calcoptionsdlg.cxx @@ -9,6 +9,8 @@ #include <sal/config.h> +#include <officecfg/Office/Calc.hxx> + #include <calcconfig.hxx> #include "calcoptionsdlg.hxx" @@ -66,13 +68,16 @@ ScCalcOptionsDialog::ScCalcOptionsDialog(weld::Window* pParent, const ScCalcConf { mxConversion->set_active(static_cast<int>(rConfig.meStringConversion)); mxConversion->connect_changed(LINK(this, ScCalcOptionsDialog, ConversionModifiedHdl)); + mxConversion->set_sensitive( !officecfg::Office::Calc::Formula::Syntax::StringConversion::isReadOnly() ); mxEmptyAsZero->set_active(rConfig.mbEmptyStringAsZero); mxEmptyAsZero->connect_toggled(LINK(this, ScCalcOptionsDialog, AsZeroModifiedHdl)); CoupleEmptyAsZeroToStringConversion(); + mxEmptyAsZero->set_sensitive ( !officecfg::Office::Calc::Formula::Syntax::EmptyStringAsZero::isReadOnly() ); mxSyntax->set_active(toSelectedItem(rConfig.meStringRefAddressSyntax)); mxSyntax->connect_changed(LINK(this, ScCalcOptionsDialog, SyntaxModifiedHdl)); + mxSyntax->set_sensitive ( !officecfg::Office::Calc::Formula::Syntax::StringRefAddressSyntax::isReadOnly() ); mxCurrentDocOnly->set_active(!mbWriteConfig); mxCurrentDocOnly->connect_toggled(LINK(this, ScCalcOptionsDialog, CurrentDocOnlyHdl)); diff --git a/sc/source/ui/optdlg/tpformula.cxx b/sc/source/ui/optdlg/tpformula.cxx index c745d748bfb0..b4825149ae58 100644 --- a/sc/source/ui/optdlg/tpformula.cxx +++ b/sc/source/ui/optdlg/tpformula.cxx @@ -26,6 +26,7 @@ #include <strings.hrc> #include <scresid.hxx> #include <formula/grammar.hxx> +#include <officecfg/Office/Calc.hxx> #include "calcoptionsdlg.hxx" #include <unotools/localedatawrapper.hxx> @@ -299,18 +300,22 @@ void ScTpFormulaOptions::Reset(const SfxItemSet* rCoreSet) } mxLbFormulaSyntax->save_value(); + mxLbFormulaSyntax->set_sensitive( !officecfg::Office::Calc::Formula::Syntax::Grammar::isReadOnly() ); ScRecalcOptions eOOXMLRecalc = aOpt.GetOOXMLRecalcOptions(); mxLbOOXMLRecalcOptions->set_active(static_cast<sal_uInt16>(eOOXMLRecalc)); mxLbOOXMLRecalcOptions->save_value(); + mxLbOOXMLRecalcOptions->set_sensitive( !officecfg::Office::Calc::Formula::Load::OOXMLRecalcMode::isReadOnly() ); ScRecalcOptions eODFRecalc = aOpt.GetODFRecalcOptions(); mxLbODFRecalcOptions->set_active(static_cast<sal_uInt16>(eODFRecalc)); mxLbODFRecalcOptions->save_value(); + mxLbODFRecalcOptions->set_sensitive( !officecfg::Office::Calc::Formula::Load::ODFRecalcMode::isReadOnly() ); // english function name. mxCbEnglishFuncName->set_active( aOpt.GetUseEnglishFuncName() ); mxCbEnglishFuncName->save_state(); + mxCbEnglishFuncName->set_sensitive( !officecfg::Office::Calc::Formula::Syntax::EnglishFunctionName::isReadOnly() ); // Separators OUString aSep = aOpt.GetFormulaSepArg(); @@ -331,6 +336,13 @@ void ScTpFormulaOptions::Reset(const SfxItemSet* rCoreSet) else ResetSeparators(); + mxEdSepFuncArg->set_sensitive( !officecfg::Office::Calc::Formula::Syntax::SeparatorArg::isReadOnly() ); + mxEdSepArrayCol->set_sensitive( !officecfg::Office::Calc::Formula::Syntax::SeparatorArrayCol::isReadOnly() ); + mxEdSepArrayRow->set_sensitive( !officecfg::Office::Calc::Formula::Syntax::SeparatorArrayRow::isReadOnly() ); + mxBtnSepReset->set_sensitive ( !officecfg::Office::Calc::Formula::Syntax::SeparatorArg::isReadOnly() && + !officecfg::Office::Calc::Formula::Syntax::SeparatorArrayCol::isReadOnly() && + !officecfg::Office::Calc::Formula::Syntax::SeparatorArrayRow::isReadOnly() ); + // detailed calc settings. ScFormulaOptions aDefaults; _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
