[Libreoffice-commits] core.git: uui/source uui/uiconfig
uui/source/masterpasscrtdlg.cxx | 25 ++ uui/source/masterpasscrtdlg.hxx |2 + uui/uiconfig/ui/setmasterpassworddlg.ui | 44 ++-- 3 files changed, 64 insertions(+), 7 deletions(-) New commits: commit fed7b3068dcea2ebf65314c4f212350720631706 Author: Sarper Akdemir AuthorDate: Mon Nov 13 17:19:01 2023 +0300 Commit: Sarper Akdemir CommitDate: Wed Nov 15 22:02:16 2023 +0100 tdf#157518: enforce password policy on setmasterpassworddlg Change-Id: I7e7adde8f0d55808d16dc9247954a7645a1d3601 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159384 Tested-by: Jenkins Reviewed-by: Sarper Akdemir diff --git a/uui/source/masterpasscrtdlg.cxx b/uui/source/masterpasscrtdlg.cxx index 2216ea5a1d48..f0c456365646 100644 --- a/uui/source/masterpasscrtdlg.cxx +++ b/uui/source/masterpasscrtdlg.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include #include #include #include @@ -33,10 +34,27 @@ IMPL_LINK_NOARG(MasterPasswordCreateDialog, EditHdl_Impl, weld::Entry&, void) m_xOKBtn->set_sensitive(aPasswordText.getLength() >= 1); m_xPasswdStrengthBar->set_percentage( SvPasswordHelper::GetPasswordStrengthPercentage(aPasswordText)); + +if(m_oPasswordPolicy) +{ +bool bPasswordMeetsPolicy += SvPasswordHelper::PasswordMeetsPolicy(aPasswordText, m_oPasswordPolicy); +m_xEDMasterPasswordCrt->set_message_type(bPasswordMeetsPolicy ? weld::EntryMessageType::Normal + : weld::EntryMessageType::Error); +m_xPasswordPolicyLabel->set_visible(!bPasswordMeetsPolicy); +} } IMPL_LINK_NOARG(MasterPasswordCreateDialog, OKHdl_Impl, weld::Button&, void) { +if (m_oPasswordPolicy +&& !SvPasswordHelper::PasswordMeetsPolicy(m_xEDMasterPasswordCrt->get_text(), + m_oPasswordPolicy)) +{ +m_xEDMasterPasswordCrt->grab_focus(); +return; +} + // compare both passwords and show message box if there are not equal!! if (m_xEDMasterPasswordCrt->get_text() == m_xEDMasterPasswordRepeat->get_text()) m_xDialog->response(RET_OK); @@ -57,13 +75,20 @@ MasterPasswordCreateDialog::MasterPasswordCreateDialog(weld::Window* pParent, co : GenericDialogController(pParent, "uui/ui/setmasterpassworddlg.ui", "SetMasterPasswordDialog") , rResLocale(rLocale) , m_xEDMasterPasswordCrt(m_xBuilder->weld_entry("password1")) +, m_xPasswordPolicyLabel(m_xBuilder->weld_label("passpolicylabel")) , m_xEDMasterPasswordRepeat(m_xBuilder->weld_entry("password2")) , m_xOKBtn(m_xBuilder->weld_button("ok")) , m_xPasswdStrengthBar(m_xBuilder->weld_level_bar("password1levelbar")) +, m_oPasswordPolicy(officecfg::Office::Common::Security::Scripting::PasswordPolicy::get()) { m_xOKBtn->set_sensitive(false); m_xOKBtn->connect_clicked( LINK( this, MasterPasswordCreateDialog, OKHdl_Impl ) ); m_xEDMasterPasswordCrt->connect_changed( LINK( this, MasterPasswordCreateDialog, EditHdl_Impl ) ); +if (m_oPasswordPolicy) +{ +m_xPasswordPolicyLabel->set_label( + officecfg::Office::Common::Security::Scripting::PasswordPolicyErrorMessage::get()); +} } MasterPasswordCreateDialog::~MasterPasswordCreateDialog() diff --git a/uui/source/masterpasscrtdlg.hxx b/uui/source/masterpasscrtdlg.hxx index f7f01cda79cc..83f981190bb1 100644 --- a/uui/source/masterpasscrtdlg.hxx +++ b/uui/source/masterpasscrtdlg.hxx @@ -27,9 +27,11 @@ private: const std::locale& rResLocale; std::unique_ptr m_xEDMasterPasswordCrt; +std::unique_ptr m_xPasswordPolicyLabel; std::unique_ptr m_xEDMasterPasswordRepeat; std::unique_ptr m_xOKBtn; std::unique_ptr m_xPasswdStrengthBar; +std::optional m_oPasswordPolicy; DECL_LINK(OKHdl_Impl, weld::Button&, void); DECL_LINK(EditHdl_Impl, weld::Entry&, void); diff --git a/uui/uiconfig/ui/setmasterpassworddlg.ui b/uui/uiconfig/ui/setmasterpassworddlg.ui index 52cec48eb30a..1fd06e0e5c57 100644 --- a/uui/uiconfig/ui/setmasterpassworddlg.ui +++ b/uui/uiconfig/ui/setmasterpassworddlg.ui @@ -95,14 +95,43 @@ - + + True -False -6 -_Enter password: -True -password1 -0 +False +12 +1 + + +True +False +end +6 +True +_Enter password: +True +password1 +0 + + +0 +0 +
[Libreoffice-commits] core.git: uui/source
uui/source/iahndl-errorhandler.cxx |8 1 file changed, 4 insertions(+), 4 deletions(-) New commits: commit 610dea096d08a2f6c31ba4bcf5419a589fd054fb Author: Szymon Kłos AuthorDate: Wed Sep 27 17:08:00 2023 +0200 Commit: Szymon Kłos CommitDate: Fri Sep 29 08:52:41 2023 +0200 jsdialog: setup LOKNotifier for interaction handler errors This allows to show error dialogs on file errors like: "file is write protected". Without that patch it was crashing on assertion that LOKNotifier is not set. Change-Id: I1bc722116142c99613fa0715a49cd847896af170 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157317 Tested-by: Jenkins Reviewed-by: Szymon Kłos diff --git a/uui/source/iahndl-errorhandler.cxx b/uui/source/iahndl-errorhandler.cxx index c03d518108f3..74e3253c5220 100644 --- a/uui/source/iahndl-errorhandler.cxx +++ b/uui/source/iahndl-errorhandler.cxx @@ -74,19 +74,19 @@ executeErrorDialog( { case task::InteractionClassification_ERROR: xBox.reset(Application::CreateMessageDialog(pParent, -VclMessageType::Error, VclButtonsType::NONE, aText.makeStringAndClear())); +VclMessageType::Error, VclButtonsType::NONE, aText.makeStringAndClear(), GetpApp())); break; case task::InteractionClassification_WARNING: xBox.reset(Application::CreateMessageDialog(pParent, -VclMessageType::Warning, VclButtonsType::NONE, aText.makeStringAndClear())); +VclMessageType::Warning, VclButtonsType::NONE, aText.makeStringAndClear(), GetpApp())); break; case task::InteractionClassification_INFO: xBox.reset(Application::CreateMessageDialog(pParent, -VclMessageType::Info, VclButtonsType::NONE, aText.makeStringAndClear())); +VclMessageType::Info, VclButtonsType::NONE, aText.makeStringAndClear(), GetpApp())); break; case task::InteractionClassification_QUERY: xBox.reset(Application::CreateMessageDialog(pParent, -VclMessageType::Question, VclButtonsType::NONE, aText.makeStringAndClear())); +VclMessageType::Question, VclButtonsType::NONE, aText.makeStringAndClear(), GetpApp())); break; default: assert(false);
[Libreoffice-commits] core.git: uui/source
uui/source/iahndl.cxx | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) New commits: commit 40b2464bf346f1aeda44f719a301e2e60f4d0fd0 Author: Noel Grandin AuthorDate: Thu Aug 17 14:06:23 2023 +0200 Commit: Noel Grandin CommitDate: Fri Aug 18 18:34:13 2023 +0200 ignore exception in UUIInteractionHelper::handlerequest otherwise I sometimes get a crash during make UITest_sw_options when an exception in configmgr goes up the stack and hits the noexcept lamba in the vcl/ stuff that executes Application::PostUserEvent stuff #1 in configmgr::RootAccess::getNode() #2 in configmgr::Access::isValue() #3 in configmgr::configuration_provider::(anonymous namespace)::Service::createInstanceWithArguments #4 in non-virtual thunk to configmgr::configuration_provider::(anonymous namespace)::Service::createInstanceWithArguments #5 in UUIInteractionHelper::getInteractionHandlerList #6 in UUIInteractionHelper::tryOtherInteractionHandler #6 in UUIInteractionHelper::handleRequest_impl #7 in UUIInteractionHelper::handlerequest Change-Id: Id90b4d27d3886984c64acdfee98d9c4696c3c03f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155766 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx index dfa3b96742d6..b6e88bcd3e40 100644 --- a/uui/source/iahndl.cxx +++ b/uui/source/iahndl.cxx @@ -141,9 +141,16 @@ void UUIInteractionHelper::handlerequest( = static_cast< UUIInteractionHelper * >(pInteractionHelper); bool bDummy = false; OUString aDummy; -pHND->bHandled -= pUUI->handleRequest_impl(pHND->m_rRequest, false, bDummy, aDummy); -pHND->set(); +try +{ +pHND->bHandled += pUUI->handleRequest_impl(pHND->m_rRequest, false, bDummy, aDummy); +pHND->set(); +} +catch (css::uno::Exception&) +{ +TOOLS_WARN_EXCEPTION("uui", ""); +} } bool
[Libreoffice-commits] core.git: uui/source vcl/uiconfig
uui/source/openlocked.cxx |3 --- vcl/uiconfig/ui/openlockedquerybox.ui |1 + 2 files changed, 1 insertion(+), 3 deletions(-) New commits: commit 53b06ea4c1a368d9a2cf898a090aa78306e166d7 Author: Caolán McNamara AuthorDate: Wed Feb 15 12:49:15 2023 + Commit: Caolán McNamara CommitDate: Wed Feb 15 16:56:59 2023 + move image into the .ui file Change-Id: I5dad1bd0bcdbedf20d27109ca08109a1a2a6234b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147085 Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara diff --git a/uui/source/openlocked.cxx b/uui/source/openlocked.cxx index 453022b912ab..adcf060a2274 100644 --- a/uui/source/openlocked.cxx +++ b/uui/source/openlocked.cxx @@ -57,9 +57,6 @@ OpenLockedQueryBox::OpenLockedQueryBox(weld::Window* pParent, const OUString& rH , mxNotifyBtn(m_xBuilder->weld_check_button("notify")) , mxHiddenText(m_xBuilder->weld_label("hiddentext")) { -//set up the image -mxQuestionMarkImage->set_from_icon_name(u"vcl/res/help.png"); - //setup click hdl mxOpenReadOnlyBtn->connect_clicked(LINK(this, OpenLockedQueryBox, ClickHdl)); mxOpenCopyBtn->connect_clicked(LINK(this, OpenLockedQueryBox, ClickHdl)); diff --git a/vcl/uiconfig/ui/openlockedquerybox.ui b/vcl/uiconfig/ui/openlockedquerybox.ui index 54efbad18e4d..74094e793024 100644 --- a/vcl/uiconfig/ui/openlockedquerybox.ui +++ b/vcl/uiconfig/ui/openlockedquerybox.ui @@ -68,6 +68,7 @@ start 24 70 +vcl/res/help.png Question mark image
[Libreoffice-commits] core.git: uui/source
uui/source/iahndl.cxx |9 + uui/source/iahndl.hxx |2 +- uui/source/logindlg.cxx |5 +++-- uui/source/logindlg.hxx |2 +- 4 files changed, 10 insertions(+), 8 deletions(-) New commits: commit fea45cc200f2e30c0af7f1a81a2a6bfa38f6293c Author: Noel Grandin AuthorDate: Wed Jun 1 08:59:07 2022 +0200 Commit: Noel Grandin CommitDate: Wed Jun 1 14:18:05 2022 +0200 clang-tidy modernize-pass-by-value in uui Change-Id: I55f4e325ae67a7b9fa36ee12b14804fe446b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135217 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx index 9f6a3d34b9d6..a704baf135f6 100644 --- a/uui/source/iahndl.cxx +++ b/uui/source/iahndl.cxx @@ -62,6 +62,7 @@ #include #include #include +#include #include #include #include @@ -108,8 +109,8 @@ class HandleData : public osl::Condition { public: explicit HandleData( -uno::Reference< task::XInteractionRequest > const & rRequest) -: m_rRequest(rRequest), +uno::Reference< task::XInteractionRequest > xRequest) +: m_rRequest(std::move(xRequest)), bHandled( false ) { } @@ -121,8 +122,8 @@ public: } /* namespace */ UUIInteractionHelper::UUIInteractionHelper( -uno::Reference< uno::XComponentContext > const & rxContext) -: m_xContext(rxContext) +uno::Reference< uno::XComponentContext > xContext) +: m_xContext(std::move(xContext)) { } diff --git a/uui/source/iahndl.hxx b/uui/source/iahndl.hxx index a43122b7adb4..7ca8b8437891 100644 --- a/uui/source/iahndl.hxx +++ b/uui/source/iahndl.hxx @@ -80,7 +80,7 @@ private: public: explicit UUIInteractionHelper( -css::uno::Reference< css::uno::XComponentContext > const & rxContext); +css::uno::Reference< css::uno::XComponentContext > xContext); const css::uno::Reference & GetParentWindow() const { return m_xWindowParam; } void SetParentWindow(const css::uno::Reference& rWindow) { m_xWindowParam = rWindow; } diff --git a/uui/source/logindlg.cxx b/uui/source/logindlg.cxx index 11c6b20394bd..3df8ed8caf4c 100644 --- a/uui/source/logindlg.cxx +++ b/uui/source/logindlg.cxx @@ -18,6 +18,7 @@ */ #include +#include #include "logindlg.hxx" #ifdef UNX @@ -111,7 +112,7 @@ IMPL_LINK_NOARG(LoginDialog, UseSysCredsHdl_Impl, weld::Toggleable&, void) } LoginDialog::LoginDialog(weld::Window* pParent, LoginFlags nFlags, -const OUString& rServer, const OUString& rRealm) +OUString aServer, OUString aRealm) : GenericDialogController(pParent, "uui/ui/logindialog.ui", "LoginDialog") , m_xErrorFT(m_xBuilder->weld_label("errorft")) , m_xErrorInfo(m_xBuilder->weld_label("errorinfo")) @@ -125,7 +126,7 @@ LoginDialog::LoginDialog(weld::Window* pParent, LoginFlags nFlags, , m_xSavePasswdBtn(m_xBuilder->weld_check_button("remember")) , m_xUseSysCredsCB(m_xBuilder->weld_check_button("syscreds")) , m_xOKBtn(m_xBuilder->weld_button("ok")) -, m_server(rServer), m_realm(rRealm) +, m_server(std::move(aServer)), m_realm(std::move(aRealm)) { if ( !( nFlags & LoginFlags::NoUseSysCreds ) ) EnableUseSysCredsControls_Impl( m_xUseSysCredsCB->get_active() ); diff --git a/uui/source/logindlg.hxx b/uui/source/logindlg.hxx index 82bc18544842..4dfe8fc962b8 100644 --- a/uui/source/logindlg.hxx +++ b/uui/source/logindlg.hxx @@ -62,7 +62,7 @@ class LoginDialog : public weld::GenericDialogController public: LoginDialog(weld::Window* pParent, LoginFlags nFlags, -const OUString& rServer, const OUString &rRealm); +OUString aServer, OUString aRealm); virtual ~LoginDialog() override; OUStringGetName() const { return m_xNameED->get_text(); }
[Libreoffice-commits] core.git: uui/source
uui/source/iahndl.cxx | 10 -- uui/source/iahndl.hxx | 11 +++ uui/source/interactionhandler.cxx | 17 +++-- 3 files changed, 10 insertions(+), 28 deletions(-) New commits: commit 259a1ebd879f1cfe7e9db9af97d3842fcd51f640 Author: Stephan Bergmann AuthorDate: Tue May 31 14:59:09 2022 +0200 Commit: Stephan Bergmann CommitDate: Tue May 31 18:51:06 2022 +0200 Rework UUIInteractionHelper construction ...to remove the need to construct a fresh m_pImpl in UUIInteractionHandler::initialize Change-Id: Ia3f1b89903448f74242a5fec3dcf87c2b1f5e764 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135187 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx index 251a642e509f..9f6a3d34b9d6 100644 --- a/uui/source/iahndl.cxx +++ b/uui/source/iahndl.cxx @@ -120,16 +120,6 @@ public: } /* namespace */ -UUIInteractionHelper::UUIInteractionHelper( -uno::Reference< uno::XComponentContext > const & rxContext, -uno::Reference< awt::XWindow > const & rxWindowParam, -const OUString & rContextParam) -: m_xContext(rxContext), -m_xWindowParam(rxWindowParam), -m_aContextParam(rContextParam) -{ -} - UUIInteractionHelper::UUIInteractionHelper( uno::Reference< uno::XComponentContext > const & rxContext) : m_xContext(rxContext) diff --git a/uui/source/iahndl.hxx b/uui/source/iahndl.hxx index df2bdd054b47..a43122b7adb4 100644 --- a/uui/source/iahndl.hxx +++ b/uui/source/iahndl.hxx @@ -73,22 +73,20 @@ class UUIInteractionHelper private: css::uno::Reference< css::uno::XComponentContext > m_xContext; css::uno::Reference< css::awt::XWindow >m_xWindowParam; -const OUString m_aContextParam; +OUStringm_aContextParam; StringHashMap m_aTypedCustomHandlers; UUIInteractionHelper(UUIInteractionHelper const &) = delete; UUIInteractionHelper& operator =(UUIInteractionHelper const &) = delete; public: -UUIInteractionHelper( -css::uno::Reference< css::uno::XComponentContext > const & rxContext, -css::uno::Reference< css::awt::XWindow > const & rxWindow, -const OUString & rContextParam); explicit UUIInteractionHelper( css::uno::Reference< css::uno::XComponentContext > const & rxContext); const css::uno::Reference & GetParentWindow() const { return m_xWindowParam; } void SetParentWindow(const css::uno::Reference& rWindow) { m_xWindowParam = rWindow; } +void setContext(OUString const & context) { m_aContextParam = context; } + ~UUIInteractionHelper(); bool handleRequest( css::uno::Reference< css::task::XInteractionRequest > const & rRequest); @@ -103,9 +101,6 @@ public: const OUString& aMessage, std::vector< OUString > const & rArguments ); -const css::uno::Reference< css::uno::XComponentContext >& -getORB() const -{ return m_xContext; } private: bool handleRequest_impl( diff --git a/uui/source/interactionhandler.cxx b/uui/source/interactionhandler.cxx index b9e3f4d788a1..ea6ebf6d36a4 100644 --- a/uui/source/interactionhandler.cxx +++ b/uui/source/interactionhandler.cxx @@ -34,7 +34,6 @@ #include #include #include -#include using namespace com::sun::star; @@ -47,7 +46,7 @@ class UUIInteractionHandler: css::beans::XPropertySet> { private: -std::optional m_pImpl; +UUIInteractionHelper m_pImpl; public: explicit UUIInteractionHandler(css::uno::Reference< css::uno::XComponentContext > const & rxContext); @@ -114,7 +113,7 @@ public: { css::uno::Reference xWindow; rValue >>= xWindow; -m_pImpl->SetParentWindow(xWindow); +m_pImpl.SetParentWindow(xWindow); return; } throw css::beans::UnknownPropertyException(rPropertyName); @@ -124,7 +123,7 @@ public: { if (rPropertyName == "ParentWindow") { -return uno::Any(m_pImpl->GetParentWindow()); +return uno::Any(m_pImpl.GetParentWindow()); } throw css::beans::UnknownPropertyException(rPropertyName); } @@ -161,9 +160,6 @@ void SAL_CALL UUIInteractionHandler::initialize( uno::Sequence< uno::Any > const & rArguments) { -uno::Reference xContext = m_pImpl->getORB(); -m_pImpl.reset(); - // The old-style InteractionHandler service supported a sequence of // PropertyValue, while the new-style service now uses constructors to pass // in Parent and Context values; for backwards compatibility, keep support @@ -185,7 +181,8 @@ UUIInteractionHandler::initialize( } } -m_pImpl.emplace( xContext, xWindow, aContext ); +m_pImpl.SetParentWindow(xWin
[Libreoffice-commits] core.git: uui/source
uui/source/requeststringresolver.cxx |2 +- uui/source/requeststringresolver.hxx |3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) New commits: commit c593567b68d353ca13206e7ee62c4a0f8348d987 Author: Stephan Bergmann AuthorDate: Tue May 31 14:57:39 2022 +0200 Commit: Stephan Bergmann CommitDate: Tue May 31 17:04:47 2022 +0200 UUIInteractionRequestStringResolver::m_pImpl can be a plain data member Change-Id: I1daed58cec87d192118f027ce1843e56b17da19b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135186 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/uui/source/requeststringresolver.cxx b/uui/source/requeststringresolver.cxx index 8bcb78bfea8d..baaaf088713c 100644 --- a/uui/source/requeststringresolver.cxx +++ b/uui/source/requeststringresolver.cxx @@ -63,7 +63,7 @@ UUIInteractionRequestStringResolver::getStringFromInformationalRequest( { try { -return m_pImpl->getStringFromRequest(Request); +return m_pImpl.getStringFromRequest(Request); } catch (uno::RuntimeException const & ex) { diff --git a/uui/source/requeststringresolver.hxx b/uui/source/requeststringresolver.hxx index 9456444a43f4..f9c95d87f6f5 100644 --- a/uui/source/requeststringresolver.hxx +++ b/uui/source/requeststringresolver.hxx @@ -24,7 +24,6 @@ #include #include #include "iahndl.hxx" -#include class UUIInteractionRequestStringResolver: public cppu::WeakImplHelper< @@ -36,7 +35,7 @@ public: css::uno::Reference< css::uno::XComponentContext > const & rxContext); private: -std::optional m_pImpl; +UUIInteractionHelper m_pImpl; UUIInteractionRequestStringResolver(UUIInteractionRequestStringResolver const &) = delete; void operator =(UUIInteractionRequestStringResolver const &) = delete;
[Libreoffice-commits] core.git: uui/source
uui/source/interactionhandler.cxx|7 --- uui/source/requeststringresolver.cxx |2 +- uui/source/requeststringresolver.hxx |7 +++ 3 files changed, 8 insertions(+), 8 deletions(-) New commits: commit d05b8080b25877e94d54576744b68f01ae775380 Author: Noel Grandin AuthorDate: Sat May 21 08:32:39 2022 +0200 Commit: Noel Grandin CommitDate: Sat May 21 11:17:44 2022 +0200 flatten UUIInteractionHandler no need to allocate these helpers separately Change-Id: I9a062c689b5c3ecb40e6400cfe9715adcdf3ae31 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134702 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/uui/source/interactionhandler.cxx b/uui/source/interactionhandler.cxx index cc5579fd1ed1..b9e3f4d788a1 100644 --- a/uui/source/interactionhandler.cxx +++ b/uui/source/interactionhandler.cxx @@ -34,6 +34,7 @@ #include #include #include +#include using namespace com::sun::star; @@ -46,7 +47,7 @@ class UUIInteractionHandler: css::beans::XPropertySet> { private: -std::unique_ptr m_pImpl; +std::optional m_pImpl; public: explicit UUIInteractionHandler(css::uno::Reference< css::uno::XComponentContext > const & rxContext); @@ -131,7 +132,7 @@ public: UUIInteractionHandler::UUIInteractionHandler( uno::Reference< uno::XComponentContext > const & rxContext) -: m_pImpl(new UUIInteractionHelper(rxContext)) +: m_pImpl(rxContext) { } @@ -184,7 +185,7 @@ UUIInteractionHandler::initialize( } } -m_pImpl.reset( new UUIInteractionHelper(xContext, xWindow, aContext) ); +m_pImpl.emplace( xContext, xWindow, aContext ); } void SAL_CALL diff --git a/uui/source/requeststringresolver.cxx b/uui/source/requeststringresolver.cxx index e9d73f0749da..8bcb78bfea8d 100644 --- a/uui/source/requeststringresolver.cxx +++ b/uui/source/requeststringresolver.cxx @@ -28,7 +28,7 @@ using namespace css; UUIInteractionRequestStringResolver::UUIInteractionRequestStringResolver( uno::Reference< uno::XComponentContext > const & rxContext) -: m_pImpl(new UUIInteractionHelper(rxContext)) +: m_pImpl(rxContext) { } diff --git a/uui/source/requeststringresolver.hxx b/uui/source/requeststringresolver.hxx index 685a18038c86..9456444a43f4 100644 --- a/uui/source/requeststringresolver.hxx +++ b/uui/source/requeststringresolver.hxx @@ -23,9 +23,8 @@ #include #include #include -#include - -class UUIInteractionHelper; +#include "iahndl.hxx" +#include class UUIInteractionRequestStringResolver: public cppu::WeakImplHelper< @@ -37,7 +36,7 @@ public: css::uno::Reference< css::uno::XComponentContext > const & rxContext); private: -std::unique_ptr m_pImpl; +std::optional m_pImpl; UUIInteractionRequestStringResolver(UUIInteractionRequestStringResolver const &) = delete; void operator =(UUIInteractionRequestStringResolver const &) = delete;
[Libreoffice-commits] core.git: uui/source
uui/source/iahndl-authentication.cxx |5 +++-- uui/source/iahndl-ssl.cxx|6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) New commits: commit db149ba9801f57c2e737dec893965f880fa04700 Author: Mike Kaganski AuthorDate: Fri Oct 29 10:23:35 2021 +0300 Commit: Mike Kaganski CommitDate: Sun Oct 31 21:32:36 2021 +0100 Prepare for removal of non-const operator[] from Sequence in uui Change-Id: I3b4ddb7c371c5a01c561e4b45f3c181b5d9e2a11 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124409 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/uui/source/iahndl-authentication.cxx b/uui/source/iahndl-authentication.cxx index ad975d3f9ae7..4ec2f734be6b 100644 --- a/uui/source/iahndl-authentication.cxx +++ b/uui/source/iahndl-authentication.cxx @@ -344,9 +344,10 @@ handleAuthenticationRequest_( { uno::Sequence< OUString > aPassList(aInfo.GetAccount().isEmpty() ? 1 : 2); - aPassList[0] = aInfo.GetPassword(); + auto pPassList = aPassList.getArray(); + pPassList[0] = aInfo.GetPassword(); if (!aInfo.GetAccount().isEmpty()) - aPassList[1] = aInfo.GetAccount(); + pPassList[1] = aInfo.GetAccount(); if (aInfo.GetIsRememberPassword()) { diff --git a/uui/source/iahndl-ssl.cxx b/uui/source/iahndl-ssl.cxx index bf4e8811f949..fa1b2a6a16e4 100644 --- a/uui/source/iahndl-ssl.cxx +++ b/uui/source/iahndl-ssl.cxx @@ -274,14 +274,14 @@ handleCertificateValidationRequest_( OUString certHostName = getContentPart( rRequest.Certificate->getSubjectName() ); uno::Sequence< OUString > certHostNames(altNames.size() + 1); - -certHostNames[0] = certHostName; +auto pcertHostNames = certHostNames.getArray(); +pcertHostNames[0] = certHostName; for (size_t n = 0; n < altNames.size(); ++n) { if (altNames[n].Type == security::ExtAltNameType_DNS_NAME) { - altNames[n].Value >>= certHostNames[n+1]; + altNames[n].Value >>= pcertHostNames[n+1]; } }
[Libreoffice-commits] core.git: uui/source
uui/source/iahndl-locking.cxx |9 +++-- uui/source/iahndl-ssl.cxx |3 +-- uui/source/iahndl.cxx | 23 --- 3 files changed, 12 insertions(+), 23 deletions(-) New commits: commit f28c4ae3c676554723ae5959f15b5766e322cee6 Author: Julien Nabet AuthorDate: Wed Oct 13 21:59:05 2021 +0200 Commit: Julien Nabet CommitDate: Thu Oct 14 10:28:44 2021 +0200 Directly initialize vectors in uui Change-Id: Ifca1362d8ee97640b31ce75b3dc8e819fe32588d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123567 Tested-by: Julien Nabet Reviewed-by: Julien Nabet diff --git a/uui/source/iahndl-locking.cxx b/uui/source/iahndl-locking.cxx index 23493c16053c..47b15dc5e9da 100644 --- a/uui/source/iahndl-locking.cxx +++ b/uui/source/iahndl-locking.cxx @@ -72,8 +72,7 @@ void handleReadOnlyOpenRequest_( std::locale aResLocale = Translate::Create("uui"); OUString aMessage; -std::vector aArguments; -aArguments.push_back(aDocumentURL); +std::vector aArguments { aDocumentURL }; aMessage = Translate::get(STR_READONLYOPEN_MSG, aResLocale); aMessage = UUIInteractionHelper::replaceMessageWithArguments(aMessage, aArguments); @@ -102,8 +101,7 @@ void handleReloadEditableRequest_( std::locale aResLocale = Translate::Create("uui"); OUString aMessage; -std::vector aArguments; -aArguments.push_back(aDocumentURL); +std::vector aArguments { aDocumentURL }; aMessage = Translate::get(STR_RELOADEDITABLE_MSG, aResLocale); aMessage = UUIInteractionHelper::replaceMessageWithArguments(aMessage, aArguments); @@ -140,8 +138,7 @@ handleLockedDocumentRequest_( std::locale aResLocale = Translate::Create("uui"); OUString aMessage; -std::vector< OUString > aArguments; -aArguments.push_back( aDocumentURL ); +std::vector< OUString > aArguments { aDocumentURL }; bool bAllowOverride = xRetry.is() && officecfg::Office::Common::Misc::AllowOverrideLocking::get(); diff --git a/uui/source/iahndl-ssl.cxx b/uui/source/iahndl-ssl.cxx index 136907da7cc2..bf4e8811f949 100644 --- a/uui/source/iahndl-ssl.cxx +++ b/uui/source/iahndl-ssl.cxx @@ -146,8 +146,7 @@ executeUnknownAuthDialog( // Get correct resource string OUString aMessage; -std::vector< OUString > aArguments; -aArguments.push_back( getContentPart( rXCert->getSubjectName()) ); +std::vector< OUString > aArguments { getContentPart( rXCert->getSubjectName()) }; std::locale aResLocale(Translate::Create("uui")); diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx index 1fb003796682..e36598605b8f 100644 --- a/uui/source/iahndl.cxx +++ b/uui/source/iahndl.cxx @@ -463,7 +463,6 @@ UUIInteractionHelper::handleRequest_impl( ucb::UnsupportedNameClashException aUORequest; if (aAnyRequest >>= aUORequest) { -std::vector< OUString > aArguments; uno::Reference< task::XInteractionApprove > xApprove; uno::Reference< task::XInteractionDisapprove > xDisapprove; @@ -472,6 +471,7 @@ UUIInteractionHelper::handleRequest_impl( if ( xApprove.is() && xDisapprove.is() ) { +std::vector< OUString > aArguments; handleErrorHandlerRequest( task::InteractionClassification_QUERY, ERRCODE_UUI_IO_UNSUPPORTEDOVERWRITE, aArguments, @@ -553,8 +553,7 @@ UUIInteractionHelper::handleRequest_impl( { sal_Int32 nMedium = 0; aWrongMediumException.Medium >>= nMedium; -std::vector< OUString > aArguments; -aArguments.push_back(OUString::number(nMedium + 1)); +std::vector< OUString > aArguments { OUString::number(nMedium + 1) }; handleErrorHandlerRequest(aWrongMediumException.Classification, ERRCODE_UUI_WRONGMEDIUM, aArguments, @@ -607,8 +606,7 @@ UUIInteractionHelper::handleRequest_impl( ? ERRCODE_UUI_CONFIGURATION_BROKENDATA_WITHREMOVE : ERRCODE_UUI_CONFIGURATION_BROKENDATA_NOREMOVE; -std::vector< OUString > aArguments; -aArguments.push_back(aMergeRecoveryRequest.ErrorLayerId); +std::vector< OUString > aArguments { aMergeRecoveryRequest.ErrorLayerId }; handleErrorHandlerRequest(task::InteractionClassification_ERROR, nErrorCode, @@ -631,8 +629,7 @@ UUIInteractionHelper::handleRequest_impl( if (aStratum.isEmpty()) aStratum = aStratumCreationException.StratumService; -std::vector< OUString > aArguments; -aArguments.push_back(aStratum); +std::vector< OUString > aArguments { aStratum }; handleErrorHandlerRequest(task::InteractionClassification_ERROR,
[Libreoffice-commits] core.git: uui/source
uui/source/secmacrowarnings.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit f7a0e58a3c0670a8c3ecf03a38a821c7944b3895 Author: Andreas Heinisch AuthorDate: Sat Oct 9 00:07:32 2021 +0200 Commit: Andreas Heinisch CommitDate: Sat Oct 9 11:22:46 2021 +0200 Don't URL encode the filename in the macro security warning dialog Change-Id: Ic1243f562fa4142ffdfece7296223b693ce7fe90 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123298 Tested-by: Jenkins Reviewed-by: Andreas Heinisch diff --git a/uui/source/secmacrowarnings.cxx b/uui/source/secmacrowarnings.cxx index 995eddc40246..79af305653ff 100644 --- a/uui/source/secmacrowarnings.cxx +++ b/uui/source/secmacrowarnings.cxx @@ -91,7 +91,7 @@ void MacroWarning::SetDocumentURL( const OUString& rDocURL ) OUString aPath; osl::FileBase::getFileURLFromSystemPath(rDocURL, aPath); -aPath = INetURLObject(aPath).GetLastName(); +aPath = INetURLObject(aPath).GetLastName(INetURLObject::DecodeMechanism::Unambiguous); m_xDialog->set_primary_text(aPath); }
[Libreoffice-commits] core.git: uui/source
uui/source/passworddlg.cxx |9 + 1 file changed, 9 insertions(+) New commits: commit 17694c906f94a195a2d5086e0e87afa1c852107b Author: Andreas Heinisch AuthorDate: Mon Jun 7 14:00:23 2021 +0200 Commit: Andreas Heinisch CommitDate: Wed Jun 9 21:45:53 2021 +0200 tdf#66553 - Add file/product name to title bar for password managers Change-Id: I6a16e654edcbc3511ee8cbea0889d858e22f2a2c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116782 Tested-by: Jenkins Reviewed-by: Andreas Heinisch diff --git a/uui/source/passworddlg.cxx b/uui/source/passworddlg.cxx index 3e8d1550f6cd..694e717216b1 100644 --- a/uui/source/passworddlg.cxx +++ b/uui/source/passworddlg.cxx @@ -21,6 +21,7 @@ #include #include +#include #include #include #include @@ -78,6 +79,14 @@ PasswordDialog::PasswordDialog(weld::Window* pParent, const char* pStrId = bOpenToModify ? STR_ENTER_PASSWORD_TO_MODIFY : STR_ENTER_PASSWORD_TO_OPEN; OUString aMessage(Translate::get(pStrId, rResLocale)); INetURLObject url(aDocURL); + +// tdf#66553 - add file name to title bar for password managers +OUString aFileName = url.getName(INetURLObject::LAST_SEGMENT, true, + INetURLObject::DecodeMechanism::Unambiguous); +if (!aFileName.isEmpty()) +aFileName += " - " + utl::ConfigManager::getProductName(); +m_xDialog->set_title(aTitle + " - " + aFileName); + aMessage += url.HasError() ? aDocURL : url.GetMainURL(INetURLObject::DecodeMechanism::Unambiguous); m_xFTPassword->set_label(aMessage); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: uui/source
uui/source/secmacrowarnings.cxx | 18 +- 1 file changed, 5 insertions(+), 13 deletions(-) New commits: commit bcecb778172f043239d07bb52dd5a6503ede1570 Author: Henry Castro AuthorDate: Fri Mar 5 06:45:45 2021 -0400 Commit: Henry Castro CommitDate: Wed Apr 7 16:44:04 2021 +0200 lok: show only the filename of the Macro Security dialog Apply the patch for desktop case too. Change-Id: Ia4cf6d2cefd0e02e11e48ca017f8af9f81600b16 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112003 Tested-by: Jenkins CollaboraOffice Reviewed-by: Jan Holesovsky Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113688 Tested-by: Jenkins Reviewed-by: Henry Castro diff --git a/uui/source/secmacrowarnings.cxx b/uui/source/secmacrowarnings.cxx index 932c4723ab21..7c853cf2f8e0 100644 --- a/uui/source/secmacrowarnings.cxx +++ b/uui/source/secmacrowarnings.cxx @@ -19,8 +19,6 @@ #include #include -#include -#include #include #include #include @@ -29,8 +27,6 @@ #include #include #include -#include -#include using namespace ::com::sun::star::security; @@ -92,15 +88,11 @@ IMPL_STATIC_LINK_NOARG(MacroWarning, InstallLOKNotifierHdl, void*, vcl::ILibreOf void MacroWarning::SetDocumentURL( const OUString& rDocURL ) { -OUString aAbbreviatedPath; -if (comphelper::LibreOfficeKit::isActive()) -{ -osl::FileBase::getFileURLFromSystemPath(rDocURL, aAbbreviatedPath); -aAbbreviatedPath = INetURLObject(aAbbreviatedPath).GetLastName(); -} -else -osl_abbreviateSystemPath(rDocURL.pData, &aAbbreviatedPath.pData, 50, nullptr); -m_xDialog->set_primary_text(aAbbreviatedPath); +OUString aPath; + +osl::FileBase::getFileURLFromSystemPath(rDocURL, aPath); +aPath = INetURLObject(aPath).GetLastName(); +m_xDialog->set_primary_text(aPath); } IMPL_LINK_NOARG(MacroWarning, ViewSignsBtnHdl, weld::Button&, void) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: uui/source
uui/source/secmacrowarnings.cxx | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) New commits: commit 598348c797854450d03c9064b45d4b4e525ebd15 Author: Henry Castro AuthorDate: Wed Mar 3 18:17:31 2021 -0400 Commit: Michael Meeks CommitDate: Tue Apr 6 23:13:12 2021 +0200 lok: strip directory and suffix from filenames The Macro Warning dialog should only show the filename Change-Id: I04f1d3a1b945d65276187ca0a284e41bd08ed298 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111941 Tested-by: Jenkins CollaboraOffice Tested-by: Michael Meeks Reviewed-by: Michael Meeks Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113687 Tested-by: Jenkins diff --git a/uui/source/secmacrowarnings.cxx b/uui/source/secmacrowarnings.cxx index 90d76d75e6ce..932c4723ab21 100644 --- a/uui/source/secmacrowarnings.cxx +++ b/uui/source/secmacrowarnings.cxx @@ -19,12 +19,18 @@ #include #include +#include +#include #include #include +#include #include #include #include #include +#include +#include +#include using namespace ::com::sun::star::security; @@ -87,7 +93,13 @@ IMPL_STATIC_LINK_NOARG(MacroWarning, InstallLOKNotifierHdl, void*, vcl::ILibreOf void MacroWarning::SetDocumentURL( const OUString& rDocURL ) { OUString aAbbreviatedPath; -osl_abbreviateSystemPath(rDocURL.pData, &aAbbreviatedPath.pData, 50, nullptr); +if (comphelper::LibreOfficeKit::isActive()) +{ +osl::FileBase::getFileURLFromSystemPath(rDocURL, aAbbreviatedPath); +aAbbreviatedPath = INetURLObject(aAbbreviatedPath).GetLastName(); +} +else +osl_abbreviateSystemPath(rDocURL.pData, &aAbbreviatedPath.pData, 50, nullptr); m_xDialog->set_primary_text(aAbbreviatedPath); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: uui/source
uui/source/secmacrowarnings.cxx |7 +++ uui/source/secmacrowarnings.hxx |1 + 2 files changed, 8 insertions(+) New commits: commit 2407f8aca45a3fde5a0c6808d62a0435ff1de565 Author: Henry Castro AuthorDate: Fri Dec 25 13:36:03 2020 -0400 Commit: Henry Castro CommitDate: Tue Jan 5 12:22:37 2021 +0100 lok: add global notifier to the "Macro Security Warning" dialog. This message dialog is especial, because it is shown before loading the document so no way to get access to view shell notifier when the model/view/controller were not created. Change-Id: I5da3ca9d1009f174f2d96c1302770f4509a807cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108291 Tested-by: Jenkins Reviewed-by: Henry Castro diff --git a/uui/source/secmacrowarnings.cxx b/uui/source/secmacrowarnings.cxx index 7a657d03ca2d..90d76d75e6ce 100644 --- a/uui/source/secmacrowarnings.cxx +++ b/uui/source/secmacrowarnings.cxx @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -75,6 +76,12 @@ MacroWarning::MacroWarning(weld::Window* pParent, bool _bWithSignatures) mxEnableBtn->connect_clicked(LINK(this, MacroWarning, EnableBtnHdl)); mxDisableBtn->connect_clicked(LINK(this, MacroWarning, DisableBtnHdl)); mxDisableBtn->grab_focus(); // Default button, but focus is on view button +m_xDialog->SetInstallLOKNotifierHdl(LINK(this, MacroWarning, InstallLOKNotifierHdl)); +} + +IMPL_STATIC_LINK_NOARG(MacroWarning, InstallLOKNotifierHdl, void*, vcl::ILibreOfficeKitNotifier*) +{ +return GetpApp(); } void MacroWarning::SetDocumentURL( const OUString& rDocURL ) diff --git a/uui/source/secmacrowarnings.hxx b/uui/source/secmacrowarnings.hxx index 6a0c97e5f8d2..b91cc092c708 100644 --- a/uui/source/secmacrowarnings.hxx +++ b/uui/source/secmacrowarnings.hxx @@ -50,6 +50,7 @@ private: DECL_LINK(EnableBtnHdl, weld::Button&, void); DECL_LINK(DisableBtnHdl, weld::Button&, void); DECL_LINK(AlwaysTrustCheckHdl, weld::Button&, void); +DECL_STATIC_LINK(MacroWarning, InstallLOKNotifierHdl, void*, vcl::ILibreOfficeKitNotifier*); voidInitControls(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: uui/source
uui/source/secmacrowarnings.cxx |6 ++ uui/source/secmacrowarnings.hxx |1 + 2 files changed, 7 insertions(+) New commits: commit 8af90b6ede741990e33ca842e096ba3d7ee5d53d Author: Henry Castro AuthorDate: Tue Dec 29 16:40:14 2020 -0400 Commit: Henry Castro CommitDate: Mon Jan 4 11:56:05 2021 +0100 lok: fix the "disable button" of the "Macro Security Warning"... Dialog. The client side cannot disable macros and close the message dialog Change-Id: Id78060d3c2b3c9c8ac010d8b951e7640b02ca715 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108489 Tested-by: Jenkins Reviewed-by: Henry Castro diff --git a/uui/source/secmacrowarnings.cxx b/uui/source/secmacrowarnings.cxx index 1f048f0cb663..7a657d03ca2d 100644 --- a/uui/source/secmacrowarnings.cxx +++ b/uui/source/secmacrowarnings.cxx @@ -73,6 +73,7 @@ MacroWarning::MacroWarning(weld::Window* pParent, bool _bWithSignatures) InitControls(); mxEnableBtn->connect_clicked(LINK(this, MacroWarning, EnableBtnHdl)); +mxDisableBtn->connect_clicked(LINK(this, MacroWarning, DisableBtnHdl)); mxDisableBtn->grab_focus(); // Default button, but focus is on view button } @@ -120,6 +121,11 @@ IMPL_LINK_NOARG(MacroWarning, EnableBtnHdl, weld::Button&, void) m_xDialog->response(RET_OK); } +IMPL_LINK_NOARG(MacroWarning, DisableBtnHdl, weld::Button&, void) +{ +m_xDialog->response(RET_CANCEL); +} + IMPL_LINK_NOARG(MacroWarning, AlwaysTrustCheckHdl, weld::Button&, void) { const bool bEnable = (mnActSecLevel < 2 || mxAlwaysTrustCB->get_active()); diff --git a/uui/source/secmacrowarnings.hxx b/uui/source/secmacrowarnings.hxx index 536f70e09fc2..6a0c97e5f8d2 100644 --- a/uui/source/secmacrowarnings.hxx +++ b/uui/source/secmacrowarnings.hxx @@ -48,6 +48,7 @@ private: DECL_LINK(ViewSignsBtnHdl, weld::Button&, void); DECL_LINK(EnableBtnHdl, weld::Button&, void); +DECL_LINK(DisableBtnHdl, weld::Button&, void); DECL_LINK(AlwaysTrustCheckHdl, weld::Button&, void); voidInitControls(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: uui/source
uui/source/iahndl.cxx |4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) New commits: commit 642e630a6229785f9206f5db6e627577f3dc4c3b Author: Stephan Bergmann AuthorDate: Fri Jun 5 15:12:28 2020 +0200 Commit: Stephan Bergmann CommitDate: Fri Jun 5 21:20:39 2020 +0200 Upcoming loplugin:elidestringvar: uui Change-Id: I68858a9f972dbe35a75e5862db040f186ba56146 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95596 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx index 14615bc9ca54..eee5c744d437 100644 --- a/uui/source/iahndl.cxx +++ b/uui/source/iahndl.cxx @@ -862,11 +862,9 @@ UUIInteractionHelper::getInteractionHandlerList( uno::Reference< lang::XMultiServiceFactory > xConfigProv = configuration::theDefaultProvider::get( m_xContext ); -OUString aFullPath = "/org.openoffice.ucb.InteractionHandler/InteractionHandlers"; - uno::Sequence aArguments(comphelper::InitAnyPropertySequence( { -{"nodepath", uno::Any(aFullPath)} +{"nodepath", uno::Any(OUString("/org.openoffice.ucb.InteractionHandler/InteractionHandlers"))} })); uno::Reference< uno::XInterface > xInterface( ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: uui/source
uui/source/iahndl.cxx | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) New commits: commit 3705a2904d50210e3515723ad246a72eb37f Author: Noel Grandin AuthorDate: Thu Mar 19 14:07:29 2020 +0200 Commit: Noel Grandin CommitDate: Thu Mar 19 13:46:30 2020 +0100 use SolarMutexReleaser in UUIInteractionHelper instead of hand-coding it Change-Id: I16cc72854a0d02422eaacf5794b97cfcd7689d83 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90744 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx index f3c7c3b94088..0c9b9397aeeb 100644 --- a/uui/source/iahndl.cxx +++ b/uui/source/iahndl.cxx @@ -164,11 +164,8 @@ UUIInteractionHelper::handleRequest( HandleData aHD(rRequest); Link aLink(&aHD,handlerequest); Application::PostUserEvent(aLink,this); -comphelper::SolarMutex& rSolarMutex = Application::GetSolarMutex(); -sal_uInt32 nLockCount = (rSolarMutex.IsCurrentThread()) ? rSolarMutex.release(true) : 0; +SolarMutexReleaser aReleaser; aHD.wait(); -if (nLockCount) -rSolarMutex.acquire(nLockCount); return aHD.bHandled; } else @@ -215,11 +212,8 @@ UUIInteractionHelper::getStringFromRequest( HandleData aHD(rRequest); Link aLink(&aHD,getstringfromrequest); Application::PostUserEvent(aLink,this); -comphelper::SolarMutex& rSolarMutex = Application::GetSolarMutex(); -sal_uInt32 nLockCount = (rSolarMutex.IsCurrentThread()) ? rSolarMutex.release(true) : 0; +SolarMutexReleaser aReleaser; aHD.wait(); -if (nLockCount) -rSolarMutex.acquire(nLockCount); return aHD.m_aResult; } else ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: uui/source
uui/source/interactionhandler.cxx | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) New commits: commit e2a081871aea244ec42d31ac9dc5d132e3b96483 Author: Stephan Bergmann AuthorDate: Tue Nov 12 13:49:18 2019 +0100 Commit: Stephan Bergmann CommitDate: Tue Nov 12 14:50:25 2019 +0100 Better throw RuntimeException than assert here (in case this functionality is ever discovered and called by external code) Change-Id: If127460f58e1d074a32f231385e2c54303e4f98c Reviewed-on: https://gerrit.libreoffice.org/82508 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/uui/source/interactionhandler.cxx b/uui/source/interactionhandler.cxx index f90763e1e22e..cc5579fd1ed1 100644 --- a/uui/source/interactionhandler.cxx +++ b/uui/source/interactionhandler.cxx @@ -27,6 +27,7 @@ #include #include #include +#include #include "iahndl.hxx" #include @@ -75,25 +76,29 @@ public: virtual void SAL_CALL addPropertyChangeListener( const OUString& /*aPropertyName*/, const css::uno::Reference< css::beans::XPropertyChangeListener >& /*xListener*/ ) override { -assert(false); +throw css::uno::RuntimeException( +"UUIInteractionHandler addPropertyChangeListener is not supported"); } virtual void SAL_CALL removePropertyChangeListener( const OUString& /*aPropertyName*/, const css::uno::Reference< css::beans::XPropertyChangeListener >& /*xListener*/ ) override { -assert(false); +throw css::uno::RuntimeException( +"UUIInteractionHandler removePropertyChangeListener is not supported"); } virtual void SAL_CALL addVetoableChangeListener( const OUString& /*aPropertyName*/, const css::uno::Reference< css::beans::XVetoableChangeListener >& /*xListener*/ ) override { -assert(false); +throw css::uno::RuntimeException( +"UUIInteractionHandler addVetoableChangeListener is not supported"); } virtual void SAL_CALL removeVetoableChangeListener( const OUString& /*aPropertyName*/, const css::uno::Reference< css::beans::XVetoableChangeListener >& /*xListener*/ ) override { -assert(false); +throw css::uno::RuntimeException( +"UUIInteractionHandler removeVetoableChangeListener is not supported"); } virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: uui/source
uui/source/interactionhandler.cxx |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) New commits: commit a07c637a0e4fe0ab81db70c69decbc946ad37da9 Author: Caolán McNamara AuthorDate: Tue Nov 12 11:17:08 2019 + Commit: Caolán McNamara CommitDate: Tue Nov 12 13:13:55 2019 +0100 getPropertySetInfo is allowed to return null so the original state, without the assert, would be ok css.beans.XPropertySet::getPropertySetInfo is documented as "@returns NULL if the implementation cannot or will not provide information about the properties" Change-Id: Ia0230add8f6c1b22a639cd71ca3cc310e0f1d126 Reviewed-on: https://gerrit.libreoffice.org/82499 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/uui/source/interactionhandler.cxx b/uui/source/interactionhandler.cxx index c132e9152b1b..f90763e1e22e 100644 --- a/uui/source/interactionhandler.cxx +++ b/uui/source/interactionhandler.cxx @@ -30,7 +30,6 @@ #include "iahndl.hxx" #include -#include #include #include #include @@ -100,7 +99,7 @@ public: virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override { -return new comphelper::PropertySetInfo; +return nullptr; } virtual void SAL_CALL setPropertyValue(const OUString& rPropertyName, const css::uno::Any& rValue) override ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: uui/source
uui/source/interactionhandler.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 774de260e934ee89cfd1480b85ca083b98d69e79 Author: Caolán McNamara AuthorDate: Mon Nov 11 16:50:43 2019 + Commit: Caolán McNamara CommitDate: Mon Nov 11 20:36:58 2019 +0100 return an empty PropertySetInfo instead of assert e.g. seen with APSO extension Change-Id: Ia2eb636a7d27ca87062e7962eded06756ff4e333 Reviewed-on: https://gerrit.libreoffice.org/82457 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/uui/source/interactionhandler.cxx b/uui/source/interactionhandler.cxx index 201e0433675d..c132e9152b1b 100644 --- a/uui/source/interactionhandler.cxx +++ b/uui/source/interactionhandler.cxx @@ -30,6 +30,7 @@ #include "iahndl.hxx" #include +#include #include #include #include @@ -99,8 +100,7 @@ public: virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override { -assert(false); -return nullptr; +return new comphelper::PropertySetInfo; } virtual void SAL_CALL setPropertyValue(const OUString& rPropertyName, const css::uno::Any& rValue) override ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: uui/source
uui/source/iahndl.hxx | 11 -- uui/source/interactionhandler.cxx | 60 -- 2 files changed, 64 insertions(+), 7 deletions(-) New commits: commit adb9b7c7cc37e768fc874a0dd584e6d76adbf62f Author: Caolán McNamara AuthorDate: Mon Sep 9 11:06:55 2019 +0100 Commit: Caolán McNamara CommitDate: Mon Sep 9 16:25:06 2019 +0100 enable route to get ParentWindow from an existing UUIInteractionHelper Change-Id: I550f99fa4a5db41cdad0b4d60ca02866835d7ae2 diff --git a/uui/source/iahndl.hxx b/uui/source/iahndl.hxx index 4feb98d3fa5d..f2c9461f6bbe 100644 --- a/uui/source/iahndl.hxx +++ b/uui/source/iahndl.hxx @@ -74,10 +74,10 @@ typedef std::unordered_map< OUString, OUString > StringHashMap; class UUIInteractionHelper { private: -css::uno::Reference< css::uno::XComponentContext > m_xContext; -css::uno::Reference< css::awt::XWindow > m_xWindowParam; -const OUString m_aContextParam; -StringHashMap m_aTypedCustomHandlers; +css::uno::Reference< css::uno::XComponentContext > m_xContext; +css::uno::Reference< css::awt::XWindow >m_xWindowParam; +const OUString m_aContextParam; +StringHashMap m_aTypedCustomHandlers; UUIInteractionHelper(UUIInteractionHelper const &) = delete; UUIInteractionHelper& operator =(UUIInteractionHelper const &) = delete; @@ -89,6 +89,9 @@ public: explicit UUIInteractionHelper( css::uno::Reference< css::uno::XComponentContext > const & rxContext); +css::uno::Reference GetParentWindow() const { return m_xWindowParam; } +void SetParentWindow(css::uno::Reference& rWindow) { m_xWindowParam = rWindow; } + ~UUIInteractionHelper(); bool handleRequest( css::uno::Reference< css::task::XInteractionRequest > const & rRequest); diff --git a/uui/source/interactionhandler.cxx b/uui/source/interactionhandler.cxx index df06d4ea1d0e..1d587988478f 100644 --- a/uui/source/interactionhandler.cxx +++ b/uui/source/interactionhandler.cxx @@ -22,6 +22,7 @@ #include #include +#include #include #include #include @@ -38,9 +39,10 @@ using namespace com::sun::star; namespace { class UUIInteractionHandler: -public cppu::WeakImplHelper< css::lang::XServiceInfo, - css::lang::XInitialization, - css::task::XInteractionHandler2 > +public cppu::WeakImplHelper { private: std::unique_ptr m_pImpl; @@ -69,6 +71,58 @@ public: handleInteractionRequest( const css::uno::Reference< css::task::XInteractionRequest >& Request ) override; + +virtual void SAL_CALL +addPropertyChangeListener( const OUString& /*aPropertyName*/, const css::uno::Reference< css::beans::XPropertyChangeListener >& /*xListener*/ ) override +{ +assert(false); +} + +virtual void SAL_CALL +removePropertyChangeListener( const OUString& /*aPropertyName*/, const css::uno::Reference< css::beans::XPropertyChangeListener >& /*xListener*/ ) override +{ +assert(false); +} + +virtual void SAL_CALL +addVetoableChangeListener( const OUString& /*aPropertyName*/, const css::uno::Reference< css::beans::XVetoableChangeListener >& /*xListener*/ ) override +{ +assert(false); +} + +virtual void SAL_CALL +removeVetoableChangeListener( const OUString& /*aPropertyName*/, const css::uno::Reference< css::beans::XVetoableChangeListener >& /*xListener*/ ) override +{ +assert(false); +} + +virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL +getPropertySetInfo() override +{ +assert(false); +return nullptr; +} + +virtual void SAL_CALL setPropertyValue(const OUString& rPropertyName, const css::uno::Any& rValue) override +{ +if (rPropertyName == "ParentWindow") +{ +css::uno::Reference xWindow; +rValue >>= xWindow; +m_pImpl->SetParentWindow(xWindow); +return; +} +throw css::beans::UnknownPropertyException(); +} + +virtual css::uno::Any SAL_CALL getPropertyValue(const OUString& rPropertyName) override +{ +if (rPropertyName == "ParentWindow") +{ +return uno::Any(m_pImpl->GetParentWindow()); +} +throw css::beans::UnknownPropertyException(); +} }; UUIInteractionHandler::UUIInteractionHandler( ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: uui/source xmlhelp/source
uui/source/interactionhandler.cxx | 10 -- xmlhelp/source/treeview/tvfactory.cxx |5 + 2 files changed, 5 insertions(+), 10 deletions(-) New commits: commit 51a30d7daee8779ef51d8db58559e4fe15665d1b Author: Julien Nabet AuthorDate: Sun Aug 18 13:38:16 2019 +0200 Commit: Julien Nabet CommitDate: Sun Aug 18 14:32:56 2019 +0200 tdf#88205 Adapt uses of css::uno::Sequence to use initializer_list ctor in uui, xmlhelp Change-Id: I588ed4154e6b21e178f2466c58abc08562eddf80 Reviewed-on: https://gerrit.libreoffice.org/77663 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/uui/source/interactionhandler.cxx b/uui/source/interactionhandler.cxx index 71286345a177..df06d4ea1d0e 100644 --- a/uui/source/interactionhandler.cxx +++ b/uui/source/interactionhandler.cxx @@ -91,13 +91,11 @@ UUIInteractionHandler::supportsService(OUString const & rServiceName) uno::Sequence< OUString > SAL_CALL UUIInteractionHandler::getSupportedServiceNames() { -uno::Sequence< OUString > aNames(3); -aNames[0] = "com.sun.star.task.InteractionHandler"; -// added to indicate support for configuration.backend.MergeRecoveryRequest -aNames[1] = "com.sun.star.configuration.backend.InteractionHandler"; -aNames[2] = "com.sun.star.uui.InteractionHandler"; +return { "com.sun.star.task.InteractionHandler", + // added to indicate support for configuration.backend.MergeRecoveryRequest + "com.sun.star.configuration.backend.InteractionHandler", // for backwards compatibility -return aNames; + "com.sun.star.uui.InteractionHandler" }; } void SAL_CALL diff --git a/xmlhelp/source/treeview/tvfactory.cxx b/xmlhelp/source/treeview/tvfactory.cxx index 73adce6ae7b4..e4fc02c58e41 100644 --- a/xmlhelp/source/treeview/tvfactory.cxx +++ b/xmlhelp/source/treeview/tvfactory.cxx @@ -131,10 +131,7 @@ TVFactory::getImplementationName_static() Sequence< OUString > TVFactory::getSupportedServiceNames_static() { -Sequence< OUString > seq( 2 ); -seq[0] = "com.sun.star.help.TreeView"; -seq[1] = "com.sun.star.ucb.HiearchyDataSource"; -return seq; +return { "com.sun.star.help.TreeView", "com.sun.star.ucb.HiearchyDataSource" }; } Reference< XSingleServiceFactory > ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: uui/source
uui/source/getcontinuations.hxx | 24 - uui/source/iahndl-authentication.cxx |6 +- uui/source/iahndl-filter.cxx | 86 --- uui/source/iahndl-ssl.cxx| 19 +++ uui/source/iahndl.cxx|8 +-- uui/source/passwordcontainer.cxx |4 - 6 files changed, 68 insertions(+), 79 deletions(-) New commits: commit 75957a96c43b83418d387e9174415b6d90cf9c63 Author: Arkadiy Illarionov AuthorDate: Sun Jun 23 15:42:31 2019 +0300 Commit: Arkadiy Illarionov CommitDate: Tue Jun 25 21:39:40 2019 +0200 Simplify Sequence iterations in uui Use range-based loops or replace with STL functions Change-Id: I36ca6016d23360d121935d9f25e8cc8d2dad08c3 Reviewed-on: https://gerrit.libreoffice.org/74625 Tested-by: Jenkins Reviewed-by: Arkadiy Illarionov diff --git a/uui/source/getcontinuations.hxx b/uui/source/getcontinuations.hxx index 8175b002b974..03dc049f45d1 100644 --- a/uui/source/getcontinuations.hxx +++ b/uui/source/getcontinuations.hxx @@ -50,11 +50,11 @@ void getContinuations( css::uno::Reference< t1 > * pContinuation1, css::uno::Reference< t2 > * pContinuation2) { -for (sal_Int32 i = 0; i < rContinuations.getLength(); ++i) +for (const auto& rContinuation : rContinuations) { -if (setContinuation(rContinuations[i], pContinuation1)) +if (setContinuation(rContinuation, pContinuation1)) continue; -if (setContinuation(rContinuations[i], pContinuation2)) +if (setContinuation(rContinuation, pContinuation2)) continue; } } @@ -67,13 +67,13 @@ void getContinuations( css::uno::Reference< t2 > * pContinuation2, css::uno::Reference< t3 > * pContinuation3) { -for (sal_Int32 i = 0; i < rContinuations.getLength(); ++i) +for (const auto& rContinuation : rContinuations) { -if (setContinuation(rContinuations[i], pContinuation1)) +if (setContinuation(rContinuation, pContinuation1)) continue; -if (setContinuation(rContinuations[i], pContinuation2)) +if (setContinuation(rContinuation, pContinuation2)) continue; -if (setContinuation(rContinuations[i], pContinuation3)) +if (setContinuation(rContinuation, pContinuation3)) continue; } } @@ -87,15 +87,15 @@ void getContinuations( css::uno::Reference< t3 > * pContinuation3, css::uno::Reference< t4 > * pContinuation4) { -for (sal_Int32 i = 0; i < rContinuations.getLength(); ++i) +for (const auto& rContinuation : rContinuations) { -if (setContinuation(rContinuations[i], pContinuation1)) +if (setContinuation(rContinuation, pContinuation1)) continue; -if (setContinuation(rContinuations[i], pContinuation2)) +if (setContinuation(rContinuation, pContinuation2)) continue; -if (setContinuation(rContinuations[i], pContinuation3)) +if (setContinuation(rContinuation, pContinuation3)) continue; -if (setContinuation(rContinuations[i], pContinuation4)) +if (setContinuation(rContinuation, pContinuation4)) continue; } } diff --git a/uui/source/iahndl-authentication.cxx b/uui/source/iahndl-authentication.cxx index 114cf8b87563..b6c74f4926db 100644 --- a/uui/source/iahndl-authentication.cxx +++ b/uui/source/iahndl-authentication.cxx @@ -137,9 +137,9 @@ void getRememberModes( bool bHasRememberModeSession = false; bool bHasRememberModePersistent = false; -for (sal_Int32 i = 0; i < nCount; ++i) +for (const auto& rRememberMode : rRememberModes) { -switch ( rRememberModes[i] ) +switch ( rRememberMode ) { case ucb::RememberAuthentication_NO: break; @@ -150,7 +150,7 @@ void getRememberModes( bHasRememberModePersistent = true; break; default: -SAL_WARN( "uui", "Unsupported RememberAuthentication value" << static_cast(rRememberModes[i]) ); +SAL_WARN( "uui", "Unsupported RememberAuthentication value" << static_cast(rRememberMode) ); break; } } diff --git a/uui/source/iahndl-filter.cxx b/uui/source/iahndl-filter.cxx index 64bc7fe7ebc5..a2cdb255a6d9 100644 --- a/uui/source/iahndl-filter.cxx +++ b/uui/source/iahndl-filter.cxx @@ -205,68 +205,62 @@ handleFilterOptionsRequest_( try { OUString aFilterName; -sal_Int32 nPropCount = rRequest.rProperties.getLength(); -for( sal_Int32 ind = 0; ind < nPropCount; ++ind ) +auto pProperty = std::find_if(rRequest.rProperties.begin(), rRequest.rProperties.end(), +[](const beans::PropertyValue& rProp) { return rProp.Name == "FilterName"; }); +if (pProperty != rRequest.rProperties.end())
[Libreoffice-commits] core.git: uui/source
uui/source/iahndl-ioexceptions.cxx | 51 ++--- 1 file changed, 15 insertions(+), 36 deletions(-) New commits: commit aed859c4825e10f0981686b9d8476538255b666f Author: Arkadiy Illarionov AuthorDate: Sun Jun 23 13:35:31 2019 +0300 Commit: Arkadiy Illarionov CommitDate: Mon Jun 24 09:08:12 2019 +0200 tdf#39593 Replace copy-pasted functions with template Change-Id: Idcb6c3e13713a9c7cc545d1e287481fe6ccadba8 Reviewed-on: https://gerrit.libreoffice.org/74595 Tested-by: Jenkins Reviewed-by: Arkadiy Illarionov diff --git a/uui/source/iahndl-ioexceptions.cxx b/uui/source/iahndl-ioexceptions.cxx index bd85abbdcb1e..6da1ea3a6fab 100644 --- a/uui/source/iahndl-ioexceptions.cxx +++ b/uui/source/iahndl-ioexceptions.cxx @@ -30,17 +30,18 @@ using namespace com::sun::star; namespace { +template bool -getStringRequestArgument(uno::Sequence< uno::Any > const & rArguments, - OUString const & rKey, - OUString * pValue) +getRequestArgument(uno::Sequence< uno::Any > const & rArguments, + OUString const & rKey, + T * pValue) { -for (sal_Int32 i = 0; i < rArguments.getLength(); ++i) +for (const auto& rArgument : rArguments) { beans::PropertyValue aProperty; -if ((rArguments[i] >>= aProperty) && aProperty.Name == rKey) +if ((rArgument >>= aProperty) && aProperty.Name == rKey) { -OUString aValue; +T aValue; if (aProperty.Value >>= aValue) { if (pValue) @@ -53,36 +54,14 @@ getStringRequestArgument(uno::Sequence< uno::Any > const & rArguments, } bool -getBoolRequestArgument(uno::Sequence< uno::Any > const & rArguments, - OUString const & rKey, - bool * pValue) -{ -for (sal_Int32 i = 0; i < rArguments.getLength(); ++i) -{ -beans::PropertyValue aProperty; -if ((rArguments[i] >>= aProperty) && aProperty.Name == rKey) -{ -bool bValue; -if (aProperty.Value >>= bValue) -{ -if (pValue) -*pValue = bValue; -return true; -} -} -} -return false; -} - -bool getResourceNameRequestArgument(uno::Sequence< uno::Any > const & rArguments, OUString * pValue) { -if (!getStringRequestArgument(rArguments, "Uri", pValue)) +if (!getRequestArgument(rArguments, "Uri", pValue)) return false; // Use the resource name only for file URLs, to avoid confusion: if (pValue && comphelper::isFileUrl(*pValue)) -getStringRequestArgument(rArguments, "ResourceName", pValue); +getRequestArgument(rArguments, "ResourceName", pValue); return true; } @@ -183,7 +162,7 @@ UUIInteractionHelper::handleInteractiveIOException( case ucb::IOErrorCode_CANT_CREATE: { OUString aArgFolder; -if (getStringRequestArgument(aRequestArguments, "Folder", &aArgFolder)) +if (getRequestArgument(aRequestArguments, "Folder", &aArgFolder)) { OUString aArgUri; if (getResourceNameRequestArgument(aRequestArguments, @@ -212,9 +191,9 @@ UUIInteractionHelper::handleInteractiveIOException( &aArgUri)) { OUString aResourceType; -getStringRequestArgument(aRequestArguments, "ResourceType", &aResourceType); +getRequestArgument(aRequestArguments, "ResourceType", &aResourceType); bool bRemovable = false; -getBoolRequestArgument(aRequestArguments, "Removable", &bRemovable); +getRequestArgument(aRequestArguments, "Removable", &bRemovable); nErrorCode = aResourceType == "volume" ? (bRemovable ? ERRCODE_UUI_IO_NOTREADY_VOLUME_REMOVABLE @@ -233,8 +212,8 @@ UUIInteractionHelper::handleInteractiveIOException( { OUString aArgVolume; OUString aArgOtherVolume; -if (getStringRequestArgument(aRequestArguments, "Volume", &aArgVolume) -&& getStringRequestArgument(aRequestArguments, "OtherVolume", +if (getRequestArgument(aRequestArguments, "Volume", &aArgVolume) +&& getRequestArgument(aRequestArguments, "OtherVolume", &aArgOtherVolume)) { nErrorCode = aErrorCode[static_cast(aIoException.Code)][1]; @@ -254,7 +233,7 @@ UUIInteractionHelper::handleInteractiveIOException( &aArgUri)) { OUString aResourceType; -getStringReques
[Libreoffice-commits] core.git: uui/source
uui/source/passworddlg.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit 5f30114c25f233fee2760645e3b1f194c8157438 Author: Caolán McNamara AuthorDate: Thu Apr 18 16:21:26 2019 +0100 Commit: Caolán McNamara CommitDate: Thu Apr 18 22:29:17 2019 +0200 Resolves: tdf#115964 force password dialog to center on parent size request this is similar to... commit d17d9500a23705a315992ff42cb7c449894fc2ce Date: Tue Apr 16 14:49:46 2019 +0100 tdf#124597 template select dialog launched before parent gets final size where the dialog is launched before its parent window has got to its final size Change-Id: I0f54a8da482ed75fa939e230b69c0eb918782bf5 Reviewed-on: https://gerrit.libreoffice.org/70943 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/uui/source/passworddlg.cxx b/uui/source/passworddlg.cxx index 9229f9ec9a46..ffa2897b24dc 100644 --- a/uui/source/passworddlg.cxx +++ b/uui/source/passworddlg.cxx @@ -41,6 +41,9 @@ PasswordDialog::PasswordDialog(weld::Window* pParent, , aPasswdMismatch(Translate::get(STR_PASSWORD_MISMATCH, rLocale)) , rResLocale(rLocale) { +// tdf#115964 we can be launched before the parent has resized to its final size +m_xDialog->set_centered_on_parent_geometry_request(); + if( nDialogMode == task::PasswordRequestMode_PASSWORD_REENTER ) { const char* pOpenToModifyErrStrId = bOpenToModify ? STR_ERROR_PASSWORD_TO_MODIFY_WRONG : STR_ERROR_PASSWORD_TO_OPEN_WRONG; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: uui/source
uui/source/lockcorrupt.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 5af5b23c8f0dde000eb025a01b07881b8f4a71e9 Author: Noel Grandin AuthorDate: Thu Feb 28 10:55:01 2019 +0200 Commit: Noel Grandin CommitDate: Thu Feb 28 13:41:08 2019 +0100 fix LockCorruptQueryBox title regression from commit 082e69fefb7439fd4f3d543f0c402039e94c1e9c Date: Mon Feb 26 16:53:37 2018 + convert various MessBox to weld::MessageDialog Change-Id: Ia9cef4de4ae9c13201c838f20f0ba6b6cff7f35d Reviewed-on: https://gerrit.libreoffice.org/68490 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/uui/source/lockcorrupt.cxx b/uui/source/lockcorrupt.cxx index bba82db1db3f..008d4555a520 100644 --- a/uui/source/lockcorrupt.cxx +++ b/uui/source/lockcorrupt.cxx @@ -28,7 +28,7 @@ LockCorruptQueryBox::LockCorruptQueryBox(weld::Window* pParent, const std::local : m_xQueryBox(Application::CreateMessageDialog(pParent, VclMessageType::Question, VclButtonsType::NONE, Translate::get(STR_LOCKCORRUPT_MSG, rResLocale))) { -m_xQueryBox->set_title(Translate::get(STR_LOCKCORRUPT_MSG, rResLocale)); +m_xQueryBox->set_title(Translate::get(STR_LOCKCORRUPT_TITLE, rResLocale)); m_xQueryBox->add_button(Translate::get(STR_LOCKCORRUPT_OPENREADONLY_BTN, rResLocale), RET_OK); m_xQueryBox->add_button(Button::GetStandardText(StandardButtonType::Cancel), RET_CANCEL); m_xQueryBox->set_default_response(RET_OK); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: uui/source
uui/source/secmacrowarnings.cxx |2 -- 1 file changed, 2 deletions(-) New commits: commit 11e18121194916f7a7ae885d981388c195ece3f4 Author: Caolán McNamara AuthorDate: Wed Feb 13 10:24:44 2019 + Commit: Caolán McNamara CommitDate: Wed Feb 13 13:32:29 2019 +0100 stray debugging fprintf Change-Id: I3956de64c100e47ce180b1096df343eca6a87a4f Reviewed-on: https://gerrit.libreoffice.org/67763 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/uui/source/secmacrowarnings.cxx b/uui/source/secmacrowarnings.cxx index e112660e71b8..4e8119c09648 100644 --- a/uui/source/secmacrowarnings.cxx +++ b/uui/source/secmacrowarnings.cxx @@ -83,8 +83,6 @@ void MacroWarning::SetDocumentURL( const OUString& rDocURL ) { OUString aAbbreviatedPath; osl_abbreviateSystemPath(rDocURL.pData, &aAbbreviatedPath.pData, 50, nullptr); -fprintf(stderr, "in %s, out %s\n", OUStringToOString(rDocURL, RTL_TEXTENCODING_UTF8).getStr(), -OUStringToOString(aAbbreviatedPath, RTL_TEXTENCODING_UTF8).getStr()); m_xDialog->set_primary_text(aAbbreviatedPath); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: uui/source
uui/source/iahndl-ssl.cxx |7 +++ 1 file changed, 7 insertions(+) New commits: commit 9c04c42425ae722e695fa4e340cabf0ca2846651 Author: Andras Timar AuthorDate: Sun Nov 25 18:15:24 2018 +0100 Commit: Andras Timar CommitDate: Wed Nov 28 13:54:36 2018 +0100 Do not validate SSL cert in LOK case Currently we cannot tunnel interaction handler dialog, so if there is a problem with site's SSL cert, the operation (e.g. insert image) would silently fail. As a workaround, let's not validate the remote site's SSL cert, as we also do not validate the site's SSL cert when we download the file through WOPI from the site, in the first place. So this patch does not really make things worse, but makes it possible to use the insert image feature with a self signed cert in test environments. Change-Id: Ibc14f0f76b814abcb9ec9ca02d92c27ad35d3878 Reviewed-on: https://gerrit.libreoffice.org/64154 Tested-by: Jenkins Reviewed-by: Andras Timar diff --git a/uui/source/iahndl-ssl.cxx b/uui/source/iahndl-ssl.cxx index 096f81b21d4c..6db6695671d9 100644 --- a/uui/source/iahndl-ssl.cxx +++ b/uui/source/iahndl-ssl.cxx @@ -28,6 +28,7 @@ #include #include +#include #include #include #include @@ -236,6 +237,12 @@ handleCertificateValidationRequest_( uno::Reference< task::XInteractionAbort > xAbort; getContinuations(rContinuations, &xApprove, &xAbort); +if ( comphelper::LibreOfficeKit::isActive() && xApprove.is() ) +{ +xApprove->select(); +return; +} + sal_Int32 failures = rRequest.CertificateValidity; bool trustCert = true; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: uui/source uui/uiconfig
uui/source/fltdlg.cxx | 48 ++- uui/source/fltdlg.hxx | 18 +++-- uui/source/iahndl-filter.cxx| 15 +-- uui/uiconfig/ui/filterselect.ui | 54 +--- 4 files changed, 77 insertions(+), 58 deletions(-) New commits: commit 8a8c384eeb8bc8dace6c77bad59e6d2654e8840b Author: Caolán McNamara Date: Thu May 17 10:53:29 2018 +0100 weld FilterDialog I think this is theoretical and in practice this dialog never appears anymore Change-Id: I1c29432ecf0df215c686c228326183d9a3a422d3 Reviewed-on: https://gerrit.libreoffice.org/54489 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/uui/source/fltdlg.cxx b/uui/source/fltdlg.cxx index e904fcdadb68..2911acb03b22 100644 --- a/uui/source/fltdlg.cxx +++ b/uui/source/fltdlg.cxx @@ -44,28 +44,18 @@ namespace uui @param "pParentWindow" , parent window for dialog @threadsafe no *//*-*/ -FilterDialog::FilterDialog( vcl::Window* pParentWindow ) -: ModalDialog (pParentWindow, "FilterSelectDialog", "uui/ui/filterselect.ui" ) -, m_pFilterNames(nullptr) +FilterDialog::FilterDialog(weld::Window* pParentWindow) +: GenericDialogController(pParentWindow, "uui/ui/filterselect.ui", "FilterSelectDialog") +, m_pFilterNames(nullptr) +, m_xFtURL(m_xBuilder->weld_label("url")) +, m_xLbFilters(m_xBuilder->weld_tree_view("filters")) { -get(m_pFtURL, "url"); -get(m_pLbFilters, "filters"); -Size aSize(pParentWindow->LogicToPixel(Size(182, 175), MapMode(MapUnit::MapAppFont))); -m_pLbFilters->set_height_request(aSize.Height()); -m_pLbFilters->set_width_request(aSize.Width()); -m_pFtURL->SetSizePixel(Size(aSize.Width(), m_pFtURL->GetOptimalSize().Height())); +m_xLbFilters->set_size_request(m_xLbFilters->get_approximate_digit_width() * 42, + m_xLbFilters->get_height_rows(15)); } FilterDialog::~FilterDialog() { -disposeOnce(); -} - -void FilterDialog::dispose() -{ -m_pFtURL.clear(); -m_pLbFilters.clear(); -ModalDialog::dispose(); } /*- @@ -77,7 +67,7 @@ void FilterDialog::dispose() void FilterDialog::SetURL( const OUString& sURL ) { // convert it and use given pure string as fallback if conversion failed -m_pFtURL->SetText( impl_buildUIFileName(sURL) ); +m_xFtURL->set_label(impl_buildUIFileName(sURL)); } /*- @@ -100,14 +90,14 @@ void FilterDialog::SetURL( const OUString& sURL ) void FilterDialog::ChangeFilters( const FilterNameList* pFilterNames ) { m_pFilterNames = pFilterNames; -m_pLbFilters->Clear(); +m_xLbFilters->clear(); if( m_pFilterNames != nullptr ) { for( FilterNameListPtr pItem = m_pFilterNames->begin(); pItem != m_pFilterNames->end() ; ++pItem ) { -m_pLbFilters->InsertEntry( pItem->sUI ); +m_xLbFilters->append_text(pItem->sUI); } } } @@ -136,12 +126,12 @@ bool FilterDialog::AskForFilter( FilterNameListPtr& pSelectedItem ) if( m_pFilterNames != nullptr ) { -if( ModalDialog::Execute() == RET_OK ) +if (m_xDialog->run() == RET_OK) { -OUString sEntry = m_pLbFilters->GetSelectedEntry(); +OUString sEntry = m_xLbFilters->get_selected_text(); if( !sEntry.isEmpty() ) { -int nPos = m_pLbFilters->GetSelectedEntryPos(); +int nPos = m_xLbFilters->get_selected_index(); if( nPos < static_cast(m_pFilterNames->size()) ) { pSelectedItem = m_pFilterNames->begin(); @@ -167,18 +157,18 @@ bool FilterDialog::AskForFilter( FilterNameListPtr& pSelectedItem ) class StringCalculator : public ::cppu::WeakImplHelper< css::util::XStringWidth > { public: -explicit StringCalculator( const OutputDevice* pDevice ) -: m_pDevice( const_cast< OutputDevice * >( pDevice ) ) +explicit StringCalculator(weld::Widget* pDevice) +: m_pDevice(pDevice) { } sal_Int32 SAL_CALL queryStringWidth( const OUString& sString ) override { -return static_cast(m_pDevice->GetTextWidth(sString)); +return static_cast(m_pDevice->get_pixel_size(sString).Width()); } private: -VclPtr m_pDevice; +weld::Widget* m_pDevice; }; /*-***
[Libreoffice-commits] core.git: uui/source
uui/source/iahndl-errorhandler.cxx | 15 + uui/source/iahndl-locking.cxx | 58 ++--- uui/source/iahndl-ssl.cxx |4 +- uui/source/iahndl.cxx | 16 +- 4 files changed, 47 insertions(+), 46 deletions(-) New commits: commit f9ecd0f47960c8975f01c4564228796342e19be1 Author: Caolán McNamara Date: Thu May 17 10:28:15 2018 +0100 go through getParentXWindow Change-Id: I1f52e1f9ff3fedf8996f72e671400c2549e74dfe Reviewed-on: https://gerrit.libreoffice.org/54488 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/uui/source/iahndl-errorhandler.cxx b/uui/source/iahndl-errorhandler.cxx index 489d8bd0cc61..553d9cf51dbe 100644 --- a/uui/source/iahndl-errorhandler.cxx +++ b/uui/source/iahndl-errorhandler.cxx @@ -53,7 +53,7 @@ enum class MessageBoxStyle { DialogMask executeErrorDialog( -vcl::Window const * pParent, +weld::Window* pParent, task::InteractionClassification eClassification, OUString const & rContext, OUString const & rMessage, @@ -72,19 +72,19 @@ executeErrorDialog( switch (eClassification) { case task::InteractionClassification_ERROR: -xBox.reset(Application::CreateMessageDialog(pParent ? pParent->GetFrameWeld() : nullptr, +xBox.reset(Application::CreateMessageDialog(pParent, VclMessageType::Error, VclButtonsType::NONE, aText.makeStringAndClear())); break; case task::InteractionClassification_WARNING: -xBox.reset(Application::CreateMessageDialog(pParent ? pParent->GetFrameWeld() : nullptr, +xBox.reset(Application::CreateMessageDialog(pParent, VclMessageType::Warning, VclButtonsType::NONE, aText.makeStringAndClear())); break; case task::InteractionClassification_INFO: -xBox.reset(Application::CreateMessageDialog(pParent ? pParent->GetFrameWeld() : nullptr, +xBox.reset(Application::CreateMessageDialog(pParent, VclMessageType::Info, VclButtonsType::NONE, aText.makeStringAndClear())); break; case task::InteractionClassification_QUERY: -xBox.reset(Application::CreateMessageDialog(pParent ? pParent->GetFrameWeld() : nullptr, +xBox.reset(Application::CreateMessageDialog(pParent, VclMessageType::Question, VclButtonsType::NONE, aText.makeStringAndClear())); break; default: @@ -245,8 +245,9 @@ UUIInteractionHelper::handleErrorHandlerRequest( } } -DialogMask nResult = executeErrorDialog( -getParentProperty(), eClassification, aContext, aMessage, nButtonMask ); +uno::Reference xParent = getParentXWindow(); +DialogMask nResult = executeErrorDialog(Application::GetFrameWeld(xParent), +eClassification, aContext, aMessage, nButtonMask ); switch (nResult) { diff --git a/uui/source/iahndl-locking.cxx b/uui/source/iahndl-locking.cxx index b1fa4989d66d..8df6c85b0608 100644 --- a/uui/source/iahndl-locking.cxx +++ b/uui/source/iahndl-locking.cxx @@ -210,38 +210,38 @@ UUIInteractionHelper::handleLockedDocumentRequest( document::LockedDocumentRequest aLockedDocumentRequest; if (aAnyRequest >>= aLockedDocumentRequest ) { -vcl::Window* pWin = getParentProperty(); -handleLockedDocumentRequest_( pWin ? pWin->GetFrameWeld() : nullptr, - aLockedDocumentRequest.DocumentURL, - aLockedDocumentRequest.UserInfo, - rRequest->getContinuations(), - UUI_DOC_LOAD_LOCK ); +uno::Reference xParent = getParentXWindow(); +handleLockedDocumentRequest_(Application::GetFrameWeld(xParent), + aLockedDocumentRequest.DocumentURL, + aLockedDocumentRequest.UserInfo, + rRequest->getContinuations(), + UUI_DOC_LOAD_LOCK); return true; } document::OwnLockOnDocumentRequest aOwnLockOnDocumentRequest; if (aAnyRequest >>= aOwnLockOnDocumentRequest ) { -vcl::Window* pWin = getParentProperty(); -handleLockedDocumentRequest_( pWin ? pWin->GetFrameWeld() : nullptr, - aOwnLockOnDocumentRequest.DocumentURL, - aOwnLockOnDocumentRequest.TimeInfo, - rRequest->getContinuations(), - aOwnLockOnDocumentRequest.IsStoring - ? UUI_DOC_OWN_SAVE_LOCK - : UUI_DOC_OWN_LOAD_LOCK ); +uno::Reference xParent = getParentXWi
[Libreoffice-commits] core.git: uui/source uui/uiconfig
uui/source/authfallbackdlg.cxx | 69 +-- uui/source/authfallbackdlg.hxx | 36 +++- uui/source/iahndl-authentication.cxx |8 - uui/uiconfig/ui/authfallback.ui | 156 +-- 4 files changed, 122 insertions(+), 147 deletions(-) New commits: commit bf09cd79d3414d88ea6c1d348ed191a77e8c413e Author: Caolán McNamara Date: Thu May 17 10:16:55 2018 +0100 AuthFallbackDlg Change-Id: I69676dd437caefca63805e86f4707527183f622f Reviewed-on: https://gerrit.libreoffice.org/54487 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/uui/source/authfallbackdlg.cxx b/uui/source/authfallbackdlg.cxx index b5d8b4f1c5a4..b7190107da2a 100644 --- a/uui/source/authfallbackdlg.cxx +++ b/uui/source/authfallbackdlg.cxx @@ -13,77 +13,60 @@ using namespace boost; -AuthFallbackDlg::AuthFallbackDlg(Window* pParent, const OUString& instructions, +AuthFallbackDlg::AuthFallbackDlg(weld::Window* pParent, const OUString& instructions, const OUString& url) -: ModalDialog(pParent, "AuthFallbackDlg", "uui/ui/authfallback.ui") +: GenericDialogController(pParent, "uui/ui/authfallback.ui", "AuthFallbackDlg") , m_bGoogleMode( false ) +, m_xTVInstructions(m_xBuilder->weld_label("instructions")) +, m_xEDUrl(m_xBuilder->weld_entry("url")) +, m_xEDCode(m_xBuilder->weld_entry("code")) +, m_xEDGoogleCode(m_xBuilder->weld_entry("google_code")) +, m_xBTOk(m_xBuilder->weld_button("ok")) +, m_xBTCancel(m_xBuilder->weld_button("cancel")) +, m_xGoogleBox(m_xBuilder->weld_widget("GDrive")) +, m_xOneDriveBox(m_xBuilder->weld_widget("OneDrive")) { -get( m_pTVInstructions, "instructions" ); -get( m_pEDUrl, "url" ); -get( m_pEDCode, "code" ); -get( m_pEDGoogleCode, "google_code" ); -get( m_pBTOk, "ok" ); -get( m_pBTCancel, "cancel" ); -get( m_pGoogleBox, "GDrive" ); -get( m_pOneDriveBox, "OneDrive" ); +m_xBTOk->connect_clicked( LINK( this, AuthFallbackDlg, OKHdl) ); +m_xBTCancel->connect_clicked( LINK( this, AuthFallbackDlg, CancelHdl) ); +m_xBTOk->set_sensitive(true); -m_pBTOk->SetClickHdl( LINK( this, AuthFallbackDlg, OKHdl) ); -m_pBTCancel->SetClickHdl( LINK( this, AuthFallbackDlg, CancelHdl) ); -m_pBTOk->Enable(); - -m_pTVInstructions->SetText( instructions ); -m_pTVInstructions->SetPaintTransparent(true); +m_xTVInstructions->set_label(instructions); if( url.isEmpty() ) { // Google 2FA m_bGoogleMode = true; -m_pGoogleBox->Show(); -m_pOneDriveBox->Hide(); -m_pEDUrl->Hide(); +m_xGoogleBox->show(); +m_xOneDriveBox->hide(); +m_xEDUrl->hide(); } else { // OneDrive m_bGoogleMode = false; -m_pGoogleBox->Hide(); -m_pOneDriveBox->Show(); -m_pEDUrl->SetText( url ); +m_xGoogleBox->hide(); +m_xOneDriveBox->show(); +m_xEDUrl->set_text( url ); } } AuthFallbackDlg::~AuthFallbackDlg() { -disposeOnce(); } OUString AuthFallbackDlg::GetCode() const { if( m_bGoogleMode ) -return m_pEDGoogleCode->GetText(); +return m_xEDGoogleCode->get_text(); else -return m_pEDCode->GetText(); -} - - -void AuthFallbackDlg::dispose() -{ -m_pTVInstructions.clear(); -m_pEDUrl.clear(); -m_pEDCode.clear(); -m_pEDGoogleCode.clear(); -m_pBTOk.clear(); -m_pBTCancel.clear(); -m_pGoogleBox.clear(); -m_pOneDriveBox.clear(); -ModalDialog::dispose(); +return m_xEDCode->get_text(); } -IMPL_LINK_NOARG ( AuthFallbackDlg, OKHdl, Button *, void) +IMPL_LINK_NOARG(AuthFallbackDlg, OKHdl, weld::Button&, void) { -EndDialog( RET_OK ); +m_xDialog->response(RET_OK); } -IMPL_LINK_NOARG ( AuthFallbackDlg, CancelHdl, Button *, void) +IMPL_LINK_NOARG(AuthFallbackDlg, CancelHdl, weld::Button&, void) { -EndDialog(); +m_xDialog->response(RET_CANCEL); } diff --git a/uui/source/authfallbackdlg.hxx b/uui/source/authfallbackdlg.hxx index ff10407265b5..206cd87274a7 100644 --- a/uui/source/authfallbackdlg.hxx +++ b/uui/source/authfallbackdlg.hxx @@ -10,38 +10,32 @@ #ifndef INCLUDED_SVTOOLS_AUTHFALLBACKDLG_HXX #define INCLUDED_SVTOOLS_AUTHFALLBACKDLG_HXX -#include -#include -#include -#include -#include -#include - -class AuthFallbackDlg : public ModalDialog +#include + +class AuthFallbackDlg : public weld::GenericDialogController { private: -VclPtr m_pTVInstructions; -VclPtr m_pEDUrl; -VclPtr m_pEDCode; -VclPtr m_pEDGoogleCode; -VclPtr m_pBTOk; -VclPtr m_pBTCancel; -VclPtr m_pGoogleBox; -VclPtr m_pOneDriveBox; bool m_bGoogleMode; +std::unique_ptr m_xTVInstructions; +std::unique_ptr m_xEDUrl; +std::unique_ptr m_xEDCode; +std::unique_ptr m_xEDGoogleCode; +std::unique_ptr m_xBTOk; +std::unique_ptr m_xBTCancel; +st
[Libreoffice-commits] core.git: uui/source uui/uiconfig
uui/source/iahndl.cxx | 23 ++--- uui/source/nameclashdlg.cxx| 64 +++-- uui/source/nameclashdlg.hxx| 37 + uui/uiconfig/ui/simplenameclash.ui | 11 -- 4 files changed, 62 insertions(+), 73 deletions(-) New commits: commit 45112bfd091b8a14729f1010d2662c9064ba03e6 Author: Caolán McNamara Date: Thu May 17 09:51:42 2018 +0100 weld NameClashDialog Change-Id: I4c68bc92fa90ca4a9723f2664549f34b50213bfb Reviewed-on: https://gerrit.libreoffice.org/54471 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx index 63e3fbdea28a..fa017aabadab 100644 --- a/uui/source/iahndl.cxx +++ b/uui/source/iahndl.cxx @@ -1019,18 +1019,18 @@ executeMessageBox( return aResult; } -NameClashResolveDialogResult executeSimpleNameClashResolveDialog( vcl::Window *pParent, - OUString const & rTargetFolderURL, - OUString const & rClashingName, - OUString & rProposedNewName, - bool bAllowOverwrite ) +NameClashResolveDialogResult executeSimpleNameClashResolveDialog(weld::Window *pParent, + OUString const & rTargetFolderURL, + OUString const & rClashingName, + OUString & rProposedNewName, + bool bAllowOverwrite) { std::locale aResLocale = Translate::Create("uui"); -ScopedVclPtrInstance aDialog(pParent, aResLocale, rTargetFolderURL, - rClashingName, rProposedNewName, bAllowOverwrite); +NameClashDialog aDialog(pParent, aResLocale, rTargetFolderURL, +rClashingName, rProposedNewName, bAllowOverwrite); -NameClashResolveDialogResult eResult = static_cast(aDialog->Execute()); -rProposedNewName = aDialog->getNewName(); +NameClashResolveDialogResult eResult = static_cast(aDialog.run()); +rProposedNewName = aDialog.getNewName(); return eResult; } @@ -1063,11 +1063,12 @@ UUIInteractionHelper::handleNameClashResolveRequest( NameClashResolveDialogResult eResult = ABORT; OUString aProposedNewName( rRequest.ProposedNewName ); -eResult = executeSimpleNameClashResolveDialog( getParentProperty(), +uno::Reference xParent = getParentXWindow(); +eResult = executeSimpleNameClashResolveDialog(Application::GetFrameWeld(xParent), rRequest.TargetFolderURL, rRequest.ClashingName, aProposedNewName, -xReplaceExistingData.is() ); +xReplaceExistingData.is()); switch ( eResult ) { diff --git a/uui/source/nameclashdlg.cxx b/uui/source/nameclashdlg.cxx index 9403c21af606..5c64583da46d 100644 --- a/uui/source/nameclashdlg.cxx +++ b/uui/source/nameclashdlg.cxx @@ -27,48 +27,47 @@ // NameClashDialog - -IMPL_LINK( NameClashDialog, ButtonHdl_Impl, Button *, pBtn, void ) +IMPL_LINK(NameClashDialog, ButtonHdl_Impl, weld::Button&, rBtn, void) { long nRet = long(ABORT); -if ( m_pBtnRename == pBtn ) +if (m_xBtnRename.get() == &rBtn) { nRet = long(RENAME); -OUString aNewName = m_pEDNewName->GetText(); -if ( ( aNewName == maNewName ) || aNewName.isEmpty() ) +OUString aNewName = m_xEDNewName->get_text(); +if ( ( aNewName == m_aNewName ) || aNewName.isEmpty() ) { -std::unique_ptr xErrorBox(Application::CreateMessageDialog(GetFrameWeld(), +std::unique_ptr xErrorBox(Application::CreateMessageDialog(m_xDialog.get(), VclMessageType::Warning, VclButtonsType::Ok, - maSameName)); + m_aSameName)); xErrorBox->run(); return; } -maNewName = aNewName; +m_aNewName = aNewName; } -else if ( m_pBtnOverwrite == pBtn ) +else if (m_xBtnOverwrite.get() == &rBtn) nRet = long(OVERWRITE); -EndDialog( nRet ); +m_xDialog->response(nRet); } -NameClashDialog::NameClashDialog( vcl::Window* pParent, const std::locale& rResLocale, +NameClashDialog::NameClashDialog( weld::Window* pParent, const std::locale& rResLocale, OUString const & rTargetFolderURL, OUString const & rClashingNa
[Libreoffice-commits] core.git: uui/source uui/uiconfig
uui/source/iahndl-authentication.cxx| 22 uui/source/masterpasscrtdlg.cxx | 43 uui/source/masterpasscrtdlg.hxx | 28 +++- uui/source/masterpassworddlg.cxx| 26 +-- uui/source/masterpassworddlg.hxx| 25 +++--- uui/uiconfig/ui/masterpassworddlg.ui| 13 +++-- uui/uiconfig/ui/setmasterpassworddlg.ui | 19 ++ 7 files changed, 80 insertions(+), 96 deletions(-) New commits: commit 3c8b38521aa584704cfa153c51fb15ca601daf9f Author: Caolán McNamara Date: Wed May 16 21:19:52 2018 +0100 weld MasterPasswordCreateDialog and MasterPasswordDialog Change-Id: I4c235546590046b06a1fea9b62d91cf2da664227 diff --git a/uui/source/iahndl-authentication.cxx b/uui/source/iahndl-authentication.cxx index b9d88b92e056..673a6e441f52 100644 --- a/uui/source/iahndl-authentication.cxx +++ b/uui/source/iahndl-authentication.cxx @@ -393,7 +393,7 @@ handleAuthenticationRequest_( void executeMasterPasswordDialog( -vcl::Window * pParent, +weld::Window* pParent, LoginErrorInfo & rInfo, task::PasswordRequestMode nMode) { @@ -404,21 +404,19 @@ executeMasterPasswordDialog( std::locale aResLocale(Translate::Create("uui")); if( nMode == task::PasswordRequestMode_PASSWORD_CREATE ) { -ScopedVclPtrInstance< MasterPasswordCreateDialog > xDialog( -pParent, aResLocale); -rInfo.SetResult(xDialog->Execute() +MasterPasswordCreateDialog aDialog(pParent, aResLocale); +rInfo.SetResult(aDialog.run() == RET_OK ? DialogMask::ButtonsOk : DialogMask::ButtonsCancel); aMaster = OUStringToOString( -xDialog->GetMasterPassword(), RTL_TEXTENCODING_UTF8); +aDialog.GetMasterPassword(), RTL_TEXTENCODING_UTF8); } else { -ScopedVclPtrInstance< MasterPasswordDialog > xDialog( -pParent, nMode, aResLocale); -rInfo.SetResult(xDialog->Execute() +MasterPasswordDialog aDialog(pParent, nMode, aResLocale); +rInfo.SetResult(aDialog.run() == RET_OK ? DialogMask::ButtonsOk : DialogMask::ButtonsCancel); aMaster = OUStringToOString( -xDialog->GetMasterPassword(), RTL_TEXTENCODING_UTF8); +aDialog.GetMasterPassword(), RTL_TEXTENCODING_UTF8); } } @@ -446,7 +444,7 @@ executeMasterPasswordDialog( void handleMasterPasswordRequest_( -vcl::Window * pParent, +weld::Window * pParent, task::PasswordRequestMode nMode, uno::Sequence< uno::Reference< task::XInteractionContinuation > > const & rContinuations) @@ -632,7 +630,9 @@ UUIInteractionHelper::handleMasterPasswordRequest( task::MasterPasswordRequest aMasterPasswordRequest; if (aAnyRequest >>= aMasterPasswordRequest) { -handleMasterPasswordRequest_(getParentProperty(), +uno::Reference xParent = getParentXWindow(); + +handleMasterPasswordRequest_(Application::GetFrameWeld(xParent), aMasterPasswordRequest.Mode, rRequest->getContinuations()); return true; diff --git a/uui/source/masterpasscrtdlg.cxx b/uui/source/masterpasscrtdlg.cxx index 42d4a053bd95..8505e2cf7bfd 100644 --- a/uui/source/masterpasscrtdlg.cxx +++ b/uui/source/masterpasscrtdlg.cxx @@ -27,52 +27,43 @@ // MasterPasswordCreateDialog--- -IMPL_LINK_NOARG(MasterPasswordCreateDialog, EditHdl_Impl, Edit&, void) +IMPL_LINK_NOARG(MasterPasswordCreateDialog, EditHdl_Impl, weld::Entry&, void) { -m_pOKBtn->Enable( m_pEDMasterPasswordCrt->GetText().getLength() >= 1 ); +m_xOKBtn->set_sensitive(m_xEDMasterPasswordCrt->get_text().getLength() >= 1); } -IMPL_LINK_NOARG(MasterPasswordCreateDialog, OKHdl_Impl, Button*, void) +IMPL_LINK_NOARG(MasterPasswordCreateDialog, OKHdl_Impl, weld::Button&, void) { // compare both passwords and show message box if there are not equal!! -if( m_pEDMasterPasswordCrt->GetText() == m_pEDMasterPasswordRepeat->GetText() ) -EndDialog( RET_OK ); +if (m_xEDMasterPasswordCrt->get_text() == m_xEDMasterPasswordRepeat->get_text()) +m_xDialog->response(RET_OK); else { OUString aErrorMsg(Translate::get(STR_ERROR_PASSWORDS_NOT_IDENTICAL, rResLocale)); -std::unique_ptr xErrorBox(Application::CreateMessageDialog(GetFrameWeld(), +std::unique_ptr xErrorBox(Application::CreateMessageDialog(m_xDialog.get(), VclMessageType::Warning, VclButtonsType::Ok, aErrorMsg)); xErrorBox->run(); -m_pEDMasterPasswordCrt->SetText( OUString() ); -m_pEDMasterPasswordRepeat->SetT
[Libreoffice-commits] core.git: uui/source uui/uiconfig
uui/source/iahndl-authentication.cxx | 41 + uui/source/logindlg.cxx | 145 +++ uui/source/logindlg.hxx | 56 ++--- uui/uiconfig/ui/logindialog.ui | 35 ++-- 4 files changed, 136 insertions(+), 141 deletions(-) New commits: commit 9c0684c9efca25ab9a39002b34328fafc30cc8bd Author: Caolán McNamara Date: Wed Apr 11 15:24:46 2018 +0100 weld LoginDialog Change-Id: I8f2af38bff24a0d4dc088eb1150220a8ea0f0fba Reviewed-on: https://gerrit.libreoffice.org/52730 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/uui/source/iahndl-authentication.cxx b/uui/source/iahndl-authentication.cxx index a9f0d8d3cca4..b9d88b92e056 100644 --- a/uui/source/iahndl-authentication.cxx +++ b/uui/source/iahndl-authentication.cxx @@ -58,7 +58,7 @@ namespace { void executeLoginDialog( -vcl::Window * pParent, +weld::Window* pParent, LoginErrorInfo & rInfo, OUString const & rRealm) { @@ -82,40 +82,40 @@ executeLoginDialog( if (!bCanUseSysCreds) nFlags |= LoginFlags::NoUseSysCreds; -ScopedVclPtrInstance< LoginDialog > xDialog(pParent, nFlags, rInfo.GetServer(), rRealm); +LoginDialog aDialog(pParent, nFlags, rInfo.GetServer(), rRealm); if (!rInfo.GetErrorText().isEmpty()) -xDialog->SetErrorText(rInfo.GetErrorText()); -xDialog->SetName(rInfo.GetUserName()); +aDialog.SetErrorText(rInfo.GetErrorText()); +aDialog.SetName(rInfo.GetUserName()); if (bAccount) -xDialog->ClearAccount(); +aDialog.ClearAccount(); else -xDialog->ClearPassword(); -xDialog->SetPassword(rInfo.GetPassword()); +aDialog.ClearPassword(); +aDialog.SetPassword(rInfo.GetPassword()); if (bSavePassword) { std::locale aLocale(Translate::Create("uui")); -xDialog->SetSavePasswordText( +aDialog.SetSavePasswordText( Translate::get(rInfo.GetIsRememberPersistent() ? RID_SAVE_PASSWORD : RID_KEEP_PASSWORD, aLocale)); -xDialog->SetSavePassword(rInfo.GetIsRememberPassword()); +aDialog.SetSavePassword(rInfo.GetIsRememberPassword()); } if ( bCanUseSysCreds ) -xDialog->SetUseSystemCredentials( rInfo.GetIsUseSystemCredentials() ); +aDialog.SetUseSystemCredentials( rInfo.GetIsUseSystemCredentials() ); -rInfo.SetResult(xDialog->Execute() == RET_OK ? DialogMask::ButtonsOk : - DialogMask::ButtonsCancel); -rInfo.SetUserName(xDialog->GetName()); -rInfo.SetPassword(xDialog->GetPassword()); -rInfo.SetAccount(xDialog->GetAccount()); -rInfo.SetIsRememberPassword(xDialog->IsSavePassword()); +rInfo.SetResult(aDialog.run() == RET_OK ? DialogMask::ButtonsOk : + DialogMask::ButtonsCancel); +rInfo.SetUserName(aDialog.GetName()); +rInfo.SetPassword(aDialog.GetPassword()); +rInfo.SetAccount(aDialog.GetAccount()); +rInfo.SetIsRememberPassword(aDialog.IsSavePassword()); if ( bCanUseSysCreds ) - rInfo.SetIsUseSystemCredentials( xDialog->IsUseSystemCredentials() ); + rInfo.SetIsUseSystemCredentials( aDialog.IsUseSystemCredentials() ); } void getRememberModes( @@ -172,7 +172,7 @@ void getRememberModes( void handleAuthenticationRequest_( -vcl::Window * pParent, +weld::Window * pParent, uno::Reference< task::XInteractionHandler2 > const & xIH, uno::Reference< uno::XComponentContext > const & xContext, ucb::AuthenticationRequest const & rRequest, @@ -595,11 +595,12 @@ UUIInteractionHelper::handleAuthenticationRequest( uno::Reference< task::XInteractionRequest > const & rRequest) { uno::Any aAnyRequest(rRequest->getRequest()); +uno::Reference xParent = getParentXWindow(); ucb::URLAuthenticationRequest aURLAuthenticationRequest; if (aAnyRequest >>= aURLAuthenticationRequest) { -handleAuthenticationRequest_(getParentProperty(), +handleAuthenticationRequest_(Application::GetFrameWeld(xParent), getInteractionHandler(), m_xContext, aURLAuthenticationRequest, @@ -611,7 +612,7 @@ UUIInteractionHelper::handleAuthenticationRequest( ucb::AuthenticationRequest aAuthenticationRequest; if (aAnyRequest >>= aAuthenticationRequest) { -handleAuthenticationRequest_(getParentProperty(), +handleAuthenticationRequest_(Application::GetFrameWeld(xParent), getInteractionHandler(), m_xContext, aAuthenticationRequest, diff --git a/uui/source/logindlg.cxx b/uui/source/logindlg.cxx index 365718830efb..3f315bcc0f6a 100644 --
[Libreoffice-commits] core.git: uui/source uui/uiconfig
uui/source/iahndl-authentication.cxx | 12 ++--- uui/source/passworddlg.cxx | 74 +-- uui/source/passworddlg.hxx | 27 uui/uiconfig/ui/password.ui | 15 +-- 4 files changed, 56 insertions(+), 72 deletions(-) New commits: commit d2f95590f478a68a4de6ef05018785523e46506b Author: Caolán McNamara Date: Fri Mar 16 16:07:22 2018 + Related: tdf#115964 convert the problematic dialog to a native gtk3 one Change-Id: I84e10f1c45dfbe267f9b350d74271ac149bdaf43 Reviewed-on: https://gerrit.libreoffice.org/51432 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/uui/source/iahndl-authentication.cxx b/uui/source/iahndl-authentication.cxx index 12ed4ed7aff9..2d4d5362f169 100644 --- a/uui/source/iahndl-authentication.cxx +++ b/uui/source/iahndl-authentication.cxx @@ -518,11 +518,11 @@ executePasswordDialog( { if (bIsSimplePasswordRequest) { -ScopedVclPtrInstance xDialog(pParent, nMode, aResLocale, aDocName, -bIsPasswordToModify, bIsSimplePasswordRequest); +std::unique_ptr xDialog(new PasswordDialog(pParent ? pParent->GetFrameWeld() : nullptr, nMode, +aResLocale, aDocName, bIsPasswordToModify, bIsSimplePasswordRequest)); xDialog->SetMinLen(0); -rInfo.SetResult(xDialog->Execute() == RET_OK ? DialogMask::ButtonsOk : DialogMask::ButtonsCancel); +rInfo.SetResult(xDialog->run() == RET_OK ? DialogMask::ButtonsOk : DialogMask::ButtonsCancel); rInfo.SetPassword(xDialog->GetPassword()); } else @@ -541,11 +541,11 @@ executePasswordDialog( } else // enter password or reenter password { -ScopedVclPtrInstance xDialog(pParent, nMode, aResLocale, aDocName, -bIsPasswordToModify, bIsSimplePasswordRequest); +std::unique_ptr xDialog(new PasswordDialog(pParent ? pParent->GetFrameWeld() : nullptr, nMode, +aResLocale, aDocName, bIsPasswordToModify, bIsSimplePasswordRequest)); xDialog->SetMinLen(0); -rInfo.SetResult(xDialog->Execute() == RET_OK ? DialogMask::ButtonsOk : DialogMask::ButtonsCancel); +rInfo.SetResult(xDialog->run() == RET_OK ? DialogMask::ButtonsOk : DialogMask::ButtonsCancel); rInfo.SetPassword(bIsPasswordToModify ? OUString() : xDialog->GetPassword()); rInfo.SetPasswordToModify(bIsPasswordToModify ? xDialog->GetPassword() : OUString()); } diff --git a/uui/source/passworddlg.cxx b/uui/source/passworddlg.cxx index eec9540de9a8..14cb63446eae 100644 --- a/uui/source/passworddlg.cxx +++ b/uui/source/passworddlg.cxx @@ -27,100 +27,84 @@ using namespace ::com::sun::star; -PasswordDialog::PasswordDialog(vcl::Window* _pParent, +PasswordDialog::PasswordDialog(weld::Window* pParent, task::PasswordRequestMode nDlgMode, const std::locale& rLocale, const OUString& aDocURL, bool bOpenToModify, bool bIsSimplePasswordRequest) -: ModalDialog(_pParent, "PasswordDialog", "uui/ui/password.ui") +: GenericDialogController(pParent, "uui/ui/password.ui", "PasswordDialog") +, m_xFTPassword(m_xBuilder->weld_label("newpassFT")) +, m_xEDPassword(m_xBuilder->weld_entry("newpassEntry")) +, m_xFTConfirmPassword(m_xBuilder->weld_label("confirmpassFT")) +, m_xEDConfirmPassword(m_xBuilder->weld_entry("confirmpassEntry")) +, m_xOKBtn(m_xBuilder->weld_button("ok")) , nMinLen(1) , aPasswdMismatch(Translate::get(STR_PASSWORD_MISMATCH, rLocale)) , nDialogMode(nDlgMode) , rResLocale(rLocale) { -get(m_pFTPassword, "newpassFT"); -get(m_pEDPassword, "newpassEntry"); -get(m_pFTConfirmPassword, "confirmpassFT"); -get(m_pEDConfirmPassword, "confirmpassEntry"); -get(m_pOKBtn, "ok"); - if( nDialogMode == task::PasswordRequestMode_PASSWORD_REENTER ) { const char* pOpenToModifyErrStrId = bOpenToModify ? STR_ERROR_PASSWORD_TO_MODIFY_WRONG : STR_ERROR_PASSWORD_TO_OPEN_WRONG; const char* pErrStrId = bIsSimplePasswordRequest ? STR_ERROR_SIMPLE_PASSWORD_WRONG : pOpenToModifyErrStrId; OUString aErrorMsg(Translate::get(pErrStrId, rResLocale)); -std::unique_ptr xBox(Application::CreateMessageDialog(_pParent ? _pParent->GetFrameWeld() : nullptr, +std::unique_ptr xBox(Application::CreateMessageDialog(pParent, VclMessageType::Warning, VclButtonsType::Ok, aErrorMsg)); xBox->run(); } // default settings for enter password or reenter passwd... OUString aTitle(Translate::get(STR_TITLE_ENTER_PASSWORD, rResLocale)); -m_pFTConfirmPassword->Hide(); -m_pEDConfirmPassword->Hide(); -m_pFTConfirmPassword->Enable( false ); -m_pEDConfirmPassword->Ena
[Libreoffice-commits] core.git: uui/source
uui/source/iahndl.cxx |8 1 file changed, 8 insertions(+) New commits: commit 0e04523b040785e2ce552143d20adcbb40b61d42 Author: Jan-Marek Glogowski Date: Wed Feb 14 12:30:47 2018 +0100 tdf#114676 release the SolarMutex, if we own it This is a follow up on the SolarMutex unification. Quite probably the updater process, which is now aborting when releasing the not-owned mutex, should somewhere acquire it. In the end this functions currently can be called with or without the SolarMutex being owned by the calling thread. This conditional release is really a horrible hack / workaround; but my guess is - like all hacks - it'll stay for longer. Change-Id: I90e30149c2fef8bdf3dc0396bf8eb7491eedeabd Reviewed-on: https://gerrit.libreoffice.org/49717 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx index f03372de3f54..59f62217c6ac 100644 --- a/uui/source/iahndl.cxx +++ b/uui/source/iahndl.cxx @@ -172,7 +172,11 @@ UUIInteractionHelper::handleRequest( HandleData aHD(rRequest); Link aLink(&aHD,handlerequest); Application::PostUserEvent(aLink,this); +comphelper::SolarMutex& rSolarMutex = Application::GetSolarMutex(); +sal_uInt32 nLockCount = (rSolarMutex.IsCurrentThread()) ? rSolarMutex.release(true) : 0; aHD.wait(); +if (nLockCount) +rSolarMutex.acquire(nLockCount); return aHD.bHandled; } else @@ -223,7 +227,11 @@ UUIInteractionHelper::getStringFromRequest( HandleData aHD(rRequest); Link aLink(&aHD,getstringfromrequest); Application::PostUserEvent(aLink,this); +comphelper::SolarMutex& rSolarMutex = Application::GetSolarMutex(); +sal_uInt32 nLockCount = (rSolarMutex.IsCurrentThread()) ? rSolarMutex.release(true) : 0; aHD.wait(); +if (nLockCount) +rSolarMutex.acquire(nLockCount); return aHD.m_aResult; } else ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: uui/source
uui/source/openlocked.cxx |8 1 file changed, 8 deletions(-) New commits: commit aa593b6dc0c72d2b7b67b8254b6ff4dfb80f1b16 Author: Mike Kaganski Date: Wed Feb 7 19:18:15 2018 +0100 Remove a workaround to bring certain dialog to front Since commits 8d1d82dd63eada8faa2f6eb43ef900764a5fda62 and 3b57cb72ec8b47f033be5a516617ed8c752517b0, it's no longer necessary to keep this hack from commit c385e76c10b173b9820967825f0ce0c6fb71e9dd. Change-Id: I8f38b4c61451d53890eab8ffe8af476c73826a1c Reviewed-on: https://gerrit.libreoffice.org/49386 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/uui/source/openlocked.cxx b/uui/source/openlocked.cxx index 156e28b6a368..074242b964b8 100644 --- a/uui/source/openlocked.cxx +++ b/uui/source/openlocked.cxx @@ -37,14 +37,6 @@ OpenLockedQueryBox::OpenLockedQueryBox( vcl::Window* pParent, const std::locale& SetButtonHelpText( RET_YES, OUString() ); SetButtonHelpText( RET_NO, OUString() ); -#ifdef _WIN32 -// bnc#656566 -// Yes, it is silly to do this only for this dialog but not the -// other similar ones. But hey, it was about this dialog that the -// customer complained. You who read this and feel the itch, feel -// free to fix the problem in a better way. -EnableAlwaysOnTop(); -#endif } OpenLockedQueryBox::~OpenLockedQueryBox() ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: uui/source uui/uiconfig
uui/source/iahndl-authentication.cxx |1 uui/source/logindlg.cxx | 45 --- uui/source/logindlg.hxx |7 uui/uiconfig/ui/logindialog.ui | 50 --- 4 files changed, 1 insertion(+), 102 deletions(-) New commits: commit f1d1854ffe2c1bc456855573b3ed4ad9852f4571 Author: Noel Grandin Date: Thu Jan 4 16:54:27 2018 +0200 remove NoPath from LoginFlags since it is always set when calling HideControls_Impl, and therefore remove the now unused UI controls Change-Id: I8a2a6a34b64dd7b0bf909c810bbd7fea8ad2c7a5 Reviewed-on: https://gerrit.libreoffice.org/47403 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/uui/source/iahndl-authentication.cxx b/uui/source/iahndl-authentication.cxx index b5ec2ed481fd..643e0e12a4e2 100644 --- a/uui/source/iahndl-authentication.cxx +++ b/uui/source/iahndl-authentication.cxx @@ -74,7 +74,6 @@ executeLoginDialog( bool bCanUseSysCreds = rInfo.GetCanUseSystemCredentials(); LoginFlags nFlags = LoginFlags::NONE; -nFlags |= LoginFlags::NoPath; if (rInfo.GetErrorText().isEmpty()) nFlags |= LoginFlags::NoErrorText; if (!bAccount) diff --git a/uui/source/logindlg.cxx b/uui/source/logindlg.cxx index c4a5c9d305cc..53011ff1ddf5 100644 --- a/uui/source/logindlg.cxx +++ b/uui/source/logindlg.cxx @@ -45,9 +45,6 @@ void LoginDialog::dispose() m_pErrorFT.clear(); m_pErrorInfo.clear(); m_pRequestInfo.clear(); -m_pPathFT.clear(); -m_pPathED.clear(); -m_pPathBtn.clear(); m_pNameFT.clear(); m_pNameED.clear(); m_pPasswordFT.clear(); @@ -68,18 +65,6 @@ void LoginDialog::SetPassword( const OUString& rNew ) void LoginDialog::HideControls_Impl( LoginFlags nFlags ) { -if ( nFlags & LoginFlags::NoPath ) -{ -m_pPathFT->Hide(); -m_pPathED->Hide(); -m_pPathBtn->Hide(); -} -else if ( nFlags & LoginFlags::PathReadonly ) -{ -m_pPathED->Enable( false ); -m_pPathBtn->Enable( false ); -} - if ( nFlags & LoginFlags::NoUsername ) { m_pNameFT->Hide(); @@ -122,9 +107,6 @@ void LoginDialog::EnableUseSysCredsControls_Impl( bool bUseSysCredsEnabled ) m_pErrorInfo->Enable( !bUseSysCredsEnabled ); m_pErrorFT->Enable( !bUseSysCredsEnabled ); m_pRequestInfo->Enable( !bUseSysCredsEnabled ); -m_pPathFT->Enable( !bUseSysCredsEnabled ); -m_pPathED->Enable( !bUseSysCredsEnabled ); -m_pPathBtn->Enable( !bUseSysCredsEnabled ); m_pNameFT->Enable( !bUseSysCredsEnabled ); m_pNameED->Enable( !bUseSysCredsEnabled ); m_pPasswordFT->Enable( !bUseSysCredsEnabled ); @@ -158,28 +140,6 @@ IMPL_LINK_NOARG(LoginDialog, OKHdl_Impl, Button*, void) EndDialog( RET_OK ); } -IMPL_LINK_NOARG(LoginDialog, PathHdl_Impl, Button*, void) -{ -try -{ -uno::Reference xFolderPicker = ui::dialogs::FolderPicker::create(comphelper::getProcessComponentContext()); - -OUString aPath( m_pPathED->GetText() ); -osl::FileBase::getFileURLFromSystemPath( aPath, aPath ); -xFolderPicker->setDisplayDirectory( aPath ); - -if (xFolderPicker->execute() == ui::dialogs::ExecutableDialogResults::OK) -{ -osl::FileBase::getSystemPathFromFileURL( xFolderPicker->getDirectory(), aPath ); -m_pPathED->SetText( aPath ); -} -} -catch (uno::Exception & e) -{ -SAL_WARN("uui", "LoginDialog::PathHdl_Impl: caught " << e); -} -} - IMPL_LINK_NOARG(LoginDialog, UseSysCredsHdl_Impl, Button*, void) { EnableUseSysCredsControls_Impl( m_pUseSysCredsCB->IsChecked() ); @@ -193,9 +153,6 @@ LoginDialog::LoginDialog(vcl::Window* pParent, LoginFlags nFlags, get(m_pErrorFT, "errorft"); get(m_pErrorInfo, "errorinfo"); get(m_pRequestInfo, "requestinfo"); -get(m_pPathFT, "pathft"); -get(m_pPathED, "pathed"); -get(m_pPathBtn, "pathbtn"); get(m_pNameFT, "nameft"); get(m_pNameED, "nameed"); get(m_pPasswordFT, "passwordft"); @@ -211,11 +168,9 @@ LoginDialog::LoginDialog(vcl::Window* pParent, LoginFlags nFlags, SetRequest(); -m_pPathED->SetMaxTextLen( _MAX_PATH ); m_pNameED->SetMaxTextLen( _MAX_PATH ); m_pOKBtn->SetClickHdl( LINK( this, LoginDialog, OKHdl_Impl ) ); -m_pPathBtn->SetClickHdl( LINK( this, LoginDialog, PathHdl_Impl ) ); m_pUseSysCredsCB->SetClickHdl( LINK( this, LoginDialog, UseSysCredsHdl_Impl ) ); HideControls_Impl( nFlags ); diff --git a/uui/source/logindlg.hxx b/uui/source/logindlg.hxx index 8b6e7731e498..85b2ef3f1f99 100644 --- a/uui/source/logindlg.hxx +++ b/uui/source/logindlg.hxx @@ -29,7 +29,6 @@ enum class LoginFlags { NONE= 0x, -NoPath = 0x0001, // hide "path" NoUsername = 0x0002, // hide "name" NoPassword = 0x0004, // hide "passwor
[Libreoffice-commits] core.git: uui/source
uui/source/iahndl.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 72d5cc9ebf64d65ee64b6c091ec7f43a2a777ae5 Author: Andrea Gelmini Date: Sat Aug 26 15:41:24 2017 +0200 Fix typo Change-Id: I2d79b299256feefa66ad0b120387d5cab6737345 Reviewed-on: https://gerrit.libreoffice.org/41585 Reviewed-by: Julien Nabet Tested-by: Julien Nabet diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx index 7bee920262cf..f3a801a47c0c 100644 --- a/uui/source/iahndl.cxx +++ b/uui/source/iahndl.cxx @@ -975,7 +975,7 @@ executeMessageBox( if (pDefaultParent) { -// need to 'Show' to have the following tasks do someting, does +// need to 'Show' to have the following tasks do something, does // not work without and may even stumble on nullptrs/errors xBox->Show(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: uui/source
uui/source/iahndl.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit c3fd791b54187a0a9df91d4674e95acd94ad1a17 Author: Caolán McNamara Date: Sun Jul 23 19:23:41 2017 +0100 coverity#1415622 Pointer to local outside scope Change-Id: I870588f62f5cbb688fa0662483ba008a54ffc492 diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx index cb24ce840f04..1e0f4b91b609 100644 --- a/uui/source/iahndl.cxx +++ b/uui/source/iahndl.cxx @@ -1194,7 +1194,8 @@ UUIInteractionHelper::handleBrokenPackageRequest( OUString aMessage; { -ErrorResource aErrorResource(RID_UUI_ERRHDL, Translate::Create("uui", Application::GetSettings().GetUILanguageTag())); +std::locale aResLocale = Translate::Create("uui", Application::GetSettings().GetUILanguageTag()); +ErrorResource aErrorResource(RID_UUI_ERRHDL, aResLocale); if (!aErrorResource.getString(nErrorCode, aMessage)) return; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: uui/source
uui/source/lockcorrupt.src |2 -- 1 file changed, 2 deletions(-) New commits: commit 03589f669fe16134991b66ebbac19e510f4f6de9 Author: Noel Grandin Date: Tue Jun 13 12:04:23 2017 +0200 no need to define __RSC here Change-Id: I5bfe4196307569bc181854db4612d7fc79f480b5 Reviewed-on: https://gerrit.libreoffice.org/38726 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/uui/source/lockcorrupt.src b/uui/source/lockcorrupt.src index e26535f3f925..a52aa196 100644 --- a/uui/source/lockcorrupt.src +++ b/uui/source/lockcorrupt.src @@ -17,8 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#define __RSC - #include "ids.hrc" String STR_LOCKCORRUPT_TITLE ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: uui/source
uui/source/iahndl-errorhandler.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit a44e94a453cc6f089e63f18a1051efced3a4f1c4 Author: Caolán McNamara Date: Mon Feb 6 19:34:09 2017 + replace calculation to get RID_SVXERRCODE with RID_SVXERRCODE presumably a hackaround from old deliver-headers era Change-Id: Idbaeec7bb8523776045ce5355235a4397b2195e4 diff --git a/uui/source/iahndl-errorhandler.cxx b/uui/source/iahndl-errorhandler.cxx index 8be4cbb..856bdef 100644 --- a/uui/source/iahndl-errorhandler.cxx +++ b/uui/source/iahndl-errorhandler.cxx @@ -28,6 +28,7 @@ #include #include +#include #include "ids.hrc" #include "getcontinuations.hxx" @@ -157,7 +158,7 @@ UUIInteractionHelper::handleErrorHandlerRequest( RID_CHAOS_START + 12, // cf. chaos/source/inc/cntrids.hrc, where // #define RID_CHAOS_ERRHDL (RID_CHAOS_START + 12) -RID_SVX_START + 350, // RID_SVXERRCODE +RID_SVXERRCODE, RID_UUI_ERRHDL }; ErrCode nErrorId = nErrorCode & ~ERRCODE_WARNING_MASK; Source eSource = nErrorId < ERRCODE_AREA_LIB1 ? ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: uui/source
uui/source/iahndl-authentication.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 361d5819d5c9331b0127401435d2f07467148da1 Author: Michael Stahl Date: Wed Nov 9 14:27:18 2016 +0100 uui: fix use-after-free on password dialog VclPtr returned from CreatePasswordToOpenModifyDialog implicitly converts to plain pointer then deletes the dialog. (regression from some vclptr refactoring) Change-Id: I4ccdeabcd6ee718104c0f7f65d67a20ce2c70ca3 diff --git a/uui/source/iahndl-authentication.cxx b/uui/source/iahndl-authentication.cxx index 3edace1..fa7d63f 100644 --- a/uui/source/iahndl-authentication.cxx +++ b/uui/source/iahndl-authentication.cxx @@ -528,8 +528,8 @@ executePasswordDialog( const sal_uInt16 nMaxPasswdLen = bMSCryptoMode ? 15 : 0; // 0 -> allow any length VclAbstractDialogFactory * pFact = VclAbstractDialogFactory::Create(); -AbstractPasswordToOpenModifyDialog *pTmp = pFact->CreatePasswordToOpenModifyDialog( pParent, nMaxPasswdLen, bIsPasswordToModify ); -ScopedVclPtr< AbstractPasswordToOpenModifyDialog > pDialog( pTmp ); +ScopedVclPtr const pDialog( +pFact->CreatePasswordToOpenModifyDialog(pParent, nMaxPasswdLen, bIsPasswordToModify)); rInfo.SetResult( pDialog->Execute() == RET_OK ? ERRCODE_BUTTON_OK : ERRCODE_BUTTON_CANCEL ); rInfo.SetPassword( pDialog->GetPasswordToOpen() ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: uui/source uui/util
uui/source/requeststringresolver.cxx | 33 - uui/source/requeststringresolver.hxx | 16 ++-- uui/source/services.cxx | 22 +- uui/util/uui.component |4 ++-- 4 files changed, 13 insertions(+), 62 deletions(-) New commits: commit 22b0c09f8463b9c6cceb9e2c3addcab79d42aa0b Author: Matúš Kukan Date: Wed Sep 7 20:10:26 2016 +0200 tdf#74608: Ctor function for css.comp.uui.UUIInteractionRequestStringResolver Change-Id: I42c0c2cc8797647aa9dd676034137a1430e42fee diff --git a/uui/source/requeststringresolver.cxx b/uui/source/requeststringresolver.cxx index d2ed7dc..b63b035 100644 --- a/uui/source/requeststringresolver.cxx +++ b/uui/source/requeststringresolver.cxx @@ -19,7 +19,6 @@ #include "requeststringresolver.hxx" #include "iahndl.hxx" -#include #include using namespace css; @@ -39,7 +38,7 @@ OUString SAL_CALL UUIInteractionRequestStringResolver::getImplementationName() throw (uno::RuntimeException, std::exception) { -return OUString::createFromAscii(m_aImplementationName); +return OUString("com.sun.star.comp.uui.UUIInteractionRequestStringResolver"); } sal_Bool SAL_CALL @@ -50,11 +49,12 @@ UUIInteractionRequestStringResolver::supportsService( return cppu::supportsService(this, rServiceName); } + uno::Sequence< OUString > SAL_CALL UUIInteractionRequestStringResolver::getSupportedServiceNames() throw (uno::RuntimeException, std::exception) { -return getSupportedServiceNames_static(); +return { "com.sun.star.task.InteractionRequestStringResolver" }; } beans::Optional< OUString > SAL_CALL @@ -73,29 +73,12 @@ UUIInteractionRequestStringResolver::getStringFromInformationalRequest( } } -char const UUIInteractionRequestStringResolver::m_aImplementationName[] -= "com.sun.star.comp.uui.UUIInteractionRequestStringResolver"; - -uno::Sequence< OUString > -UUIInteractionRequestStringResolver::getSupportedServiceNames_static() -{ -uno::Sequence< OUString > aNames { "com.sun.star.task.InteractionRequestStringResolver" }; -return aNames; -} - -uno::Reference< uno::XInterface > SAL_CALL -UUIInteractionRequestStringResolver::createInstance( -uno::Reference< lang::XMultiServiceFactory > const & -rServiceFactory) +extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL +com_sun_star_comp_uui_UUIInteractionRequestStringResolver_get_implementation( +css::uno::XComponentContext *context, +css::uno::Sequence const &) { -try -{ -return *new UUIInteractionRequestStringResolver(comphelper::getComponentContext(rServiceFactory)); -} -catch (std::bad_alloc const &) -{ -throw uno::RuntimeException("out of memory", nullptr); -} +return cppu::acquire(new UUIInteractionRequestStringResolver(context)); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/uui/source/requeststringresolver.hxx b/uui/source/requeststringresolver.hxx index 4ebbee0..e6dc745 100644 --- a/uui/source/requeststringresolver.hxx +++ b/uui/source/requeststringresolver.hxx @@ -21,7 +21,6 @@ #define INCLUDED_UUI_SOURCE_REQUESTSTRINGRESOLVER_HXX #include -#include #include #include #include @@ -35,16 +34,8 @@ class UUIInteractionRequestStringResolver: css::task::XInteractionRequestStringResolver > { public: -static char const m_aImplementationName[]; - -static css::uno::Sequence< OUString > -getSupportedServiceNames_static(); - -static css::uno::Reference< css::uno::XInterface > -SAL_CALL -createInstance( -css::uno::Reference< css::lang::XMultiServiceFactory > const & -rServiceFactory); +explicit UUIInteractionRequestStringResolver( +css::uno::Reference< css::uno::XComponentContext > const & rxContext); private: std::unique_ptr m_pImpl; @@ -52,9 +43,6 @@ private: UUIInteractionRequestStringResolver(UUIInteractionRequestStringResolver &) = delete; void operator =(UUIInteractionRequestStringResolver&) = delete; -explicit UUIInteractionRequestStringResolver( -css::uno::Reference< css::uno::XComponentContext > const & rxContext); - virtual ~UUIInteractionRequestStringResolver() override; virtual OUString SAL_CALL getImplementationName() diff --git a/uui/source/services.cxx b/uui/source/services.cxx index e914508..052658a 100644 --- a/uui/source/services.cxx +++ b/uui/source/services.cxx @@ -24,7 +24,6 @@ #include #include -#include "requeststringresolver.hxx" #include "passwordcontainer.hxx" using namespace com::sun::star::uno; @@ -45,28 +44,9 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL uui_component_getFactory(sal_Cha static_cast< XMultiServiceFactory * >( pServiceManager ) ); Reference< XSingleServiceFactory > xFactory; - -// UUI Interaction Request String Resolver. - - -if ( rtl_str_compare(pImplName, - UUIInteractio
[Libreoffice-commits] core.git: uui/source uui/uiconfig
uui/source/authfallbackdlg.cxx | 27 +- uui/source/authfallbackdlg.hxx |9 ++- uui/uiconfig/ui/authfallback.ui | 102 ++-- 3 files changed, 108 insertions(+), 30 deletions(-) New commits: commit 32d160300e7bd51c0f273275a3d8872e55af9ad3 Author: Yousuf Philips Date: Mon Aug 15 13:14:58 2016 +0400 tdf#87938 Add descriptive instructions to 2fa dialog Change-Id: I0bbe3ae4591785e32467dec8554493f0b549d009 Reviewed-on: https://gerrit.libreoffice.org/28105 Reviewed-by: Szymon KÅos Tested-by: Szymon KÅos diff --git a/uui/source/authfallbackdlg.cxx b/uui/source/authfallbackdlg.cxx index 8911074..dedcdc8 100644 --- a/uui/source/authfallbackdlg.cxx +++ b/uui/source/authfallbackdlg.cxx @@ -17,29 +17,37 @@ using namespace boost; AuthFallbackDlg::AuthFallbackDlg(Window* pParent, const OUString& instructions, const OUString& url) : ModalDialog(pParent, "AuthFallbackDlg", "uui/ui/authfallback.ui") +, m_bGoogleMode( false ) { get( m_pTVInstructions, "instructions" ); get( m_pEDUrl, "url" ); get( m_pEDCode, "code" ); +get( m_pEDGoogleCode, "google_code" ); get( m_pBTOk, "ok" ); get( m_pBTCancel, "cancel" ); -get( m_pFTGooglePrefixLabel, "google_prefix_label" ); +get( m_pGoogleBox, "GDrive" ); +get( m_pOneDriveBox, "OneDrive" ); m_pBTOk->SetClickHdl( LINK( this, AuthFallbackDlg, OKHdl) ); m_pBTCancel->SetClickHdl( LINK( this, AuthFallbackDlg, CancelHdl) ); m_pBTOk->Enable(); m_pTVInstructions->SetText( instructions ); +m_pTVInstructions->SetPaintTransparent(true); if( url.isEmpty() ) { // Google 2FA -m_pFTGooglePrefixLabel->Show(); +m_bGoogleMode = true; +m_pGoogleBox->Show(); +m_pOneDriveBox->Hide(); m_pEDUrl->Hide(); } else { // OneDrive -m_pFTGooglePrefixLabel->Hide(); +m_bGoogleMode = false; +m_pGoogleBox->Hide(); +m_pOneDriveBox->Show(); m_pEDUrl->SetText( url ); } } @@ -49,14 +57,25 @@ AuthFallbackDlg::~AuthFallbackDlg() disposeOnce(); } +OUString AuthFallbackDlg::GetCode() const +{ +if( m_bGoogleMode ) +return m_pEDGoogleCode->GetText(); +else +return m_pEDCode->GetText(); +} + + void AuthFallbackDlg::dispose() { m_pTVInstructions.clear(); m_pEDUrl.clear(); m_pEDCode.clear(); +m_pEDGoogleCode.clear(); m_pBTOk.clear(); m_pBTCancel.clear(); -m_pFTGooglePrefixLabel.clear(); +m_pGoogleBox.clear(); +m_pOneDriveBox.clear(); ModalDialog::dispose(); } diff --git a/uui/source/authfallbackdlg.hxx b/uui/source/authfallbackdlg.hxx index 9e5eb52..4df88dd 100644 --- a/uui/source/authfallbackdlg.hxx +++ b/uui/source/authfallbackdlg.hxx @@ -15,7 +15,7 @@ #include #include #include - +#include class AuthFallbackDlg : public ModalDialog { @@ -23,9 +23,12 @@ private: VclPtr m_pTVInstructions; VclPtr m_pEDUrl; VclPtr m_pEDCode; +VclPtr m_pEDGoogleCode; VclPtr m_pBTOk; VclPtr m_pBTCancel; -VclPtr m_pFTGooglePrefixLabel; +VclPtr m_pGoogleBox; +VclPtr m_pOneDriveBox; +bool m_bGoogleMode; public: AuthFallbackDlg(Window* pParent, const OUString& instructions, @@ -33,7 +36,7 @@ public: virtual ~AuthFallbackDlg(); virtual void dispose() override; -OUString GetCode() const { return m_pEDCode->GetText(); } +OUString GetCode() const; private: diff --git a/uui/uiconfig/ui/authfallback.ui b/uui/uiconfig/ui/authfallback.ui index d99fa99..09b0dc8 100644 --- a/uui/uiconfig/ui/authfallback.ui +++ b/uui/uiconfig/ui/authfallback.ui @@ -64,13 +64,52 @@ vertical 6 - + True False -4 -False -word -False +vertical +6 + + +True +False +4 +False +word +False + + +False +True +0 + + + + +True +True +False +â + + +False +True +1 + + + + +True +True +â +0 + + +False +True +2 + +
[Libreoffice-commits] core.git: uui/source
uui/source/iahndl-authentication.cxx | 26 -- 1 file changed, 12 insertions(+), 14 deletions(-) New commits: commit 4b73aff7d2e4af7d3a1359df52133cd2c59058c5 Author: Caolán McNamara Date: Fri Jul 29 10:08:25 2016 +0100 VclPtr: password prompts never dispose Change-Id: I917e5457be6de152b39e91ad41b6ed196dfe3e45 diff --git a/uui/source/iahndl-authentication.cxx b/uui/source/iahndl-authentication.cxx index 9855df9..a0a0377 100644 --- a/uui/source/iahndl-authentication.cxx +++ b/uui/source/iahndl-authentication.cxx @@ -516,13 +516,12 @@ executePasswordDialog( { if (bIsSimplePasswordRequest) { -VclPtr< PasswordDialog > pDialog( -VclPtr::Create( pParent, nMode, xManager.get(), aDocName, -bIsPasswordToModify, bIsSimplePasswordRequest ) ); -pDialog->SetMinLen(0); +ScopedVclPtrInstance xDialog(pParent, nMode, xManager.get(), aDocName, +bIsPasswordToModify, bIsSimplePasswordRequest); +xDialog->SetMinLen(0); -rInfo.SetResult( pDialog->Execute() == RET_OK ? ERRCODE_BUTTON_OK : ERRCODE_BUTTON_CANCEL ); -rInfo.SetPassword( pDialog->GetPassword() ); +rInfo.SetResult(xDialog->Execute() == RET_OK ? ERRCODE_BUTTON_OK : ERRCODE_BUTTON_CANCEL); +rInfo.SetPassword(xDialog->GetPassword()); } else { @@ -540,14 +539,13 @@ executePasswordDialog( } else // enter password or reenter password { -VclPtr< PasswordDialog > pDialog( -VclPtr::Create( pParent, nMode, xManager.get(), aDocName, -bIsPasswordToModify, bIsSimplePasswordRequest ) ); -pDialog->SetMinLen(0); - -rInfo.SetResult( pDialog->Execute() == RET_OK ? ERRCODE_BUTTON_OK : ERRCODE_BUTTON_CANCEL ); -rInfo.SetPassword( bIsPasswordToModify ? OUString() : pDialog->GetPassword() ); -rInfo.SetPasswordToModify( bIsPasswordToModify ? pDialog->GetPassword() : OUString() ); +ScopedVclPtrInstance xDialog(pParent, nMode, xManager.get(), aDocName, +bIsPasswordToModify, bIsSimplePasswordRequest); +xDialog->SetMinLen(0); + +rInfo.SetResult(xDialog->Execute() == RET_OK ? ERRCODE_BUTTON_OK : ERRCODE_BUTTON_CANCEL); +rInfo.SetPassword(bIsPasswordToModify ? OUString() : xDialog->GetPassword()); +rInfo.SetPasswordToModify(bIsPasswordToModify ? xDialog->GetPassword() : OUString()); } } catch (std::bad_alloc const &) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: uui/source uui/uiconfig
uui/source/authfallbackdlg.cxx |9 + uui/source/authfallbackdlg.hxx |2 ++ uui/uiconfig/ui/authfallback.ui | 26 -- 3 files changed, 35 insertions(+), 2 deletions(-) New commits: commit 5dee1106703a14c0128880736db77cd7507df776 Author: Szymon KÅos Date: Mon May 23 19:49:31 2016 +0200 Google 2FA: better info for user Google sends SMS with code in format "G-XX". User should enter only numbers wihout "G-". + added "G-" label which is shown in the Google authentication code request before PIN field Change-Id: I8eaecbbe7b8803269444f947e97ee67c33db61b2 diff --git a/uui/source/authfallbackdlg.cxx b/uui/source/authfallbackdlg.cxx index a6383d1..db0448e 100644 --- a/uui/source/authfallbackdlg.cxx +++ b/uui/source/authfallbackdlg.cxx @@ -23,6 +23,7 @@ AuthFallbackDlg::AuthFallbackDlg(Window* pParent, const OUString& instructions, get( m_pEDCode, "code" ); get( m_pBTOk, "ok" ); get( m_pBTCancel, "cancel" ); +get( m_pFTGooglePrefixLabel, "google_prefix_label" ); m_pBTOk->SetClickHdl( LINK( this, AuthFallbackDlg, OKHdl) ); m_pBTCancel->SetClickHdl( LINK( this, AuthFallbackDlg, CancelHdl) ); @@ -30,9 +31,17 @@ AuthFallbackDlg::AuthFallbackDlg(Window* pParent, const OUString& instructions, m_pTVInstructions->SetText( instructions ); if( url.isEmpty() ) +{ +// Google 2FA +m_pFTGooglePrefixLabel->Show(); m_pEDUrl->Hide(); +} else +{ +// OneDrive +m_pFTGooglePrefixLabel->Hide(); m_pEDUrl->SetText( url ); +} } AuthFallbackDlg::~AuthFallbackDlg() diff --git a/uui/source/authfallbackdlg.hxx b/uui/source/authfallbackdlg.hxx index b90bb15..9e5eb52 100644 --- a/uui/source/authfallbackdlg.hxx +++ b/uui/source/authfallbackdlg.hxx @@ -14,6 +14,7 @@ #include #include #include +#include class AuthFallbackDlg : public ModalDialog @@ -24,6 +25,7 @@ private: VclPtr m_pEDCode; VclPtr m_pBTOk; VclPtr m_pBTCancel; +VclPtr m_pFTGooglePrefixLabel; public: AuthFallbackDlg(Window* pParent, const OUString& instructions, diff --git a/uui/uiconfig/ui/authfallback.ui b/uui/uiconfig/ui/authfallback.ui index 6c99edf..dbeb5b5 100644 --- a/uui/uiconfig/ui/authfallback.ui +++ b/uui/uiconfig/ui/authfallback.ui @@ -92,10 +92,32 @@ - + True False -â + + +False +G- + + +False +True +0 + + + + +True +False +â + + +False +True +1 + + False ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: uui/source uui/uiconfig
uui/source/logindlg.cxx| 38 ++ uui/source/logindlg.hxx|5 - uui/uiconfig/ui/logindialog.ui | 28 3 files changed, 58 insertions(+), 13 deletions(-) New commits: commit f88554edd46d2dc8d6c8eaba74c89ccd3e537104 Author: Stephan Bergmann Date: Mon May 2 23:20:11 2016 +0200 Related tdf#98644: In login dialog, give a hint that the password was wrong ...by changing the dialog text from "Enter user name and password for..." to "Wrong user name and password for..." when an old password is already given. Change-Id: Ie167c5ea263e9f75e0269c528dc88b69270208f3 diff --git a/uui/source/logindlg.cxx b/uui/source/logindlg.cxx index 8cf4e58..740c847 100644 --- a/uui/source/logindlg.cxx +++ b/uui/source/logindlg.cxx @@ -61,6 +61,12 @@ void LoginDialog::dispose() ModalDialog::dispose(); } +void LoginDialog::SetPassword( const OUString& rNew ) +{ +m_pPasswordED->SetText( rNew ); +SetRequest(); +} + void LoginDialog::HideControls_Impl( sal_uInt16 nFlags ) { if ( ( nFlags & LF_NO_PATH ) == LF_NO_PATH ) @@ -128,6 +134,23 @@ void LoginDialog::EnableUseSysCredsControls_Impl( bool bUseSysCredsEnabled ) m_pAccountED->Enable( !bUseSysCredsEnabled ); } +void LoginDialog::SetRequest() +{ +bool oldPwd = !m_pPasswordED->GetText().isEmpty(); +OUString aRequest; +if (m_pAccountFT->IsVisible() && !m_realm.isEmpty()) +{ +aRequest = get(oldPwd ? "wrongloginrealm" : "loginrealm") +->GetText(); +aRequest = aRequest.replaceAll("%2", m_realm); +} +else +aRequest = get(oldPwd ? "wrongrequestinfo" : "requestinfo") +->GetText(); +aRequest = aRequest.replaceAll("%1", m_server); +m_pRequestInfo->SetText(aRequest); +} + IMPL_LINK_NOARG_TYPED(LoginDialog, OKHdl_Impl, Button*, void) { // trim the strings @@ -165,7 +188,8 @@ IMPL_LINK_NOARG_TYPED(LoginDialog, UseSysCredsHdl_Impl, Button*, void) LoginDialog::LoginDialog(vcl::Window* pParent, sal_uInt16 nFlags, const OUString& rServer, const OUString& rRealm) -: ModalDialog(pParent, "LoginDialog", "uui/ui/logindialog.ui") +: ModalDialog(pParent, "LoginDialog", "uui/ui/logindialog.ui"), + m_server(rServer), m_realm(rRealm) { get(m_pErrorFT, "errorft"); get(m_pErrorInfo, "errorinfo"); @@ -183,20 +207,10 @@ LoginDialog::LoginDialog(vcl::Window* pParent, sal_uInt16 nFlags, get(m_pUseSysCredsCB, "syscreds"); get(m_pOKBtn, "ok"); -OUString aRequest; -if ((nFlags & LF_NO_ACCOUNT) != 0 && !rRealm.isEmpty()) -{ -aRequest = get("loginrealm")->GetText(); -aRequest = aRequest.replaceAll("%2", rRealm); -} -else -aRequest = m_pRequestInfo->GetText(); - if ( !( ( nFlags & LF_NO_USESYSCREDS ) == LF_NO_USESYSCREDS ) ) EnableUseSysCredsControls_Impl( m_pUseSysCredsCB->IsChecked() ); -aRequest = aRequest.replaceAll("%1", rServer); -m_pRequestInfo->SetText(aRequest); +SetRequest(); m_pPathED->SetMaxTextLen( _MAX_PATH ); m_pNameED->SetMaxTextLen( _MAX_PATH ); diff --git a/uui/source/logindlg.hxx b/uui/source/logindlg.hxx index 567c401..e5e7d98 100644 --- a/uui/source/logindlg.hxx +++ b/uui/source/logindlg.hxx @@ -55,9 +55,12 @@ class LoginDialog : public ModalDialog VclPtr m_pSavePasswdBtn; VclPtr m_pUseSysCredsCB; VclPtr m_pOKBtn; +OUString m_server; +OUString m_realm; voidHideControls_Impl( sal_uInt16 nFlags ); voidEnableUseSysCredsControls_Impl( bool bUseSysCredsEnabled ); +voidSetRequest(); DECL_LINK_TYPED(OKHdl_Impl, Button*, void); DECL_LINK_TYPED(PathHdl_Impl, Button*, void); @@ -72,7 +75,7 @@ public: OUStringGetName() const { return m_pNameED->GetText(); } voidSetName( const OUString& rNewName ) { m_pNameED->SetText( rNewName ); } OUStringGetPassword() const { return m_pPasswordED->GetText(); } -voidSetPassword( const OUString& rNew ) { m_pPasswordED->SetText( rNew ); } +voidSetPassword( const OUString& rNew ); OUStringGetAccount() const { return m_pAccountED->GetText(); } boolIsSavePassword() const { return m_pSavePasswdBtn->IsChecked(); } voidSetSavePassword( bool bSave ) { m_pSavePasswdBtn->Check( bSave ); } diff --git a/uui/uiconfig/ui/logindialog.ui b/uui/uiconfig/ui/logindialog.ui index ca47ea5..806d8f5 100644 --- a/uui/uiconfig/ui/logindialog.ui +++ b/uui/uiconfig/ui/logindialog.ui @@ -251,6 +251,34 @@ + +False +True +0 +Wrong user name and password for: +â%2â on
[Libreoffice-commits] core.git: uui/source
uui/source/interactionhandler.cxx |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) New commits: commit 7e7bef2748c100aed9ec98fbceb8608fc2906ef2 Author: Stephan Bergmann Date: Sat Apr 16 20:58:18 2016 +0200 Avoid reserved identifier Change-Id: I3dde927ee22032e0f516df16a7f9921ccb3cca7f diff --git a/uui/source/interactionhandler.cxx b/uui/source/interactionhandler.cxx index c45fb95..b4384d5 100644 --- a/uui/source/interactionhandler.cxx +++ b/uui/source/interactionhandler.cxx @@ -70,7 +70,7 @@ public: virtual sal_Bool SAL_CALL handleInteractionRequest( -const css::uno::Reference< css::task::XInteractionRequest >& _Request +const css::uno::Reference< css::task::XInteractionRequest >& Request ) throw ( css::uno::RuntimeException, std::exception ) override; }; @@ -159,11 +159,11 @@ UUIInteractionHandler::handle( } sal_Bool SAL_CALL UUIInteractionHandler::handleInteractionRequest( -const uno::Reference< task::XInteractionRequest >& _Request ) throw ( uno::RuntimeException, std::exception ) +const uno::Reference< task::XInteractionRequest >& Request ) throw ( uno::RuntimeException, std::exception ) { try { -return m_pImpl->handleRequest( _Request ); +return m_pImpl->handleRequest( Request ); } catch (uno::RuntimeException const & ex) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: uui/source
uui/source/passworddlg.cxx |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) New commits: commit 9bcc09dcb9a17404fd4852c61b47247886dfda0c Author: Stephan Bergmann Date: Tue Oct 20 14:46:56 2015 +0200 Gracefully handle URLs INetURLObject refuses to parse Change-Id: Id4d09dd32a1faa76b1be70c0478e0e76aa16b05e diff --git a/uui/source/passworddlg.cxx b/uui/source/passworddlg.cxx index 4831bd3..bcba73e 100644 --- a/uui/source/passworddlg.cxx +++ b/uui/source/passworddlg.cxx @@ -73,7 +73,9 @@ PasswordDialog::PasswordDialog(vcl::Window* _pParent, sal_uInt16 nStrId = bOpenToModify ? STR_ENTER_PASSWORD_TO_MODIFY : STR_ENTER_PASSWORD_TO_OPEN; OUString aMessage(ResId(nStrId, *pResourceMgr).toString()); -aMessage += INetURLObject(aDocURL).GetMainURL(INetURLObject::DECODE_UNAMBIGUOUS); +INetURLObject url(aDocURL); +aMessage += url.HasError() +? aDocURL : url.GetMainURL(INetURLObject::DECODE_UNAMBIGUOUS); m_pFTPassword->SetText(aMessage); if (bIsSimplePasswordRequest) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: uui/source
uui/source/alreadyopen.src |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 92d77c1c5b2318e63571fa39b741bb3ccbc6e812 Author: Andras Timar Date: Mon Jun 15 15:24:45 2015 +0200 untranslatable UI string (since 2009) Change-Id: Ic743bb74894a3873f72333a5d33211964e7bcdaf diff --git a/uui/source/alreadyopen.src b/uui/source/alreadyopen.src index 49ed785..876db49 100644 --- a/uui/source/alreadyopen.src +++ b/uui/source/alreadyopen.src @@ -23,7 +23,7 @@ String STR_ALREADYOPEN_TITLE { -Text = "Document in Use"; +Text [ en-US ] = "Document in Use"; }; String STR_ALREADYOPEN_MSG { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: uui/source uui/uiconfig
uui/source/secmacrowarnings.cxx|5 - uui/source/secmacrowarnings.hxx|1 + uui/uiconfig/ui/macrowarnmedium.ui | 14 ++ 3 files changed, 19 insertions(+), 1 deletion(-) New commits: commit bf6a14e0ba4eb2a47da0146379ec905089ab3a6c Author: Andras Timar Date: Thu May 14 10:32:26 2015 +0200 make hardcoded string localizable Change-Id: Ie0bc8e8bd5e0770b85130496359e64358e34c836 Reviewed-on: https://gerrit.libreoffice.org/15727 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/uui/source/secmacrowarnings.cxx b/uui/source/secmacrowarnings.cxx index cb32f76..8af1a4e 100644 --- a/uui/source/secmacrowarnings.cxx +++ b/uui/source/secmacrowarnings.cxx @@ -73,6 +73,7 @@ MacroWarning::MacroWarning( vcl::Window* _pParent, bool _bWithSignatures, ResMgr get(mpSymbolImg, "symbolImage"); get(mpDocNameFI, "docNameLabel"); get(mpDescr1FI, "descr1Label"); +get(mpDescr1aFI, "descr1aLabel"); get(mpSignsFI, "signsLabel"); get(mpViewSignsBtn, "viewSignsButton"); get(mpDescr2FI, "descr2Label"); @@ -96,6 +97,7 @@ void MacroWarning::dispose() { mpSymbolImg.clear(); mpDocNameFI.clear(); +mpDescr1aFI.clear(); mpDescr1FI.clear(); mpSignsFI.clear(); mpViewSignsBtn.clear(); @@ -191,7 +193,8 @@ void MacroWarning::InitControls() } else { -mpDescr1FI->SetText("The document contains document macros."); +mpDescr1FI->Hide(); +mpDescr1aFI->Show(); mpSignsFI->Hide(); mpViewSignsBtn->Hide(); mpAlwaysTrustCB->Hide(); diff --git a/uui/source/secmacrowarnings.hxx b/uui/source/secmacrowarnings.hxx index 076916f..f51bb90 100644 --- a/uui/source/secmacrowarnings.hxx +++ b/uui/source/secmacrowarnings.hxx @@ -47,6 +47,7 @@ private: VclPtr mpSymbolImg; VclPtr mpDocNameFI; VclPtr mpDescr1FI; +VclPtr mpDescr1aFI; VclPtr mpSignsFI; VclPtr mpViewSignsBtn; VclPtr mpDescr2FI; diff --git a/uui/uiconfig/ui/macrowarnmedium.ui b/uui/uiconfig/ui/macrowarnmedium.ui index 5519a4b..a9c49c3 100644 --- a/uui/uiconfig/ui/macrowarnmedium.ui +++ b/uui/uiconfig/ui/macrowarnmedium.ui @@ -133,6 +133,20 @@ + +False +False +start +True +The document contains document macros. + + +False +True +1 + + + True False ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: uui/source
uui/source/iahndl-authentication.cxx | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) New commits: commit cd3e9457dac61766791adb59032b0202c0037505 Author: Caolán McNamara Date: Fri May 8 12:56:07 2015 +0100 VclPtr: presumably these also leak Change-Id: I6118e908e2c56f67593315e8d8499b28b9489810 diff --git a/uui/source/iahndl-authentication.cxx b/uui/source/iahndl-authentication.cxx index 47ed642..3249e9d 100644 --- a/uui/source/iahndl-authentication.cxx +++ b/uui/source/iahndl-authentication.cxx @@ -88,8 +88,7 @@ executeLoginDialog( if (!bCanUseSysCreds) nFlags |= LF_NO_USESYSCREDS; -VclPtr< LoginDialog > xDialog( -VclPtr::Create(pParent, nFlags, rInfo.GetServer(), rRealm)); +ScopedVclPtrInstance< LoginDialog > xDialog(pParent, nFlags, rInfo.GetServer(), rRealm); if (!rInfo.GetErrorText().isEmpty()) xDialog->SetErrorText(rInfo.GetErrorText()); xDialog->SetName(rInfo.GetUserName()); @@ -417,8 +416,8 @@ executeMasterPasswordDialog( boost::scoped_ptr< ResMgr > xManager(ResMgr::CreateResMgr("uui")); if( nMode == task::PasswordRequestMode_PASSWORD_CREATE ) { -VclPtr< MasterPasswordCreateDialog > xDialog( -VclPtr::Create(pParent, xManager.get())); +ScopedVclPtrInstance< MasterPasswordCreateDialog > xDialog( +pParent, xManager.get()); rInfo.SetResult(xDialog->Execute() == RET_OK ? ERRCODE_BUTTON_OK : ERRCODE_BUTTON_CANCEL); aMaster = OUStringToOString( @@ -426,8 +425,8 @@ executeMasterPasswordDialog( } else { -VclPtr< MasterPasswordDialog > xDialog( -VclPtr::Create(pParent, nMode, xManager.get())); +ScopedVclPtrInstance< MasterPasswordDialog > xDialog( +pParent, nMode, xManager.get()); rInfo.SetResult(xDialog->Execute() == RET_OK ? ERRCODE_BUTTON_OK : ERRCODE_BUTTON_CANCEL); aMaster = OUStringToOString( ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: uui/source
uui/source/iahndl-errorhandler.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit c6b5535f1c957f134d67952145b539e262f4ca0d Author: Caolán McNamara Date: Fri May 1 20:55:09 2015 +0100 VclPtr: error dialogs never deleted Change-Id: I43ef768c4c0a29599fd95f5653769bf1583a3d97 diff --git a/uui/source/iahndl-errorhandler.cxx b/uui/source/iahndl-errorhandler.cxx index 3b12c7b..31dfe1e 100644 --- a/uui/source/iahndl-errorhandler.cxx +++ b/uui/source/iahndl-errorhandler.cxx @@ -101,6 +101,9 @@ executeErrorDialog( } sal_uInt16 aResult = xBox->Execute(); + +xBox.disposeAndClear(); + switch( aResult ) { case RET_OK: ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: uui/source
uui/source/logindlg.hxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit bbba311d55484389bc8e3677d01b8cb4fa5644d6 Author: Julien Nabet Date: Tue Jan 13 23:02:39 2015 +0100 Typo: cedentials->credentials Change-Id: Ifd0905ed0e68b495d96e429df6193503f53ea908 diff --git a/uui/source/logindlg.hxx b/uui/source/logindlg.hxx index 4fe319e..0cd7eb6 100644 --- a/uui/source/logindlg.hxx +++ b/uui/source/logindlg.hxx @@ -35,7 +35,7 @@ #define LF_PATH_READONLY0x0020 // "path" readonly #define LF_USERNAME_READONLY0x0040 // "name" readonly #define LF_NO_ACCOUNT 0x0080 // hide "account" -#define LF_NO_USESYSCREDS 0x0100 // hide "use system cedentials" +#define LF_NO_USESYSCREDS 0x0100 // hide "use system credentials" ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: uui/source
uui/source/interactionhandler.cxx |9 + 1 file changed, 5 insertions(+), 4 deletions(-) New commits: commit f1433c21b14fd8d3419e45ed80e42a140ff1129c Author: Stephan Bergmann Date: Tue Apr 15 08:39:28 2014 +0200 Clean up function declarations Change-Id: Ie9081e6ed0840fad98f52f9755767788db77f406 diff --git a/uui/source/interactionhandler.cxx b/uui/source/interactionhandler.cxx index c95e0e3..1cded67 100644 --- a/uui/source/interactionhandler.cxx +++ b/uui/source/interactionhandler.cxx @@ -17,6 +17,9 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include + +#include #include #include #include @@ -34,14 +37,12 @@ namespace { class UUIInteractionHandler: public cppu::WeakImplHelper3< com::sun::star::lang::XServiceInfo, com::sun::star::lang::XInitialization, - com::sun::star::task::XInteractionHandler2 > + com::sun::star::task::XInteractionHandler2 >, +private boost::noncopyable { private: UUIInteractionHelper * m_pImpl; -UUIInteractionHandler(UUIInteractionHandler &); // not implemented -void operator =(UUIInteractionHandler); // not implemented - public: UUIInteractionHandler(com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: uui/source
uui/source/fltdlg.cxx| 12 uui/source/iahndl-authentication.cxx |6 ++-- uui/source/iahndl-errorhandler.cxx |6 ++-- uui/source/iahndl.cxx| 18 ++-- uui/source/iahndl.hxx|6 ++-- uui/source/logindlg.hxx | 14 - uui/source/loginerr.hxx |2 - uui/source/masterpasscrtdlg.hxx |2 - uui/source/masterpassworddlg.hxx |2 - uui/source/nameclashdlg.hrc |2 - uui/source/nameclashdlg.hxx |2 - uui/source/passwordcontainer.cxx | 50 +-- uui/source/passwordcontainer.hxx |8 ++--- uui/source/passworddlg.cxx |4 +- uui/source/passworddlg.hxx |2 - uui/source/services.cxx | 10 +++ uui/source/sslwarndlg.hxx|4 +- uui/source/unknownauthdlg.hxx|4 +- 18 files changed, 77 insertions(+), 77 deletions(-) New commits: commit c4399bcd13cbe1cfa89c782e6667906c0b8bbb89 Author: Alexander Wilms Date: Tue Feb 25 22:48:34 2014 +0100 Remove visual noise from uui Change-Id: I64fa42929aad00fc63f2937527dd3539f9d6f7f3 Reviewed-on: https://gerrit.libreoffice.org/8337 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/uui/source/fltdlg.cxx b/uui/source/fltdlg.cxx index 137cd8a..ffc3973 100644 --- a/uui/source/fltdlg.cxx +++ b/uui/source/fltdlg.cxx @@ -35,7 +35,7 @@ namespace uui { -/*-//** +/*- @short initialize filter dialog with start values @descr We set some necessary information on these instance for later working and create internal structures. After construction user should call "SetFilters()" and "SetURL()" to fill listbox with selectable filter @@ -64,7 +64,7 @@ FilterDialog::FilterDialog( Window* pParentWindow , FreeResource(); } -/*-//** +/*- @short set file name on dialog control @descr We convert given URL (it must be an URL!) into valid file name and show it on our dialog. @@ -82,7 +82,7 @@ void FilterDialog::SetURL( const OUString& sURL ) m_ftURL.SetText( impl_buildUIFileName(sURL) ); } -/*-//** +/*- @short change list of filter names @descr We save given pointer internal and use it to fill our listbox with given names. Saved list pointer is used on method "AskForFilter()" too, to find user selected item @@ -116,7 +116,7 @@ void FilterDialog::ChangeFilters( const FilterNameList* pFilterNames ) } } -/*-//** +/*- @short ask user for his decision @descr We show the dialog and if user finish it with "OK" - we try to find selected item in internal saved name list (which you must set in "ChangeFilters()"!). If we return sal_True as result, you can use out @@ -159,7 +159,7 @@ bool FilterDialog::AskForFilter( FilterNameListPtr& pSelectedItem ) return bSelected; } -/*-//** +/*- @short helper class to calculate length of given string @descr Instances of it can be used as callback for INetURLObject::getAbbreviated() method to build short URLs to show it on GUI. We use in ctor set OutputDevice to call special VCL method ... @@ -190,7 +190,7 @@ class StringCalculator : public ::cppu::WeakImplHelper1< ::com::sun::star::util: const OutputDevice* m_pDevice; }; -/*-//** +/*- @short try to build short name of given URL to show it n GUI @descr We detect type of given URL automaticly and build this short name depend on this type ... If we couldnt make it right we return full give
[Libreoffice-commits] core.git: uui/source
uui/source/newerverwarn.cxx |9 + 1 file changed, 5 insertions(+), 4 deletions(-) New commits: commit b62b4e65586047bd81a563adbe4c53ddfc9bf8b6 Author: Stephan Bergmann Date: Mon Feb 10 13:57:25 2014 +0100 typo Change-Id: Ia3b810d7ff231674d63aaf82a8ff254290fa55ca diff --git a/uui/source/newerverwarn.cxx b/uui/source/newerverwarn.cxx index 8e94699..2688f11 100644 --- a/uui/source/newerverwarn.cxx +++ b/uui/source/newerverwarn.cxx @@ -102,10 +102,11 @@ IMPL_LINK_NOARG(NewerVersionWarningDialog, UpdateHdl) } else { -// TODO: do we need to respect the -// /org.openoffice.Office.Jobs/Jobs/UpdateCheck/Arguments -// configuration flag? Finally, its meaning is "are automatic -// updates enabled", but this here is not an automatic update, but one triggered explicitly by the user. +// TODO: do we need to respect the /org.openoffice.Office.Jobs/Jobs/ +// UpdateCheck/Arguments/AutoCheckEnabled configuration flag? +// Finally, its meaning is "are automatic updates enabled", but this +// here is not an automatic update, but one triggered explicitly by +// the user. css::uno::Reference< css::container::XHierarchicalNameAccess > xOfficeHelp(officecfg::Office::Addons::AddonUI::OfficeHelp::get(xContext), css::uno::UNO_QUERY_THROW); util::URL aURL; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: uui/source
uui/source/newerverwarn.cxx | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) New commits: commit 602a63785ae79ac31d53709a8ae95a6f3de6ef9a Author: Stephan Bergmann Date: Mon Feb 10 13:53:59 2014 +0100 bUpdateCheckEnabled had always been unused and marked TODO ...ever since its inception in c41efc6d0b2740be4243fd696385f8dbcec0aefe "CWS-TOOLING: integrate CWS dba301a_DEV300" Change-Id: I5da6a38f595146ef0d2894b33bf614e7663d53fa diff --git a/uui/source/newerverwarn.cxx b/uui/source/newerverwarn.cxx index 5f96cdb..8e94699 100644 --- a/uui/source/newerverwarn.cxx +++ b/uui/source/newerverwarn.cxx @@ -28,11 +28,9 @@ #include #include #include -#include #include #include #include -#include #include #include @@ -104,13 +102,9 @@ IMPL_LINK_NOARG(NewerVersionWarningDialog, UpdateHdl) } else { -uno::Reference < container::XNameReplace > xUpdateConfig = -setup::UpdateCheckConfig::create(xContext); - -sal_Bool bUpdateCheckEnabled = sal_False; -OSL_VERIFY( xUpdateConfig->getByName("AutoCheckEnabled") >>= bUpdateCheckEnabled ); - -// TODO: do we need to respect the bUpdateCheckEnabled flag? Finally, its meaning is "are automatic +// TODO: do we need to respect the +// /org.openoffice.Office.Jobs/Jobs/UpdateCheck/Arguments +// configuration flag? Finally, its meaning is "are automatic // updates enabled", but this here is not an automatic update, but one triggered explicitly by the user. css::uno::Reference< css::container::XHierarchicalNameAccess > xOfficeHelp(officecfg::Office::Addons::AddonUI::OfficeHelp::get(xContext), css::uno::UNO_QUERY_THROW); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: uui/source
uui/source/interactionhandler.cxx | 64 -- uui/source/interactionhandler.hxx | 80 -- 2 files changed, 60 insertions(+), 84 deletions(-) New commits: commit ed9e1e739041c8ef30e68559e9e9415632b21d94 Author: Matúš Kukan Date: Thu Jan 30 13:28:40 2014 +0100 Use anonymous namespace for UUIInteractionHandler. After it's no longer used in uui_component_getFactory, since fe537786a42abea57551395f73328db48bebd086 Change-Id: I27f77b88c898f665d481931a55f1a0c1fce15818 diff --git a/uui/source/interactionhandler.cxx b/uui/source/interactionhandler.cxx index dd71174..872bf52 100644 --- a/uui/source/interactionhandler.cxx +++ b/uui/source/interactionhandler.cxx @@ -17,14 +17,68 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include "iahndl.hxx" -#include "interactionhandler.hxx" -#include "comphelper/namedvaluecollection.hxx" +#include +#include +#include +#include + +#include +#include +#include #include -#include "com/sun/star/awt/XWindow.hpp" using namespace com::sun::star; +namespace { + +class UUIInteractionHandler: +public cppu::WeakImplHelper3< com::sun::star::lang::XServiceInfo, + com::sun::star::lang::XInitialization, + com::sun::star::task::XInteractionHandler2 > +{ +private: +UUIInteractionHelper * m_pImpl; + +UUIInteractionHandler(UUIInteractionHandler &); // not implemented +void operator =(UUIInteractionHandler); // not implemented + +public: +UUIInteractionHandler(com::sun::star::uno::Reference< + com::sun::star::uno::XComponentContext > + const & rxContext) +SAL_THROW(()); + +virtual ~UUIInteractionHandler() SAL_THROW(()); + +virtual OUString SAL_CALL getImplementationName() +throw (com::sun::star::uno::RuntimeException); + +virtual sal_Bool SAL_CALL supportsService(OUString const & + rServiceName) +throw (com::sun::star::uno::RuntimeException); + +virtual com::sun::star::uno::Sequence< OUString > SAL_CALL +getSupportedServiceNames() +throw (com::sun::star::uno::RuntimeException); + +virtual void SAL_CALL +initialize( +com::sun::star::uno::Sequence< com::sun::star::uno::Any > const & +rArguments) +throw (com::sun::star::uno::Exception); + +virtual void SAL_CALL +handle(com::sun::star::uno::Reference< + com::sun::star::task::XInteractionRequest > const & + rRequest) +throw (com::sun::star::uno::RuntimeException); + +virtual ::sal_Bool SAL_CALL +handleInteractionRequest( +const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionRequest >& _Request +) throw ( ::com::sun::star::uno::RuntimeException ); +}; + UUIInteractionHandler::UUIInteractionHandler( uno::Reference< uno::XComponentContext > const & rxContext) @@ -124,6 +178,8 @@ UUIInteractionHandler::handle( } } +} + extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL com_sun_star_comp_uui_UUIInteractionHandler_get_implementation( css::uno::XComponentContext *context, diff --git a/uui/source/interactionhandler.hxx b/uui/source/interactionhandler.hxx deleted file mode 100644 index d5ea999..000 --- a/uui/source/interactionhandler.hxx +++ /dev/null @@ -1,80 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef UUI_INTERACTIONHANDLER_HXX -#define UUI_INTERACTIONHANDLER_HXX - -#include "com/sun/star/lang/XInitialization.hpp" -#include "com/sun/star/lang/XServiceInfo.hpp" -#include "com/sun/star/task/XInteractionHandler2.hpp" -#include "cppuhelper/implbase3.hxx" - -class UUIInteractionHelper; - -class UUIInteractionHandler: -public cppu::WeakImplHelper3< com::sun::star::lang::XServiceInfo, - com::sun::star::lang::XInitialization, - com::sun::star::task::XInteractionHandler2 > -{ -private: -UUIInteractionHelper * m_pImpl;
[Libreoffice-commits] core.git: uui/source
uui/source/iahndl-ssl.cxx |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) New commits: commit fa290c750183ab598447630ab66f382e99188edb Author: Oliver-Rainer Wittmann Date: Tue Jan 21 16:17:39 2014 + Resolves: #i123744# correct consideration of Subject Alternative Name... field of the given certificate (cherry picked from commit 117218483797c0aeedef9b68bdae96a727cb3426) Change-Id: I81fbb49593b15edea2509aed81b252c8e5b0cd82 diff --git a/uui/source/iahndl-ssl.cxx b/uui/source/iahndl-ssl.cxx index d36b3e0..4c10f7c 100644 --- a/uui/source/iahndl-ssl.cxx +++ b/uui/source/iahndl-ssl.cxx @@ -296,9 +296,10 @@ handleCertificateValidationRequest_( certHostNames[0] = certHostName; -for(int n = 1; n < altNames.getLength(); n++){ +for(int n = 0; n < altNames.getLength(); ++n) +{ if (altNames[n].Type == security::ExtAltNameType_DNS_NAME){ - altNames[n].Value >>= certHostNames[n]; + altNames[n].Value >>= certHostNames[n+1]; } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: uui/source
uui/source/newerverwarn.cxx |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) New commits: commit 0d874ee2e452ea67c03a27bf1a7f26d0ffc617dc Author: Stephan Bergmann Date: Thu Jul 25 17:11:29 2013 +0200 Fix configuration access path for "URL" group member ...broken with 20430c74f391ceffd8a063c0b6b8a8fd615abac0 "fdo#46037: no more comphelper/configurationhelper.hxx in uui" (but note that NewerVersionWarningDialog is dead code anyway since 718c0fe73251be083d032f0905880058128d4054 "Ported sfx2-remove-check-update-on-fileload.diff from ooo-build." Change-Id: I7095044b73888aad12704d76a39551158e6c6b33 diff --git a/uui/source/newerverwarn.cxx b/uui/source/newerverwarn.cxx index ac83576..8e4877a 100644 --- a/uui/source/newerverwarn.cxx +++ b/uui/source/newerverwarn.cxx @@ -28,6 +28,7 @@ #include #include #include +#include #include #include @@ -105,10 +106,10 @@ IMPL_LINK_NOARG(NewerVersionWarningDialog, UpdateHdl) // TODO: do we need to respect the bUpdateCheckEnabled flag? Finally, its meaning is "are automatic // updates enabled", but this here is not an automatic update, but one triggered explicitly by the user. -css::uno::Reference< css::container::XNameAccess > xOfficeHelp = officecfg::Office::Addons::AddonUI::OfficeHelp::get(xContext); +css::uno::Reference< css::container::XHierarchicalNameAccess > xOfficeHelp(officecfg::Office::Addons::AddonUI::OfficeHelp::get(xContext), css::uno::UNO_QUERY_THROW); util::URL aURL; -if ( xOfficeHelp->getByName("UpdateCheckJob") >>= aURL.Complete ) +if ( xOfficeHelp->getByHierarchicalName("['UpdateCheckJob']/URL") >>= aURL.Complete ) { uno::Reference< util::XURLTransformer > xTransformer( util::URLTransformer::create(xContext) ); xTransformer->parseStrict( aURL ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits