[Libreoffice-commits] core.git: forms/source
forms/source/component/Columns.cxx|4 ++-- forms/source/component/DatabaseForm.cxx |2 +- forms/source/component/FormattedField.cxx |4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) New commits: commit 6581f028f85d72f3b85c873eaecd77a37c98ac31 Author: Stephan Bergmann AuthorDate: Thu Oct 19 10:30:15 2023 +0200 Commit: Stephan Bergmann CommitDate: Thu Oct 19 20:21:47 2023 +0200 Extended loplugin:ostr: Automatic rewrite O[U]StringLiteral: forms Change-Id: Ifab0f06a776a9c505508781018300c7ce5d46436 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158194 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/forms/source/component/Columns.cxx b/forms/source/component/Columns.cxx index 4aab958f934e..56be293fc549 100644 --- a/forms/source/component/Columns.cxx +++ b/forms/source/component/Columns.cxx @@ -83,8 +83,8 @@ const css::uno::Sequence& getColumnTypes() sal_Int32 getColumnTypeByModelName(const OUString& aModelName) { -static constexpr OUStringLiteral aModelPrefix (u"com.sun.star.form.component."); -static constexpr OUStringLiteral aCompatibleModelPrefix (u"stardiv.one.form.component."); +static constexpr OUString aModelPrefix (u"com.sun.star.form.component."_ustr); +static constexpr OUString aCompatibleModelPrefix (u"stardiv.one.form.component."_ustr); sal_Int32 nTypeId = -1; if (aModelName == FRM_COMPONENT_EDIT) diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx index fccd2367ea17..0d6aafaaa5cf 100644 --- a/forms/source/component/DatabaseForm.cxx +++ b/forms/source/component/DatabaseForm.cxx @@ -1953,7 +1953,7 @@ void ODatabaseForm::reset_impl(bool _bApproveByListeners) if ( xColProps.is() ) xPSI = xColProps->getPropertySetInfo( ); -static constexpr OUStringLiteral PROPERTY_CONTROLDEFAULT = u"ControlDefault"; +static constexpr OUString PROPERTY_CONTROLDEFAULT = u"ControlDefault"_ustr; if ( xPSI.is() && xPSI->hasPropertyByName( PROPERTY_CONTROLDEFAULT ) ) { Any aDefault = xColProps->getPropertyValue( PROPERTY_CONTROLDEFAULT ); diff --git a/forms/source/component/FormattedField.cxx b/forms/source/component/FormattedField.cxx index dbabcaf9bcdd..119fcc35f6a1 100644 --- a/forms/source/component/FormattedField.cxx +++ b/forms/source/component/FormattedField.cxx @@ -656,7 +656,7 @@ void OFormattedModel::write(const Reference& _rxOutStream) Reference xFormats = xSupplier->getNumberFormats(); OUString sFormatDescription; LanguageTypeeFormatLanguage = LANGUAGE_DONTKNOW; -static constexpr OUStringLiteral s_aLocaleProp = u"Locale"; +static constexpr OUString s_aLocaleProp = u"Locale"_ustr; Reference xFormat = xFormats->getByKey(nKey); if (hasProperty(s_aLocaleProp, xFormat)) { @@ -667,7 +667,7 @@ void OFormattedModel::write(const Reference& _rxOutStream) eFormatLanguage = LanguageTag::convertToLanguageType( *pLocale, false); } } -static constexpr OUStringLiteral s_aFormatStringProp = u"FormatString"; +static constexpr OUString s_aFormatStringProp = u"FormatString"_ustr; if (hasProperty(s_aFormatStringProp, xFormat)) xFormat->getPropertyValue(s_aFormatStringProp) >>= sFormatDescription; _rxOutStream->writeUTF(sFormatDescription);
[Libreoffice-commits] core.git: forms/source
forms/source/misc/InterfaceContainer.cxx | 19 +-- 1 file changed, 5 insertions(+), 14 deletions(-) New commits: commit 74410e57bda7ec355e92ced5c21c956f83a0f6b7 Author: Julien Nabet AuthorDate: Thu Oct 5 13:05:05 2023 +0200 Commit: Julien Nabet CommitDate: Thu Oct 5 20:35:59 2023 +0200 Replace useless lcl_throwIllegalArgumentException function (forms) Change-Id: Icad8c36ef91edd12da8cc533e3ce24ca8a28 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157590 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/forms/source/misc/InterfaceContainer.cxx b/forms/source/misc/InterfaceContainer.cxx index f7278117899c..90a918f5edcd 100644 --- a/forms/source/misc/InterfaceContainer.cxx +++ b/forms/source/misc/InterfaceContainer.cxx @@ -71,15 +71,6 @@ using namespace ::com::sun::star::io; using namespace ::com::sun::star::form; using namespace ::com::sun::star::util; -namespace -{ - -void lcl_throwIllegalArgumentException() -{ -throw IllegalArgumentException(); -} -} - static bool lcl_hasVbaEvents( const Sequence< ScriptEventDescriptor >& sEvents ) { @@ -739,17 +730,17 @@ void OInterfaceContainer::approveNewElement( const Reference< XPropertySet >& _r // it has to support our element type interface Any aCorrectType = _rxObject->queryInterface( m_aElementType ); if ( !aCorrectType.hasValue() ) -lcl_throwIllegalArgumentException(); +throw IllegalArgumentException(); // it has to have a "Name" property if ( !hasProperty( PROPERTY_NAME, _rxObject ) ) -lcl_throwIllegalArgumentException(); +throw IllegalArgumentException(); // it has to be a child, and it must not have a parent already Reference< XChild > xChild( _rxObject, UNO_QUERY ); if ( !xChild.is() || xChild->getParent().is() ) { -lcl_throwIllegalArgumentException(); +throw IllegalArgumentException(); } // passed all tests. cache the information we have so far @@ -1107,14 +1098,14 @@ void SAL_CALL OInterfaceContainer::replaceByName(const OUString& Name, const Any throw NoSuchElementException(); if (Element.getValueType().getTypeClass() != TypeClass_INTERFACE) -lcl_throwIllegalArgumentException(); +throw IllegalArgumentException(); Reference xSet; Element >>= xSet; if (xSet.is()) { if (!hasProperty(PROPERTY_NAME, xSet)) -lcl_throwIllegalArgumentException(); +throw IllegalArgumentException(); xSet->setPropertyValue(PROPERTY_NAME, Any(Name)); }
[Libreoffice-commits] core.git: forms/source sw/source
forms/source/xforms/xpathlib/xpathlib.cxx |7 +-- sw/source/core/fields/docufld.cxx |7 +-- sw/source/core/fields/flddat.cxx | 10 ++ 3 files changed, 20 insertions(+), 4 deletions(-) New commits: commit 2295c2b17cd7b4648f7d0842929be18125c0edab Author: Michael Stahl AuthorDate: Wed Apr 27 15:12:00 2016 +0200 Commit: Gabor Kelemen CommitDate: Mon Jul 24 18:56:40 2023 +0200 sw, forms: some hacks to nerf time-fields so convwatch works better This is useful for PDF-based layout-comparison regression testing where date/time fields were updated upon PDF export and create lots of false positives. Hopefully these can be eliminated this way, at least from text documents. To test: Download https://bugs.documentfoundation.org/attachment.cgi?id=48452 from tdf#38703 and export it with: STABLE_FIELDS_HACK=1 instdir/program/swriter --convert-to pdf DeleteStackSample.odt The date and time fields are now reset to 30/12/1899 00:00:00 Change-Id: Ic89111615074adb50f16a605f920f9a89c437dfd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/24442 Tested-by: Jenkins Tested-by: Gabor Kelemen Reviewed-by: Gabor Kelemen diff --git a/forms/source/xforms/xpathlib/xpathlib.cxx b/forms/source/xforms/xpathlib/xpathlib.cxx index e2f0a10eba58..ffae5a59ca34 100644 --- a/forms/source/xforms/xpathlib/xpathlib.cxx +++ b/forms/source/xforms/xpathlib/xpathlib.cxx @@ -277,8 +277,11 @@ void xforms_nowFunction(xmlXPathParserContextPtr ctxt, int /*nargs*/) be omitted or, if present, the time zone must be Coordinated Universal tools::Time (UTC) indicated by a "Z". */ -DateTime aDateTime( DateTime::SYSTEM ); -OString aDateTimeString = makeDateTimeString(aDateTime); +OString aDateTimeString; +if (std::getenv("STABLE_FIELDS_HACK")) +aDateTimeString = makeDateTimeString(DateTime(DateTime::EMPTY)); +else +aDateTimeString = makeDateTimeString(DateTime(DateTime::SYSTEM)); xmlChar *pString = static_cast(xmlMalloc(aDateTimeString.getLength()+1)); strncpy(reinterpret_cast(pString), aDateTimeString.getStr(), aDateTimeString.getLength()); pString[aDateTimeString.getLength()] = 0; diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx index 97156636ef60..4c3f928ec910 100644 --- a/sw/source/core/fields/docufld.cxx +++ b/sw/source/core/fields/docufld.cxx @@ -945,8 +945,11 @@ OUString SwDocInfoFieldType::Expand( sal_uInt16 nSub, sal_uInt32 nFormat, else if( nSub == DI_PRINT ) { aName = xDocProps->getPrintedBy(); -uDT = xDocProps->getPrintDate(); -aDate = DateTime(uDT); +if ( !std::getenv("STABLE_FIELDS_HACK") ) +{ +uDT = xDocProps->getPrintDate(); +aDate = DateTime(uDT); +} } else break; diff --git a/sw/source/core/fields/flddat.cxx b/sw/source/core/fields/flddat.cxx index 3dcaf848f417..264b7538f967 100644 --- a/sw/source/core/fields/flddat.cxx +++ b/sw/source/core/fields/flddat.cxx @@ -63,6 +63,11 @@ SwDateTimeField::SwDateTimeField(SwDateTimeFieldType* pInitType, sal_uInt16 nSub OUString SwDateTimeField::ExpandImpl(SwRootFrame const*const) const { +if (getenv("STABLE_FIELDS_HACK")) +{ +const_cast(this)->m_nSubType |= FIXEDFLD; //HACK +} + double fVal; if (!(IsFixed())) @@ -131,6 +136,11 @@ double SwDateTimeField::GetDateTime(SwDoc& rDoc, const DateTime& rDT) double SwDateTimeField::GetValue() const { +if (getenv("STABLE_FIELDS_HACK")) +{ +const_cast(this)->m_nSubType |= FIXEDFLD; //HACK +} + if (IsFixed()) return SwValueField::GetValue(); else
[Libreoffice-commits] core.git: forms/source include/cui include/drawinglayer include/sfx2 include/xmloff sc/source svx/inc vcl/inc
forms/source/inc/property.hxx |2 +- include/cui/dlgname.hxx|6 +++--- include/drawinglayer/processor2d/cairopixelprocessor2d.hxx |2 +- include/sfx2/dinfdlg.hxx |2 +- include/xmloff/GradientStyle.hxx |2 +- sc/source/filter/inc/formulabuffer.hxx |2 +- sc/source/filter/inc/formulaparser.hxx |2 +- sc/source/ui/inc/DrawModelBroadcaster.hxx |2 +- svx/inc/sdr/properties/cellproperties.hxx |4 ++-- svx/inc/shapecollection.hxx|2 +- vcl/inc/headless/CairoCommon.hxx |2 +- vcl/inc/headless/SvpGraphicsBackend.hxx|2 +- vcl/inc/unx/cairotextrender.hxx|2 +- vcl/inc/unx/freetype_glyphcache.hxx|2 +- 14 files changed, 17 insertions(+), 17 deletions(-) New commits: commit 18446cdd6007679f227f192a606c86fe2eea1ef6 Author: Noel Grandin AuthorDate: Wed Jul 5 16:06:46 2023 +0200 Commit: Noel Grandin CommitDate: Wed Jul 5 21:39:51 2023 +0200 loplugin:finalclasses Change-Id: I62b094a3bd9a4f630cebdf538c04391e2920ff2c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154064 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/forms/source/inc/property.hxx b/forms/source/inc/property.hxx index 54d19a03d319..00b2075ccebd 100644 --- a/forms/source/inc/property.hxx +++ b/forms/source/inc/property.hxx @@ -326,7 +326,7 @@ private: // a class implementing the comphelper::IPropertyInfoService -class ConcreteInfoService : public ::comphelper::IPropertyInfoService +class ConcreteInfoService final : public ::comphelper::IPropertyInfoService { public: virtual ~ConcreteInfoService() {} diff --git a/include/cui/dlgname.hxx b/include/cui/dlgname.hxx index 04fc5610e937..2ca8a8a55e29 100644 --- a/include/cui/dlgname.hxx +++ b/include/cui/dlgname.hxx @@ -23,7 +23,7 @@ #include /// Dialog for editing a name -class CUI_DLLPUBLIC SvxNameDialog : public weld::GenericDialogController +class CUI_DLLPUBLIC SvxNameDialog final : public weld::GenericDialogController { private: std::unique_ptr m_xEdtName; @@ -74,7 +74,7 @@ public: /** #i68101# Dialog for editing Object name plus uniqueness-callback-linkHandler */ -class SvxObjectNameDialog : public weld::GenericDialogController +class SvxObjectNameDialog final : public weld::GenericDialogController { private: // name @@ -101,7 +101,7 @@ public: /** #i68101# Dialog for editing Object Title and Description */ -class SvxObjectTitleDescDialog : public weld::GenericDialogController +class SvxObjectTitleDescDialog final : public weld::GenericDialogController { private: // title diff --git a/include/drawinglayer/processor2d/cairopixelprocessor2d.hxx b/include/drawinglayer/processor2d/cairopixelprocessor2d.hxx index c940039abb66..2324b9f619e8 100644 --- a/include/drawinglayer/processor2d/cairopixelprocessor2d.hxx +++ b/include/drawinglayer/processor2d/cairopixelprocessor2d.hxx @@ -37,7 +37,7 @@ class SingleLinePrimitive2D; namespace drawinglayer::processor2d { -class DRAWINGLAYER_DLLPUBLIC CairoPixelProcessor2D : public BaseProcessor2D +class DRAWINGLAYER_DLLPUBLIC CairoPixelProcessor2D final : public BaseProcessor2D { // the modifiedColorPrimitive stack basegfx::BColorModifierStack maBColorModifierStack; diff --git a/include/sfx2/dinfdlg.hxx b/include/sfx2/dinfdlg.hxx index 81692a2fc96f..2acbc93cffe9 100644 --- a/include/sfx2/dinfdlg.hxx +++ b/include/sfx2/dinfdlg.hxx @@ -276,7 +276,7 @@ public: ~CustomPropertiesTimeField(); }; -class DurationDialog_Impl : public weld::GenericDialogController +class DurationDialog_Impl final : public weld::GenericDialogController { std::unique_ptr m_xNegativeCB; std::unique_ptr m_xYearNF; diff --git a/include/xmloff/GradientStyle.hxx b/include/xmloff/GradientStyle.hxx index 58975644fb3d..37884d9bea42 100644 --- a/include/xmloff/GradientStyle.hxx +++ b/include/xmloff/GradientStyle.hxx @@ -48,7 +48,7 @@ public: OUString& rStrName ); }; -class XMLOFF_DLLPUBLIC XMLGradientStopContext: public SvXMLImportContext +class XMLOFF_DLLPUBLIC XMLGradientStopContext final : public SvXMLImportContext { public: XMLGradientStopContext( diff --git a/sc/source/filter/inc/formulabuffer.hxx b/sc/source/filter/inc/formulabuffer.hxx index 2266362718eb..512b1feb3c81 100644 --- a/sc/source/filter/inc/formulabuffer.hxx +++ b/sc/source/filter/inc/formulabuffer.hxx @@ -16,7 +16,7 @@ namespace oox::xls { -class FormulaBuffer : public WorkbookHelper +class FormulaBuffer final : public WorkbookHelper { public: /** diff --git a/sc/source/filter/inc/formulaparser.hxx b/sc/source/filter/inc/formulaparser.hxx index 32cab7caed3a..6b9c8fa8fa6c 100644 --- a/sc/so
[Libreoffice-commits] core.git: forms/source
forms/source/xforms/binding.cxx |2 -- 1 file changed, 2 deletions(-) New commits: commit 45826e60d5f1508d54b0f0a4d98b0e2ebe94a097 Author: Julien Nabet AuthorDate: Thu May 18 22:03:43 2023 +0200 Commit: Julien Nabet CommitDate: Fri May 19 21:19:31 2023 +0200 XML forms: remove duplicate addEventListener DOMAttrModified with capture true since commit b2a54aa2e4d215edc30cfecc397eeb3eeff1e5bc Author: Vladimir Glazounov Date: Wed Mar 23 10:34:34 2005 + Change-Id: I8f511d1efa0e2ee713d1e7c145cc60f4945aa8cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151983 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/forms/source/xforms/binding.cxx b/forms/source/xforms/binding.cxx index b9f111a7e49e..93952e033ac1 100644 --- a/forms/source/xforms/binding.cxx +++ b/forms/source/xforms/binding.cxx @@ -469,8 +469,6 @@ static void lcl_addListenerToNode( const Reference& xNode, xListener, false ); xTarget->addEventListener( "DOMAttrModified", xListener, true ); -xTarget->addEventListener( "DOMAttrModified", - xListener, true ); xTarget->addEventListener( "xforms-generic", xListener, true ); }
[Libreoffice-commits] core.git: forms/source
forms/source/xforms/submission/submission_get.cxx |4 1 file changed, 4 deletions(-) New commits: commit 2811ffb4a5f6629101e851d0d57c9816404464ab Author: Julien Nabet AuthorDate: Tue May 16 21:38:36 2023 +0200 Commit: Julien Nabet CommitDate: Wed May 17 15:35:52 2023 +0200 tdf#154628: XML Form Document: Sending data with GET fires very often See rationale here: https://bugs.documentfoundation.org/show_bug.cgi?id=154628#c5 Change-Id: I26556baceec8823d2c3bed382d51731d18bd2ccd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151852 Reviewed-by: Michael Stahl Tested-by: Jenkins diff --git a/forms/source/xforms/submission/submission_get.cxx b/forms/source/xforms/submission/submission_get.cxx index ae630b504b0c..1ddcd529ef1a 100644 --- a/forms/source/xforms/submission/submission_get.cxx +++ b/forms/source/xforms/submission/submission_get.cxx @@ -24,7 +24,6 @@ #include #include #include -#include #include #include @@ -80,9 +79,6 @@ CSubmission::SubmissionResult CSubmissionGet::submit(const css::uno::Reference< } OUString aQueryURL = OStringToOUString(aUTF8QueryURL, RTL_TEXTENCODING_UTF8); ucbhelper::Content aContent(aQueryURL, aEnvironment, m_xContext); -css::uno::Reference< XOutputStream > aPipe( css::io::Pipe::create(m_xContext), UNO_QUERY_THROW ); -if (!aContent.openStream(aPipe)) -return UNKNOWN_ERROR; // get reply try { m_aResultStream = aContent.openStream();
[Libreoffice-commits] core.git: forms/source
forms/source/xforms/binding.cxx |9 - 1 file changed, 8 insertions(+), 1 deletion(-) New commits: commit aa0cbe2c82bbc2295b51357378a68da0d64a44a0 Author: Julien Nabet AuthorDate: Sun May 14 13:22:07 2023 +0200 Commit: Julien Nabet CommitDate: Sun May 14 14:17:00 2023 +0200 tdf#155121: XML Form Document: better take into account "not required" Change-Id: Ibebdbc52f2bd7d09ec7aa5f072efef364249a291 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151733 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/forms/source/xforms/binding.cxx b/forms/source/xforms/binding.cxx index 57d3727c6b97..b9f111a7e49e 100644 --- a/forms/source/xforms/binding.cxx +++ b/forms/source/xforms/binding.cxx @@ -207,7 +207,14 @@ bool Binding::isValid() const { // TODO: determine whether node is suitable, not just whether it exists return maBindingExpression.getNode().is() && -isValid_DataType() && +( +// tdf#155121, validity rules should be apply when field is required or +// when the field is not required but not empty +// so if the field is not required and empty, do not check validity +(! maMIP.isRequired() && maBindingExpression.hasValue() + && maBindingExpression.getString().isEmpty() ) || +isValid_DataType() +) && maMIP.isConstraint() && ( ! maMIP.isRequired() || ( maBindingExpression.hasValue() &&
[Libreoffice-commits] core.git: forms/source
forms/source/richtext/richtextmodel.cxx | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) New commits: commit 63b8e8bda29efbdde0e0bd7f7d2b18d5a9b7b135 Author: Caolán McNamara AuthorDate: Mon May 8 09:35:20 2023 +0100 Commit: Caolán McNamara CommitDate: Mon May 8 13:21:20 2023 +0200 tdf#152974 revert change to ORichTextModel::getPropertyDefaultByHandle properties that match the default are not exported, so we're basically stuck with what is in there for compatibility with older versions, so revert commit ca46afebb7dc0ec4375e995fa90edccbed6c2530 Date: Tue Oct 4 16:22:51 2022 +0100 default to 'flat' instead of '3D Look' for form controls and set m_nBorder to the desired new default in the ctor but leave getPropertyDefaultByHandle as it always was Change-Id: Ia862fc6851248fc9b16b3b4c505fdaf6fdb4b2ac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151497 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/forms/source/richtext/richtextmodel.cxx b/forms/source/richtext/richtextmodel.cxx index c07dcb451cac..61f647b1e4a1 100644 --- a/forms/source/richtext/richtextmodel.cxx +++ b/forms/source/richtext/richtextmodel.cxx @@ -64,7 +64,9 @@ namespace frm m_nClassId = FormComponentType::TEXTFIELD; getPropertyDefaultByHandle( PROPERTY_ID_DEFAULTCONTROL ) >>= m_sDefaultControl; -getPropertyDefaultByHandle( PROPERTY_ID_BORDER ) >>= m_nBorder; +// Default to 'flat' instead of '3D Look' for form controls, but don't change +// getPropertyDefaultByHandle, see tdf#152974 +m_nBorder = 2; getPropertyDefaultByHandle( PROPERTY_ID_ENABLED ) >>= m_bEnabled; getPropertyDefaultByHandle( PROPERTY_ID_ENABLEVISIBLE ) >>= m_bEnableVisible; getPropertyDefaultByHandle( PROPERTY_ID_HARDLINEBREAKS ) >>= m_bHardLineBreaks; @@ -450,7 +452,9 @@ namespace frm } } - +// note tdf#152974, we can't simply change a default here because properties +// that match the default are not exported, so for compatibility these +// can't be changed without some sort of solution for that Any ORichTextModel::getPropertyDefaultByHandle( sal_Int32 _nHandle ) const { Any aDefault; @@ -506,7 +510,7 @@ namespace frm break; case PROPERTY_ID_BORDER: -aDefault <<= sal_Int16(2); +aDefault <<= sal_Int16(1); break; default:
[Libreoffice-commits] core.git: forms/source unotools/source
forms/source/xforms/datatypes.cxx | 15 +++ unotools/source/misc/datetime.cxx | 17 ++--- 2 files changed, 29 insertions(+), 3 deletions(-) New commits: commit c4aa51f497db8b659cc66402dea7be88f57c2580 Author: Julien Nabet AuthorDate: Mon May 1 21:14:14 2023 +0200 Commit: Julien Nabet CommitDate: Wed May 3 13:55:30 2023 +0200 Related tdf#154769: XML Form add limits of length value for some datatype length value for: - year:4 - month and day:2 change ISO8601parseDate in unotools to return false when month or day length > 2 Change-Id: I807a8a784c8924750ae2c821de4be667e514e91f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151238 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/forms/source/xforms/datatypes.cxx b/forms/source/xforms/datatypes.cxx index eb458ae925ba..e81f40246425 100644 --- a/forms/source/xforms/datatypes.cxx +++ b/forms/source/xforms/datatypes.cxx @@ -1051,6 +1051,11 @@ namespace xforms static bool lcl_getValueYear( std::u16string_view value, double& fValue ) { +if (value.size() > 4) +{ + fValue = 0; + return false; +} if (o3tl::equalsAscii(value, "0")) { fValue = 0; @@ -1072,6 +1077,11 @@ namespace xforms static bool lcl_getValueMonth( std::u16string_view value, double& fValue ) { +if (value.size() > 2) +{ + fValue = 0; + return false; +} sal_Int32 int32Value = o3tl::toInt32(value); if ( int32Value == 0 || @@ -1088,6 +1098,11 @@ namespace xforms static bool lcl_getValueDay( std::u16string_view value, double& fValue ) { +if (value.size() > 2) +{ + fValue = 0; + return false; +} sal_Int32 int32Value = o3tl::toInt32(value); if ( int32Value == 0 || diff --git a/unotools/source/misc/datetime.cxx b/unotools/source/misc/datetime.cxx index 348dd0df4934..e2cc1f6d1150 100644 --- a/unotools/source/misc/datetime.cxx +++ b/unotools/source/misc/datetime.cxx @@ -350,14 +350,25 @@ bool ISO8601parseDate(std::u16string_view aDateStr, css::util::Date& rDate) sal_Int32 nDay = 30; sal_Int32 nIdx {0}; -if ( !convertNumber32( nYear, o3tl::getToken(aDateStr, 0, '-', nIdx ), 0, ) ) +auto strCurrentToken = o3tl::getToken(aDateStr, 0, '-', nIdx ); +if ( !convertNumber32( nYear, strCurrentToken, 0, ) ) return false; if ( nDateTokens >= 2 ) -if ( !convertNumber32( nMonth, o3tl::getToken(aDateStr, 0, '-', nIdx ), 0, 12 ) ) +{ +strCurrentToken = o3tl::getToken(aDateStr, 0, '-', nIdx ); +if (strCurrentToken.size() > 2) +return false; +if ( !convertNumber32( nMonth, strCurrentToken, 0, 12 ) ) return false; +} if ( nDateTokens >= 3 ) -if ( !convertNumber32( nDay, o3tl::getToken(aDateStr, 0, '-', nIdx ), 0, 31 ) ) +{ +strCurrentToken = o3tl::getToken(aDateStr, 0, '-', nIdx ); +if (strCurrentToken.size() > 2) +return false; +if ( !convertNumber32( nDay, strCurrentToken, 0, 31 ) ) return false; +} rDate.Year = static_cast(nYear); rDate.Month = static_cast(nMonth);
[Libreoffice-commits] core.git: forms/source
forms/source/xforms/datatyperepository.cxx |2 forms/source/xforms/datatypes.cxx | 128 + forms/source/xforms/datatypes.hxx | 29 ++ 3 files changed, 158 insertions(+), 1 deletion(-) New commits: commit d0ecc80ca4ab5fd19bf26dff8dc748c87444c024 Author: Julien Nabet AuthorDate: Sat Apr 22 21:19:06 2023 +0200 Commit: Julien Nabet CommitDate: Wed Apr 26 09:36:53 2023 +0200 Related tdf#154769: XML forms add anyURI/hyperlink datatype See https://www.w3.org/TR/xmlschema11-2/#anyURI Since I copied-paste string datatype + add check url, I thought about deriving from string datatype but seeing https://www.w3.org/TR/2012/REC-xmlschema11-2-20120405/datatypes.html#built-in-datatypes anyURI doesn't derive from string TODO: contrary to "string" which uses "preserve" for "whitespace" "anyURI" uses "collapse" There's WhiteSpaceTreatment notion in datatypes.cxx and m_nWST associated, WhiteSpaceTreatment::Preserve seems to be the default but when searching about it, it's seems not used. Change-Id: Ifc2dc06072e40b9be168c2f40a9506fe7d267ce4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150822 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/forms/source/xforms/datatyperepository.cxx b/forms/source/xforms/datatyperepository.cxx index fc446a5a3ecf..aba911c3f714 100644 --- a/forms/source/xforms/datatyperepository.cxx +++ b/forms/source/xforms/datatyperepository.cxx @@ -52,7 +52,7 @@ namespace xforms m_aRepository[ sName ] = new OStringType( sName, css::xsd::DataTypeClass::STRING ); sName = ResourceManager::loadString(RID_STR_DATATYPE_URL); -m_aRepository[ sName ] = new OStringType( sName, css::xsd::DataTypeClass::anyURI ); +m_aRepository[ sName ] = new OAnyURIType( sName, css::xsd::DataTypeClass::anyURI ); sName = ResourceManager::loadString(RID_STR_DATATYPE_BOOLEAN); m_aRepository[ sName ] = new OBooleanType( sName ); diff --git a/forms/source/xforms/datatypes.cxx b/forms/source/xforms/datatypes.cxx index 510e75cfd3d7..eb458ae925ba 100644 --- a/forms/source/xforms/datatypes.cxx +++ b/forms/source/xforms/datatypes.cxx @@ -24,6 +24,7 @@ #include #include #include "convert.hxx" +#include #include #include @@ -576,6 +577,133 @@ namespace xforms return sInfo.makeStringAndClear(); } + +OAnyURIType::OAnyURIType( const OUString& _rName, sal_Int16 _nTypeClass ) +:OAnyURIType_Base( _rName, _nTypeClass ) +{ +m_xURLTransformer = css::util::URLTransformer::create(::comphelper::getProcessComponentContext()); +} + + +void OAnyURIType::registerProperties() +{ +OAnyURIType_Base::registerProperties(); + +registerMayBeVoidProperty( PROPERTY_XSD_LENGTH, PROPERTY_ID_XSD_LENGTH, css::beans::PropertyAttribute::BOUND | css::beans::PropertyAttribute::MAYBEVOID, +&m_aLength, cppu::UnoType::get() ); + +registerMayBeVoidProperty( PROPERTY_XSD_MIN_LENGTH, PROPERTY_ID_XSD_MIN_LENGTH, css::beans::PropertyAttribute::BOUND | css::beans::PropertyAttribute::MAYBEVOID, +&m_aMinLength, cppu::UnoType::get() ); + +registerMayBeVoidProperty( PROPERTY_XSD_MAX_LENGTH, PROPERTY_ID_XSD_MAX_LENGTH, css::beans::PropertyAttribute::BOUND | css::beans::PropertyAttribute::MAYBEVOID, +&m_aMaxLength, cppu::UnoType::get() ); +} + + +rtl::Reference OAnyURIType::createClone( const OUString& _rName ) const +{ +return new OAnyURIType( _rName, getTypeClass() ); +} +void OAnyURIType::initializeClone( const OXSDDataType& _rCloneSource ) +{ +OAnyURIType_Base::initializeClone( _rCloneSource ); +initializeTypedClone( static_cast< const OAnyURIType& >( _rCloneSource ) ); +} + + + +void OAnyURIType::initializeTypedClone( const OAnyURIType& _rCloneSource ) +{ +m_aLength = _rCloneSource.m_aLength; +m_aMinLength= _rCloneSource.m_aMinLength; +m_aMaxLength= _rCloneSource.m_aMaxLength; +} + + +bool OAnyURIType::checkPropertySanity( sal_Int32 _nHandle, const Any& _rNewValue, OUString& _rErrorMessage ) +{ +// let the base class do the conversion +if ( !OAnyURIType_Base::checkPropertySanity( _nHandle, _rNewValue, _rErrorMessage ) ) +return false; + +_rErrorMessage.clear(); +switch ( _nHandle ) +{ +case PROPERTY_ID_XSD_LENGTH: +case PROPERTY_ID_XSD_MIN_LENGTH: +case PROPERTY_ID_XSD_MAX_LENGTH: +{ +sal_Int32 nValue( 0 ); +OSL_VERIFY( _rNewValue >>= nValue ); +if ( nValue <= 0 ) +_rErrorMessage = "Length limits must denote positive integer values."; +// TODO/eforms: localize the error message +} +break; +} + +
[Libreoffice-commits] core.git: forms/source
forms/source/component/FormattedFieldWrapper.cxx | 20 +--- forms/source/component/FormattedFieldWrapper.hxx |6 -- 2 files changed, 17 insertions(+), 9 deletions(-) New commits: commit 29b3265a6eee7aada7cb6d8f478bfeb0a32c006e Author: Stephan Bergmann AuthorDate: Fri Apr 21 13:50:50 2023 +0200 Commit: Stephan Bergmann CommitDate: Fri Apr 21 15:05:37 2023 +0200 Fix some getImplementationName ...to match the corresponding .component entries Change-Id: I4c2a838b7a88e3d21e230310c1a4057b427a7c7d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150756 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/forms/source/component/FormattedFieldWrapper.cxx b/forms/source/component/FormattedFieldWrapper.cxx index 8a8f27830395..834527ccd79b 100644 --- a/forms/source/component/FormattedFieldWrapper.cxx +++ b/forms/source/component/FormattedFieldWrapper.cxx @@ -44,14 +44,17 @@ using namespace ::com::sun::star::io; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::util; -OFormattedFieldWrapper::OFormattedFieldWrapper(const Reference& _rxFactory) +OFormattedFieldWrapper::OFormattedFieldWrapper(const Reference& _rxFactory, + OUString const & implementationName) :m_xContext(_rxFactory) +,m_implementationName(implementationName) { } -css::uno::Reference OFormattedFieldWrapper::createFormattedFieldWrapper(const css::uno::Reference< css::uno::XComponentContext>& _rxFactory, bool bActAsFormatted) +css::uno::Reference OFormattedFieldWrapper::createFormattedFieldWrapper(const css::uno::Reference< css::uno::XComponentContext>& _rxFactory, bool bActAsFormatted, OUString const & implementationName) { -rtl::Reference pRef = new OFormattedFieldWrapper(_rxFactory); +rtl::Reference pRef = new OFormattedFieldWrapper(_rxFactory, + implementationName); if (bActAsFormatted) { @@ -82,7 +85,8 @@ Reference< XCloneable > SAL_CALL OFormattedFieldWrapper::createClone() { ensureAggregate(); -rtl::Reference< OFormattedFieldWrapper > xRef(new OFormattedFieldWrapper(m_xContext)); +rtl::Reference< OFormattedFieldWrapper > xRef(new OFormattedFieldWrapper(m_xContext, + m_implementationName)); Reference< XCloneable > xCloneAccess; query_aggregation( m_xAggregate, xCloneAccess ); @@ -174,7 +178,7 @@ OUString SAL_CALL OFormattedFieldWrapper::getServiceName() OUString SAL_CALL OFormattedFieldWrapper::getImplementationName( ) { -return "com.sun.star.comp.forms.OFormattedFieldWrapper_ForcedFormatted"; +return m_implementationName; } sal_Bool SAL_CALL OFormattedFieldWrapper::supportsService( const OUString& _rServiceName ) @@ -342,7 +346,8 @@ com_sun_star_form_OFormattedFieldWrapper_get_implementation(css::uno::XComponent css::uno::Sequence const &) { css::uno::Reference inst( -OFormattedFieldWrapper::createFormattedFieldWrapper(component, false)); +OFormattedFieldWrapper::createFormattedFieldWrapper( +component, false, "com.sun.star.form.OFormattedFieldWrapper")); inst->acquire(); return inst.get(); } @@ -352,7 +357,8 @@ com_sun_star_comp_forms_OFormattedFieldWrapper_ForcedFormatted_get_implementatio css::uno::Sequence const &) { css::uno::Reference inst( -OFormattedFieldWrapper::createFormattedFieldWrapper(component, true)); +OFormattedFieldWrapper::createFormattedFieldWrapper( +component, true, "com.sun.star.comp.forms.OFormattedFieldWrapper_ForcedFormatted")); inst->acquire(); return inst.get(); } diff --git a/forms/source/component/FormattedFieldWrapper.hxx b/forms/source/component/FormattedFieldWrapper.hxx index b34db4148531..9dc093dece0d 100644 --- a/forms/source/component/FormattedFieldWrapper.hxx +++ b/forms/source/component/FormattedFieldWrapper.hxx @@ -42,6 +42,7 @@ typedef ::cppu::WeakAggImplHelper3 < css::io::XPersistObject class OFormattedFieldWrapper final : public OFormattedFieldWrapper_Base { css::uno::Reference< css::uno::XComponentContext> m_xContext; +OUString m_implementationName; css::uno::Reference< css::uno::XAggregation> m_xAggregate; @@ -49,7 +50,8 @@ class OFormattedFieldWrapper final : public OFormattedFieldWrapper_Base // if we act as formatted this is used to write the EditModel part css::uno::Reference< css::io::XPersistObject> m_xFormattedPart; -OFormattedFieldWrapper(const css::uno::Reference< css::uno::XComponentContext>& _rxFactory); +OFormattedFieldWrapper(const css::uno::Reference< css::uno::XComponentContext>& _rxFactory, + OUString const & implementationName); virtual ~OFormattedFieldWrapper() override; @@ -58,7 +60,7 @@
[Libreoffice-commits] core.git: forms/source
forms/source/xforms/convert.cxx |2 +- forms/source/xforms/datatypes.cxx |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) New commits: commit 50837fdd60d3d20b5025d94e243b09d92a166fb4 Author: Julien Nabet AuthorDate: Fri Apr 21 10:13:26 2023 +0200 Commit: Julien Nabet CommitDate: Fri Apr 21 13:46:11 2023 +0200 tdf#116451: XML Form: adding 2 values of decimal-fields gives wrong result Since, depending of the localization decimal separator may be ",", replace "," by "." before calling ::rtl::math::stringToDouble Change-Id: I461f3bdf83019d066735e10b3b6b6784e006bc7f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150750 Reviewed-by: Noel Grandin Tested-by: Jenkins diff --git a/forms/source/xforms/convert.cxx b/forms/source/xforms/convert.cxx index 8ffd4cab4906..0f7193422fa5 100644 --- a/forms/source/xforms/convert.cxx +++ b/forms/source/xforms/convert.cxx @@ -78,7 +78,7 @@ namespace { rtl_math_ConversionStatus eStatus; double f = rtl::math::stringToDouble( -rString, '.', ',', &eStatus ); +rString.replace(',','.'), '.', ',', &eStatus ); return ( eStatus == rtl_math_ConversionStatus_Ok ) ? Any( f ) : Any(); } diff --git a/forms/source/xforms/datatypes.cxx b/forms/source/xforms/datatypes.cxx index 8e5e0b5268b3..510e75cfd3d7 100644 --- a/forms/source/xforms/datatypes.cxx +++ b/forms/source/xforms/datatypes.cxx @@ -404,7 +404,7 @@ namespace xforms rtl_math_ConversionStatus eStatus; sal_Int32 nEnd; double f = ::rtl::math::stringToDouble( -rValue, '.', u'\0', &eStatus, &nEnd ); +rValue.replace(',','.'), '.', u'\0', &eStatus, &nEnd ); // error checking... bool bReturn = false;
[Libreoffice-commits] core.git: forms/source
forms/source/xforms/datatypes.cxx | 78 +- 1 file changed, 68 insertions(+), 10 deletions(-) New commits: commit 4d8a46b819fb65ff13e306ac2c1580f87974bb6d Author: Julien Nabet AuthorDate: Wed Apr 19 21:04:57 2023 +0200 Commit: Noel Grandin CommitDate: Thu Apr 20 08:03:38 2023 +0200 Related tdf#154769: XML form, detect misformed year/month/day From https://www.w3.org/TR/xforms20/ "Data Binding Restrictions: Binds only the following list of datatypes, or datatypes derived by restriction from those in the list: xsd:duration, xsd:date, xsd:time, xsd:dateTime, xsd:gYearMonth, xsd:gYear, xsd:gMonthDay, xsd:gDay, xsd:gMonth, xsd:float, xsd:double, and xsd:decimal. " gYear: a number between 0 and 1 From https://www.w3.org/TR/xmlschema11-2/#gYear + https://www.w3.org/TR/xmlschema11-2/#partial-implementation: "All ·minimally conforming· processors must support nonnegative ·year· values less than 1" -> we could accept more but if other use this minimal requirement, they may wrongly consider LO as buggy here gMonth: a number between 1 and 12, not some string like 'May' (see https://www.w3.org/TR/xmlschema11-2/#gMonth) gDay: a number between 1 and 31, https://www.w3.org/TR/xmlschema11-2/#gDay The first test in lcl_getValueyear is due to the fact that a failing conversion with "o3tl::toInt32" also returns 0. So the goal is to consider this obvious case first. Change-Id: Ifd8106b55419093a0223cff6a0afb9ccd3aa5efe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150652 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/forms/source/xforms/datatypes.cxx b/forms/source/xforms/datatypes.cxx index ea71dc85af83..8e5e0b5268b3 100644 --- a/forms/source/xforms/datatypes.cxx +++ b/forms/source/xforms/datatypes.cxx @@ -27,6 +27,7 @@ #include #include +#include #include #include #include @@ -920,21 +921,78 @@ namespace xforms initializeTypedClone( static_cast< const OShortIntegerType& >( _rCloneSource ) ); } -bool OShortIntegerType::_getValue( const OUString& value, double& fValue ) +static bool lcl_getValueYear( std::u16string_view value, double& fValue ) { -fValue = static_cast(static_cast(value.toInt32())); -// TODO/eforms -// this does not care for values which do not fit into a sal_Int16, but simply -// cuts them down. A better implementation here should probably return -// for those values. -// Else, we may have a situation where the UI claims an input to be valid -// (say "12345678"), while internally, and at submission time, this is cut to -// some smaller value. +if (o3tl::equalsAscii(value, "0")) +{ +fValue = 0; +return true; +} +sal_Int32 int32Value = o3tl::toInt32(value); +if ( +int32Value == 0 || +int32Value < 0 || +int32Value > 1 + ) +{ + fValue = 0; + return false; +} +fValue = static_cast(static_cast(int32Value)); +return true; +} -// Additionally, this of course does not care for strings which are no numbers... +static bool lcl_getValueMonth( std::u16string_view value, double& fValue ) +{ +sal_Int32 int32Value = o3tl::toInt32(value); +if ( +int32Value == 0 || +int32Value < 1 || +int32Value > 12 + ) +{ + fValue = 0; + return false; +} +fValue = static_cast(static_cast(int32Value)); return true; } +static bool lcl_getValueDay( std::u16string_view value, double& fValue ) +{ +sal_Int32 int32Value = o3tl::toInt32(value); +if ( +int32Value == 0 || +int32Value < 1 || +int32Value > 31 + ) +{ + fValue = 0; + return false; +} +fValue = static_cast(static_cast(int32Value)); +return true; +} + +bool OShortIntegerType::_getValue( const OUString& value, double& fValue ) +{ +switch (this->getTypeClass()) +{ +case css::xsd::DataTypeClass::gYear: +return lcl_getValueYear(value, fValue); + +case css::xsd::DataTypeClass::gMonth: +return lcl_getValueMonth(value, fValue); + +case css::xsd::DataTypeClass::gDay: +return lcl_getValueDay(value, fValue); +default: +// for the moment, the only types which derive from OShortIntegerType are: +// gYear, gMonth and gDay, see ODataTypeRepository ctr +return false; +} +} + OUString OShortIntegerType::typedValueAsHumanReadableString( const Any& _rValue ) const {
[Libreoffice-commits] core.git: forms/source
forms/source/xforms/convert.cxx |5 +++-- forms/source/xforms/datatypes.cxx | 30 +++--- 2 files changed, 30 insertions(+), 5 deletions(-) New commits: commit 3b4982b9c702002072dc3a9f7755f820eada08e7 Author: Julien Nabet AuthorDate: Tue Apr 18 18:07:17 2023 +0200 Commit: Noel Grandin CommitDate: Wed Apr 19 08:03:55 2023 +0200 Related tdf#154769: XML form, detect misformed date/datetime/time Change-Id: Ied859703f906ef97c70be4518974ca6a0e482573 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150582 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/forms/source/xforms/convert.cxx b/forms/source/xforms/convert.cxx index 5cd017ac0c5a..8ffd4cab4906 100644 --- a/forms/source/xforms/convert.cxx +++ b/forms/source/xforms/convert.cxx @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -133,7 +134,7 @@ namespace // all okay? if ( !bWellformed ) -return css::util::Date( 1, 1, 1900 ); +throw com::sun::star::lang::IllegalArgumentException(); return aDate; } @@ -203,7 +204,7 @@ namespace // all okay? if ( !bWellformed ) -return css::util::Time(); +throw com::sun::star::lang::IllegalArgumentException(); return aTime; } diff --git a/forms/source/xforms/datatypes.cxx b/forms/source/xforms/datatypes.cxx index c372298f0e5f..ea71dc85af83 100644 --- a/forms/source/xforms/datatypes.cxx +++ b/forms/source/xforms/datatypes.cxx @@ -730,7 +730,15 @@ namespace xforms bool ODateType::_getValue( const OUString& value, double& fValue ) { -Any aTypeValue = Convert::get().toAny( value, getCppuType() ); +Any aTypeValue; +try +{ +aTypeValue = Convert::get().toAny( value, getCppuType() ); +} +catch (com::sun::star::lang::IllegalArgumentException) +{ +return false; +} Date aValue; if ( !( aTypeValue >>= aValue ) ) @@ -779,7 +787,15 @@ namespace xforms bool OTimeType::_getValue( const OUString& value, double& fValue ) { -Any aTypedValue = Convert::get().toAny( value, getCppuType() ); +Any aTypedValue; +try +{ +aTypedValue = Convert::get().toAny( value, getCppuType() ); +} +catch (com::sun::star::lang::IllegalArgumentException) +{ +return false; +} css::util::Time aValue; if ( !( aTypedValue >>= aValue ) ) @@ -851,7 +867,15 @@ namespace xforms bool ODateTimeType::_getValue( const OUString& value, double& fValue ) { -Any aTypedValue = Convert::get().toAny( value, getCppuType() ); +Any aTypedValue; +try +{ +aTypedValue = Convert::get().toAny( value, getCppuType() ); +} +catch (com::sun::star::uno::RuntimeException) +{ +return false; +} DateTime aValue; if ( !( aTypedValue >>= aValue ) )
[Libreoffice-commits] core.git: forms/source
forms/source/xforms/datatypes.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 4829a85d0753c93419bd46b1d50bcfa6f0f3f1da Author: Julien Nabet AuthorDate: Fri Apr 14 21:05:06 2023 +0200 Commit: Julien Nabet CommitDate: Fri Apr 14 22:58:09 2023 +0200 tdf#154734: XML Form doc: all binded fields will be shown as fields... with wrong content - except fields, which have wrong content Regression of 14cfff500e93f0d6cbf8412065feea85c01ea81d (at 2021-08-05) Pass context and resource string down to boost::locale separately because this is often on a hot path, and we can avoid the splitting and joining of strings like this. Before the commit, it was: return ( _validate( sValue ) == nullptr ); _validate methods return "TranslateId" variable which contain the reason why validity is wrong so if this variable contains no reason it means everything is OK. so just replace: return bool(_validate( sValue )); by: return bool(!_validate( sValue )); Change-Id: I76373d0825f86f9072217c96757252b6a891ecc4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150433 Reviewed-by: Julien Nabet Tested-by: Jenkins diff --git a/forms/source/xforms/datatypes.cxx b/forms/source/xforms/datatypes.cxx index 92e0c3ec781b..c372298f0e5f 100644 --- a/forms/source/xforms/datatypes.cxx +++ b/forms/source/xforms/datatypes.cxx @@ -156,7 +156,7 @@ namespace xforms sal_Bool OXSDDataType::validate( const OUString& sValue ) { -return bool(_validate( sValue )); +return bool(!_validate( sValue )); }
[Libreoffice-commits] core.git: forms/source
forms/source/xforms/convert.cxx | 33 + 1 file changed, 33 insertions(+) New commits: commit 26012007e4d20f47697d1336b725e60541df794a Author: Julien Nabet AuthorDate: Mon Apr 10 09:51:07 2023 +0200 Commit: Julien Nabet CommitDate: Mon Apr 10 12:01:57 2023 +0200 tdf#154658: XML Form Document: Fields doesnt calculate any more Regression from 73334560b2dd2d60ac58d2cc2b1a5295490b03e1 author Julien Nabet 2021-11-07 15:40:37 +0100 committer Julien Nabet 2021-11-07 21:58:53 +0100 commit 73334560b2dd2d60ac58d2cc2b1a5295490b03e1 (patch) treeb5bc4f69dd8ed455c78ea05ab1c5e2f3c25b909e parent 6be03ac71e0d4927612b4a57ead3d0b245c29c77 (diff) Replace some macros in forms part 16 A big thank you to Raal for having spotted this! Change-Id: Ib6f1878897b16b43df287702f82835824c1f766d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150174 Reviewed-by: Julien Nabet Tested-by: Jenkins diff --git a/forms/source/xforms/convert.cxx b/forms/source/xforms/convert.cxx index 420dfd32fe70..5cd017ac0c5a 100644 --- a/forms/source/xforms/convert.cxx +++ b/forms/source/xforms/convert.cxx @@ -21,6 +21,7 @@ #include "convert.hxx" #include +#include #include #include #include @@ -50,6 +51,36 @@ namespace Any lcl_toAny_OUString( const OUString& rStr ) { return Any(rStr); } +OUString lcl_toXSD_bool( const Any& rAny ) +{ bool b = false; rAny >>= b; return b ? OUString("true") : OUString("false"); } + +Any lcl_toAny_bool( const OUString& rStr ) +{ +bool b = ( rStr == "true" || rStr == "1" ); +return Any( b ); +} + +OUString lcl_toXSD_double( const Any& rAny ) +{ +double f = 0.0; +rAny >>= f; + +return std::isfinite( f ) +? rtl::math::doubleToUString( f, rtl_math_StringFormat_Automatic, +rtl_math_DecimalPlaces_Max, '.', +true ) +: OUString(); +} + + +Any lcl_toAny_double( const OUString& rString ) +{ +rtl_math_ConversionStatus eStatus; +double f = rtl::math::stringToDouble( +rString, '.', ',', &eStatus ); +return ( eStatus == rtl_math_ConversionStatus_Ok ) ? Any( f ) : Any(); +} + void lcl_appendInt32ToBuffer( const sal_Int32 _nValue, OUStringBuffer& _rBuffer, sal_Int16 _nMinDigits ) { if ( ( _nMinDigits >= 4 ) && ( _nValue < 1000 ) ) @@ -231,6 +262,8 @@ namespace void Convert::init() { maMap[ cppu::UnoType::get() ] = Convert_t(&lcl_toXSD_OUString, &lcl_toAny_OUString); +maMap[ cppu::UnoType::get() ] = Convert_t(&lcl_toXSD_bool, &lcl_toAny_bool); +maMap[ cppu::UnoType::get() ] = Convert_t(&lcl_toXSD_double, &lcl_toAny_double); maMap[ cppu::UnoType::get() ] = Convert_t( &lcl_toXSD_UNODate, &lcl_toAny_UNODate ); maMap[ cppu::UnoType::get() ] = Convert_t( &lcl_toXSD_UNOTime, &lcl_toAny_UNOTime ); maMap[ cppu::UnoType::get() ] = Convert_t( &lcl_toXSD_UNODateTime, &lcl_toAny_UNODateTime );
[Libreoffice-commits] core.git: forms/source
forms/source/xforms/submission/submission.hxx | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) New commits: commit 0292570e63d51f222d9776e0c8714af4cb365b52 Author: Noel Grandin AuthorDate: Fri Feb 24 15:03:18 2023 +0200 Commit: Noel Grandin CommitDate: Mon Feb 27 14:11:02 2023 + osl::Mutex->std::mutex in CProgressHandlerHelper Change-Id: I86ddf381e0d52fe50739d5378ea36059a4d1e521 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147863 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/forms/source/xforms/submission/submission.hxx b/forms/source/xforms/submission/submission.hxx index 42469336ccdc..65631b9a21c1 100644 --- a/forms/source/xforms/submission/submission.hxx +++ b/forms/source/xforms/submission/submission.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include #include @@ -39,6 +38,7 @@ #include "serialization.hxx" #include +#include #include class CSubmissionPut; @@ -72,7 +72,7 @@ class CProgressHandlerHelper final : public cppu::WeakImplHelper< css::ucb::XPro friend class CSubmissionPost; friend class CSubmissionGet; osl::Condition m_cFinished; -osl::Mutex m_mLock; +std::mutex m_mLock; sal_Int32 m_count; public: CProgressHandlerHelper() @@ -80,20 +80,18 @@ public: {} virtual void SAL_CALL push( const css::uno::Any& /*aStatus*/) override { -m_mLock.acquire(); +std::unique_lock g(m_mLock); m_count++; -m_mLock.release(); } virtual void SAL_CALL update(const css::uno::Any& /*aStatus*/) override { } virtual void SAL_CALL pop() override { -m_mLock.acquire(); +std::unique_lock g(m_mLock); m_count--; if (m_count == 0) m_cFinished.set(); -m_mLock.release(); } };
[Libreoffice-commits] core.git: forms/source
forms/source/component/EventThread.cxx | 12 +++- forms/source/component/EventThread.hxx |3 ++- 2 files changed, 9 insertions(+), 6 deletions(-) New commits: commit 1ce02008ae8b61a6a489e65bd32b5e8bdc47e99e Author: Noel Grandin AuthorDate: Fri Feb 24 15:06:06 2023 +0200 Commit: Noel Grandin CommitDate: Mon Feb 27 14:10:03 2023 + osl::Mutex->std::mutex in frm::OComponentEventThread Change-Id: I419a96fce0d5dbdd438dda32217ced39ba598446 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147864 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/forms/source/component/EventThread.cxx b/forms/source/component/EventThread.cxx index 0b38e33f7a4d..2d5336fe384b 100644 --- a/forms/source/component/EventThread.cxx +++ b/forms/source/component/EventThread.cxx @@ -79,7 +79,7 @@ void OComponentEventThread::disposing( const EventObject& evt ) if( evt.Source != static_cast(m_xComp.get()) ) return; -::osl::MutexGuard aGuard( m_aMutex ); +std::unique_lock aGuard( m_aMutex ); // Remove EventListener Reference xEvtLstnr = static_cast(this); @@ -107,7 +107,7 @@ void OComponentEventThread::addEvent( std::unique_ptr _pEvt, const Reference& rControl, bool bFlag ) { -::osl::MutexGuard aGuard( m_aMutex ); +std::unique_lock aGuard( m_aMutex ); // Put data into the queue m_aEvents.push_back( std::move( _pEvt ) ); @@ -140,7 +140,7 @@ void OComponentEventThread::run() do { -::osl::MutexGuard aGuard(m_aMutex); +std::unique_lock aGuard(m_aMutex); while( !m_aEvents.empty() ) { @@ -160,7 +160,7 @@ void OComponentEventThread::run() m_aFlags.erase( firstFlag ); { -MutexRelease aReleaseOnce(m_aMutex); +aGuard.unlock(); // Because a queryHardRef can throw an Exception, it should not be called when // the mutex is locked. Reference xControl; @@ -170,6 +170,7 @@ void OComponentEventThread::run() if( xComp.is() ) processEvent( xComp.get(), pEvt.get(), xControl, bFlag ); +aGuard.lock(); } } @@ -181,9 +182,10 @@ void OComponentEventThread::run() // Reset waiting condition m_aCond.reset(); { -MutexRelease aReleaseOnce(m_aMutex); +aGuard.unlock(); // And wait ... if, in the meantime, an Event came in after all m_aCond.wait(); +aGuard.lock(); } } while( true ); diff --git a/forms/source/component/EventThread.hxx b/forms/source/component/EventThread.hxx index 20aff73113db..df7b33ee134f 100644 --- a/forms/source/component/EventThread.hxx +++ b/forms/source/component/EventThread.hxx @@ -22,6 +22,7 @@ #include #include +#include #include #include @@ -50,7 +51,7 @@ class OComponentEventThread typedef std::vector> ThreadEvents; typedef std::vector< css::uno::Reference< css::uno::XAdapter> > ThreadObjects; -::osl::Mutexm_aMutex; +std::mutex m_aMutex; ::osl::Conditionm_aCond;// Queue filled? ThreadEventsm_aEvents; // EventQueue ThreadObjects m_aControls;// Control for Submit
[Libreoffice-commits] core.git: forms/source include/toolkit toolkit/source
forms/source/component/Filter.cxx |8 +--- include/toolkit/awt/vclxwindow.hxx |6 +-- include/toolkit/helper/listenermultiplexer.hxx | 44 + include/toolkit/helper/macros.hxx | 18 +++--- toolkit/source/awt/vclxcontainer.cxx |2 - toolkit/source/awt/vclxwindow.cxx |4 +- toolkit/source/controls/tree/treecontrol.cxx | 18 +++--- toolkit/source/helper/listenermultiplexer.cxx |9 +++-- 8 files changed, 81 insertions(+), 28 deletions(-) New commits: commit 1f49d8ad7a520975f611023f77f3fc9c0e32ed77 Author: Noel Grandin AuthorDate: Wed Feb 22 12:24:31 2023 +0200 Commit: Noel Grandin CommitDate: Wed Feb 22 11:47:11 2023 + BaseMutex->std::mutex in ListenerMultiplexerBase Change-Id: Icd565c83ca3b4afb1a846a637b7943b0498487e4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147457 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/forms/source/component/Filter.cxx b/forms/source/component/Filter.cxx index e3b9d0628067..bd9b640f1ce3 100644 --- a/forms/source/component/Filter.cxx +++ b/forms/source/component/Filter.cxx @@ -355,9 +355,7 @@ namespace frm m_aText = sText; TextEvent aEvt; aEvt.Source = *this; -::comphelper::OInterfaceIteratorHelper3 aIt(m_aTextListeners); -while( aIt.hasMoreElements() ) -aIt.next()->textChanged(aEvt); +m_aTextListeners.notifyEach(&css::awt::XTextListener::textChanged, aEvt); } #endif } @@ -530,9 +528,7 @@ namespace frm setText(aNewText); TextEvent aEvt; aEvt.Source = *this; -::comphelper::OInterfaceIteratorHelper3 aIt(m_aTextListeners); -while( aIt.hasMoreElements() ) -aIt.next()->textChanged(aEvt); +m_aTextListeners.notifyEach(&css::awt::XTextListener::textChanged, aEvt); #endif return true; } diff --git a/include/toolkit/awt/vclxwindow.hxx b/include/toolkit/awt/vclxwindow.hxx index 30073236aa8a..b4b0a82b544b 100644 --- a/include/toolkit/awt/vclxwindow.hxx +++ b/include/toolkit/awt/vclxwindow.hxx @@ -42,7 +42,7 @@ #include #include -namespace comphelper { template class OInterfaceContainerHelper3; } +template class ListenerMultiplexerBase; namespace com::sun::star::accessibility { class XAccessibleContext; } namespace com::sun::star::awt { class XTopWindowListener; } namespace com::sun::star::awt { class XVclContainerListener; } @@ -99,8 +99,8 @@ protected: bool bWithDefaults = false ); virtual voidGetPropertyIds( std::vector< sal_uInt16 > &aIds ); -::comphelper::OInterfaceContainerHelper3& GetContainerListeners(); -::comphelper::OInterfaceContainerHelper3& GetTopWindowListeners(); +ListenerMultiplexerBase& GetContainerListeners(); +ListenerMultiplexerBase& GetTopWindowListeners(); public: typedef ::std::function Callback; diff --git a/include/toolkit/helper/listenermultiplexer.hxx b/include/toolkit/helper/listenermultiplexer.hxx index b562e9e2852c..f2d9db4e625d 100644 --- a/include/toolkit/helper/listenermultiplexer.hxx +++ b/include/toolkit/helper/listenermultiplexer.hxx @@ -42,10 +42,9 @@ #include #include #include -#include #include #include -#include +#include #include #include #include @@ -53,19 +52,20 @@ // class ListenerMultiplexerBase template -class UNLESS_MERGELIBS(TOOLKIT_DLLPUBLIC) ListenerMultiplexerBase : public cppu::BaseMutex, -public ::comphelper::OInterfaceContainerHelper3, +class UNLESS_MERGELIBS(TOOLKIT_DLLPUBLIC) ListenerMultiplexerBase : public css::uno::XInterface { private: ::cppu::OWeakObject&mrContext; - protected: +mutable std::mutex m_aMutex; +::comphelper::OInterfaceContainerHelper4 maListeners; + ::cppu::OWeakObject&GetContext() { return mrContext; } public: ListenerMultiplexerBase( ::cppu::OWeakObject& rSource ) -: ::comphelper::OInterfaceContainerHelper3(m_aMutex), mrContext(rSource) +: mrContext(rSource) { } @@ -81,6 +81,38 @@ public: voidSAL_CALL acquire() noexcept override { mrContext.acquire(); } voidSAL_CALL release() noexcept override { mrContext.release(); } + +void addInterface( const css::uno::Reference& l) +{ +std::unique_lock g(m_aMutex); +maListeners.addInterface(g, l); +} + +void removeInterface( const css::uno::Reference& l) +{ +std::unique_lock g(m_aMutex); +maListeners.removeInterface(g, l); +} + +void disposeAndClear(const css::lang::EventObject& rDisposeEvent) +{ +std::unique_lock g(m_aMutex); +maListeners.disposeAndClear(g, rDisposeEvent); +} + +sal_Int32 getLength() const +{ +
[Libreoffice-commits] core.git: forms/source
forms/source/xforms/model.cxx|2 +- forms/source/xforms/model_helper.hxx |4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) New commits: commit c6668bf7f87bb50ee5d795f17a67666018931b9a Author: Caolán McNamara AuthorDate: Thu Jan 19 09:03:01 2023 + Commit: Caolán McNamara CommitDate: Thu Jan 19 10:33:16 2023 + cid#1520418 Unchecked dynamic_cast and cid#1520419 Unchecked dynamic_cast cid#1520420 Unchecked dynamic_cast Change-Id: Ia5ef238677bd5eadcdb7fc3fcf982d8a1507133c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145768 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/forms/source/xforms/model.cxx b/forms/source/xforms/model.cxx index 0bab14a61cc8..0cab2350385e 100644 --- a/forms/source/xforms/model.cxx +++ b/forms/source/xforms/model.cxx @@ -428,7 +428,7 @@ void SAL_CALL Model::submitWithInteraction( { Submission* pSubmission = dynamic_cast( mxSubmissions->getItem( sID ).get() ); -OSL_ENSURE( pSubmission != nullptr, "no submission?" ); +assert(pSubmission && "no submission?"); OSL_ENSURE( pSubmission->getModelImpl() == this, "wrong model" ); diff --git a/forms/source/xforms/model_helper.hxx b/forms/source/xforms/model_helper.hxx index 0ec03591bc0a..ae8d78da7c0d 100644 --- a/forms/source/xforms/model_helper.hxx +++ b/forms/source/xforms/model_helper.hxx @@ -91,14 +91,14 @@ protected: virtual void _insert( const T& t ) override { auto pSubmission = dynamic_cast( t.get() ); -OSL_ENSURE( pSubmission != nullptr, "invalid item?" ); +assert(pSubmission && "invalid item?"); pSubmission->setModel( mpModel ); } virtual void _remove( const T& t ) override { auto pSubmission = dynamic_cast( t.get() ); -OSL_ENSURE( pSubmission != nullptr, "invalid item?" ); +assert(pSubmission && "invalid item?"); pSubmission->setModel( nullptr ); } };
[Libreoffice-commits] core.git: forms/source
forms/source/xforms/model.cxx|2 +- forms/source/xforms/model_helper.hxx |6 +++--- forms/source/xforms/submission.cxx |7 --- forms/source/xforms/submission.hxx |3 --- 4 files changed, 4 insertions(+), 14 deletions(-) New commits: commit 7195e2740eb1c71f5bbc4322b3535d56b39e2817 Author: Noel Grandin AuthorDate: Tue Jan 17 23:04:42 2023 +0200 Commit: Noel Grandin CommitDate: Wed Jan 18 05:01:26 2023 + cleanup commit for Submission The following commit missed some stuff: commit fc41f4d58c7c0e60025c1b43127ef1b3c87fa1ac Author: Noel Grandin Date: Sat Jan 14 12:41:58 2023 +0200 XUnoTunnel->dynamic_cast in Submission Change-Id: Ic27a813e360ae39227cd68213d2899ab64f0dee5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145688 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/forms/source/xforms/model.cxx b/forms/source/xforms/model.cxx index e347c9219ac6..0bab14a61cc8 100644 --- a/forms/source/xforms/model.cxx +++ b/forms/source/xforms/model.cxx @@ -427,7 +427,7 @@ void SAL_CALL Model::submitWithInteraction( if( mxSubmissions->hasItem( sID ) ) { Submission* pSubmission = -comphelper::getFromUnoTunnel( mxSubmissions->getItem( sID ) ); +dynamic_cast( mxSubmissions->getItem( sID ).get() ); OSL_ENSURE( pSubmission != nullptr, "no submission?" ); OSL_ENSURE( pSubmission->getModelImpl() == this, "wrong model" ); diff --git a/forms/source/xforms/model_helper.hxx b/forms/source/xforms/model_helper.hxx index fbb563a1300b..0ec03591bc0a 100644 --- a/forms/source/xforms/model_helper.hxx +++ b/forms/source/xforms/model_helper.hxx @@ -84,20 +84,20 @@ public: virtual bool isValid( const T& t ) const override { -return comphelper::getFromUnoTunnel( t ) != nullptr; +return dynamic_cast( t.get() ) != nullptr; } protected: virtual void _insert( const T& t ) override { -auto pSubmission = comphelper::getFromUnoTunnel( t ); +auto pSubmission = dynamic_cast( t.get() ); OSL_ENSURE( pSubmission != nullptr, "invalid item?" ); pSubmission->setModel( mpModel ); } virtual void _remove( const T& t ) override { -auto pSubmission = comphelper::getFromUnoTunnel( t ); +auto pSubmission = dynamic_cast( t.get() ); OSL_ENSURE( pSubmission != nullptr, "invalid item?" ); pSubmission->setModel( nullptr ); } diff --git a/forms/source/xforms/submission.cxx b/forms/source/xforms/submission.cxx index fde73057b4e4..9cb97988d97e 100644 --- a/forms/source/xforms/submission.cxx +++ b/forms/source/xforms/submission.cxx @@ -254,13 +254,6 @@ bool Submission::doSubmit( const Reference< XInteractionHandler >& xHandler ) return ( aResult == CSubmission::SUCCESS ); } -Sequence Submission::getUnoTunnelId() -{ -static const comphelper::UnoIdInit aImplementationId; -return aImplementationId.getSeq(); -} - - void Submission::liveCheck() { bool bValid = mxModel.is(); diff --git a/forms/source/xforms/submission.hxx b/forms/source/xforms/submission.hxx index 8dbfb2b3f1aa..b8f7fb11d87e 100644 --- a/forms/source/xforms/submission.hxx +++ b/forms/source/xforms/submission.hxx @@ -152,9 +152,6 @@ public: * @returns if submission was successful */ bool doSubmit( const css::uno::Reference< css::task::XInteractionHandler >& aHandler ); -// helpers for UNO tunnel -static css::uno::Sequence getUnoTunnelId(); - private: /// check whether object is live, and throw suitable exception if not
[Libreoffice-commits] core.git: forms/source
forms/source/xforms/submission.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 27d76f145a9668999cc31c02b6f2712903e427db Author: Noel Grandin AuthorDate: Mon Jan 16 13:48:53 2023 +0200 Commit: Noel Grandin CommitDate: Mon Jan 16 15:33:24 2023 + tdf#153039 submitting XML from XForms document regression from commit 5fd2f0b93bd7d38a277823bfc251c71da7a6f490 Author: Noel Grandin Date: Thu Jan 12 09:19:03 2023 +0200 use concrete class in Submission Change-Id: I99bc069b5243e994da71287960e29be6ab3338ac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145567 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/forms/source/xforms/submission.cxx b/forms/source/xforms/submission.cxx index 8260095102b3..7a27305760e3 100644 --- a/forms/source/xforms/submission.cxx +++ b/forms/source/xforms/submission.cxx @@ -86,7 +86,7 @@ Submission::~Submission() noexcept void Submission::setModel( const Reference& xModel ) { mxModel = dynamic_cast(xModel.get()); -assert((!mxModel || !xModel) && "we only support an instance of Model here"); +assert(bool(mxModel)==bool(xModel) && "we only support an instance of Model here"); }
[Libreoffice-commits] core.git: forms/source
forms/source/richtext/richtextcontrol.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 32911b8fe99f5205bda08a31b22bfbd991db20f7 Author: Andrea Gelmini AuthorDate: Fri Jan 13 19:12:00 2023 +0100 Commit: Julien Nabet CommitDate: Fri Jan 13 20:26:24 2023 + Fix typo Change-Id: I4d6b70095259b179f8ac3fc210899ffa84b87fa0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145492 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/forms/source/richtext/richtextcontrol.cxx b/forms/source/richtext/richtextcontrol.cxx index cb4bb3e5357c..b481b6bfc981 100644 --- a/forms/source/richtext/richtextcontrol.cxx +++ b/forms/source/richtext/richtextcontrol.cxx @@ -257,7 +257,7 @@ namespace frm // the EditEngine of the model RichTextEngine* pEngine = ORichTextModel::getEditEngine( _rxModel ); -OSL_ENSURE( pEngine, "ORichTextPeer::Create: could not obtaine the edit engine from the model!" ); +OSL_ENSURE( pEngine, "ORichTextPeer::Create: could not obtain the edit engine from the model!" ); if ( !pEngine ) return nullptr;
[Libreoffice-commits] core.git: forms/source
forms/source/component/FormComponent.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit 7c1a8152889fe38d961f8f605713c44293920a28 Author: Andreas Heinisch AuthorDate: Wed Sep 28 16:30:01 2022 +0200 Commit: Andreas Heinisch CommitDate: Wed Oct 5 15:31:51 2022 +0200 tdf#122319 - Don't allow nullable form components if input is required Change-Id: I676aab37df7a98192680b87f0143a27d2a5fd3ee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140713 Tested-by: Jenkins Reviewed-by: Andreas Heinisch diff --git a/forms/source/component/FormComponent.cxx b/forms/source/component/FormComponent.cxx index 9b5558eed5e6..7b6dd36c5e75 100644 --- a/forms/source/component/FormComponent.cxx +++ b/forms/source/component/FormComponent.cxx @@ -1960,7 +1960,8 @@ void OBoundControlModel::connectToField(const Reference& rForm) m_xColumn.set( m_xField, UNO_QUERY ); sal_Int32 nNullableFlag = ColumnValue::NO_NULLS; m_xField->getPropertyValue(PROPERTY_ISNULLABLE) >>= nNullableFlag; -m_bRequired = (ColumnValue::NO_NULLS == nNullableFlag); +// tdf#122319 - don't allow nullable form components if input is required +m_bRequired = (ColumnValue::NO_NULLS == nNullableFlag || m_bInputRequired); // we're optimistic: in case of ColumnValue_NULLABLE_UNKNOWN we assume nullability... } else
[Libreoffice-commits] core.git: forms/source
forms/source/richtext/richtextmodel.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit ca46afebb7dc0ec4375e995fa90edccbed6c2530 Author: Caolán McNamara AuthorDate: Tue Oct 4 16:22:51 2022 +0100 Commit: Caolán McNamara CommitDate: Tue Oct 4 21:18:15 2022 +0200 default to 'flat' instead of '3D Look' for form controls better matches what the pdf/print output will be. Change-Id: I86869024768877f8345c4a0c320eb24d48b35f13 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140947 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/forms/source/richtext/richtextmodel.cxx b/forms/source/richtext/richtextmodel.cxx index 57207e440133..c07dcb451cac 100644 --- a/forms/source/richtext/richtextmodel.cxx +++ b/forms/source/richtext/richtextmodel.cxx @@ -506,7 +506,7 @@ namespace frm break; case PROPERTY_ID_BORDER: -aDefault <<= sal_Int16(1); +aDefault <<= sal_Int16(2); break; default:
[Libreoffice-commits] core.git: forms/source include/svx sc/source sd/source svx/source sw/source toolkit/source
forms/source/component/Edit.cxx |1 forms/source/component/FormComponent.cxx | 18 ++- forms/source/inc/FormComponent.hxx |1 forms/source/inc/frm_strings.hxx |2 + forms/source/inc/property.hxx|2 - include/svx/svdmodel.hxx |2 + sc/source/core/data/drwlayer.cxx |1 sd/source/core/drawdoc.cxx |2 + svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx |8 ++ svx/source/svdraw/svdmodel.cxx |1 sw/source/core/draw/drawdoc.cxx |1 toolkit/source/controls/unocontrol.cxx | 18 +++ 12 files changed, 55 insertions(+), 2 deletions(-) New commits: commit ea36e0502c0bc381577cfa1b1a7fedf0f05d1d72 Author: Caolán McNamara AuthorDate: Tue Oct 4 12:42:33 2022 +0100 Commit: Caolán McNamara CommitDate: Tue Oct 4 21:17:46 2022 +0200 tdf#150786 use a 'standard' theme for form controls i.e. ignore system theme so we get the same results on export to pdf regardless of the theme (esp dark) and don't follow the system theme when hosted with a writer/calc/impress document (do continue to use system theme for StarBasic dialogs as seen in BasicIDE) Didn't reuse 'NativeWidgetLook' for this because is currently defaults off, while we currently do use the colors derived from the system theme even when this is off, its really the NWF flag to render using the platform theming engine Change-Id: I816d7ebaf793e5eac7bd937d44c1db0371145199 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140942 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/forms/source/component/Edit.cxx b/forms/source/component/Edit.cxx index 27ea6cc9982d..580e4f3a9f0e 100644 --- a/forms/source/component/Edit.cxx +++ b/forms/source/component/Edit.cxx @@ -382,6 +382,7 @@ void OEditModel::describeAggregateProperties( Sequence< Property >& _rAggregateP RemoveProperty( _rAggregateProps, PROPERTY_NAME ); RemoveProperty( _rAggregateProps, PROPERTY_TAG ); RemoveProperty( _rAggregateProps, PROPERTY_NATIVE_LOOK ); +RemoveProperty( _rAggregateProps, PROPERTY_STANDARD_THEME ); } diff --git a/forms/source/component/FormComponent.cxx b/forms/source/component/FormComponent.cxx index 2c882145ffd1..9b5558eed5e6 100644 --- a/forms/source/component/FormComponent.cxx +++ b/forms/source/component/FormComponent.cxx @@ -496,6 +496,7 @@ OControlModel::OControlModel( ,m_nTabIndex(FRM_DEFAULT_TABINDEX) ,m_nClassId(FormComponentType::CONTROL) ,m_bNativeLook( false ) +,m_bStandardTheme( false ) ,m_bGenerateVbEvents( false ) ,m_nControlTypeinMSO(0) // 0 : default value is create from AOO ,m_nObjIDinMSO(INVALID_OBJ_ID_IN_MSO) @@ -548,6 +549,7 @@ OControlModel::OControlModel( const OControlModel* _pOriginal, const Reference< m_nTabIndex = _pOriginal->m_nTabIndex; m_nClassId = _pOriginal->m_nClassId; m_bNativeLook = _pOriginal->m_bNativeLook; +m_bStandardTheme = _pOriginal->m_bStandardTheme; m_bGenerateVbEvents = _pOriginal->m_bGenerateVbEvents; m_nControlTypeinMSO = _pOriginal->m_nControlTypeinMSO; m_nObjIDinMSO = _pOriginal->m_nObjIDinMSO; @@ -871,6 +873,9 @@ Any OControlModel::getPropertyDefaultByHandle( sal_Int32 _nHandle ) const case PROPERTY_ID_NATIVE_LOOK: aReturn <<= true; break; +case PROPERTY_ID_STANDARD_THEME: +aReturn <<= false; +break; case PROPERTY_ID_GENERATEVBAEVENTS: aReturn <<= false; break; @@ -909,6 +914,9 @@ void OControlModel::getFastPropertyValue( Any& _rValue, sal_Int32 _nHandle ) con case PROPERTY_ID_NATIVE_LOOK: _rValue <<= m_bNativeLook; break; +case PROPERTY_ID_STANDARD_THEME: +_rValue <<= m_bStandardTheme; +break; case PROPERTY_ID_GENERATEVBAEVENTS: _rValue <<= m_bGenerateVbEvents; break; @@ -946,6 +954,9 @@ sal_Bool OControlModel::convertFastPropertyValue( case PROPERTY_ID_NATIVE_LOOK: bModified = tryPropertyValue(_rConvertedValue, _rOldValue, _rValue, m_bNativeLook); break; +case PROPERTY_ID_STANDARD_THEME: +bModified = tryPropertyValue(_rConvertedValue, _rOldValue, _rValue, m_bStandardTheme); +break; case PROPERTY_ID_GENERATEVBAEVENTS: bModified = tryPropertyValue(_rConvertedValue, _rOldValue, _rValue, m_bGenerateVbEvents); break; @@ -988,6 +999,9 @@ void OControlModel::setFastPropertyValue_NoBroadcast(sal_Int32 _nHandle, const A case PROPERTY_ID_NATIVE_LOOK: OSL_VERIFY( _rValue >>= m_bNativeLook );
[Libreoffice-commits] core.git: forms/source include/toolkit include/vcl offapi/com toolkit/source vcl/inc vcl/source
forms/source/inc/frm_strings.hxx |2 include/toolkit/helper/property.hxx |4 include/vcl/toolkit/combobox.hxx |2 include/vcl/toolkit/lstbox.hxx|2 offapi/com/sun/star/awt/UnoControlComboBoxModel.idl | 12 ++ offapi/com/sun/star/awt/UnoControlCurrencyFieldModel.idl | 12 ++ offapi/com/sun/star/awt/UnoControlDateFieldModel.idl | 12 ++ offapi/com/sun/star/awt/UnoControlEditModel.idl | 12 ++ offapi/com/sun/star/awt/UnoControlFixedTextModel.idl | 12 ++ offapi/com/sun/star/awt/UnoControlFormattedFieldModel.idl | 12 ++ offapi/com/sun/star/awt/UnoControlListBoxModel.idl| 12 ++ offapi/com/sun/star/awt/UnoControlNumericFieldModel.idl | 12 ++ offapi/com/sun/star/awt/UnoControlPatternFieldModel.idl | 12 ++ offapi/com/sun/star/awt/UnoControlTimeFieldModel.idl | 12 ++ toolkit/source/awt/vclxwindow.cxx | 46 +++ toolkit/source/awt/vclxwindows.cxx| 81 ++ toolkit/source/controls/formattedcontrol.cxx |2 toolkit/source/controls/unocontrolmodel.cxx |4 toolkit/source/helper/property.cxx|2 vcl/inc/listbox.hxx |2 vcl/source/control/combobox.cxx | 34 + vcl/source/control/imp_listbox.cxx| 30 + vcl/source/control/listbox.cxx| 22 +++ 23 files changed, 351 insertions(+), 2 deletions(-) New commits: commit ba164651bbdbde1b8a4ae3495b845ebc13b01bad Author: Ilhan Yesil AuthorDate: Fri Jul 1 08:17:19 2022 +0200 Commit: Michael Weghorn CommitDate: Mon Sep 19 13:30:15 2022 +0200 tdf#149797 Change highlight background color in some controls The highlight and highlighttext colors can be set for some controls. So as example a selected item in a listbox can now be paint with anothers colors then the standard blue. Controls are: listbox, combobox, edit field and some special edit fields like date, currency and others. Change-Id: Iace2dd9a1a61abb7819b6c81eb0b8030912db32b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136691 Reviewed-by: Michael Weghorn Tested-by: Jenkins diff --git a/forms/source/inc/frm_strings.hxx b/forms/source/inc/frm_strings.hxx index 35d9dab77234..79f23aa46985 100644 --- a/forms/source/inc/frm_strings.hxx +++ b/forms/source/inc/frm_strings.hxx @@ -213,6 +213,8 @@ inline constexpr OUStringLiteral PROPERTY_BACKGROUNDCOLOR = u"BackgroundColor"; inline constexpr OUStringLiteral PROPERTY_ICONSIZE = u"IconSize"; inline constexpr OUStringLiteral PROPERTY_TEXTLINECOLOR = u"TextLineColor"; inline constexpr OUStringLiteral PROPERTY_HIDEINACTIVESELECTION = u"HideInactiveSelection"; +inline constexpr OUStringLiteral PROPERTY_HIGHLIGHT_COLOR = u"HighlightColor"; +inline constexpr OUStringLiteral PROPERTY_HIGHLIGHT_TEXT_COLOR = u"HighlightTextColor"; inline constexpr OUStringLiteral PROPERTY_SHOW_POSITION = u"ShowPosition"; inline constexpr OUStringLiteral PROPERTY_SHOW_NAVIGATION = u"ShowNavigation"; diff --git a/include/toolkit/helper/property.hxx b/include/toolkit/helper/property.hxx index 4a8fe2385317..92adc587d171 100644 --- a/include/toolkit/helper/property.hxx +++ b/include/toolkit/helper/property.hxx @@ -204,7 +204,9 @@ namespace com::sun::star::uno { #define BASEPROPERTY_INACTIVE_SEL_BACKGROUND_COLOR 166 #define BASEPROPERTY_ACTIVE_SEL_TEXT_COLOR 167 #define BASEPROPERTY_INACTIVE_SEL_TEXT_COLOR168 -#define BASEPROPERTY_TYPEDITEMLIST 169 // AnySequence +#define BASEPROPERTY_HIGHLIGHT_COLOR169 +#define BASEPROPERTY_HIGHLIGHT_TEXT_COLOR 170 +#define BASEPROPERTY_TYPEDITEMLIST 171 // AnySequence // These properties are not bound, they are always extracted from the BASEPROPERTY_FONTDESCRIPTOR property diff --git a/include/vcl/toolkit/combobox.hxx b/include/vcl/toolkit/combobox.hxx index bdc415744662..f5d8a10f1ced 100644 --- a/include/vcl/toolkit/combobox.hxx +++ b/include/vcl/toolkit/combobox.hxx @@ -106,6 +106,8 @@ public: voidDrawEntry( const UserDrawEvent& rEvt ); voidSetBorderStyle( WindowBorderStyle nBorderStyle ); +voidSetHighlightColor(const Color& rColor); +voidSetHighlightTextColor(const Color& rColor); /** * Adds a new separator at the given position n. diff --git a/include/vcl/toolkit/lstbox.hxx b/include/vcl/toolkit/lstbox.hxx index e3bcc1297082..8890fb7ec931 100644 --- a/include/vcl/toolkit/lstbox.hxx +++ b/include/vcl/toolkit/lstbox.hxx @@ -209,6 +209,8 @@ public: voidEnableMultiSelection( bool bMulti ); boolIsMultiSelectionEnabled() const; +voidSetHi
[Libreoffice-commits] core.git: forms/source framework/source include/vcl vcl/inc vcl/source vcl/workben
forms/source/solar/control/navtoolbar.cxx |6 ++ framework/source/uielement/toolbarmanager.cxx |9 +++-- framework/source/uielement/toolbarmerger.cxx |3 +-- include/vcl/toolbox.hxx |1 + vcl/inc/toolbox.h |1 + vcl/source/app/salvtables.cxx |3 +-- vcl/source/window/NotebookBarAddonsMerger.cxx |1 - vcl/source/window/builder.cxx |3 +-- vcl/source/window/toolbox2.cxx| 14 -- vcl/workben/vcldemo.cxx |2 +- 10 files changed, 19 insertions(+), 24 deletions(-) New commits: commit c76857fe4e725834e6be9bd5b3273df95bf7fafd Author: Maxim Monastirsky AuthorDate: Thu Jul 21 23:56:42 2022 +0300 Commit: Maxim Monastirsky CommitDate: Wed Aug 10 08:28:18 2022 +0200 Make ToolBox::InsertItem take the command name For the next patch for tdf#149956 I need the command to be already set when the VclEventId::ToolboxItemAdded event is emitted. Change-Id: I3d8ce44b426a3ed5704d4520d6e62bc4efbf8e44 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138038 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky diff --git a/forms/source/solar/control/navtoolbar.cxx b/forms/source/solar/control/navtoolbar.cxx index 217a9d55d0d3..7193ac4532c1 100644 --- a/forms/source/solar/control/navtoolbar.cxx +++ b/forms/source/solar/control/navtoolbar.cxx @@ -91,7 +91,6 @@ namespace frm if ( pAsciiCommandName != nullptr ) return ".uno:" + OUString::createFromAscii( pAsciiCommandName ); -OSL_FAIL( "lcl_getCommandURL: unknown FormFeature!" ); return OUString(); } } @@ -279,13 +278,12 @@ namespace frm { // it's _not_ a separator // insert the entry -m_pToolbar->InsertItem( ToolBoxItemId(pSupportedFeatures->nId), OUString(), pSupportedFeatures->bRepeat ? ToolBoxItemBits::REPEAT : ToolBoxItemBits::NONE ); +OUString sCommandURL( lcl_getCommandURL( pSupportedFeatures->nId ) ); +m_pToolbar->InsertItem( ToolBoxItemId(pSupportedFeatures->nId), OUString(), sCommandURL, pSupportedFeatures->bRepeat ? ToolBoxItemBits::REPEAT : ToolBoxItemBits::NONE ); m_pToolbar->SetQuickHelpText( ToolBoxItemId(pSupportedFeatures->nId), OUString() ); // TODO if ( !isArtificialItem( pSupportedFeatures->nId ) ) { -OUString sCommandURL( lcl_getCommandURL( pSupportedFeatures->nId ) ); -m_pToolbar->SetItemCommand( ToolBoxItemId(pSupportedFeatures->nId), sCommandURL ); auto aProperties = vcl::CommandInfoProvider::GetCommandProperties(sCommandURL, m_sModuleId); m_pToolbar->SetQuickHelpText(ToolBoxItemId(pSupportedFeatures->nId), vcl::CommandInfoProvider::GetLabelForCommand(aProperties)); diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx index 7dbee84c1072..ef3470a28fb3 100644 --- a/framework/source/uielement/toolbarmanager.cxx +++ b/framework/source/uielement/toolbarmanager.cxx @@ -221,8 +221,7 @@ public: const OUString& rLabel, ToolBoxItemBits nItemBits) override { -m_pToolBar->InsertItem( nId, rLabel, nItemBits ); -m_pToolBar->SetItemCommand( nId, rCommandURL ); +m_pToolBar->InsertItem( nId, rLabel, rCommandURL, nItemBits ); m_pToolBar->SetQuickHelpText(nId, rTooltip); m_pToolBar->EnableItem( nId ); m_pToolBar->SetItemState( nId, TRISTATE_FALSE ); @@ -1525,7 +1524,7 @@ void ToolBarManager::FillAddonToolbar( const Sequence< Sequence< PropertyValue > } else { -m_pToolBar->InsertItem( nId, aTitle ); +m_pToolBar->InsertItem( nId, aTitle, aURL ); OUString aShortcut(vcl::CommandInfoProvider::GetCommandShortcut(aURL, m_xFrame)); if (!aShortcut.isEmpty()) @@ -1536,7 +1535,6 @@ void ToolBarManager::FillAddonToolbar( const Sequence< Sequence< PropertyValue > pRuntimeItemData->aControlType = aControlType; pRuntimeItemData->nWidth = nWidth; m_pToolBar->SetItemData( nId, pRuntimeItemData ); -m_pToolBar->SetItemCommand( nId, aURL ); // Fill command map. It stores all our commands and from what // image manager we got our image. So we can decide if we have to use an @@ -1583,8 +1581,7 @@ void ToolBarManager::FillOverflowToolbar( ToolBox const * pParent ) } const OUString aCommandURL( pParent->GetItemCommand( nId ) ); -m_pToolBar->InsertItem( nId, pParent->GetItemText( nId ) ); -m_pToolBar->SetItemCommand( nId, a
[Libreoffice-commits] core.git: forms/source
forms/source/richtext/richtextimplcontrol.cxx | 24 ++-- forms/source/richtext/richtextimplcontrol.hxx |9 + 2 files changed, 19 insertions(+), 14 deletions(-) New commits: commit cdf5b6a2a6f0ba2838323ce4398948c3d3a56f8e Author: Caolán McNamara AuthorDate: Sun Aug 7 15:49:25 2022 +0100 Commit: Caolán McNamara CommitDate: Mon Aug 8 09:54:31 2022 +0200 tdf#117388 use native scrollbar under gtk in richedit control you get one of these by starting with a normal text box form control and changing its "text type" property to multi-line with formatting Change-Id: If922b6b9fdc49b78fa379dbb3e5974a73f6095ae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137933 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/forms/source/richtext/richtextimplcontrol.cxx b/forms/source/richtext/richtextimplcontrol.cxx index c51a3a8772af..fc9251074e64 100644 --- a/forms/source/richtext/richtextimplcontrol.cxx +++ b/forms/source/richtext/richtextimplcontrol.cxx @@ -306,25 +306,23 @@ namespace frm m_pVScroll->SetThumbPos( m_pView->GetVisArea().Top() ); } - IMPL_LINK_NOARG( RichTextControlImpl, OnInvalidateAllAttributes, LinkParamNone*, void ) { updateAllAttributes(); } - -IMPL_LINK( RichTextControlImpl, OnHScroll, ScrollBar*, _pScrollbar, void ) +IMPL_LINK( RichTextControlImpl, OnHScroll, weld::Scrollbar&, rScrollbar, void ) { -m_pView->Scroll( -_pScrollbar->GetDelta(), 0, ScrollRangeCheck::PaperWidthTextSize ); +auto nDiff = m_pView->GetVisArea().Left() - rScrollbar.adjustment_get_value(); +m_pView->Scroll(nDiff, 0, ScrollRangeCheck::PaperWidthTextSize); } - -IMPL_LINK( RichTextControlImpl, OnVScroll, ScrollBar*, _pScrollbar, void ) +IMPL_LINK(RichTextControlImpl, OnVScroll, weld::Scrollbar&, rScrollbar, void) { -m_pView->Scroll( 0, -_pScrollbar->GetDelta(), ScrollRangeCheck::PaperWidthTextSize ); +auto nDiff = m_pView->GetVisArea().Top() - rScrollbar.adjustment_get_value(); +m_pView->Scroll(0, nDiff, ScrollRangeCheck::PaperWidthTextSize); } - void RichTextControlImpl::ensureScrollbars() { bool bNeedVScroll = 0 != ( m_pAntiImpl->GetStyle() & WB_VSCROLL ); @@ -341,7 +339,7 @@ namespace frm } else { -m_pVScroll = VclPtr::Create( m_pAntiImpl, WB_VSCROLL | WB_DRAG | WB_REPEAT ); +m_pVScroll = VclPtr::Create( m_pAntiImpl, false ); m_pVScroll->SetScrollHdl ( LINK( this, RichTextControlImpl, OnVScroll ) ); m_pVScroll->Show(); } @@ -352,7 +350,7 @@ namespace frm } else { -m_pHScroll = VclPtr::Create( m_pAntiImpl, WB_HSCROLL | WB_DRAG | WB_REPEAT ); +m_pHScroll = VclPtr::Create( m_pAntiImpl, true ); m_pHScroll->SetScrollHdl ( LINK( this, RichTextControlImpl, OnHScroll ) ); m_pHScroll->Show(); } @@ -417,9 +415,15 @@ namespace frm m_pViewport->SetPosSizePixel( Point( nOffset, nOffset ), aViewportSizePixel ); // position the scrollbars if ( m_pVScroll ) +{ +m_pVScroll->SetThickness(nScrollBarWidth); m_pVScroll->SetPosSizePixel( Point( aViewportPlaygroundPixel.Width(), 0 ), Size( nScrollBarWidth, aViewportPlaygroundPixel.Height() ) ); +} if ( m_pHScroll ) +{ +m_pHScroll->SetThickness(nScrollBarHeight); m_pHScroll->SetPosSizePixel( Point( 0, aViewportPlaygroundPixel.Height() ), Size( aViewportPlaygroundPixel.Width(), nScrollBarHeight ) ); +} if ( m_pScrollCorner ) m_pScrollCorner->SetPosSizePixel( Point( aViewportPlaygroundPixel.Width(), aViewportPlaygroundPixel.Height() ), Size( nScrollBarWidth, nScrollBarHeight ) ); diff --git a/forms/source/richtext/richtextimplcontrol.hxx b/forms/source/richtext/richtextimplcontrol.hxx index d4fef2f66806..f1cbb81ffe22 100644 --- a/forms/source/richtext/richtextimplcontrol.hxx +++ b/forms/source/richtext/richtextimplcontrol.hxx @@ -21,6 +21,7 @@ #include "rtattributehandler.hxx" #include "richtextviewport.hxx" #include "richtextengine.hxx" +#include #include #include @@ -53,8 +54,8 @@ namespace frm VclPtrm_pAntiImpl; VclPtr m_pViewport; -VclPtr m_pHScroll; -VclPtr m_pVScroll; +VclPtr m_pHScroll; +VclPtr m_pVScroll; VclPtr m_pScrollCorner; RichTextEngine* m_pEngine; std::unique_ptr m_pView; @@ -173,8 +174,8 @@ namespace frm private: DECL_LINK( OnInvalidateAllAttributes, LinkParamNone*, void ); -DECL_LINK( OnHScroll, ScrollBar*, void ); -DECL_LINK( OnVScroll, ScrollBar*, void ); +DECL_LINK( OnHScroll, weld::Scrollbar&, void )
[Libreoffice-commits] core.git: forms/source
forms/source/component/Columns.cxx|5 +++-- forms/source/component/Columns.hxx|2 +- forms/source/component/DatabaseForm.hxx |7 --- forms/source/component/GroupManager.cxx |9 + forms/source/component/GroupManager.hxx |4 ++-- forms/source/component/imgprod.cxx|7 --- forms/source/richtext/featuredispatcher.cxx |6 -- forms/source/richtext/featuredispatcher.hxx |2 +- forms/source/runtime/formoperations.hxx | 13 +++-- forms/source/solar/control/navtoolbar.cxx |9 + forms/source/solar/inc/navtoolbar.hxx |4 ++-- forms/source/xforms/datatypes.cxx |5 +++-- forms/source/xforms/datatypes.hxx |2 +- forms/source/xforms/evaluationcontext.hxx | 13 +++-- forms/source/xforms/submission/submission.hxx |5 +++-- 15 files changed, 52 insertions(+), 41 deletions(-) New commits: commit 7778a1a573ad87fae76810ad67e6808b22f63420 Author: Noel Grandin AuthorDate: Tue Jun 21 09:03:42 2022 +0200 Commit: Noel Grandin CommitDate: Tue Jun 21 12:59:54 2022 +0200 clang-tidy modernize-pass-by-value in forms Change-Id: I9b4b8db9872ccc8aeb461e34ceed203af7ea35b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136204 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/forms/source/component/Columns.cxx b/forms/source/component/Columns.cxx index 7ab2e08019b4..c14b96191be6 100644 --- a/forms/source/component/Columns.cxx +++ b/forms/source/component/Columns.cxx @@ -36,6 +36,7 @@ #include #include #include +#include namespace frm @@ -186,11 +187,11 @@ Any SAL_CALL OGridColumn::queryAggregation( const Type& _rType ) } -OGridColumn::OGridColumn( const Reference& _rContext, const OUString& _sModelName ) +OGridColumn::OGridColumn( const Reference& _rContext, OUString _sModelName ) :OGridColumn_BASE(m_aMutex) ,OPropertySetAggregationHelper(OGridColumn_BASE::rBHelper) ,m_aHidden( Any( false ) ) -,m_aModelName(_sModelName) +,m_aModelName(std::move(_sModelName)) { // Create the UnoControlModel diff --git a/forms/source/component/Columns.hxx b/forms/source/component/Columns.hxx index fd2caa3b979d..6c12197b90a5 100644 --- a/forms/source/component/Columns.hxx +++ b/forms/source/component/Columns.hxx @@ -60,7 +60,7 @@ class OGridColumn :public ::cppu::BaseMutex // [properties] public: -OGridColumn(const css::uno::Reference& _rContext, const OUString& _sModelName); +OGridColumn(const css::uno::Reference& _rContext, OUString _sModelName); explicit OGridColumn(const OGridColumn* _pOriginal ); virtual ~OGridColumn() override; diff --git a/forms/source/component/DatabaseForm.hxx b/forms/source/component/DatabaseForm.hxx index 7d6b86e03277..73831a9c67ba 100644 --- a/forms/source/component/DatabaseForm.hxx +++ b/forms/source/component/DatabaseForm.hxx @@ -22,6 +22,7 @@ #include #include +#include #include #include @@ -94,10 +95,10 @@ public: OUString aValue; sal_uInt16 nRepresentation; -HtmlSuccessfulObj( const OUString& _rName, const OUString& _rValue, +HtmlSuccessfulObj( OUString _aName, OUString _aValue, sal_uInt16 _nRepresent = SUCCESSFUL_REPRESENT_TEXT ) -:aName( _rName ) -,aValue( _rValue ) +:aName(std::move( _aName )) +,aValue(std::move( _aValue )) ,nRepresentation( _nRepresent ) { } diff --git a/forms/source/component/GroupManager.cxx b/forms/source/component/GroupManager.cxx index deec1bcd572c..edd296d6c77a 100644 --- a/forms/source/component/GroupManager.cxx +++ b/forms/source/component/GroupManager.cxx @@ -27,6 +27,7 @@ #include #include +#include namespace frm { @@ -54,9 +55,9 @@ namespace } } -OGroupCompAcc::OGroupCompAcc(const Reference& rxElement, const OGroupComp& _rGroupComp ) +OGroupCompAcc::OGroupCompAcc(const Reference& rxElement, OGroupComp _aGroupComp ) :m_xComponent( rxElement ) - ,m_aGroupComp( _rGroupComp ) + ,m_aGroupComp(std::move( _aGroupComp )) { } @@ -118,8 +119,8 @@ public: } }; -OGroup::OGroup( const OUString& rGroupName ) -:m_aGroupName( rGroupName ) +OGroup::OGroup( OUString sGroupName ) +:m_aGroupName(std::move( sGroupName )) ,m_nInsertPos(0) { } diff --git a/forms/source/component/GroupManager.hxx b/forms/source/component/GroupManager.hxx index 9365d1b44ea8..4cefd7ac3a12 100644 --- a/forms/source/component/GroupManager.hxx +++ b/forms/source/component/GroupManager.hxx @@ -114,7 +114,7 @@ class OGroupCompAcc friend class OGroupCompAccLess; public: -OGroupCompAcc(const css::uno::Reference< css::beans::XPropertySet>& rxElement, const OGroupComp& _rGroupComp ); +OGroupCompAcc(const css::uno::Reference< css::beans::XPropertySet>& rxElement, OGroupComp _aGroupComp );
[Libreoffice-commits] core.git: forms/source
forms/source/component/Button.cxx|2 - forms/source/component/Columns.cxx |4 +- forms/source/component/ComboBox.cxx | 22 ++--- forms/source/component/Currency.cxx |4 +- forms/source/component/DatabaseForm.cxx | 44 +-- forms/source/component/Date.cxx |2 - forms/source/component/Edit.cxx | 12 +++ forms/source/component/EditBase.cxx |4 +- forms/source/component/File.cxx |4 +- forms/source/component/Filter.cxx| 12 +++ forms/source/component/FormComponent.cxx | 14 forms/source/component/FormattedField.cxx| 16 - forms/source/component/Grid.cxx |2 - forms/source/component/ImageControl.cxx | 20 ++-- forms/source/component/ListBox.cxx | 22 ++--- forms/source/component/Pattern.cxx |5 +-- forms/source/component/RadioButton.cxx |4 +- forms/source/component/cachedrowset.cxx |6 +-- forms/source/component/clickableimage.cxx|6 +-- forms/source/component/formcontrolfont.cxx |6 +-- forms/source/component/refvaluecomponent.cxx |4 +- forms/source/component/scrollbar.cxx |4 +- forms/source/component/spinbutton.cxx|2 - forms/source/misc/InterfaceContainer.cxx | 16 - forms/source/runtime/formoperations.cxx | 25 +++ forms/source/solar/control/navtoolbar.cxx|4 +- forms/source/xforms/NameContainer.hxx|2 - forms/source/xforms/binding.cxx |3 - forms/source/xforms/collection.hxx | 14 forms/source/xforms/convert.cxx |7 +--- forms/source/xforms/datatyperepository.cxx |3 - forms/source/xforms/datatypes.cxx|7 +--- forms/source/xforms/model_ui.cxx |4 +- forms/source/xforms/namedcollection.hxx |2 - forms/source/xforms/propertysetbase.hxx |2 - forms/source/xforms/submission.cxx |4 +- forms/source/xforms/submission/replace.cxx |4 +- 37 files changed, 156 insertions(+), 162 deletions(-) New commits: commit efdf328a7147582d21da43966ed8afef2394d812 Author: Stephan Bergmann AuthorDate: Wed May 4 10:11:48 2022 +0200 Commit: Stephan Bergmann CommitDate: Wed May 4 12:11:29 2022 +0200 Just use Any ctor instead of makeAny in forms Change-Id: I25183cc06728c81e45b28fd41071c15abf05bbc1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133809 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/forms/source/component/Button.cxx b/forms/source/component/Button.cxx index c3597da7d070..3c08b6524763 100644 --- a/forms/source/component/Button.cxx +++ b/forms/source/component/Button.cxx @@ -715,7 +715,7 @@ void OButtonControl::featureStateChanged( sal_Int16 _nFeatureId, bool _bEnabled // enable or disable our peer, according to the new state Reference< XVclWindowPeer > xPeer( getPeer(), UNO_QUERY ); if ( xPeer.is() ) -xPeer->setProperty( PROPERTY_ENABLED, makeAny( m_bEnabledByPropertyValue && _bEnabled ) ); +xPeer->setProperty( PROPERTY_ENABLED, Any( m_bEnabledByPropertyValue && _bEnabled ) ); // if we're disabled according to our model's property, then // we don't care for the feature state, but *are* disabled. // If the model's property states that we're enabled, then we *do* diff --git a/forms/source/component/Columns.cxx b/forms/source/component/Columns.cxx index 3453b15169ed..7ab2e08019b4 100644 --- a/forms/source/component/Columns.cxx +++ b/forms/source/component/Columns.cxx @@ -189,7 +189,7 @@ Any SAL_CALL OGridColumn::queryAggregation( const Type& _rType ) OGridColumn::OGridColumn( const Reference& _rContext, const OUString& _sModelName ) :OGridColumn_BASE(m_aMutex) ,OPropertySetAggregationHelper(OGridColumn_BASE::rBHelper) -,m_aHidden( makeAny( false ) ) +,m_aHidden( Any( false ) ) ,m_aModelName(_sModelName) { @@ -443,7 +443,7 @@ Any OGridColumn::getPropertyDefaultByHandle( sal_Int32 nHandle ) const case PROPERTY_ID_ALIGN: return Any(); case PROPERTY_ID_HIDDEN: -return makeAny(false); +return Any(false); default: return OPropertySetAggregationHelper::getPropertyDefaultByHandle(nHandle); } diff --git a/forms/source/component/ComboBox.cxx b/forms/source/component/ComboBox.cxx index 7bf52797a98a..d38c16abc489 100644 --- a/forms/source/component/ComboBox.cxx +++ b/forms/source/component/ComboBox.cxx @@ -444,8 +444,8 @@ void SAL_CALL OComboBoxModel::read(const Reference& && !hasExternalListSource() ) { -setFastPropertyValue( PROPERTY_ID_STRINGITEMLIST, makeAny( css::uno::Sequence() ) ); -setFastPropertyValue( PROPERTY
[Libreoffice-commits] core.git: forms/source
forms/source/component/DatabaseForm.cxx | 29 + forms/source/component/clickableimage.cxx |5 + 2 files changed, 14 insertions(+), 20 deletions(-) New commits: commit 6dcd73f505eca7d0ea3164855dd4cd0813b4 Author: Julien Nabet AuthorDate: Sun Feb 6 21:47:14 2022 +0100 Commit: Julien Nabet CommitDate: Mon Feb 7 07:56:16 2022 +0100 Simplify sequence of PropertyValue in forms Change-Id: Iab1af5c8d8d824ef2a4be471395f174cadabfc1e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129583 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx index 6ba5a380ee9c..e22acf270fb5 100644 --- a/forms/source/component/DatabaseForm.cxx +++ b/forms/source/component/DatabaseForm.cxx @@ -29,6 +29,7 @@ #include "GroupManager.hxx" #include #include +#include #include #include @@ -2103,9 +2104,6 @@ static void lcl_dispatch(const Reference< XFrame >& xFrame,const Reference aArgs(2); -aArgs.getArray()[0].Name = "Referer"; -aArgs.getArray()[0].Value <<= aReferer; // build a sequence from the to-be-submitted string OString a8BitData(OUStringToOString(aData, _eEncoding)); @@ -2113,8 +2111,11 @@ static void lcl_dispatch(const Reference< XFrame >& xFrame,const Reference aPostData(reinterpret_cast(a8BitData.getStr()), a8BitData.getLength()); Reference< XInputStream > xPostData = new SequenceInputStream(aPostData); -aArgs.getArray()[1].Name = "PostData"; -aArgs.getArray()[1].Value <<= xPostData; +Sequence aArgs +{ +comphelper::makePropertyValue("Referer", aReferer), +comphelper::makePropertyValue("PostData", xPostData) +}; xDisp->dispatch(aURL, aArgs); } @@ -2193,9 +2194,7 @@ void ODatabaseForm::submit_impl(const Reference& Control, const css::a if (xDisp.is()) { -Sequence aArgs(1); -aArgs.getArray()->Name = "Referer"; -aArgs.getArray()->Value <<= aReferer; +Sequence aArgs { comphelper::makePropertyValue("Referer", aReferer) }; xDisp->dispatch(aURL, aArgs); } } @@ -2226,17 +2225,15 @@ void ODatabaseForm::submit_impl(const Reference& Control, const css::a if (!aData.hasElements()) return; -Sequence aArgs(3); -aArgs.getArray()[0].Name = "Referer"; -aArgs.getArray()[0].Value <<= aReferer; -aArgs.getArray()[1].Name = "ContentType"; -aArgs.getArray()[1].Value <<= aContentType; - // build a sequence from the to-be-submitted string Reference< XInputStream > xPostData = new SequenceInputStream(aData); -aArgs.getArray()[2].Name = "PostData"; -aArgs.getArray()[2].Value <<= xPostData; +Sequence aArgs +{ +comphelper::makePropertyValue("Referer", aReferer), +comphelper::makePropertyValue("ContentType", aContentType), +comphelper::makePropertyValue("PostData", xPostData) +}; xDisp->dispatch(aURL, aArgs); } diff --git a/forms/source/component/clickableimage.cxx b/forms/source/component/clickableimage.cxx index c84ba34cfb95..6a1ec1120192 100644 --- a/forms/source/component/clickableimage.cxx +++ b/forms/source/component/clickableimage.cxx @@ -301,10 +301,7 @@ namespace frm FrameSearchFlag::SELF | FrameSearchFlag::PARENT | FrameSearchFlag::SIBLINGS | FrameSearchFlag::CREATE ); -Sequence aArgs(1); -PropertyValue& rProp = aArgs.getArray()[0]; -rProp.Name = "Referer"; -rProp.Value <<= xModel->getURL(); +Sequence aArgs { comphelper::makePropertyValue("Referer", xModel->getURL()) }; if (xDisp.is()) xDisp->dispatch( aURL, aArgs );
[Libreoffice-commits] core.git: forms/source
forms/source/richtext/richtextcontrol.cxx | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) New commits: commit b0b2d7f040c6a7c5dc1f3949693b368ca54ea3b5 Author: Caolán McNamara AuthorDate: Sat Dec 18 10:32:59 2021 + Commit: Caolán McNamara CommitDate: Sat Dec 18 16:01:16 2021 +0100 cid#1495784 Missing move assignment operator Change-Id: If9211cbfa326992f2fbbc321f5bf21804de091ad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127026 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/forms/source/richtext/richtextcontrol.cxx b/forms/source/richtext/richtextcontrol.cxx index bc3dbfe6002b..85da65cb0824 100644 --- a/forms/source/richtext/richtextcontrol.cxx +++ b/forms/source/richtext/richtextcontrol.cxx @@ -239,13 +239,10 @@ namespace frm Sequence< Reference< XDispatch > > SAL_CALL ORichTextControl::queryDispatches( const Sequence< DispatchDescriptor >& _rRequests ) { -Sequence< Reference< XDispatch > > aReturn; -Reference< XDispatchProvider > xTypedPeer( getPeer(), UNO_QUERY ); -if ( xTypedPeer.is() ) -{ -aReturn = xTypedPeer->queryDispatches( _rRequests ); -} -return aReturn; +Reference xTypedPeer(getPeer(), UNO_QUERY); +if (xTypedPeer.is()) +return xTypedPeer->queryDispatches(_rRequests); +return Sequence>(); } bool ORichTextControl::requiresNewPeer( const OUString& _rPropertyName ) const
[Libreoffice-commits] core.git: forms/source include/toolkit svx/source toolkit/source
forms/source/component/Filter.cxx |8 include/toolkit/awt/vclxwindow.hxx |8 +--- include/toolkit/helper/listenermultiplexer.hxx | 24 +--- include/toolkit/helper/macros.hxx | 16 +++- svx/source/inc/gridcell.hxx|1 + toolkit/source/awt/vclxcontainer.cxx |2 +- toolkit/source/awt/vclxwindow.cxx |5 ++--- toolkit/source/controls/tree/treecontrol.cxx |8 toolkit/source/helper/listenermultiplexer.cxx | 25 +++-- 9 files changed, 44 insertions(+), 53 deletions(-) New commits: commit b2aa646ef09dc8434d3ca8a5bba53a8d8ff3f910 Author: Caolán McNamara AuthorDate: Wed Dec 15 11:43:32 2021 + Commit: Caolán McNamara CommitDate: Thu Dec 16 16:34:29 2021 +0100 use more OInterfaceContainerHelper3 in toolkit Change-Id: I3861a254d660662cbf575e9669cbacba36634856 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126855 Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara diff --git a/forms/source/component/Filter.cxx b/forms/source/component/Filter.cxx index 7fc70280e696..38ed0b7ada01 100644 --- a/forms/source/component/Filter.cxx +++ b/forms/source/component/Filter.cxx @@ -357,9 +357,9 @@ namespace frm m_aText = sText; TextEvent aEvt; aEvt.Source = *this; -::comphelper::OInterfaceIteratorHelper2 aIt( m_aTextListeners ); +::comphelper::OInterfaceIteratorHelper3 aIt(m_aTextListeners); while( aIt.hasMoreElements() ) -static_cast(aIt.next())->textChanged( aEvt ); +aIt.next()->textChanged(aEvt); } #endif } @@ -532,9 +532,9 @@ namespace frm setText(aNewText); TextEvent aEvt; aEvt.Source = *this; -::comphelper::OInterfaceIteratorHelper2 aIt( m_aTextListeners ); +::comphelper::OInterfaceIteratorHelper3 aIt(m_aTextListeners); while( aIt.hasMoreElements() ) -static_cast< XTextListener* >( aIt.next() )->textChanged( aEvt ); +aIt.next()->textChanged(aEvt); } #endif return true; diff --git a/include/toolkit/awt/vclxwindow.hxx b/include/toolkit/awt/vclxwindow.hxx index 9acc4a636a7a..9f3226ee6add 100644 --- a/include/toolkit/awt/vclxwindow.hxx +++ b/include/toolkit/awt/vclxwindow.hxx @@ -42,8 +42,10 @@ #include #include -namespace comphelper { class OInterfaceContainerHelper2; } +namespace comphelper { template class OInterfaceContainerHelper3; } namespace com::sun::star::accessibility { class XAccessibleContext; } +namespace com::sun::star::awt { class XTopWindowListener; } +namespace com::sun::star::awt { class XVclContainerListener; } namespace vcl { class Window; } class VclWindowEvent; @@ -97,8 +99,8 @@ protected: bool bWithDefaults = false ); virtual voidGetPropertyIds( std::vector< sal_uInt16 > &aIds ); -::comphelper::OInterfaceContainerHelper2& GetContainerListeners(); -::comphelper::OInterfaceContainerHelper2& GetTopWindowListeners(); +::comphelper::OInterfaceContainerHelper3& GetContainerListeners(); +::comphelper::OInterfaceContainerHelper3& GetTopWindowListeners(); public: typedef ::std::function Callback; diff --git a/include/toolkit/helper/listenermultiplexer.hxx b/include/toolkit/helper/listenermultiplexer.hxx index d1fb0215f6c9..45267944c40e 100644 --- a/include/toolkit/helper/listenermultiplexer.hxx +++ b/include/toolkit/helper/listenermultiplexer.hxx @@ -42,8 +42,9 @@ #include #include #include +#include #include -#include +#include #include #include #include @@ -51,9 +52,9 @@ // class ListenerMultiplexerBase - +template class UNLESS_MERGELIBS(TOOLKIT_DLLPUBLIC) ListenerMultiplexerBase : public MutexHelper, -public ::comphelper::OInterfaceContainerHelper2, +public ::comphelper::OInterfaceContainerHelper3, public css::uno::XInterface { private: @@ -63,16 +64,25 @@ protected: ::cppu::OWeakObject&GetContext() { return mrContext; } public: -ListenerMultiplexerBase( ::cppu::OWeakObject& rSource ); -virtual ~ListenerMultiplexerBase(); +ListenerMultiplexerBase( ::cppu::OWeakObject& rSource ) +: ::comphelper::OInterfaceContainerHelper3(GetMutex()), mrContext(rSource) +{ +} + +virtual ~ListenerMultiplexerBase() +{ +} // css::uno::XInterface -css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override; +css::uno::Any SAL_CALL queryInterface(const css::uno::Type & rType) override +{ +return ::cppu::queryInterface(rType, static_cast(this)); +} + voidSAL_CALL acquire() noexcept override { mrContex
[Libreoffice-commits] core.git: forms/source
forms/source/component/Button.cxx |4 +-- forms/source/component/DatabaseForm.cxx | 33 +- forms/source/component/DatabaseForm.hxx |9 +++ forms/source/component/Edit.hxx |3 +- forms/source/component/File.cxx |4 +-- forms/source/component/File.hxx |3 +- forms/source/component/FormComponent.cxx |4 +-- forms/source/component/Grid.cxx |4 +-- forms/source/component/Grid.hxx |7 +++-- forms/source/component/ImageControl.hxx |3 +- forms/source/component/ListBox.hxx|5 ++- forms/source/component/clickableimage.cxx |5 +-- forms/source/component/clickableimage.hxx |9 --- forms/source/component/entrylisthelper.hxx|4 +-- forms/source/component/errorbroadcaster.cxx |5 +-- forms/source/component/errorbroadcaster.hxx |4 +-- forms/source/helper/resettable.cxx|4 +-- forms/source/inc/FormComponent.hxx|7 +++-- forms/source/inc/InterfaceContainer.hxx |4 +-- forms/source/inc/resettable.hxx |4 +-- forms/source/misc/InterfaceContainer.cxx |2 - forms/source/richtext/attributedispatcher.cxx |4 +-- forms/source/richtext/featuredispatcher.cxx |4 +-- forms/source/richtext/featuredispatcher.hxx |6 ++-- forms/source/richtext/richtextmodel.hxx |4 +-- 25 files changed, 73 insertions(+), 72 deletions(-) New commits: commit 9f18e327a1a51316ea5bc9f3997d83f657032226 Author: Noel Grandin AuthorDate: Sat Nov 27 21:59:47 2021 +0200 Commit: Noel Grandin CommitDate: Sun Nov 28 11:40:17 2021 +0100 use more OInterfaceContainerHelper3 in forms Change-Id: Ie4a6124beccb55c983b8d4f63c86ec5f2869e9c5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125956 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/forms/source/component/Button.cxx b/forms/source/component/Button.cxx index 8b913ac7a0c3..6ab64ec1798c 100644 --- a/forms/source/component/Button.cxx +++ b/forms/source/component/Button.cxx @@ -460,7 +460,7 @@ IMPL_LINK_NOARG(OButtonControl, OnClick, void*, void) if (FormButtonType_PUSH == *o3tl::doAccess(xSet->getPropertyValue(PROPERTY_BUTTONTYPE))) { // notify the action listeners for a push button -::comphelper::OInterfaceIteratorHelper2 aIter(m_aActionListeners); +::comphelper::OInterfaceIteratorHelper3 aIter(m_aActionListeners); ActionEvent aEvt(static_cast(this), m_aActionCommand); while(aIter.hasMoreElements() ) { @@ -469,7 +469,7 @@ IMPL_LINK_NOARG(OButtonControl, OnClick, void*, void) // to get notified try { -static_cast< XActionListener* >( aIter.next() )->actionPerformed(aEvt); +aIter.next()->actionPerformed(aEvt); } #ifdef DBG_UTIL catch( const RuntimeException& ) diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx index 60b35a8b5959..c9281843326c 100644 --- a/forms/source/component/DatabaseForm.cxx +++ b/forms/source/component/DatabaseForm.cxx @@ -2116,12 +2116,12 @@ static void lcl_dispatch(const Reference< XFrame >& xFrame,const Reference& Control, const css::awt::MouseEvent& MouseEvt) { -::comphelper::OInterfaceIteratorHelper2 aIter(m_aSubmitListeners); +::comphelper::OInterfaceIteratorHelper3 aIter(m_aSubmitListeners); EventObject aEvt(static_cast(this)); bool bCanceled = false; while (aIter.hasMoreElements() && !bCanceled) { -if (!static_cast(aIter.next())->approveSubmit(aEvt)) +if (!aIter.next()->approveSubmit(aEvt)) bCanceled = true; } @@ -2924,11 +2924,11 @@ void ODatabaseForm::reload_impl(bool bMoveToFirst, const Reference< XInteraction // the approval is done by the aggregate if (!m_aRowSetApproveListeners.getLength()) { -::comphelper::OInterfaceIteratorHelper2 aIter(m_aLoadListeners); +::comphelper::OInterfaceIteratorHelper3 aIter(m_aLoadListeners); aGuard.clear(); while (aIter.hasMoreElements()) -static_cast(aIter.next())->reloading(aEvent); +aIter.next()->reloading(aEvent); aGuard.reset(); } @@ -2947,10 +2947,10 @@ void ODatabaseForm::reload_impl(bool bMoveToFirst, const Reference< XInteraction if (bSuccess) { -::comphelper::OInterfaceIteratorHelper2 aIter(m_aLoadListeners); +::comphelper::OInterfaceIteratorHelper3 aIter(m_aLoadListeners); aGuard.clear(); while (aIter.hasMoreElements()) -static_cast(aIter.next())->reloaded(aEvent); +aIter.next()->reloaded(aEvent); // if we are on the insert row, w
[Libreoffice-commits] core.git: forms/source
forms/source/component/FormComponent.cxx |2 forms/source/helper/urltransformer.cxx |1 forms/source/inc/frm_strings.hxx | 516 +++ forms/source/inc/services.hxx| 310 +- 4 files changed, 411 insertions(+), 418 deletions(-) New commits: commit ed355acf3f7bff30494f1936563fecb9008aa4be Author: Noel Grandin AuthorDate: Wed Nov 24 13:28:55 2021 +0200 Commit: Noel Grandin CommitDate: Thu Nov 25 12:04:56 2021 +0100 loplugin:stringliteraldefine in forms Change-Id: Ia26f0c767030db0361758d2be37f01d30c7e1df9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125763 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/forms/source/component/FormComponent.cxx b/forms/source/component/FormComponent.cxx index d9aa7941b007..41a61c5cba09 100644 --- a/forms/source/component/FormComponent.cxx +++ b/forms/source/component/FormComponent.cxx @@ -1949,7 +1949,7 @@ void OBoundControlModel::connectToField(const Reference& rForm) } else { -SAL_WARN("forms.component", "OBoundControlModel::connectToField: property " PROPERTY_VALUE " not supported!"); +SAL_WARN("forms.component", "OBoundControlModel::connectToField: property " << PROPERTY_VALUE << " not supported!"); impl_setField_noNotify( nullptr ); } diff --git a/forms/source/helper/urltransformer.cxx b/forms/source/helper/urltransformer.cxx index 8f7394b96ca4..e112041c2256 100644 --- a/forms/source/helper/urltransformer.cxx +++ b/forms/source/helper/urltransformer.cxx @@ -77,7 +77,6 @@ namespace frm m_xTransformer->parseSmart( _rURL, _rProtocol ); } - } // namespace frm diff --git a/forms/source/inc/frm_strings.hxx b/forms/source/inc/frm_strings.hxx index d0558f80b450..8a1889701165 100644 --- a/forms/source/inc/frm_strings.hxx +++ b/forms/source/inc/frm_strings.hxx @@ -19,279 +19,273 @@ #pragma once +#include -namespace frm -{ +//- properties +inline constexpr OUStringLiteral PROPERTY_TABINDEX = u"TabIndex"; +inline constexpr OUStringLiteral PROPERTY_TAG = u"Tag"; +inline constexpr OUStringLiteral PROPERTY_NAME = u"Name"; +inline constexpr OUStringLiteral PROPERTY_GROUP_NAME = u"GroupName"; +inline constexpr OUStringLiteral PROPERTY_CLASSID = u"ClassId"; +inline constexpr OUStringLiteral PROPERTY_FETCHSIZE = u"FetchSize"; +inline constexpr OUStringLiteral PROPERTY_VALUE = u"Value"; +inline constexpr OUStringLiteral PROPERTY_TEXT = u"Text"; +inline constexpr OUStringLiteral PROPERTY_LABEL = u"Label"; +#define PROPERTY_CANINSERT"CanInsert" +#define PROPERTY_CANUPDATE"CanUpdate" +#define PROPERTY_CANDELETE"CanDelete" +inline constexpr OUStringLiteral PROPERTY_NAVIGATION = u"NavigationBarMode"; +inline constexpr OUStringLiteral PROPERTY_HASNAVIGATION = u"HasNavigationBar"; +inline constexpr OUStringLiteral PROPERTY_CYCLE = u"Cycle"; +inline constexpr OUStringLiteral PROPERTY_CONTROLSOURCE = u"DataField"; +inline constexpr OUStringLiteral PROPERTY_ENABLED = u"Enabled"; +inline constexpr OUStringLiteral PROPERTY_ENABLEVISIBLE = u"EnableVisible"; +inline constexpr OUStringLiteral PROPERTY_READONLY = u"ReadOnly"; +inline constexpr OUStringLiteral PROPERTY_RELEVANT = u"Relevant"; +inline constexpr OUStringLiteral PROPERTY_ISREADONLY = u"IsReadOnly"; +inline constexpr OUStringLiteral PROPERTY_FILTER = u"Filter"; +inline constexpr OUStringLiteral PROPERTY_HAVINGCLAUSE = u"HavingClause"; +inline constexpr OUStringLiteral PROPERTY_WIDTH = u"Width"; +inline constexpr OUStringLiteral PROPERTY_SEARCHABLE = u"IsSearchable"; +inline constexpr OUStringLiteral PROPERTY_MULTILINE = u"MultiLine"; +inline constexpr OUStringLiteral PROPERTY_TARGET_URL = u"TargetURL"; +inline constexpr OUStringLiteral PROPERTY_TARGET_FRAME = u"TargetFrame"; +inline constexpr OUStringLiteral PROPERTY_DEFAULTCONTROL = u"DefaultControl"; +inline constexpr OUStringLiteral PROPERTY_MAXTEXTLEN = u"MaxTextLen"; +inline constexpr OUStringLiteral PROPERTY_EDITMASK = u"EditMask"; +inline constexpr OUStringLiteral PROPERTY_SIZE = u"Size"; +inline constexpr OUStringLiteral PROPERTY_SPIN = u"Spin"; +inline constexpr OUStringLiteral PROPERTY_DATE = u"Date"; +inline constexpr OUStringLiteral PROPERTY_TIME = u"Time"; +inline constexpr OUStringLiteral PROPERTY_STATE = u"State"; +inline constexpr OUStringLiteral PROPERTY_TRISTATE = u"TriState"; +inline constexpr OUStringLiteral PROPERTY_HIDDEN_VALUE = u"HiddenValue"; +inline constexpr OUStringLiteral PROPERTY_BUTTONTYPE = u"ButtonType"; +inline constexpr OUStringLiteral PROPERTY_STRINGITEMLIST = u"StringItemList"; +inline constexpr OUStringLiteral PROPERTY_TYPEDITEMLIST = u"TypedItemList"; +inline constexpr OUStringLiteral PROPERTY_DEFAULT_TEXT = u"DefaultText"; +inline constexpr OUStringLiteral PROPERTY_DEFAULT_STATE = u"DefaultState"; +inline constexpr OUStringLiteral PROPER
[Libreoffice-commits] core.git: forms/source
forms/source/component/clickableimage.cxx |2 +- forms/source/helper/urltransformer.cxx|4 ++-- forms/source/inc/urltransformer.hxx |4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) New commits: commit e29d89545eb4c714e6e7c82dbfb780097ee6745d Author: Noel Grandin AuthorDate: Mon Nov 22 14:46:30 2021 +0200 Commit: Noel Grandin CommitDate: Mon Nov 22 17:37:58 2021 +0100 improve method naming Change-Id: I9a45839f6566caf41ccee2f8d149b4d0c60c3503 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125663 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/forms/source/component/clickableimage.cxx b/forms/source/component/clickableimage.cxx index 77dd6c5943b6..808f05e6e1ce 100644 --- a/forms/source/component/clickableimage.cxx +++ b/forms/source/component/clickableimage.cxx @@ -293,7 +293,7 @@ namespace frm xSet->getPropertyValue(PROPERTY_DISPATCHURLINTERNAL) >>= bDispatchUrlInternal; if ( bDispatchUrlInternal ) { - m_pFeatureInterception->getTransformer().parseSmartWithAsciiProtocol( aURL, INET_FILE_SCHEME ); + m_pFeatureInterception->getTransformer().parseSmartWithProtocol( aURL, INET_FILE_SCHEME ); OUString aTargetFrame; xSet->getPropertyValue(PROPERTY_TARGET_FRAME) >>= aTargetFrame; diff --git a/forms/source/helper/urltransformer.cxx b/forms/source/helper/urltransformer.cxx index d166a85f6c39..8f7394b96ca4 100644 --- a/forms/source/helper/urltransformer.cxx +++ b/forms/source/helper/urltransformer.cxx @@ -71,10 +71,10 @@ namespace frm } -void UrlTransformer::parseSmartWithAsciiProtocol( css::util::URL& _rURL, const OUString& _rAsciiURL ) const +void UrlTransformer::parseSmartWithProtocol( css::util::URL& _rURL, const OUString& _rProtocol ) const { if ( implEnsureTransformer() ) -m_xTransformer->parseSmart( _rURL, _rAsciiURL ); +m_xTransformer->parseSmart( _rURL, _rProtocol ); } diff --git a/forms/source/inc/urltransformer.hxx b/forms/source/inc/urltransformer.hxx index 191313c431b5..3cfe225945bb 100644 --- a/forms/source/inc/urltransformer.hxx +++ b/forms/source/inc/urltransformer.hxx @@ -49,10 +49,10 @@ namespace frm css::util::URL getStrictURLFromAscii( const char* _pAsciiURL ) const; -/** parses a given URL smartly, with a protocol given by ASCII string +/** parses a given URL smartly, with a given protocol */ void -parseSmartWithAsciiProtocol( css::util::URL& _rURL, const OUString& _rAsciiURL ) const; +parseSmartWithProtocol( css::util::URL& _rURL, const OUString& _rProtocol ) const; private: /** ensures that we have a URLTransformer instance in m_xTransformer
[Libreoffice-commits] core.git: forms/source
forms/source/solar/component/navbarcontrol.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit ae22b5c49c1c0c56cea2022c2979568b7fa4871e Author: Julien Nabet AuthorDate: Wed Nov 17 18:25:38 2021 +0100 Commit: Julien Nabet CommitDate: Wed Nov 17 21:45:29 2021 +0100 tdf#145731: fix crash closing document Regression from: https://cgit.freedesktop.org/libreoffice/core/commit/?id=73334560b2dd2d60ac58d2cc2b1a5295490b03e1 author Julien Nabet 2021-11-07 15:40:37 +0100 committer Julien Nabet 2021-11-07 21:58:53 +0100 commit 73334560b2dd2d60ac58d2cc2b1a5295490b03e1 (patch) treeb5bc4f69dd8ed455c78ea05ab1c5e2f3c25b909e parent 6be03ac71e0d4927612b4a57ead3d0b245c29c77 (diff) Replace some macros in forms part 16 Thank you Xisco for having spotted it! Change-Id: Ie0eb2a7e0e9f4c4fc12b83a233553a8713d6a6f2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125420 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/forms/source/solar/component/navbarcontrol.cxx b/forms/source/solar/component/navbarcontrol.cxx index ce70d2336c22..082a670faa4d 100644 --- a/forms/source/solar/component/navbarcontrol.cxx +++ b/forms/source/solar/component/navbarcontrol.cxx @@ -180,7 +180,7 @@ namespace frm Reference< XDispatchProviderInterception > xTypedPeer(getPeer(), UNO_QUERY); if (xTypedPeer.is()) { -xTypedPeer->registerDispatchProviderInterceptor(_rxInterceptor); +xTypedPeer->releaseDispatchProviderInterceptor(_rxInterceptor); } }
[Libreoffice-commits] core.git: forms/source
forms/source/component/ComboBox.cxx|4 - forms/source/component/DatabaseForm.cxx| 20 +++ forms/source/component/Filter.cxx |2 forms/source/component/FormComponent.cxx |8 +- forms/source/component/ImageControl.cxx|6 +- forms/source/component/ListBox.cxx |4 - forms/source/inc/frm_resource.hxx |2 forms/source/misc/InterfaceContainer.cxx |6 +- forms/source/runtime/formoperations.cxx| 12 ++-- forms/source/solar/control/navtoolbar.cxx |2 forms/source/xforms/binding.cxx| 30 +- forms/source/xforms/datatyperepository.cxx | 26 - forms/source/xforms/model.cxx | 10 +-- forms/source/xforms/model_ui.cxx | 81 + forms/source/xforms/propertysetbase.hxx|5 - forms/source/xforms/submission.cxx | 32 +-- 16 files changed, 129 insertions(+), 121 deletions(-) New commits: commit 01878ce321dbbffbc877fbe9eb399dec95f99755 Author: Julien Nabet AuthorDate: Sun Nov 7 23:07:18 2021 +0100 Commit: Julien Nabet CommitDate: Mon Nov 8 07:04:47 2021 +0100 Replace some macros in forms part 17 Remove FRM_RES_STRING + PROP + PROPERTY_FLAGS Change-Id: I11befedbe83ad9d7c3f3f4d689230ffe422c0770 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124830 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/forms/source/component/ComboBox.cxx b/forms/source/component/ComboBox.cxx index 4e59c99ed503..d43903bfea35 100644 --- a/forms/source/component/ComboBox.cxx +++ b/forms/source/component/ComboBox.cxx @@ -584,7 +584,7 @@ void OComboBoxModel::loadData( bool _bForce ) } catch(const SQLException& eSQL) { -onError(eSQL, FRM_RES_STRING(RID_BASELISTBOX_ERROR_FILLLIST)); +onError(eSQL, ResourceManager::loadString(RID_BASELISTBOX_ERROR_FILLLIST)); return; } catch( const Exception& ) @@ -652,7 +652,7 @@ void OComboBoxModel::loadData( bool _bForce ) } catch(const SQLException& eSQL) { -onError(eSQL, FRM_RES_STRING(RID_BASELISTBOX_ERROR_FILLLIST)); +onError(eSQL, ResourceManager::loadString(RID_BASELISTBOX_ERROR_FILLLIST)); return; } catch( const Exception& ) diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx index 5319b9ef05c0..60b35a8b5959 100644 --- a/forms/source/component/DatabaseForm.cxx +++ b/forms/source/component/DatabaseForm.cxx @@ -1151,7 +1151,7 @@ bool ODatabaseForm::executeRowSet(::osl::ResettableMutexGuard& _rClearForNotifie if (!m_sCurrentErrorContext.isEmpty()) onError(eDb, m_sCurrentErrorContext); else -onError(eDb, FRM_RES_STRING(RID_STR_READERROR)); +onError(eDb, ResourceManager::loadString(RID_STR_READERROR)); _rClearForNotifies.reset(); restoreInsertOnlyState( ); @@ -1193,7 +1193,7 @@ bool ODatabaseForm::executeRowSet(::osl::ResettableMutexGuard& _rClearForNotifie if (!m_sCurrentErrorContext.isEmpty()) onError(eDB, m_sCurrentErrorContext); else -onError(eDB, FRM_RES_STRING(RID_STR_READERROR)); +onError(eDB, ResourceManager::loadString(RID_STR_READERROR)); _rClearForNotifies.reset(); bSuccess = false; } @@ -2795,7 +2795,7 @@ bool ODatabaseForm::implEnsureConnection() } catch(const SQLException& eDB) { -onError(eDB, FRM_RES_STRING(RID_STR_CONNECTERROR)); +onError(eDB, ResourceManager::loadString(RID_STR_CONNECTERROR)); } catch(const Exception&) { @@ -2836,7 +2836,7 @@ void ODatabaseForm::load_impl(bool bCausedByParentForm, bool bMoveToFirst, const bool bSuccess = false; if (bExecute) { -m_sCurrentErrorContext = FRM_RES_STRING(RID_ERR_LOADING_FORM); +m_sCurrentErrorContext = ResourceManager::loadString(RID_ERR_LOADING_FORM); bSuccess = executeRowSet(aGuard, bMoveToFirst, _rxCompletionHandler); } @@ -2937,7 +2937,7 @@ void ODatabaseForm::reload_impl(bool bMoveToFirst, const Reference< XInteraction bool bSuccess = true; try { -m_sCurrentErrorContext = FRM_RES_STRING(RID_ERR_REFRESHING_FORM); +m_sCurrentErrorContext = ResourceManager::loadString(RID_ERR_REFRESHING_FORM); bSuccess = executeRowSet(aGuard, bMoveToFirst, _rxCompletionHandler); } catch(const SQLException&) @@ -3432,7 +3432,7 @@ void SAL_CALL ODatabaseForm::insertRow() } catch(const SQLException& eDb) { -onError(eDb, FRM_RES_STRING(RID_STR_ERR_INSERTRECORD)); +onError(eDb, ResourceManager::loadString(RID_STR_ERR_INSERTRECORD)); throw; } } @@ -3452,7 +3452,7 @@ void SAL_CALL ODatabaseForm::updateRow() } catch(const SQLException& eDb) { -onErr
[Libreoffice-commits] core.git: forms/source
forms/source/component/Button.cxx |8 forms/source/component/Button.hxx |9 forms/source/component/CheckBox.cxx|8 forms/source/component/CheckBox.hxx|9 forms/source/component/ComboBox.cxx|7 forms/source/component/ComboBox.hxx|9 forms/source/component/Currency.cxx|8 forms/source/component/Currency.hxx|9 forms/source/component/Date.cxx|7 forms/source/component/Date.hxx| 10 forms/source/component/Edit.cxx|7 forms/source/component/Edit.hxx|9 forms/source/component/EditBase.hxx|7 forms/source/component/File.cxx|7 forms/source/component/File.hxx|9 forms/source/component/FixedText.cxx |7 forms/source/component/FixedText.hxx |9 forms/source/component/FormattedField.cxx |7 forms/source/component/FormattedField.hxx |9 forms/source/component/Grid.hxx|9 forms/source/component/GroupBox.cxx|7 forms/source/component/GroupBox.hxx|9 forms/source/component/Hidden.cxx |7 forms/source/component/Hidden.hxx |9 forms/source/component/ImageButton.cxx |7 forms/source/component/ImageButton.hxx |9 forms/source/component/ImageControl.cxx|7 forms/source/component/ImageControl.hxx|9 forms/source/component/ListBox.cxx |7 forms/source/component/ListBox.hxx |9 forms/source/component/Numeric.cxx |7 forms/source/component/Numeric.hxx |9 forms/source/component/Pattern.cxx |7 forms/source/component/Pattern.hxx |9 forms/source/component/RadioButton.cxx |7 forms/source/component/RadioButton.hxx |9 forms/source/component/Time.cxx|7 forms/source/component/Time.hxx|9 forms/source/component/clickableimage.hxx |7 forms/source/component/navigationbar.cxx |7 forms/source/component/navigationbar.hxx |9 forms/source/component/refvaluecomponent.hxx |6 forms/source/component/scrollbar.cxx |7 forms/source/component/scrollbar.hxx |9 forms/source/component/spinbutton.cxx |7 forms/source/component/spinbutton.hxx |9 forms/source/inc/FormComponent.hxx | 28 -- forms/source/misc/property.cxx | 321 - forms/source/richtext/richtextmodel.cxx|7 forms/source/richtext/richtextmodel.hxx|9 forms/source/solar/component/navbarcontrol.cxx | 25 + forms/source/xforms/binding.cxx| 19 - forms/source/xforms/convert.cxx| 40 --- forms/source/xforms/datatypes.hxx | 90 --- 54 files changed, 582 insertions(+), 326 deletions(-) New commits: commit 73334560b2dd2d60ac58d2cc2b1a5295490b03e1 Author: Julien Nabet AuthorDate: Sun Nov 7 15:40:37 2021 +0100 Commit: Julien Nabet CommitDate: Sun Nov 7 21:58:53 2021 +0100 Replace some macros in forms part 16 Remove DEFAULT_DECLARE_SUBTYPE + EXCEPT + EXPAND_PROP_INIT + DECLARE_DEFAULT_CLONE_CTOR + DECLARE_DEFAULT_LEAF_XTOR + FORWARD_TO_PEER_1 + IMPLEMENT_DEFAULT_CLONING + ADD_ENTRY (include removing: /home/julien/lo/libreoffice/forms/source/xforms/convert.cxx:56:14: error: unused function 'lcl_toXSD_bool' [-Werror,-Wunused-function] OUString lcl_toXSD_bool( const Any& rAny ) ^ /home/julien/lo/libreoffice/forms/source/xforms/convert.cxx:60:9: error: unused function 'lcl_toAny_bool' [-Werror,-Wunused-function] Any lcl_toAny_bool( const OUString& rStr ) ^ /home/julien/lo/libreoffice/forms/source/xforms/convert.cxx:67:14: error: unused function 'lcl_toXSD_double' [-Werror,-Wunused-function] OUString lcl_toXSD_double( const Any& rAny ) ^ /home/julien/lo/libreoffice/forms/source/xforms/convert.cxx:80:9: error: unused function 'lcl_toAny_double' [-Werror,-Wunused-function] Any lcl_toAny_double( const OUString& rString ) ^ ) Change-Id: I1e6923922b7037e8d1e9d009b05a27111c94b6fa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124827 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/forms/source/component/Button.cxx b/forms/source/component/Button.cxx index 3b58ea317303..8b913ac7a0c3 100644 --- a/forms/source/component/Button.cxx +++ b/forms/source/component/Button.cxx @@ -115,7 +115,13 @@ void OButtonModel::describeFixedProperties( Sequence< Property >& _rProps ) cons } -IMPLEMENT_DEFAULT_CLONING( OButtonModel ) +css::uno::Reference< css::util::XCloneabl
[Libreoffice-commits] core.git: forms/source
forms/source/component/navigationbar.cxx | 11 +--- forms/source/xforms/binding.cxx| 68 -- forms/source/xforms/datatyperepository.cxx | 75 + forms/source/xforms/datatypes.cxx | 18 +- forms/source/xforms/datatypes.hxx |4 - forms/source/xforms/model.cxx | 28 -- forms/source/xforms/propertysetbase.hxx|2 forms/source/xforms/submission.cxx | 71 ++- 8 files changed, 174 insertions(+), 103 deletions(-) New commits: commit f63cf9e83a944306ad8564e4ce9b98f92fae666e Author: Julien Nabet AuthorDate: Sun Nov 7 12:53:24 2021 +0100 Commit: Julien Nabet CommitDate: Sun Nov 7 15:29:02 2021 +0100 Replace some macros in forms part 15 Remove REGISTER_VOID_PROP + REGISTER_BOOL_PROPERTY_RO + REGISTER_PROPERTY_RO + REGISTER_PROPERTY + PROPERTY_RO + PROPERTY + REGISTER_PROPERTY_BOOL + REGISTER_BOOL_PROPERTY + REGISTER_PROPERTY_API Change-Id: Ia38d75e89aafc5788bc143aae864eac9ad5bb86d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124815 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/forms/source/component/navigationbar.cxx b/forms/source/component/navigationbar.cxx index 788bd1223425..12491dc975a8 100644 --- a/forms/source/component/navigationbar.cxx +++ b/forms/source/component/navigationbar.cxx @@ -44,10 +44,6 @@ namespace frm namespace WritingMode2 = ::com::sun::star::text::WritingMode2; -#define REGISTER_VOID_PROP( prop, memberAny, type ) \ -registerMayBeVoidProperty( PROPERTY_##prop, PROPERTY_ID_##prop, PropertyAttribute::BOUND | PropertyAttribute::MAYBEDEFAULT | PropertyAttribute::MAYBEVOID, \ -&memberAny, cppu::UnoType::get() ); - ONavigationBarModel::ONavigationBarModel( const Reference< XComponentContext >& _rxFactory ) :OControlModel( _rxFactory, OUString() ) ,FontControlModel( true ) @@ -129,8 +125,11 @@ namespace frm registerProperty( PROPERTY_CONTEXT_WRITING_MODE, PROPERTY_ID_CONTEXT_WRITING_MODE, PropertyAttribute::BOUND | PropertyAttribute::MAYBEDEFAULT | PropertyAttribute::TRANSIENT, &m_nContextWritingMode, cppu::UnoType::get() ); -REGISTER_VOID_PROP( TABSTOP, m_aTabStop, sal_Bool ); -REGISTER_VOID_PROP( BACKGROUNDCOLOR, m_aBackgroundColor, sal_Int32 ); +registerMayBeVoidProperty( PROPERTY_TABSTOP, PROPERTY_ID_TABSTOP, PropertyAttribute::BOUND | PropertyAttribute::MAYBEDEFAULT | PropertyAttribute::MAYBEVOID, +&m_aTabStop, cppu::UnoType::get() ); + +registerMayBeVoidProperty( PROPERTY_BACKGROUNDCOLOR, PROPERTY_ID_BACKGROUNDCOLOR, PropertyAttribute::BOUND | PropertyAttribute::MAYBEDEFAULT | PropertyAttribute::MAYBEVOID, +&m_aBackgroundColor, cppu::UnoType::get() ); } diff --git a/forms/source/xforms/binding.cxx b/forms/source/xforms/binding.cxx index 6d8735f6366c..0f176ddabc8f 100644 --- a/forms/source/xforms/binding.cxx +++ b/forms/source/xforms/binding.cxx @@ -1191,36 +1191,52 @@ css::uno::Reference SAL_CALL Binding::createClone() // property set implementations +void Binding::initializePropertySet() +{ +registerProperty( PROPERTY_FLAGS( BindingID, OUString, css::beans::PropertyAttribute::BOUND ), +new DirectPropertyAccessor< Binding, OUString >(this, &Binding::setBindingID, &Binding::getBindingID)); -#define REGISTER_PROPERTY( property, type ) \ -registerProperty( PROPERTY( property, type ), \ -new DirectPropertyAccessor< Binding, type >( this, &Binding::set##property, &Binding::get##property ) ); +registerProperty( PROPERTY_FLAGS( BindingExpression, OUString, css::beans::PropertyAttribute::BOUND ), +new DirectPropertyAccessor< Binding, OUString >(this, &Binding::setBindingExpression, &Binding::getBindingExpression)); -#define REGISTER_PROPERTY_RO( property, type ) \ -registerProperty( PROPERTY_RO( property, type ), \ -new DirectPropertyAccessor< Binding, type >( this, nullptr, &Binding::get##property ) ); +registerProperty( PROPERTY_FLAGS( Model, css::uno::Reference, css::beans::PropertyAttribute::BOUND | css::beans::PropertyAttribute::READONLY ), +new DirectPropertyAccessor< Binding, css::uno::Reference >(this, nullptr, &Binding::getModel)); -#define REGISTER_BOOL_PROPERTY_RO( property ) \ -registerProperty( PROPERTY_RO( property, sal_Bool ), \ -new BooleanPropertyAccessor< Binding >( this, nullptr, &Binding::get##property ) ); +registerProperty( PROPERTY_FLAGS( BindingNamespaces, css::uno::Reference, css::beans::PropertyAttribute::BOUND ), +new DirectPropertyAccessor< Binding, css::uno::Reference >(this, &Binding::setBindingNamespaces, &Binding::getBindingNamespaces)); -void Binding::initializePropertySet() -{ -REGISTER_PROPERTY( BindingID,OUString ); -REGISTER_PROPERTY( Bi
[Libreoffice-commits] core.git: forms/source
forms/source/xforms/datatypes.cxx | 93 +++--- 1 file changed, 48 insertions(+), 45 deletions(-) New commits: commit 39e1d23982c1f080da79d4a46056ae6dc49888a5 Author: Julien Nabet AuthorDate: Sun Nov 7 11:20:12 2021 +0100 Commit: Julien Nabet CommitDate: Sun Nov 7 12:47:17 2021 +0100 Replace some macros in forms part 14 Remove DEFAULT_IMPLEMNENT_SUBTYPE + SET_PROPERTY Change-Id: Ic1ab69076017eeb58cefb3dbecd385f1b862c031 Change-Id: I91230d25e8eb11c6c0dd6cec920c6bd5ec958bb3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124808 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/forms/source/xforms/datatypes.cxx b/forms/source/xforms/datatypes.cxx index ae7b9d79ca71..1f934937364a 100644 --- a/forms/source/xforms/datatypes.cxx +++ b/forms/source/xforms/datatypes.cxx @@ -102,11 +102,6 @@ namespace xforms IMPLEMENT_FORWARD_XTYPEPROVIDER2( OXSDDataType, OXSDDataType_Base, ::comphelper::OPropertyContainer ) -#define SET_PROPERTY( propertyid, value, member ) \ -setFastPropertyValue( PROPERTY_ID_##propertyid, makeAny( value ) ); \ -SAL_WARN_IF( member != value, "forms.misc", "OXSDDataType::setFoo: inconsistency!" ); - - OUString SAL_CALL OXSDDataType::getName( ) { return m_sName; @@ -116,7 +111,8 @@ namespace xforms void SAL_CALL OXSDDataType::setName( const OUString& aName ) { // TODO: check the name for conflicts in the repository -SET_PROPERTY( NAME, aName, m_sName ); +setFastPropertyValue( PROPERTY_ID_NAME, makeAny(aName) ); +SAL_WARN_IF( m_sName != aName, "forms.misc", "OXSDDataType::setName: inconsistency!" ); } @@ -128,7 +124,8 @@ namespace xforms void SAL_CALL OXSDDataType::setPattern( const OUString& _pattern ) { -SET_PROPERTY( XSD_PATTERN, _pattern, m_sPattern ); +setFastPropertyValue( PROPERTY_ID_XSD_PATTERN, makeAny(_pattern) ); +SAL_WARN_IF( m_sPattern != _pattern, "forms.misc", "OXSDDataType::setPattern: inconsistency!" ); } @@ -140,7 +137,8 @@ namespace xforms void SAL_CALL OXSDDataType::setWhiteSpaceTreatment( sal_Int16 _whitespacetreatment ) { -SET_PROPERTY( XSD_WHITESPACE, _whitespacetreatment, m_nWST ); +setFastPropertyValue( PROPERTY_ID_XSD_WHITESPACE, makeAny(_whitespacetreatment) ); +SAL_WARN_IF( m_nWST != _whitespacetreatment, "forms.misc", "OXSDDataType::setWhiteSpaceTreatment: inconsistency!" ); } @@ -478,7 +476,7 @@ namespace xforms { return new OStringType( _rName, getTypeClass() ); } -void OStringType::initializeClone( const OXSDDataType& _rCloneSource ) \ +void OStringType::initializeClone( const OXSDDataType& _rCloneSource ) { OStringType_Base::initializeClone( _rCloneSource ); initializeTypedClone( static_cast< const OStringType& >( _rCloneSource ) ); @@ -611,7 +609,7 @@ namespace xforms { return new ODecimalType( _rName, getTypeClass() ); } -void ODecimalType::initializeClone( const OXSDDataType& _rCloneSource ) \ +void ODecimalType::initializeClone( const OXSDDataType& _rCloneSource ) { ODecimalType_Base::initializeClone( _rCloneSource ); initializeTypedClone( static_cast< const ODecimalType& >( _rCloneSource ) ); @@ -703,36 +701,25 @@ namespace xforms } -//= - -#define DEFAULT_IMPLEMNENT_SUBTYPE( classname, typeclass ) \ -classname::classname( const OUString& _rName ) \ -:classname##_Base( _rName, DataTypeClass::typeclass ) \ -{ \ -} \ -rtl::Reference classname::createClone( const OUString& _rName ) const \ -{ \ -return new classname( _rName ); \ -} \ -void classname::initializeClone( const OXSDDataType& _rCloneSource ) \ -{ \ - classname##_Base::initializeClone( _rCloneSource );\ -initializeTypedClone( static_cast< const classname& >( _rCloneSource ) ); \ -} \ - - -//= ODateType - - -DEFAULT_IMPLEMNENT_SUBTYPE( ODateType, DATE ) - +ODateType::ODateType(const OUString& _rName) +:ODateType_Base(_rName, DataTypeClass::DATE) +{ +} +rtl::Reference ODateType::createClone(const OUString& _rName) const +{ +return new ODateType(_rName); +} +void ODateType::initializeClone( const OXSDDataType& _rCloneSource ) +{ +ODateType_Base::initializeClone(_rCloneSource); +initializeTypedClone(static_cast< const ODateType& >(_rCloneSource)); +} TranslateId ODateType::_validate( const OUString& _rValue ) { return ODateType_Base::_validate( _rValue ); } - bool ODateType::_getV
[Libreoffice-commits] core.git: forms/source
forms/source/component/scrollbar.hxx |4 ++- forms/source/component/spinbutton.hxx |4 ++- forms/source/inc/FormComponent.hxx|6 - forms/source/xforms/datatypes.cxx | 35 +++--- forms/source/xforms/datatypes.hxx | 30 + 5 files changed, 44 insertions(+), 35 deletions(-) New commits: commit a061223af8946a9ddb6d52f62c912f892356 Author: Julien Nabet AuthorDate: Sun Nov 7 10:25:04 2021 +0100 Commit: Julien Nabet CommitDate: Sun Nov 7 11:17:48 2021 +0100 Replace some macros in forms part 13 Remove DECLARE_DEFAULT_CLONING + IMPLEMENT_DEFAULT_TYPED_CLONING + DECLARE_XPERSISTOBJECT Change-Id: Ib874cadcfd30c3ac9e2d12036482868c19a2d98b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124807 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/forms/source/component/scrollbar.hxx b/forms/source/component/scrollbar.hxx index 356d101be40e..574faaff38c7 100644 --- a/forms/source/component/scrollbar.hxx +++ b/forms/source/component/scrollbar.hxx @@ -39,7 +39,9 @@ namespace frm virtual ::css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override; // XPersistObject -DECLARE_XPERSISTOBJECT() +virtual OUString SAL_CALL getServiceName() override; +virtual void SAL_CALL write(const css::uno::Reference< css::io::XObjectOutputStream>& _rxOutStream) override; +virtual void SAL_CALL read(const css::uno::Reference< css::io::XObjectInputStream>& _rxInStream) override; // XCloneable virtual css::uno::Reference< css::util::XCloneable > SAL_CALL createClone( ) override; diff --git a/forms/source/component/spinbutton.hxx b/forms/source/component/spinbutton.hxx index 2579c322d733..debbfc72d286 100644 --- a/forms/source/component/spinbutton.hxx +++ b/forms/source/component/spinbutton.hxx @@ -40,7 +40,9 @@ namespace frm virtual ::css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override; // XPersistObject -DECLARE_XPERSISTOBJECT() +virtual OUString SAL_CALL getServiceName() override; +virtual void SAL_CALL write(const css::uno::Reference< css::io::XObjectOutputStream>& _rxOutStream) override; +virtual void SAL_CALL read(const css::uno::Reference< css::io::XObjectInputStream>& _rxInStream) override; // XCloneable virtual css::uno::Reference< css::util::XCloneable > SAL_CALL createClone( ) override; diff --git a/forms/source/inc/FormComponent.hxx b/forms/source/inc/FormComponent.hxx index 0310e3455a02..8d1f97154cce 100644 --- a/forms/source/inc/FormComponent.hxx +++ b/forms/source/inc/FormComponent.hxx @@ -70,12 +70,6 @@ namespace frm // default tab index for components const sal_Int16 FRM_DEFAULT_TABINDEX = 0; -// macros for quickly declaring/implementing XServiceInfo -#define DECLARE_XPERSISTOBJECT() \ -virtual OUString SAL_CALL getServiceName() override;\ -virtual void SAL_CALL write(const css::uno::Reference< css::io::XObjectOutputStream>& _rxOutStream) override;\ -virtual void SAL_CALL read(const css::uno::Reference< css::io::XObjectInputStream>& _rxInStream) override; - class OControlModel; diff --git a/forms/source/xforms/datatypes.cxx b/forms/source/xforms/datatypes.cxx index 464b1c1adbbf..ae7b9d79ca71 100644 --- a/forms/source/xforms/datatypes.cxx +++ b/forms/source/xforms/datatypes.cxx @@ -474,7 +474,16 @@ namespace xforms } -IMPLEMENT_DEFAULT_TYPED_CLONING( OStringType, OStringType_Base ) +rtl::Reference OStringType::createClone( const OUString& _rName ) const +{ +return new OStringType( _rName, getTypeClass() ); +} +void OStringType::initializeClone( const OXSDDataType& _rCloneSource ) \ +{ +OStringType_Base::initializeClone( _rCloneSource ); +initializeTypedClone( static_cast< const OStringType& >( _rCloneSource ) ); +} + void OStringType::initializeTypedClone( const OStringType& _rCloneSource ) @@ -598,9 +607,15 @@ namespace xforms { } - -IMPLEMENT_DEFAULT_TYPED_CLONING( ODecimalType, ODecimalType_Base ) - +rtl::Reference ODecimalType::createClone( const OUString& _rName ) const +{ +return new ODecimalType( _rName, getTypeClass() ); +} +void ODecimalType::initializeClone( const OXSDDataType& _rCloneSource ) \ +{ +ODecimalType_Base::initializeClone( _rCloneSource ); +initializeTypedClone( static_cast< const ODecimalType& >( _rCloneSource ) ); +} void ODecimalType::initializeTypedClone( const ODecimalType& _rCloneSource ) { @@ -860,9 +875,15 @@ namespace xforms { } - -IMPLEMENT_DEFAULT_TYPED_CLONING( OShortIntegerType, OShortIntegerType_Base ) - +rtl::Reference OShortIntegerType::createClone( const OUString& _rName ) const +{ +return new OShortIntegerType( _
[Libreoffice-commits] core.git: forms/source
forms/source/component/Columns.cxx | 347 +++-- forms/source/component/Columns.hxx | 35 --- 2 files changed, 337 insertions(+), 45 deletions(-) New commits: commit 278f91d9611dfe21fa03ee348aaab2bb1b6f5e3c Author: Julien Nabet AuthorDate: Sat Nov 6 12:44:27 2021 +0100 Commit: Julien Nabet CommitDate: Sat Nov 6 17:09:12 2021 +0100 Replace some macros in forms part 12 Remove IMPL_COLUMN Change-Id: I7446b1146853c7a3b0820a681793e0146921da0b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124791 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/forms/source/component/Columns.cxx b/forms/source/component/Columns.cxx index ee1ec4440be3..190af02c15c0 100644 --- a/forms/source/component/Columns.cxx +++ b/forms/source/component/Columns.cxx @@ -553,18 +553,345 @@ void OGridColumn::read(const Reference& _rxInStream) } } +TextFieldColumn::TextFieldColumn(const css::uno::Reference& _rContext) +:OGridColumn(_rContext, FRM_SUN_COMPONENT_TEXTFIELD) +{ +} +TextFieldColumn::TextFieldColumn(const TextFieldColumn* _pCloneFrom) +:OGridColumn( _pCloneFrom ) +{ +} +css::uno::Reference< css::beans::XPropertySetInfo> TextFieldColumn::getPropertySetInfo() +{ +css::uno::Reference< css::beans::XPropertySetInfo> xInfo( createPropertySetInfo( getInfoHelper() ) ); +return xInfo; +} +::cppu::IPropertyArrayHelper& TextFieldColumn::getInfoHelper() +{ +return *getArrayHelper(); +} +void TextFieldColumn::fillProperties( +css::uno::Sequence< css::beans::Property >& /* [out] */ _rProps, +css::uno::Sequence< css::beans::Property >& /* [out] */ _rAggregateProps +) const +{ +if (m_xAggregateSet.is()) +{ +_rAggregateProps = m_xAggregateSet->getPropertySetInfo()->getProperties(); +clearAggregateProperties(_rAggregateProps, false); +setOwnProperties(_rProps); +} +} +rtl::Reference TextFieldColumn::createCloneColumn() const +{ +return new TextFieldColumn(this); +} + +PatternFieldColumn::PatternFieldColumn(const css::uno::Reference& _rContext) +:OGridColumn(_rContext, FRM_SUN_COMPONENT_PATTERNFIELD) +{ +} +PatternFieldColumn::PatternFieldColumn(const PatternFieldColumn* _pCloneFrom) +:OGridColumn( _pCloneFrom ) +{ +} +css::uno::Reference< css::beans::XPropertySetInfo> PatternFieldColumn::getPropertySetInfo() +{ +css::uno::Reference< css::beans::XPropertySetInfo> xInfo( createPropertySetInfo( getInfoHelper() ) ); +return xInfo; +} +::cppu::IPropertyArrayHelper& PatternFieldColumn::getInfoHelper() +{ +return *getArrayHelper(); +} +void PatternFieldColumn::fillProperties( +css::uno::Sequence< css::beans::Property >& /* [out] */ _rProps, +css::uno::Sequence< css::beans::Property >& /* [out] */ _rAggregateProps +) const +{ +if (m_xAggregateSet.is()) +{ +_rAggregateProps = m_xAggregateSet->getPropertySetInfo()->getProperties(); +clearAggregateProperties(_rAggregateProps, false); +setOwnProperties(_rProps); +} +} +rtl::Reference PatternFieldColumn::createCloneColumn() const +{ +return new PatternFieldColumn(this); +} + +DateFieldColumn::DateFieldColumn(const css::uno::Reference& _rContext) +:OGridColumn(_rContext, FRM_SUN_COMPONENT_DATEFIELD) +{ +} +DateFieldColumn::DateFieldColumn(const DateFieldColumn* _pCloneFrom) +:OGridColumn( _pCloneFrom ) +{ +} +css::uno::Reference< css::beans::XPropertySetInfo> DateFieldColumn::getPropertySetInfo() +{ +css::uno::Reference< css::beans::XPropertySetInfo> xInfo( createPropertySetInfo( getInfoHelper() ) ); +return xInfo; +} +::cppu::IPropertyArrayHelper& DateFieldColumn::getInfoHelper() +{ +return *getArrayHelper(); +} +void DateFieldColumn::fillProperties( +css::uno::Sequence< css::beans::Property >& /* [out] */ _rProps, +css::uno::Sequence< css::beans::Property >& /* [out] */ _rAggregateProps +) const +{ +if (m_xAggregateSet.is()) +{ +_rAggregateProps = m_xAggregateSet->getPropertySetInfo()->getProperties(); +clearAggregateProperties(_rAggregateProps, true); +setOwnProperties(_rProps); +} +} +rtl::Reference DateFieldColumn::createCloneColumn() const +{ +return new DateFieldColumn(this); +} -IMPL_COLUMN(TextFieldColumn,FRM_SUN_COMPONENT_TEXTFIELD,false); -IMPL_COLUMN(PatternFieldColumn, FRM_SUN_COMPONENT_PATTERNFIELD, false); -IMPL_COLUMN(DateFieldColumn,FRM_SUN_COMPONENT_DATEFIELD,true); -IMPL_COLUMN(TimeFieldColumn,FRM_SUN_COMPONENT_TIMEFIELD,false); -IMPL_COLUMN(NumericFieldColumn, FRM_SUN_COMPONENT_NUMERICFIELD, false); -IMPL_COLUMN(CurrencyFieldColumn,FRM_SUN_COMPONENT_CURRENCYFIELD,false); -IMPL_COLUMN(CheckBoxColumn, FRM_SUN_COMPONENT
[Libreoffice-commits] core.git: forms/source
forms/source/component/Columns.hxx | 220 +++-- 1 file changed, 189 insertions(+), 31 deletions(-) New commits: commit 91131f92dcead3c5c08fe720af8d9a9cd187bb39 Author: Julien Nabet AuthorDate: Sat Nov 6 11:02:15 2021 +0100 Commit: Julien Nabet CommitDate: Sat Nov 6 11:55:36 2021 +0100 Replace some macros in forms part 11 Remove DECL_COLUMN Change-Id: Ie7533f8a52e7365215fbd878385f2bed0113b5aa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124788 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/forms/source/component/Columns.hxx b/forms/source/component/Columns.hxx index 2f2bb3e846be..99359f286c94 100644 --- a/forms/source/component/Columns.hxx +++ b/forms/source/component/Columns.hxx @@ -110,27 +110,6 @@ protected: virtual rtl::Reference createCloneColumn() const = 0; }; -#define DECL_COLUMN(ClassName) \ -class ClassName \ -:public OGridColumn \ -,public OAggregationArrayUsageHelper< ClassName > \ -{ \ -public: \ -explicit ClassName(const css::uno::Reference& _rContext );\ -explicit ClassName(const ClassName* _pCloneFrom); \ - \ -virtual css::uno::Reference< css::beans::XPropertySetInfo> SAL_CALL getPropertySetInfo() override; \ -virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override; \ - \ -virtual void fillProperties( \ -css::uno::Sequence< css::beans::Property >& /* [out] */ _rProps, \ -css::uno::Sequence< css::beans::Property >& /* [out] */ _rAggregateProps \ -) const override; \ - \ -virtual rtl::Reference createCloneColumn() const override; \ -}; - - #define IMPL_COLUMN(ClassName, Model, bAllowDropDown) \ ClassName::ClassName( const css::uno::Reference& _rContext ) \ :OGridColumn(_rContext, Model) \ @@ -183,16 +162,195 @@ const css::uno::Sequence& getColumnTypes(); sal_Int32 getColumnTypeByModelName(const OUString& aModelName); // Columns -DECL_COLUMN(TextFieldColumn) -DECL_COLUMN(PatternFieldColumn) -DECL_COLUMN(DateFieldColumn) -DECL_COLUMN(TimeFieldColumn) -DECL_COLUMN(NumericFieldColumn) -DECL_COLUMN(CurrencyFieldColumn) -DECL_COLUMN(CheckBoxColumn) -DECL_COLUMN(ComboBoxColumn) -DECL_COLUMN(ListBoxColumn) -DECL_COLUMN(FormattedFieldColumn) +class TextFieldColumn +:public OGridColumn +,public OAggregationArrayUsageHelper< TextFieldColumn > +{ +public: +explicit TextFieldColumn(const css::uno::Reference& _rContext ); +explicit TextFieldColumn(const TextFieldColumn* _pCloneFrom); + +virtual css::uno::Reference< css::beans::XPropertySetInfo> SAL_CALL getPropertySetInfo() override; +virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override; + +virtual void fillProperties( +css::uno::Sequence< css::beans::Property >& /* [out] */ _rProps, +css::uno::Sequence< css::beans::Property >& /* [out] */ _rAggregateProps +) const override; + +virtual rtl::Reference createCloneColumn() const override; +}; + +class PatternFieldColumn +:public OGridColumn +,public OAggregationArrayUsageHelper< PatternFieldColumn > +{ +public: +explicit PatternFieldColumn(const css::uno::Reference& _rContext ); +explicit PatternFieldColumn(const PatternFieldColumn* _pCloneFrom); + +virtual css::uno::Reference< css::beans::XPropertySetInfo> SAL_CALL getPropertySetInfo() override; +virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override; + +virtual void fillProperties( +css::uno::Sequence< css::beans::Property >& /* [out] */ _rProps, +css::uno::Sequence< css::beans::Property >& /* [out] */ _rAggregateProps +) const override; + +virtual rtl::Reference createClone
[Libreoffice-commits] core.git: forms/source
forms/source/component/Button.cxx| 12 ++-- forms/source/component/CheckBox.cxx |2 forms/source/component/Columns.cxx |8 +- forms/source/component/ComboBox.cxx | 12 ++-- forms/source/component/Currency.cxx |4 - forms/source/component/DatabaseForm.cxx | 32 +-- forms/source/component/Date.cxx |6 +- forms/source/component/Edit.cxx |6 +- forms/source/component/File.cxx |4 - forms/source/component/FormComponent.cxx | 16 ++--- forms/source/component/FormattedField.cxx|2 forms/source/component/Grid.cxx | 74 +-- forms/source/component/Hidden.cxx|8 +- forms/source/component/ImageButton.cxx | 10 +-- forms/source/component/ImageControl.cxx |4 - forms/source/component/ListBox.cxx | 20 +++ forms/source/component/Numeric.cxx |4 - forms/source/component/Pattern.cxx |6 +- forms/source/component/RadioButton.cxx |2 forms/source/component/Time.cxx |6 +- forms/source/component/formcontrolfont.cxx | 38 ++--- forms/source/component/navigationbar.cxx |2 forms/source/component/refvaluecomponent.cxx |6 +- forms/source/component/scrollbar.cxx |6 +- forms/source/component/spinbutton.cxx|6 +- forms/source/inc/property.hxx|4 - forms/source/richtext/richtextmodel.cxx |2 27 files changed, 149 insertions(+), 153 deletions(-) New commits: commit 40a5ba66a8b92898d4a933064b9eab4267388f45 Author: Julien Nabet AuthorDate: Sat Nov 6 09:02:16 2021 +0100 Commit: Julien Nabet CommitDate: Sat Nov 6 10:49:45 2021 +0100 Replace some macros in forms part 10 Remove DECL_PROP_IMPL Change-Id: I4ba5e3252058b137cd314f0aed0caf60bb347852 Change-Id: Icfda67a31f465ebfe0c13761bdbdf9b024605dc5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124785 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/forms/source/component/Button.cxx b/forms/source/component/Button.cxx index dd8344cb9586..3b58ea317303 100644 --- a/forms/source/component/Button.cxx +++ b/forms/source/component/Button.cxx @@ -105,12 +105,12 @@ void OButtonModel::describeFixedProperties( Sequence< Property >& _rProps ) cons sal_Int32 nOldCount = _rProps.getLength(); _rProps.realloc( nOldCount + 6); css::beans::Property* pProperties = _rProps.getArray() + nOldCount; -DECL_PROP_IMPL(BUTTONTYPE, FormButtonType) css::beans::PropertyAttribute::BOUND); -DECL_PROP_IMPL(DEFAULT_STATE, sal_Int16) css::beans::PropertyAttribute::BOUND); -DECL_PROP_IMPL(DISPATCHURLINTERNAL, sal_Bool) css::beans::PropertyAttribute::BOUND); -DECL_PROP_IMPL(TARGET_URL, OUString) css::beans::PropertyAttribute::BOUND); -DECL_PROP_IMPL(TARGET_FRAME, OUString) css::beans::PropertyAttribute::BOUND); -DECL_PROP_IMPL(TABINDEX, sal_Int16) css::beans::PropertyAttribute::BOUND); +*pProperties++ = css::beans::Property(PROPERTY_BUTTONTYPE, PROPERTY_ID_BUTTONTYPE, cppu::UnoType::get(), css::beans::PropertyAttribute::BOUND); +*pProperties++ = css::beans::Property(PROPERTY_DEFAULT_STATE, PROPERTY_ID_DEFAULT_STATE, cppu::UnoType::get(), css::beans::PropertyAttribute::BOUND); +*pProperties++ = css::beans::Property(PROPERTY_DISPATCHURLINTERNAL, PROPERTY_ID_DISPATCHURLINTERNAL, cppu::UnoType::get(), css::beans::PropertyAttribute::BOUND); +*pProperties++ = css::beans::Property(PROPERTY_TARGET_URL, PROPERTY_ID_TARGET_URL, cppu::UnoType::get(), css::beans::PropertyAttribute::BOUND); +*pProperties++ = css::beans::Property(PROPERTY_TARGET_FRAME, PROPERTY_ID_TARGET_FRAME, cppu::UnoType::get(), css::beans::PropertyAttribute::BOUND); +*pProperties++ = css::beans::Property(PROPERTY_TABINDEX, PROPERTY_ID_TABINDEX, cppu::UnoType::get(), css::beans::PropertyAttribute::BOUND); DBG_ASSERT( pProperties == _rProps.getArray() + _rProps.getLength(), "<...>::describeFixedProperties/getInfoHelper: forgot to adjust the count ?"); } diff --git a/forms/source/component/CheckBox.cxx b/forms/source/component/CheckBox.cxx index cc9f618be124..8b34ba18af66 100644 --- a/forms/source/component/CheckBox.cxx +++ b/forms/source/component/CheckBox.cxx @@ -113,7 +113,7 @@ void OCheckBoxModel::describeFixedProperties( Sequence< Property >& _rProps ) co sal_Int32 nOldCount = _rProps.getLength(); _rProps.realloc( nOldCount + 1); css::beans::Property* pProperties = _rProps.getArray() + nOldCount; -DECL_PROP_IMPL(TABINDEX, sal_Int16) css::beans::PropertyAttribute::BOUND); +*pProperties++ = css::beans::Property(PROPERTY_TABINDEX, PROPERTY_ID_TABINDEX, cppu::UnoType::get(), css::beans::PropertyAttribute::BOUND); DBG_ASSERT( pProperties == _rProps.getArray() + _rProps.getLength(), "<...>::
[Libreoffice-commits] core.git: forms/source
forms/source/component/Button.cxx| 12 +- forms/source/component/CheckBox.cxx |2 - forms/source/component/Columns.cxx |4 +-- forms/source/component/ComboBox.cxx | 12 +- forms/source/component/Currency.cxx |2 - forms/source/component/DatabaseForm.cxx | 16 ++--- forms/source/component/Date.cxx |4 +-- forms/source/component/Edit.cxx |2 - forms/source/component/File.cxx |4 +-- forms/source/component/FormComponent.cxx | 12 +- forms/source/component/FormattedField.cxx|2 - forms/source/component/Grid.cxx | 32 +-- forms/source/component/Hidden.cxx|6 ++--- forms/source/component/ImageButton.cxx | 10 forms/source/component/ImageControl.cxx |4 +-- forms/source/component/ListBox.cxx | 12 +- forms/source/component/Numeric.cxx |2 - forms/source/component/Pattern.cxx |2 - forms/source/component/RadioButton.cxx |2 - forms/source/component/Time.cxx |4 +-- forms/source/component/formcontrolfont.cxx | 28 +++ forms/source/component/refvaluecomponent.cxx |6 ++--- forms/source/component/scrollbar.cxx |4 +-- forms/source/component/spinbutton.cxx|4 +-- forms/source/inc/property.hxx|3 -- 25 files changed, 94 insertions(+), 97 deletions(-) New commits: commit b4c4ca39d7cd4cc59e01bceeb31dc75097b67acb Author: Julien Nabet AuthorDate: Fri Nov 5 23:48:35 2021 +0100 Commit: Julien Nabet CommitDate: Sat Nov 6 08:13:40 2021 +0100 Replace some macros in forms part 9 Change-Id: I3bd6e118455c8ce86650797e05b7e40ca066eb53 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124784 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/forms/source/component/Button.cxx b/forms/source/component/Button.cxx index 23b05370c380..dd8344cb9586 100644 --- a/forms/source/component/Button.cxx +++ b/forms/source/component/Button.cxx @@ -105,12 +105,12 @@ void OButtonModel::describeFixedProperties( Sequence< Property >& _rProps ) cons sal_Int32 nOldCount = _rProps.getLength(); _rProps.realloc( nOldCount + 6); css::beans::Property* pProperties = _rProps.getArray() + nOldCount; -DECL_PROP1( BUTTONTYPE, FormButtonType, BOUND ); -DECL_PROP1( DEFAULT_STATE, sal_Int16, BOUND ); -DECL_PROP1( DISPATCHURLINTERNAL,sal_Bool, BOUND ); -DECL_PROP1( TARGET_URL, OUString,BOUND ); -DECL_PROP1( TARGET_FRAME, OUString,BOUND ); -DECL_PROP1( TABINDEX, sal_Int16, BOUND ); +DECL_PROP_IMPL(BUTTONTYPE, FormButtonType) css::beans::PropertyAttribute::BOUND); +DECL_PROP_IMPL(DEFAULT_STATE, sal_Int16) css::beans::PropertyAttribute::BOUND); +DECL_PROP_IMPL(DISPATCHURLINTERNAL, sal_Bool) css::beans::PropertyAttribute::BOUND); +DECL_PROP_IMPL(TARGET_URL, OUString) css::beans::PropertyAttribute::BOUND); +DECL_PROP_IMPL(TARGET_FRAME, OUString) css::beans::PropertyAttribute::BOUND); +DECL_PROP_IMPL(TABINDEX, sal_Int16) css::beans::PropertyAttribute::BOUND); DBG_ASSERT( pProperties == _rProps.getArray() + _rProps.getLength(), "<...>::describeFixedProperties/getInfoHelper: forgot to adjust the count ?"); } diff --git a/forms/source/component/CheckBox.cxx b/forms/source/component/CheckBox.cxx index 033f6013d4ab..cc9f618be124 100644 --- a/forms/source/component/CheckBox.cxx +++ b/forms/source/component/CheckBox.cxx @@ -113,7 +113,7 @@ void OCheckBoxModel::describeFixedProperties( Sequence< Property >& _rProps ) co sal_Int32 nOldCount = _rProps.getLength(); _rProps.realloc( nOldCount + 1); css::beans::Property* pProperties = _rProps.getArray() + nOldCount; -DECL_PROP1(TABINDEX,sal_Int16, BOUND); +DECL_PROP_IMPL(TABINDEX, sal_Int16) css::beans::PropertyAttribute::BOUND); DBG_ASSERT( pProperties == _rProps.getArray() + _rProps.getLength(), "<...>::describeFixedProperties/getInfoHelper: forgot to adjust the count ?"); } diff --git a/forms/source/component/Columns.cxx b/forms/source/component/Columns.cxx index bdea1e4009ae..cab7d72ff52b 100644 --- a/forms/source/component/Columns.cxx +++ b/forms/source/component/Columns.cxx @@ -345,12 +345,12 @@ void OGridColumn::setOwnProperties(Sequence& aDescriptor) { aDescriptor.realloc(5); Property* pProperties = aDescriptor.getArray(); -DECL_PROP1(LABEL, OUString,BOUND); +DECL_PROP_IMPL(LABEL, OUString) css::beans::PropertyAttribute::BOUND); DECL_PROP_IMPL(WIDTH, sal_Int32) css::beans::PropertyAttribute::BOUND | css::beans::P
[Libreoffice-commits] core.git: forms/source
forms/source/component/Button.cxx|5 - forms/source/component/CheckBox.cxx |5 - forms/source/component/ComboBox.cxx |5 - forms/source/component/Currency.cxx |5 - forms/source/component/Date.cxx |5 - forms/source/component/Edit.cxx |5 - forms/source/component/File.cxx |5 - forms/source/component/FormComponent.cxx |5 - forms/source/component/FormattedField.cxx|5 - forms/source/component/ImageButton.cxx |5 - forms/source/component/ImageControl.cxx |5 - forms/source/component/ListBox.cxx |5 - forms/source/component/Numeric.cxx |5 - forms/source/component/Pattern.cxx |5 - forms/source/component/RadioButton.cxx |5 - forms/source/component/Time.cxx |5 - forms/source/component/navigationbar.cxx |5 - forms/source/component/refvaluecomponent.cxx |5 - forms/source/component/scrollbar.cxx |5 - forms/source/component/spinbutton.cxx|5 - forms/source/inc/property.hxx|8 forms/source/richtext/richtextmodel.cxx |5 - 22 files changed, 84 insertions(+), 29 deletions(-) New commits: commit 742b8befecbcfc0cfab87cfcd87c83b7d8ef32ab Author: Julien Nabet AuthorDate: Fri Nov 5 22:38:31 2021 +0100 Commit: Julien Nabet CommitDate: Fri Nov 5 23:38:51 2021 +0100 Replace some macros in forms part 7 Remove BEGIN_DESCRIBE_PROPERTIES Change-Id: Ic1f52f21037e890c4f7143a1283f34101dbb737a Change-Id: I1bd902af7f634bb70313dda72b7a008bdda38f75 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124782 Tested-by: Julien Nabet Reviewed-by: Julien Nabet diff --git a/forms/source/component/Button.cxx b/forms/source/component/Button.cxx index b63ba6752192..23b05370c380 100644 --- a/forms/source/component/Button.cxx +++ b/forms/source/component/Button.cxx @@ -101,7 +101,10 @@ OButtonModel::~OButtonModel() void OButtonModel::describeFixedProperties( Sequence< Property >& _rProps ) const { -BEGIN_DESCRIBE_PROPERTIES( 6, OClickableImageBaseModel ) +OClickableImageBaseModel::describeFixedProperties( _rProps ); +sal_Int32 nOldCount = _rProps.getLength(); +_rProps.realloc( nOldCount + 6); +css::beans::Property* pProperties = _rProps.getArray() + nOldCount; DECL_PROP1( BUTTONTYPE, FormButtonType, BOUND ); DECL_PROP1( DEFAULT_STATE, sal_Int16, BOUND ); DECL_PROP1( DISPATCHURLINTERNAL,sal_Bool, BOUND ); diff --git a/forms/source/component/CheckBox.cxx b/forms/source/component/CheckBox.cxx index f1ab6469d5e9..033f6013d4ab 100644 --- a/forms/source/component/CheckBox.cxx +++ b/forms/source/component/CheckBox.cxx @@ -109,7 +109,10 @@ css::uno::Sequence SAL_CALL OCheckBoxModel::getSupportedServiceNames() void OCheckBoxModel::describeFixedProperties( Sequence< Property >& _rProps ) const { -BEGIN_DESCRIBE_PROPERTIES( 1, OReferenceValueComponent ) +OReferenceValueComponent::describeFixedProperties( _rProps ); +sal_Int32 nOldCount = _rProps.getLength(); +_rProps.realloc( nOldCount + 1); +css::beans::Property* pProperties = _rProps.getArray() + nOldCount; DECL_PROP1(TABINDEX,sal_Int16, BOUND); DBG_ASSERT( pProperties == _rProps.getArray() + _rProps.getLength(), "<...>::describeFixedProperties/getInfoHelper: forgot to adjust the count ?"); } diff --git a/forms/source/component/ComboBox.cxx b/forms/source/component/ComboBox.cxx index 1b50e28ceb02..5145fd084e12 100644 --- a/forms/source/component/ComboBox.cxx +++ b/forms/source/component/ComboBox.cxx @@ -291,7 +291,10 @@ sal_Bool OComboBoxModel::convertFastPropertyValue( void OComboBoxModel::describeFixedProperties( Sequence< Property >& _rProps ) const { -BEGIN_DESCRIBE_PROPERTIES( 7, OBoundControlModel ) +OBoundControlModel::describeFixedProperties( _rProps ); +sal_Int32 nOldCount = _rProps.getLength(); +_rProps.realloc( nOldCount + 7); +css::beans::Property* pProperties = _rProps.getArray() + nOldCount; DECL_PROP1(TABINDEX,sal_Int16, BOUND); DECL_PROP1(LISTSOURCETYPE, ListSourceType, BOUND); DECL_PROP1(LISTSOURCE, OUString,BOUND); diff --git a/forms/source/component/Currency.cxx b/forms/source/component/Currency.cxx index 4ef9f5a379ff..4703d57e3220 100644 --- a/forms/source/component/Currency.cxx +++ b/forms/source/component/Currency.cxx @@ -156,7 +156,10 @@ css::uno::Sequence SAL_CALL OCurrencyModel::getSupportedServiceNames() void OCurrencyModel::describeFixedProperties( Sequence< Property >& _rProps ) const { -BEGIN_DESCRIBE_PROPERTIES( 2, OEditBaseModel ) +OEditBaseModel::d
[Libreoffice-commits] core.git: forms/source
forms/source/component/Button.cxx|2 +- forms/source/component/CheckBox.cxx |2 +- forms/source/component/ComboBox.cxx |2 +- forms/source/component/Currency.cxx |2 +- forms/source/component/DatabaseForm.cxx |2 +- forms/source/component/Date.cxx |2 +- forms/source/component/Edit.cxx |2 +- forms/source/component/File.cxx |2 +- forms/source/component/FormComponent.cxx |4 ++-- forms/source/component/FormattedField.cxx|2 +- forms/source/component/Grid.cxx |2 +- forms/source/component/Hidden.cxx|2 +- forms/source/component/ImageButton.cxx |2 +- forms/source/component/ImageControl.cxx |2 +- forms/source/component/ListBox.cxx |2 +- forms/source/component/Numeric.cxx |2 +- forms/source/component/Pattern.cxx |2 +- forms/source/component/RadioButton.cxx |2 +- forms/source/component/Time.cxx |2 +- forms/source/component/navigationbar.cxx |2 +- forms/source/component/refvaluecomponent.cxx |2 +- forms/source/component/scrollbar.cxx |2 +- forms/source/component/spinbutton.cxx|2 +- forms/source/inc/property.hxx|3 --- forms/source/richtext/richtextmodel.cxx |2 +- 25 files changed, 25 insertions(+), 28 deletions(-) New commits: commit 642a03393580f142ef4b703b0164b8142c780129 Author: Julien Nabet AuthorDate: Fri Nov 5 22:43:14 2021 +0100 Commit: Julien Nabet CommitDate: Fri Nov 5 23:34:46 2021 +0100 Replace some macros in forms part 8 Remove END_DESCRIBE_PROPERTIES Change-Id: I844b71cd74f2b2c5306d0ad979ed56480892268c Change-Id: Ia0aa75a3042ecc47bf434afb0de971d35ab78dfa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124783 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/forms/source/component/Button.cxx b/forms/source/component/Button.cxx index a52a423398cf..b63ba6752192 100644 --- a/forms/source/component/Button.cxx +++ b/forms/source/component/Button.cxx @@ -108,7 +108,7 @@ void OButtonModel::describeFixedProperties( Sequence< Property >& _rProps ) cons DECL_PROP1( TARGET_URL, OUString,BOUND ); DECL_PROP1( TARGET_FRAME, OUString,BOUND ); DECL_PROP1( TABINDEX, sal_Int16, BOUND ); -END_DESCRIBE_PROPERTIES(); +DBG_ASSERT( pProperties == _rProps.getArray() + _rProps.getLength(), "<...>::describeFixedProperties/getInfoHelper: forgot to adjust the count ?"); } diff --git a/forms/source/component/CheckBox.cxx b/forms/source/component/CheckBox.cxx index c91c903e0df5..f1ab6469d5e9 100644 --- a/forms/source/component/CheckBox.cxx +++ b/forms/source/component/CheckBox.cxx @@ -111,7 +111,7 @@ void OCheckBoxModel::describeFixedProperties( Sequence< Property >& _rProps ) co { BEGIN_DESCRIBE_PROPERTIES( 1, OReferenceValueComponent ) DECL_PROP1(TABINDEX,sal_Int16, BOUND); -END_DESCRIBE_PROPERTIES(); +DBG_ASSERT( pProperties == _rProps.getArray() + _rProps.getLength(), "<...>::describeFixedProperties/getInfoHelper: forgot to adjust the count ?"); } diff --git a/forms/source/component/ComboBox.cxx b/forms/source/component/ComboBox.cxx index e63997e16294..1b50e28ceb02 100644 --- a/forms/source/component/ComboBox.cxx +++ b/forms/source/component/ComboBox.cxx @@ -300,7 +300,7 @@ void OComboBoxModel::describeFixedProperties( Sequence< Property >& _rProps ) co DECL_PROP1(DEFAULT_TEXT,OUString,BOUND); DECL_PROP1(STRINGITEMLIST, Sequence< OUString >,BOUND); DECL_PROP1(TYPEDITEMLIST, Sequence< Any >,OPTIONAL); -END_DESCRIBE_PROPERTIES(); +DBG_ASSERT( pProperties == _rProps.getArray() + _rProps.getLength(), "<...>::describeFixedProperties/getInfoHelper: forgot to adjust the count ?"); } diff --git a/forms/source/component/Currency.cxx b/forms/source/component/Currency.cxx index b95d0ad9f74b..4ef9f5a379ff 100644 --- a/forms/source/component/Currency.cxx +++ b/forms/source/component/Currency.cxx @@ -162,7 +162,7 @@ void OCurrencyModel::describeFixedProperties( Sequence< Property >& _rProps ) co DECL_PROP_IMPL(DEFAULT_VALUE, double) css::beans::PropertyAttribute::BOUND | css::beans::PropertyAttribute::MAYBEDEFAULT | css::beans::PropertyAttribute::MAYBEVOID); DECL_PROP1(TABINDEX,sal_Int16, BOUND); -END_DESCRIBE_PROPERTIES(); +DBG_ASSERT( pProperties == _rProps.getArray() + _rProps.getLength(), "<...>::describeFixedProperties/getInfoHelper: forgot to adjust the count ?"); } diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx index 62a95776492b..9d0570288caa 100644 --- a/forms/source/component/DatabaseForm.
[Libreoffice-commits] core.git: forms/source
forms/source/component/Columns.cxx |3 ++- forms/source/component/ComboBox.cxx|3 ++- forms/source/component/DatabaseForm.cxx| 18 -- forms/source/component/Edit.cxx|6 -- forms/source/component/FormComponent.cxx |9 ++--- forms/source/component/FormattedField.cxx |6 -- forms/source/component/Grid.cxx|6 -- forms/source/component/Hidden.cxx |3 ++- forms/source/component/ImageControl.cxx|3 ++- forms/source/component/Pattern.cxx |3 ++- forms/source/component/formcontrolfont.cxx |6 -- forms/source/inc/property.hxx |9 - 12 files changed, 44 insertions(+), 31 deletions(-) New commits: commit 7b6554851fb4cc620f4720f6ad3f394fa0a8995f Author: Julien Nabet AuthorDate: Fri Nov 5 19:12:25 2021 +0100 Commit: Julien Nabet CommitDate: Fri Nov 5 20:09:24 2021 +0100 Replace some macros in forms part 6 Remove DECL_BOOL_PROP_IMPL + BEGIN_DESCRIBE_BASE_PROPERTIES Change-Id: I1a55c9de46ae741045002241a2b0f5dfa32db8c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124777 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/forms/source/component/Columns.cxx b/forms/source/component/Columns.cxx index 9d44851e6037..bdea1e4009ae 100644 --- a/forms/source/component/Columns.cxx +++ b/forms/source/component/Columns.cxx @@ -348,7 +348,8 @@ void OGridColumn::setOwnProperties(Sequence& aDescriptor) DECL_PROP1(LABEL, OUString,BOUND); DECL_PROP_IMPL(WIDTH, sal_Int32) css::beans::PropertyAttribute::BOUND | css::beans::PropertyAttribute::MAYBEVOID | css::beans::PropertyAttribute::MAYBEDEFAULT); DECL_PROP_IMPL(ALIGN, sal_Int16) css::beans::PropertyAttribute::BOUND | css::beans::PropertyAttribute::MAYBEVOID | css::beans::PropertyAttribute::MAYBEDEFAULT); -DECL_BOOL_PROP_IMPL(HIDDEN) css::beans::PropertyAttribute::BOUND | css::beans::PropertyAttribute::MAYBEDEFAULT); +*pProperties++ = css::beans::Property(PROPERTY_HIDDEN, PROPERTY_ID_HIDDEN, cppu::UnoType::get(), + css::beans::PropertyAttribute::BOUND | css::beans::PropertyAttribute::MAYBEDEFAULT); DECL_PROP1(COLUMNSERVICENAME, OUString,READONLY); } diff --git a/forms/source/component/ComboBox.cxx b/forms/source/component/ComboBox.cxx index ce61560f1c70..e63997e16294 100644 --- a/forms/source/component/ComboBox.cxx +++ b/forms/source/component/ComboBox.cxx @@ -295,7 +295,8 @@ void OComboBoxModel::describeFixedProperties( Sequence< Property >& _rProps ) co DECL_PROP1(TABINDEX,sal_Int16, BOUND); DECL_PROP1(LISTSOURCETYPE, ListSourceType, BOUND); DECL_PROP1(LISTSOURCE, OUString,BOUND); -DECL_BOOL_PROP_IMPL(EMPTY_IS_NULL) css::beans::PropertyAttribute::BOUND); +*pProperties++ = css::beans::Property(PROPERTY_EMPTY_IS_NULL, PROPERTY_ID_EMPTY_IS_NULL, cppu::UnoType::get(), + css::beans::PropertyAttribute::BOUND); DECL_PROP1(DEFAULT_TEXT,OUString,BOUND); DECL_PROP1(STRINGITEMLIST, Sequence< OUString >,BOUND); DECL_PROP1(TYPEDITEMLIST, Sequence< Any >,OPTIONAL); diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx index 0604103f4322..62a95776492b 100644 --- a/forms/source/component/DatabaseForm.cxx +++ b/forms/source/component/DatabaseForm.cxx @@ -1293,7 +1293,8 @@ void ODatabaseForm::describeFixedAndAggregateProperties( *pProperties++ = css::beans::Property(PROPERTY_ACTIVE_CONNECTION, PROPERTY_ID_ACTIVE_CONNECTION, cppu::UnoType::get(), css::beans::PropertyAttribute::BOUND | css::beans::PropertyAttribute::TRANSIENT | css::beans::PropertyAttribute::MAYBEVOID | PropertyAttribute::CONSTRAINED); -DECL_BOOL_PROP_IMPL(APPLYFILTER) css::beans::PropertyAttribute::BOUND | css::beans::PropertyAttribute::MAYBEDEFAULT); +*pProperties++ = css::beans::Property(PROPERTY_APPLYFILTER, PROPERTY_ID_APPLYFILTER, cppu::UnoType::get(), + css::beans::PropertyAttribute::BOUND | css::beans::PropertyAttribute::MAYBEDEFAULT); DECL_PROP1 ( NAME, OUString,BOUND ); DECL_PROP1 ( MASTERFIELDS, Sequence< OUString >,BOUND ); DECL_PROP1 ( DETAILFIELDS, Sequence< OUString >,BOUND ); @@ -1301,17 +1302,22 @@ void ODatabaseForm::describeFixedAndAggregateProperties( DECL_PROP_IMPL(CYCLE, TabulatorCycle) css::beans::PropertyAttribute::BOUND | css::beans::PropertyAttribute::MAYBEVOID | css::beans::PropertyAttribute::MAYBEDEFAULT); DECL_PROP
[Libreoffice-commits] core.git: forms/source
forms/source/component/DatabaseForm.cxx| 11 ++- forms/source/component/Date.cxx|3 ++- forms/source/component/Edit.cxx|4 ++-- forms/source/component/FormComponent.cxx | 10 ++ forms/source/component/Grid.cxx| 22 +++--- forms/source/component/Hidden.cxx |2 +- forms/source/component/ImageControl.cxx|3 ++- forms/source/component/ListBox.cxx |6 +++--- forms/source/component/Pattern.cxx |4 ++-- forms/source/component/Time.cxx|3 ++- forms/source/component/formcontrolfont.cxx |6 +++--- forms/source/component/navigationbar.cxx |2 +- forms/source/component/scrollbar.cxx |2 +- forms/source/component/spinbutton.cxx |2 +- forms/source/inc/property.hxx | 13 - forms/source/richtext/richtextmodel.cxx|2 +- 16 files changed, 44 insertions(+), 51 deletions(-) New commits: commit 5bfbaf3c80987d1f7e6b3d7ffe6896b9bc3687e6 Author: Julien Nabet AuthorDate: Fri Nov 5 17:47:23 2021 +0100 Commit: Julien Nabet CommitDate: Fri Nov 5 18:45:50 2021 +0100 Replace some macros in forms part 5 Remove DECL_IFACE_PROP_IMPL + DECL_PROP0 + DECL_PROP2 Change-Id: I8bd044a4cb0db33fa890056bf00e240fb4fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124769 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx index 814760174d0c..0604103f4322 100644 --- a/forms/source/component/DatabaseForm.cxx +++ b/forms/source/component/DatabaseForm.cxx @@ -1290,22 +1290,23 @@ void ODatabaseForm::describeFixedAndAggregateProperties( RemoveProperty( _rAggregateProps, PROPERTY_HAVINGCLAUSE ); RemoveProperty( _rAggregateProps, PROPERTY_APPLYFILTER ); -DECL_IFACE_PROP_IMPL(ACTIVE_CONNECTION, XConnection) css::beans::PropertyAttribute::BOUND | css::beans::PropertyAttribute::TRANSIENT | +*pProperties++ = css::beans::Property(PROPERTY_ACTIVE_CONNECTION, PROPERTY_ID_ACTIVE_CONNECTION, cppu::UnoType::get(), + css::beans::PropertyAttribute::BOUND | css::beans::PropertyAttribute::TRANSIENT | css::beans::PropertyAttribute::MAYBEVOID | PropertyAttribute::CONSTRAINED); DECL_BOOL_PROP_IMPL(APPLYFILTER) css::beans::PropertyAttribute::BOUND | css::beans::PropertyAttribute::MAYBEDEFAULT); DECL_PROP1 ( NAME, OUString,BOUND ); DECL_PROP1 ( MASTERFIELDS, Sequence< OUString >,BOUND ); DECL_PROP1 ( DETAILFIELDS, Sequence< OUString >,BOUND ); -DECL_PROP2 ( DATASOURCE, OUString,BOUND, CONSTRAINED ); +DECL_PROP_IMPL(DATASOURCE, OUString) css::beans::PropertyAttribute::BOUND | css::beans::PropertyAttribute::CONSTRAINED); DECL_PROP_IMPL(CYCLE, TabulatorCycle) css::beans::PropertyAttribute::BOUND | css::beans::PropertyAttribute::MAYBEVOID | css::beans::PropertyAttribute::MAYBEDEFAULT); -DECL_PROP2 ( FILTER, OUString,BOUND, MAYBEDEFAULT); -DECL_PROP2 ( HAVINGCLAUSE, OUString,BOUND, MAYBEDEFAULT); +DECL_PROP_IMPL(FILTER, OUString) css::beans::PropertyAttribute::BOUND | css::beans::PropertyAttribute::MAYBEDEFAULT); +DECL_PROP_IMPL(HAVINGCLAUSE, OUString) css::beans::PropertyAttribute::BOUND | css::beans::PropertyAttribute::MAYBEDEFAULT); DECL_BOOL_PROP_IMPL(INSERTONLY) css::beans::PropertyAttribute::BOUND | css::beans::PropertyAttribute::MAYBEDEFAULT); DECL_PROP1 ( NAVIGATION, NavigationBarMode, BOUND ); DECL_BOOL_PROP_IMPL(ALLOWADDITIONS) css::beans::PropertyAttribute::BOUND); DECL_BOOL_PROP_IMPL(ALLOWEDITS) css::beans::PropertyAttribute::BOUND); DECL_BOOL_PROP_IMPL(ALLOWDELETIONS) css::beans::PropertyAttribute::BOUND); -DECL_PROP2 ( PRIVILEGES, sal_Int32, TRANSIENT, READONLY); +DECL_PROP_IMPL(PRIVILEGES, sal_Int32) css::beans::PropertyAttribute::TRANSIENT | css::beans::PropertyAttribute::READONLY); DECL_PROP1 ( TARGET_URL, OUString,BOUND ); DECL_PROP1 ( TARGET_FRAME, OUString,BOUND ); DECL_PROP1 ( SUBMIT_METHOD,FormSubmitMethod,BOUND ); diff --git a/forms/source/component/Date.cxx b/forms/source/component/Date.cxx index 503a2e22d17a..6222ad392e2c 100644 --- a/forms/source/component/Date.cxx +++ b/forms/source/component/Date.cxx @@ -145,7 +145,8 @@ void ODateModel::describeFixedProperties( Sequence< Property >& _rProps ) c
[Libreoffice-commits] core.git: forms/source
forms/source/component/Columns.cxx |4 ++-- forms/source/component/Currency.cxx|2 +- forms/source/component/DatabaseForm.cxx|8 forms/source/component/Date.cxx|2 +- forms/source/component/Grid.cxx| 16 forms/source/component/ListBox.cxx |2 +- forms/source/component/Numeric.cxx |2 +- forms/source/component/Time.cxx|2 +- forms/source/component/formcontrolfont.cxx |4 ++-- forms/source/inc/property.hxx |3 --- 10 files changed, 21 insertions(+), 24 deletions(-) New commits: commit 9776087faf8ea0107481dbd32ec74058301280fe Author: Julien Nabet AuthorDate: Thu Nov 4 23:09:43 2021 +0100 Commit: Julien Nabet CommitDate: Fri Nov 5 07:05:13 2021 +0100 Replace some macros in forms part 4 Change-Id: Ic9310fcfa4fb3b1b7e64eaa2be3839ba89949a3e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124723 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/forms/source/component/Columns.cxx b/forms/source/component/Columns.cxx index 92733ad47c20..9d44851e6037 100644 --- a/forms/source/component/Columns.cxx +++ b/forms/source/component/Columns.cxx @@ -346,8 +346,8 @@ void OGridColumn::setOwnProperties(Sequence& aDescriptor) aDescriptor.realloc(5); Property* pProperties = aDescriptor.getArray(); DECL_PROP1(LABEL, OUString,BOUND); -DECL_PROP3(WIDTH, sal_Int32, BOUND, MAYBEVOID, MAYBEDEFAULT); -DECL_PROP3(ALIGN, sal_Int16, BOUND, MAYBEVOID, MAYBEDEFAULT); +DECL_PROP_IMPL(WIDTH, sal_Int32) css::beans::PropertyAttribute::BOUND | css::beans::PropertyAttribute::MAYBEVOID | css::beans::PropertyAttribute::MAYBEDEFAULT); +DECL_PROP_IMPL(ALIGN, sal_Int16) css::beans::PropertyAttribute::BOUND | css::beans::PropertyAttribute::MAYBEVOID | css::beans::PropertyAttribute::MAYBEDEFAULT); DECL_BOOL_PROP_IMPL(HIDDEN) css::beans::PropertyAttribute::BOUND | css::beans::PropertyAttribute::MAYBEDEFAULT); DECL_PROP1(COLUMNSERVICENAME, OUString,READONLY); } diff --git a/forms/source/component/Currency.cxx b/forms/source/component/Currency.cxx index 925e23cde6fa..b95d0ad9f74b 100644 --- a/forms/source/component/Currency.cxx +++ b/forms/source/component/Currency.cxx @@ -160,7 +160,7 @@ void OCurrencyModel::describeFixedProperties( Sequence< Property >& _rProps ) co // Set Value to transient // ModifyPropertyAttributes(_rAggregateProps, PROPERTY_VALUE, PropertyAttribute::TRANSIENT, 0); -DECL_PROP3(DEFAULT_VALUE, double, BOUND, MAYBEDEFAULT, MAYBEVOID); +DECL_PROP_IMPL(DEFAULT_VALUE, double) css::beans::PropertyAttribute::BOUND | css::beans::PropertyAttribute::MAYBEDEFAULT | css::beans::PropertyAttribute::MAYBEVOID); DECL_PROP1(TABINDEX,sal_Int16, BOUND); END_DESCRIBE_PROPERTIES(); } diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx index 8e04ff613619..814760174d0c 100644 --- a/forms/source/component/DatabaseForm.cxx +++ b/forms/source/component/DatabaseForm.cxx @@ -1297,7 +1297,7 @@ void ODatabaseForm::describeFixedAndAggregateProperties( DECL_PROP1 ( MASTERFIELDS, Sequence< OUString >,BOUND ); DECL_PROP1 ( DETAILFIELDS, Sequence< OUString >,BOUND ); DECL_PROP2 ( DATASOURCE, OUString,BOUND, CONSTRAINED ); -DECL_PROP3 ( CYCLE,TabulatorCycle, BOUND, MAYBEVOID, MAYBEDEFAULT ); +DECL_PROP_IMPL(CYCLE, TabulatorCycle) css::beans::PropertyAttribute::BOUND | css::beans::PropertyAttribute::MAYBEVOID | css::beans::PropertyAttribute::MAYBEDEFAULT); DECL_PROP2 ( FILTER, OUString,BOUND, MAYBEDEFAULT); DECL_PROP2 ( HAVINGCLAUSE, OUString,BOUND, MAYBEDEFAULT); DECL_BOOL_PROP_IMPL(INSERTONLY) css::beans::PropertyAttribute::BOUND | css::beans::PropertyAttribute::MAYBEDEFAULT); @@ -1311,9 +1311,9 @@ void ODatabaseForm::describeFixedAndAggregateProperties( DECL_PROP1 ( SUBMIT_METHOD,FormSubmitMethod,BOUND ); DECL_PROP1 ( SUBMIT_ENCODING, FormSubmitEncoding, BOUND ); DECL_BOOL_PROP_IMPL(DYNAMIC_CONTROL_BORDER) css::beans::PropertyAttribute::BOUND | css::beans::PropertyAttribute::MAYBEVOID | css::beans::PropertyAttribute::MAYBEDEFAULT ); -DECL_PROP3 ( CONTROL_BORDER_COLOR_FOCUS, sal_Int32, BOUND, MAYBEVOID, MAYBEDEFAULT ); -DECL_PROP3 ( CONTROL_BORDER_COLOR_MOUSE, sal_Int32, BOUND, MAYBEVOID, MAYBEDEFAULT ); -DECL_PROP3 ( CONTROL_BORDER_COLOR_INVALID, sal_Int32, BOUND, MAYBEVOID, MAYBEDEFAULT ); +DECL_PROP_IMPL(CONTROL_BORDER
[Libreoffice-commits] core.git: forms/source
forms/source/component/Columns.cxx |2 +- forms/source/component/ComboBox.cxx|2 +- forms/source/component/DatabaseForm.cxx| 10 +- forms/source/component/Edit.cxx|4 ++-- forms/source/component/FormComponent.cxx |4 ++-- forms/source/component/FormattedField.cxx |4 ++-- forms/source/component/Grid.cxx|2 +- forms/source/component/ImageControl.cxx|2 +- forms/source/component/Pattern.cxx |2 +- forms/source/component/formcontrolfont.cxx |4 ++-- forms/source/inc/property.hxx | 11 --- 11 files changed, 18 insertions(+), 29 deletions(-) New commits: commit 3c1bd037802f5fbad9f43566a33500e54a6b9de6 Author: Julien Nabet AuthorDate: Wed Nov 3 23:29:30 2021 +0100 Commit: Julien Nabet CommitDate: Thu Nov 4 07:04:01 2021 +0100 Replace some macros in forms part 3 Remove DECL_BOOL_PROP1 + DECL_BOOL_PROP2 Change-Id: I8a07ac7b2b8ab724d5277a11b37cf10a6711fdb5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124664 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/forms/source/component/Columns.cxx b/forms/source/component/Columns.cxx index b92b99768912..92733ad47c20 100644 --- a/forms/source/component/Columns.cxx +++ b/forms/source/component/Columns.cxx @@ -348,7 +348,7 @@ void OGridColumn::setOwnProperties(Sequence& aDescriptor) DECL_PROP1(LABEL, OUString,BOUND); DECL_PROP3(WIDTH, sal_Int32, BOUND, MAYBEVOID, MAYBEDEFAULT); DECL_PROP3(ALIGN, sal_Int16, BOUND, MAYBEVOID, MAYBEDEFAULT); -DECL_BOOL_PROP2(HIDDEN, BOUND, MAYBEDEFAULT); +DECL_BOOL_PROP_IMPL(HIDDEN) css::beans::PropertyAttribute::BOUND | css::beans::PropertyAttribute::MAYBEDEFAULT); DECL_PROP1(COLUMNSERVICENAME, OUString,READONLY); } diff --git a/forms/source/component/ComboBox.cxx b/forms/source/component/ComboBox.cxx index fa28816c0890..ce61560f1c70 100644 --- a/forms/source/component/ComboBox.cxx +++ b/forms/source/component/ComboBox.cxx @@ -295,7 +295,7 @@ void OComboBoxModel::describeFixedProperties( Sequence< Property >& _rProps ) co DECL_PROP1(TABINDEX,sal_Int16, BOUND); DECL_PROP1(LISTSOURCETYPE, ListSourceType, BOUND); DECL_PROP1(LISTSOURCE, OUString,BOUND); -DECL_BOOL_PROP1(EMPTY_IS_NULL, BOUND); +DECL_BOOL_PROP_IMPL(EMPTY_IS_NULL) css::beans::PropertyAttribute::BOUND); DECL_PROP1(DEFAULT_TEXT,OUString,BOUND); DECL_PROP1(STRINGITEMLIST, Sequence< OUString >,BOUND); DECL_PROP1(TYPEDITEMLIST, Sequence< Any >,OPTIONAL); diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx index 0882d82a47c7..8e04ff613619 100644 --- a/forms/source/component/DatabaseForm.cxx +++ b/forms/source/component/DatabaseForm.cxx @@ -1292,7 +1292,7 @@ void ODatabaseForm::describeFixedAndAggregateProperties( DECL_IFACE_PROP_IMPL(ACTIVE_CONNECTION, XConnection) css::beans::PropertyAttribute::BOUND | css::beans::PropertyAttribute::TRANSIENT | css::beans::PropertyAttribute::MAYBEVOID | PropertyAttribute::CONSTRAINED); -DECL_BOOL_PROP2 ( APPLYFILTER, BOUND, MAYBEDEFAULT); +DECL_BOOL_PROP_IMPL(APPLYFILTER) css::beans::PropertyAttribute::BOUND | css::beans::PropertyAttribute::MAYBEDEFAULT); DECL_PROP1 ( NAME, OUString,BOUND ); DECL_PROP1 ( MASTERFIELDS, Sequence< OUString >,BOUND ); DECL_PROP1 ( DETAILFIELDS, Sequence< OUString >,BOUND ); @@ -1300,11 +1300,11 @@ void ODatabaseForm::describeFixedAndAggregateProperties( DECL_PROP3 ( CYCLE,TabulatorCycle, BOUND, MAYBEVOID, MAYBEDEFAULT ); DECL_PROP2 ( FILTER, OUString,BOUND, MAYBEDEFAULT); DECL_PROP2 ( HAVINGCLAUSE, OUString,BOUND, MAYBEDEFAULT); -DECL_BOOL_PROP2 ( INSERTONLY,BOUND, MAYBEDEFAULT); +DECL_BOOL_PROP_IMPL(INSERTONLY) css::beans::PropertyAttribute::BOUND | css::beans::PropertyAttribute::MAYBEDEFAULT); DECL_PROP1 ( NAVIGATION, NavigationBarMode, BOUND ); -DECL_BOOL_PROP1 ( ALLOWADDITIONS,BOUND ); -DECL_BOOL_PROP1 ( ALLOWEDITS,BOUND ); -DECL_BOOL_PROP1 ( ALLOWDELETIONS,BOUND ); +DECL_BOOL_PROP_IMPL(ALLOWADDITIO
[Libreoffice-commits] core.git: forms/source
forms/source/component/Grid.cxx |3 - forms/source/component/navigationbar.cxx | 43 ++-- forms/source/inc/property.hxx| 18 -- forms/source/richtext/richtextmodel.cxx | 83 --- 4 files changed, 86 insertions(+), 61 deletions(-) New commits: commit d33613c067c198c2a6ef30fb56bcc0cce7565c9b Author: Julien Nabet AuthorDate: Tue Nov 2 20:51:05 2021 +0100 Commit: Julien Nabet CommitDate: Wed Nov 3 18:50:30 2021 +0100 Replace some macros in forms part 2 DECL_PROP4 + REGISTER_PROP_2 + REGISTER_PROP_3 + REGISTER_VOID_PROP_2 Change-Id: Ib7fdfed9f94fe0bb2c3f4f1398bc058af84823d5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124615 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/forms/source/component/Grid.cxx b/forms/source/component/Grid.cxx index 67fb4cba1bbf..0b98db032679 100644 --- a/forms/source/component/Grid.cxx +++ b/forms/source/component/Grid.cxx @@ -406,7 +406,8 @@ void OGridControlModel::describeFixedProperties( Sequence< Property >& _rProps ) DECL_PROP1(FONT_STRIKEOUT, sal_Int16, MAYBEDEFAULT); DECL_PROP2(RECORDMARKER,sal_Bool, BOUND, MAYBEDEFAULT ); DECL_PROP2(PRINTABLE, sal_Bool, BOUND, MAYBEDEFAULT ); -DECL_PROP4(CURSORCOLOR, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID , TRANSIENT); +DECL_PROP_IMPL(CURSORCOLOR, sal_Int32) css::beans::PropertyAttribute::BOUND | css::beans::PropertyAttribute::MAYBEDEFAULT | + css::beans::PropertyAttribute::MAYBEVOID | css::beans::PropertyAttribute::TRANSIENT); DECL_PROP3(ALWAYSSHOWCURSOR,sal_Bool, BOUND, MAYBEDEFAULT, TRANSIENT); DECL_PROP3(DISPLAYSYNCHRON, sal_Bool, BOUND, MAYBEDEFAULT, TRANSIENT); DECL_PROP2(HELPURL, OUString,BOUND, MAYBEDEFAULT); diff --git a/forms/source/component/navigationbar.cxx b/forms/source/component/navigationbar.cxx index 368ab62d3fa9..b3b386d2aefc 100644 --- a/forms/source/component/navigationbar.cxx +++ b/forms/source/component/navigationbar.cxx @@ -99,20 +99,35 @@ namespace frm void ONavigationBarModel::implInitPropertyContainer() { -REGISTER_PROP_2( DEFAULTCONTROL, m_sDefaultControl,BOUND, MAYBEDEFAULT ); -REGISTER_PROP_2( HELPTEXT,m_sHelpText, BOUND, MAYBEDEFAULT ); -REGISTER_PROP_2( HELPURL, m_sHelpURL, BOUND, MAYBEDEFAULT ); -REGISTER_PROP_2( ENABLED, m_bEnabled, BOUND, MAYBEDEFAULT ); -REGISTER_PROP_2( ENABLEVISIBLE, m_bEnableVisible, BOUND, MAYBEDEFAULT ); -REGISTER_PROP_2( ICONSIZE,m_nIconSize, BOUND, MAYBEDEFAULT ); -REGISTER_PROP_2( BORDER, m_nBorder,BOUND, MAYBEDEFAULT ); -REGISTER_PROP_2( DELAY, m_nDelay, BOUND, MAYBEDEFAULT ); -REGISTER_PROP_2( SHOW_POSITION, m_bShowPosition, BOUND, MAYBEDEFAULT ); -REGISTER_PROP_2( SHOW_NAVIGATION, m_bShowNavigation,BOUND, MAYBEDEFAULT ); -REGISTER_PROP_2( SHOW_RECORDACTIONS, m_bShowActions, BOUND, MAYBEDEFAULT ); -REGISTER_PROP_2( SHOW_FILTERSORT, m_bShowFilterSort,BOUND, MAYBEDEFAULT ); -REGISTER_PROP_2( WRITING_MODE,m_nWritingMode, BOUND, MAYBEDEFAULT ); -REGISTER_PROP_3( CONTEXT_WRITING_MODE,m_nContextWritingMode,BOUND, MAYBEDEFAULT, TRANSIENT ); +registerProperty( PROPERTY_DEFAULTCONTROL, PROPERTY_ID_DEFAULTCONTROL, PropertyAttribute::BOUND | PropertyAttribute::MAYBEDEFAULT, + &m_sDefaultControl, cppu::UnoType::get() ); +registerProperty( PROPERTY_HELPTEXT, PROPERTY_ID_HELPTEXT, PropertyAttribute::BOUND | PropertyAttribute::MAYBEDEFAULT, + &m_sHelpText, cppu::UnoType::get() ); +registerProperty( PROPERTY_HELPURL, PROPERTY_ID_HELPURL, PropertyAttribute::BOUND | PropertyAttribute::MAYBEDEFAULT, + &m_sHelpURL, cppu::UnoType::get() ); +registerProperty( PROPERTY_ENABLED, PROPERTY_ID_ENABLED, PropertyAttribute::BOUND | PropertyAttribute::MAYBEDEFAULT, + &m_bEnabled, cppu::UnoType::get() ); +registerProperty( PROPERTY_ENABLEVISIBLE, PROPERTY_ID_ENABLEVISIBLE, PropertyAttribute::BOUND | PropertyAttribute::MAYBEDEFAULT, + &m_bEnableVisible, cppu::UnoType::get() ); +registerProperty( PROPERTY_ICONSIZE, PROPERTY_ID_ICONSIZE, PropertyAttribute::BOUND | PropertyAttribute::MAYBEDEFAULT, + &m_nIconSize, cppu::UnoType::get() ); +registerProperty( PROPERTY_BORDER, PROPERTY_ID_BORDER, PropertyAttribute::BOUND | PropertyAttribute::MAYBEDEFAULT, +
[Libreoffice-commits] core.git: forms/source
forms/source/component/DatabaseForm.cxx |5 +++-- forms/source/component/Date.cxx |2 +- forms/source/component/FormComponent.cxx |4 ++-- forms/source/component/ImageControl.cxx |2 +- forms/source/component/Time.cxx |2 +- forms/source/inc/property.hxx| 20 +--- 6 files changed, 9 insertions(+), 26 deletions(-) New commits: commit de9f8683234ea2187f650210b7c3e66818778e9f Author: Julien Nabet AuthorDate: Mon Nov 1 19:17:37 2021 +0100 Commit: Julien Nabet CommitDate: Tue Nov 2 18:42:35 2021 +0100 Replace some macros in forms DECL_IFACE_PROP2 + DECL_IFACE_PROP3 + DECL_IFACE_PROP4 + DECL_BOOL_PROP3 Change-Id: Ibfe652001f4e914cad364222bcaf38dec69298e5 Change-Id: I432e045b9d071d61cd142bca66f40233cd59ef0b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124564 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx index 7411abf90351..0882d82a47c7 100644 --- a/forms/source/component/DatabaseForm.cxx +++ b/forms/source/component/DatabaseForm.cxx @@ -1290,7 +1290,8 @@ void ODatabaseForm::describeFixedAndAggregateProperties( RemoveProperty( _rAggregateProps, PROPERTY_HAVINGCLAUSE ); RemoveProperty( _rAggregateProps, PROPERTY_APPLYFILTER ); -DECL_IFACE_PROP4( ACTIVE_CONNECTION,XConnection, BOUND, TRANSIENT, MAYBEVOID, CONSTRAINED); +DECL_IFACE_PROP_IMPL(ACTIVE_CONNECTION, XConnection) css::beans::PropertyAttribute::BOUND | css::beans::PropertyAttribute::TRANSIENT | + css::beans::PropertyAttribute::MAYBEVOID | PropertyAttribute::CONSTRAINED); DECL_BOOL_PROP2 ( APPLYFILTER, BOUND, MAYBEDEFAULT); DECL_PROP1 ( NAME, OUString,BOUND ); DECL_PROP1 ( MASTERFIELDS, Sequence< OUString >,BOUND ); @@ -1309,7 +1310,7 @@ void ODatabaseForm::describeFixedAndAggregateProperties( DECL_PROP1 ( TARGET_FRAME, OUString,BOUND ); DECL_PROP1 ( SUBMIT_METHOD,FormSubmitMethod,BOUND ); DECL_PROP1 ( SUBMIT_ENCODING, FormSubmitEncoding, BOUND ); -DECL_BOOL_PROP3 ( DYNAMIC_CONTROL_BORDER,BOUND, MAYBEVOID, MAYBEDEFAULT ); +DECL_BOOL_PROP_IMPL(DYNAMIC_CONTROL_BORDER) css::beans::PropertyAttribute::BOUND | css::beans::PropertyAttribute::MAYBEVOID | css::beans::PropertyAttribute::MAYBEDEFAULT ); DECL_PROP3 ( CONTROL_BORDER_COLOR_FOCUS, sal_Int32, BOUND, MAYBEVOID, MAYBEDEFAULT ); DECL_PROP3 ( CONTROL_BORDER_COLOR_MOUSE, sal_Int32, BOUND, MAYBEVOID, MAYBEDEFAULT ); DECL_PROP3 ( CONTROL_BORDER_COLOR_INVALID, sal_Int32, BOUND, MAYBEVOID, MAYBEDEFAULT ); diff --git a/forms/source/component/Date.cxx b/forms/source/component/Date.cxx index 1d16109ce672..90a348482540 100644 --- a/forms/source/component/Date.cxx +++ b/forms/source/component/Date.cxx @@ -145,7 +145,7 @@ void ODateModel::describeFixedProperties( Sequence< Property >& _rProps ) const DECL_PROP3(DEFAULT_DATE,util::Date, BOUND, MAYBEDEFAULT, MAYBEVOID); DECL_PROP1(TABINDEX,sal_Int16, BOUND); DECL_PROP1(FORMATKEY, sal_Int32, TRANSIENT); -DECL_IFACE_PROP2(FORMATSSUPPLIER, XNumberFormatsSupplier, READONLY, TRANSIENT); +DECL_IFACE_PROP_IMPL(FORMATSSUPPLIER, XNumberFormatsSupplier) css::beans::PropertyAttribute::READONLY | css::beans::PropertyAttribute::TRANSIENT); END_DESCRIBE_PROPERTIES(); } diff --git a/forms/source/component/FormComponent.cxx b/forms/source/component/FormComponent.cxx index 0f67f8433e95..16d90a75f5df 100644 --- a/forms/source/component/FormComponent.cxx +++ b/forms/source/component/FormComponent.cxx @@ -2780,8 +2780,8 @@ void OBoundControlModel::describeFixedProperties( Sequence< Property >& _rProps { BEGIN_DESCRIBE_PROPERTIES( 5, OControlModel ) DECL_PROP1 ( CONTROLSOURCE, OUString, BOUND ); -DECL_IFACE_PROP3( BOUNDFIELD, XPropertySet, BOUND, READONLY, TRANSIENT ); -DECL_IFACE_PROP2( CONTROLLABEL, XPropertySet, BOUND, MAYBEVOID ); +DECL_IFACE_PROP_IMPL(BOUNDFIELD, XPropertySet) css::beans::PropertyAttribute::BOUND | css::beans::PropertyAttribute::READONLY | css::beans::PropertyAttribute::TRANSIENT); +DECL_IFACE_PROP_IMPL(CONTROLLABEL, XPropertySet) css::beans::PropertyAttribute::BOUND | css::beans::PropertyAttribute::MAYBEVOID); DECL_PROP2 ( CONTROLSOURCEPROPERTY,OUString,READONLY, TRANSIENT ); DECL_BOOL_PROP1 ( INPUT_REQUIRED,
[Libreoffice-commits] core.git: forms/source
forms/source/component/ComboBox.cxx|2 +- forms/source/component/Grid.cxx|9 + forms/source/component/ListBox.cxx |9 +++-- forms/source/component/clickableimage.cxx | 16 +++- forms/source/component/entrylisthelper.cxx |5 +++-- forms/source/helper/formnavigation.cxx |6 +++--- forms/source/runtime/formoperations.cxx| 13 - forms/source/solar/control/navtoolbar.cxx |3 ++- forms/source/xforms/submission/replace.cxx | 11 ++- 9 files changed, 34 insertions(+), 40 deletions(-) New commits: commit bddfc920220b712c08eda96ac320a274e4bfcee6 Author: Mike Kaganski AuthorDate: Fri Oct 29 09:39:59 2021 +0300 Commit: Mike Kaganski CommitDate: Sat Oct 30 09:28:10 2021 +0200 Prepare for removal of non-const operator[] from Sequence in forms Change-Id: I2b7bd7935d7e620b9f283ec7c0548beeb97c140d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124366 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/forms/source/component/ComboBox.cxx b/forms/source/component/ComboBox.cxx index fe3260070d68..fa28816c0890 100644 --- a/forms/source/component/ComboBox.cxx +++ b/forms/source/component/ComboBox.cxx @@ -763,7 +763,7 @@ bool OComboBoxModel::commitControlValueToDbColumn( bool _bPostReset ) { sal_Int32 nOldLen = aStringItemList.getLength(); aStringItemList.realloc( nOldLen + 1 ); -aStringItemList[ nOldLen ] = sNewValue; +aStringItemList.getArray()[ nOldLen ] = sNewValue; setFastPropertyValue( PROPERTY_ID_STRINGITEMLIST, makeAny( aStringItemList ) ); setFastPropertyValue( PROPERTY_ID_TYPEDITEMLIST, makeAny( css::uno::Sequence() ) ); diff --git a/forms/source/component/Grid.cxx b/forms/source/component/Grid.cxx index b92f763d578e..67fb4cba1bbf 100644 --- a/forms/source/component/Grid.cxx +++ b/forms/source/component/Grid.cxx @@ -163,10 +163,11 @@ css::uno::Sequence OGridControlModel::getSupportedServiceNames() { css::uno::Sequence aSupported = OControlModel::getSupportedServiceNames(); aSupported.realloc(aSupported.getLength() + 4); -aSupported[aSupported.getLength()-4] = "com.sun.star.awt.UnoControlModel"; -aSupported[aSupported.getLength()-3] = FRM_SUN_COMPONENT_GRIDCONTROL; -aSupported[aSupported.getLength()-2] = FRM_COMPONENT_GRID; -aSupported[aSupported.getLength()-1] = FRM_COMPONENT_GRIDCONTROL; +auto pSupported = aSupported.getArray(); +pSupported[aSupported.getLength()-4] = "com.sun.star.awt.UnoControlModel"; +pSupported[aSupported.getLength()-3] = FRM_SUN_COMPONENT_GRIDCONTROL; +pSupported[aSupported.getLength()-2] = FRM_COMPONENT_GRID; +pSupported[aSupported.getLength()-1] = FRM_COMPONENT_GRIDCONTROL; return aSupported; } Any SAL_CALL OGridControlModel::queryAggregation( const Type& _rType ) diff --git a/forms/source/component/ListBox.cxx b/forms/source/component/ListBox.cxx index 2f95f6331f01..4e632d60a07e 100644 --- a/forms/source/component/ListBox.cxx +++ b/forms/source/component/ListBox.cxx @@ -1178,8 +1178,7 @@ namespace frm { if ( m_nNULLPos != -1 ) { -aSelectionIndicies.realloc(1); -aSelectionIndicies[0] = m_nNULLPos; +aSelectionIndicies = { m_nNULLPos }; } } else @@ -1191,8 +1190,7 @@ namespace frm ValueList::const_iterator curValuePos = ::std::find( aValues.begin(), aValues.end(), v ); if ( curValuePos != aValues.end() ) { -aSelectionIndicies.realloc( 1 ); -aSelectionIndicies[0] = curValuePos - aValues.begin(); +aSelectionIndicies = { o3tl::narrowing(curValuePos - aValues.begin()) }; } } @@ -1391,8 +1389,7 @@ namespace frm OSL_VERIFY( _rExternalValue >>= nSelectIndex ); if ( ( nSelectIndex >= 0 ) && ( nSelectIndex < static_cast(getStringItemList().size()) ) ) { -aSelectIndexes.realloc( 1 ); -aSelectIndexes[ 0 ] = static_cast< sal_Int16 >( nSelectIndex ); +aSelectIndexes = { o3tl::narrowing(nSelectIndex) }; } } break; diff --git a/forms/source/component/clickableimage.cxx b/forms/source/component/clickableimage.cxx index 8dd3489967f5..77dd6c5943b6 100644 --- a/forms/source/component/clickableimage.cxx +++ b/forms/source/component/clickableimage.cxx @@ -44,6 +44,7 @@ #include #include #include +#include #include #include #include @@ -317,15 +318,12 @@ namespace frm if ( xDisp.is() ) { -Sequence aProps(3); -aProps[0].Name = "URL"; -aProps[0].Value <<= aURL.Complete; - -aProps[1].Name = "Fr
[Libreoffice-commits] core.git: forms/source
forms/source/component/ListBox.cxx |8 forms/source/component/ListBox.hxx |2 +- 2 files changed, 5 insertions(+), 5 deletions(-) New commits: commit 1c46d2cabfa9cffd65599e55ca4060e39dcbad62 Author: Noel Grandin AuthorDate: Mon Oct 11 16:09:21 2021 +0200 Commit: Noel Grandin CommitDate: Mon Oct 11 21:06:44 2021 +0200 loplugin:moveparam in forms Change-Id: Ib3a6058e933eb7030cd6d7aef335f12fbd4e6bd3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123417 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/forms/source/component/ListBox.cxx b/forms/source/component/ListBox.cxx index a67249097d7d..91a22ea4ef3d 100644 --- a/forms/source/component/ListBox.cxx +++ b/forms/source/component/ListBox.cxx @@ -321,7 +321,7 @@ namespace frm // propagate if ( m_eListSourceType == ListSourceType_VALUELIST ) { -setBoundValues(m_aListSourceValues); +setBoundValues(std::vector(m_aListSourceValues)); } else { @@ -1000,7 +1000,7 @@ namespace frm m_nNULLPos = 0; } -setBoundValues(aValueList); +setBoundValues(std::move(aValueList)); setFastPropertyValue( PROPERTY_ID_STRINGITEMLIST, makeAny( lcl_convertToStringSequence( aDisplayList ) ) ); setFastPropertyValue( PROPERTY_ID_TYPEDITEMLIST, makeAny( css::uno::Sequence() ) ); @@ -1037,10 +1037,10 @@ namespace frm } -void OListBoxModel::setBoundValues(const ValueList &l) +void OListBoxModel::setBoundValues(ValueList && l) { m_aConvertedBoundValues.clear(); -m_aBoundValues = l; +m_aBoundValues = std::move(l); } diff --git a/forms/source/component/ListBox.hxx b/forms/source/component/ListBox.hxx index 046717202b2e..b4b51d4d8ce0 100644 --- a/forms/source/component/ListBox.hxx +++ b/forms/source/component/ListBox.hxx @@ -214,7 +214,7 @@ private: */ voidimpl_refreshDbEntryList( bool _bForce ); -voidsetBoundValues(const ValueList&); +voidsetBoundValues(ValueList &&); voidclearBoundValues(); ValueList impl_getValues() const;
[Libreoffice-commits] core.git: forms/source sfx2/source svx/source sw/source
forms/source/component/Filter.cxx| 11 + forms/source/component/ListBox.cxx | 11 + forms/source/runtime/formoperations.cxx |3 +- sfx2/source/doc/objxtor.cxx |3 +- svx/source/form/fmobjfac.cxx |3 +- sw/source/core/bastyp/calc.cxx |6 ++--- sw/source/core/doc/DocumentFieldsManager.cxx | 31 +-- sw/source/core/doc/docfld.cxx| 23 ++-- sw/source/core/doc/docnew.cxx|5 ++-- sw/source/core/edit/edfld.cxx|5 ++-- sw/source/core/fields/docufld.cxx|5 ++-- sw/source/filter/ww8/ww8par5.cxx |7 +++--- sw/source/ui/dialog/swdlgfact.cxx| 15 ++--- sw/source/ui/fldui/fldedt.cxx|3 +- sw/source/ui/fldui/fldtdlg.cxx |7 +++--- sw/source/uibase/app/apphdl.cxx |5 ++-- sw/source/uibase/app/applab.cxx |5 ++-- sw/source/uibase/fldui/fldmgr.cxx|5 ++-- sw/source/uibase/shells/basesh.cxx |3 +- sw/source/uibase/uiview/uivwimp.cxx |3 +- sw/source/uibase/uiview/view2.cxx|7 +++--- sw/source/uibase/uno/SwXDocumentSettings.cxx |5 ++-- sw/source/uibase/uno/unodispatch.cxx |3 +- sw/source/uibase/uno/unodoc.cxx |3 +- 24 files changed, 100 insertions(+), 77 deletions(-) New commits: commit 78cee244be863a14dfc76e4540b21dd08dba5e5a Author: Caolán McNamara AuthorDate: Fri Sep 24 12:46:21 2021 +0100 Commit: Caolán McNamara CommitDate: Fri Sep 24 15:26:21 2021 +0200 make it possible to build required database stuff for fuzzing The dbase filter requires dbaccess and connectivity but I don't want to pull in the rest of the stuff that --disable-database-connectivity currently disables that we still don't need for fuzzing if --disable-database-connectivity is removed Change-Id: Ia48d42295f9724b4dd2d3beb8e46ed23fc789f5c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122579 Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara diff --git a/forms/source/component/Filter.cxx b/forms/source/component/Filter.cxx index 0bf85648ddba..ce137f3bb1ca 100644 --- a/forms/source/component/Filter.cxx +++ b/forms/source/component/Filter.cxx @@ -20,6 +20,7 @@ #include #include +#include #include @@ -90,7 +91,7 @@ namespace frm bool OFilterControl::ensureInitialized( ) { -#if HAVE_FEATURE_DBCONNECTIVITY +#if HAVE_FEATURE_DBCONNECTIVITY && !ENABLE_FUZZERS if ( !m_xField.is() ) { OSL_FAIL( "OFilterControl::ensureInitialized: improperly initialized: no field!" ); @@ -271,7 +272,7 @@ namespace frm void SAL_CALL OFilterControl::itemStateChanged( const ItemEvent& rEvent ) { -#if !HAVE_FEATURE_DBCONNECTIVITY +#if !HAVE_FEATURE_DBCONNECTIVITY || ENABLE_FUZZERS (void) rEvent; #else OUStringBuffer aText; @@ -366,7 +367,7 @@ namespace frm void OFilterControl::implInitFilterList() { -#if HAVE_FEATURE_DBCONNECTIVITY +#if HAVE_FEATURE_DBCONNECTIVITY && !ENABLE_FUZZERS if ( !ensureInitialized( ) ) // already asserted in ensureInitialized return; @@ -491,7 +492,7 @@ namespace frm sal_Bool SAL_CALL OFilterControl::commit() { -#if HAVE_FEATURE_DBCONNECTIVITY +#if HAVE_FEATURE_DBCONNECTIVITY && !ENABLE_FUZZERS if ( !ensureInitialized( ) ) // already asserted in ensureInitialized return true; @@ -806,7 +807,7 @@ namespace frm void OFilterControl::initControlModel(Reference< XPropertySet > const & xControlModel) { -#if !HAVE_FEATURE_DBCONNECTIVITY +#if !HAVE_FEATURE_DBCONNECTIVITY || ENABLE_FUZZERS (void) xControlModel; #else if ( !xControlModel.is() ) diff --git a/forms/source/component/ListBox.cxx b/forms/source/component/ListBox.cxx index b58fb00cd8e9..f719ed3af040 100644 --- a/forms/source/component/ListBox.cxx +++ b/forms/source/component/ListBox.cxx @@ -18,6 +18,7 @@ */ #include +#include #include "ListBox.hxx" #include @@ -345,7 +346,7 @@ namespace frm } break; -#if HAVE_FEATURE_DBCONNECTIVITY +#if HAVE_FEATURE_DBCONNECTIVITY && !ENABLE_FUZZERS case PROPERTY_ID_SELECT_VALUE : { ORowSetValue v; @@ -875,7 +876,7 @@ namespace frm switch (m_eListSourceType) { -#if HAVE_FEATURE_DBCONNECTIVITY +#if HAVE_FEATURE_DBCONNECTIVITY && !ENABLE_FUZZERS case ListSourceType_SQL: case ListSourceType_SQLPASSTHROUGH: case ListSourceType_TABLE: @@ -1206,7 +1207,7 @@ namespace frm sal_Int32 nCount(0); -#if HAVE_FEATURE_DBCONNECTIVITY +#if HAVE_FEATURE_DBCONNECTIVITY && !ENABLE_FUZZERS sal_Int16 *pIndex = aSelectionIndicies.getArray();
[Libreoffice-commits] core.git: forms/source oox/source sc/source sfx2/source svx/source sw/source
forms/source/richtext/rtattributehandler.cxx |8 oox/source/export/shapes.cxx |2 +- sc/source/core/data/table5.cxx |2 +- sc/source/ui/app/scmod.cxx |2 +- sc/source/ui/view/auditsh.cxx |2 +- sc/source/ui/view/cellsh3.cxx |2 +- sc/source/ui/view/tabvwshe.cxx |4 ++-- sfx2/source/appl/appserv.cxx |2 +- svx/source/stbctrls/zoomsliderctrl.cxx |2 +- sw/source/core/doc/doctxm.cxx |9 - sw/source/core/docnode/ndsect.cxx |2 +- sw/source/core/edit/edglbldc.cxx |2 +- sw/source/core/edit/edtox.cxx |6 +++--- sw/source/core/layout/fly.cxx |2 +- sw/source/core/layout/trvlfrm.cxx |2 +- sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx |6 +++--- sw/source/core/objectpositioning/environmentofanchoredobject.cxx |4 ++-- sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx |2 +- sw/source/core/txtnode/fmtatr2.cxx |3 +-- sw/source/core/txtnode/ndtxt.cxx |3 +-- sw/source/core/unocore/unorefmk.cxx|3 +-- sw/source/core/view/vprint.cxx |2 +- sw/source/uibase/app/docsh2.cxx|5 ++--- sw/source/uibase/docvw/PostItMgr.cxx |2 +- sw/source/uibase/uiview/srcview.cxx|4 ++-- sw/source/uibase/utlui/viewlayoutctrl.cxx |2 +- 26 files changed, 40 insertions(+), 45 deletions(-) New commits: commit e11386053d3c404fbeab8b66402d68f813f7dd58 Author: Noel Grandin AuthorDate: Wed Sep 8 15:01:33 2021 +0200 Commit: Noel Grandin CommitDate: Wed Sep 8 22:17:05 2021 +0200 convert some OSL_ENSURE -> assert where we are just provide checking for a following static_cast. I'd rather have an explicit assert failure than a random crash Change-Id: Iab6c6b056341018deaa74b78b075e564f72c58d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121814 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/forms/source/richtext/rtattributehandler.cxx b/forms/source/richtext/rtattributehandler.cxx index 804d6bb2d42d..653d42e46a5f 100644 --- a/forms/source/richtext/rtattributehandler.cxx +++ b/forms/source/richtext/rtattributehandler.cxx @@ -183,7 +183,7 @@ namespace frm AttributeCheckState ParaAlignmentHandler::implGetCheckState( const SfxPoolItem& _rItem ) const { -OSL_ENSURE( dynamic_cast( &_rItem) != nullptr, "ParaAlignmentHandler::implGetCheckState: invalid pool item!" ); +assert( dynamic_cast( &_rItem) && "ParaAlignmentHandler::implGetCheckState: invalid pool item!" ); SvxAdjust eAdjust = static_cast< const SvxAdjustItem& >( _rItem ).GetAdjust(); return ( eAdjust == m_eAdjust ) ? eChecked : eUnchecked; } @@ -213,7 +213,7 @@ namespace frm AttributeCheckState LineSpacingHandler::implGetCheckState( const SfxPoolItem& _rItem ) const { -OSL_ENSURE( dynamic_cast( &_rItem) != nullptr, "LineSpacingHandler::implGetCheckState: invalid pool item!" ); +assert( dynamic_cast( &_rItem) && "LineSpacingHandler::implGetCheckState: invalid pool item!" ); sal_uInt16 nLineSpace = static_cast< const SvxLineSpacingItem& >( _rItem ).GetPropLineSpace(); return ( nLineSpace == m_nLineSpace ) ? eChecked : eUnchecked; } @@ -250,7 +250,7 @@ namespace frm AttributeCheckState EscapementHandler::implGetCheckState( const SfxPoolItem& _rItem ) const { -OSL_ENSURE( dynamic_cast( &_rItem) != nullptr, "EscapementHandler::getState: invalid pool item!" ); +assert( dynamic_cast( &_rItem) && "EscapementHandler::getState: invalid pool item!" ); SvxEscapement eEscapement = static_cast< const SvxEscapementItem& >( _rItem ).GetEscapement(); return ( eEscapement == m_eEscapement ) ? eChecked : eUnchecked; } @@ -389,7 +389,7 @@ namespace frm AttributeCheckState ParagraphDirectionHandler::implGetCheckState( const SfxPoolItem& _rItem ) const { -OSL_ENSURE( dynamic_cast( &_rItem) != nullptr, "ParagraphDirectionHandler::implGetCheckState: invalid pool item!" ); +assert( dynamic_cast( &_rItem) && "ParagraphDirectionHandler::implGetCheckState: invalid pool item!" ); SvxFrameDirection eDirection = static_cast<
[Libreoffice-commits] core.git: forms/source fpicker/source framework/source
forms/source/component/ComboBox.cxx|2 - forms/source/component/Filter.cxx |3 -- forms/source/component/FormComponent.cxx |4 --- forms/source/component/FormattedField.cxx |3 -- forms/source/component/ImageControl.cxx|2 - forms/source/component/ListBox.cxx |2 - forms/source/component/cachedrowset.cxx|4 --- forms/source/component/clickableimage.cxx |1 forms/source/richtext/richtextcontrol.cxx |1 forms/source/solar/component/navbarcontrol.cxx |2 - forms/source/xforms/binding.cxx|5 --- forms/source/xforms/boolexpression.cxx |5 --- forms/source/xforms/computedexpression.cxx |6 +--- forms/source/xforms/convert.cxx|1 forms/source/xforms/model.cxx |1 forms/source/xforms/pathexpression.cxx |2 - forms/source/xforms/submission.cxx | 13 -- fpicker/source/office/PlacesListBox.cxx|3 -- fpicker/source/office/contentenumeration.cxx |1 framework/source/accelerators/presethandler.cxx|3 -- framework/source/fwe/classes/actiontriggercontainer.cxx|3 -- framework/source/fwe/classes/actiontriggerpropertyset.cxx |1 framework/source/fwe/classes/actiontriggerseparatorpropertyset.cxx |1 framework/source/fwe/classes/rootactiontriggercontainer.cxx|3 -- framework/source/fwe/dispatch/interaction.cxx |1 framework/source/fwe/helper/propertysetcontainer.cxx |2 - framework/source/fwe/helper/titlehelper.cxx|4 --- framework/source/fwe/helper/undomanagerhelper.cxx |9 +- framework/source/helper/titlebarupdate.cxx |1 framework/source/interaction/quietinteraction.cxx |1 framework/source/layoutmanager/layoutmanager.cxx |4 +-- framework/source/services/ContextChangeEventMultiplexer.cxx|3 -- framework/source/services/desktop.cxx | 11 framework/source/services/frame.cxx|7 - framework/source/services/pathsettings.cxx |6 framework/source/uielement/buttontoolbarcontroller.cxx |1 framework/source/uielement/genericstatusbarcontroller.cxx |1 framework/source/uifactory/uicontrollerfactory.cxx |1 38 files changed, 17 insertions(+), 107 deletions(-) New commits: commit 1875b3d9f2a3873b592d5d207a46a6771649ca95 Author: Noel Grandin AuthorDate: Tue Aug 31 15:12:18 2021 +0200 Commit: Noel Grandin CommitDate: Wed Sep 1 08:54:41 2021 +0200 clang-tidy:readability-redundant-member-init Change-Id: I67edbea77b12940ac807ccbadfd74b250902809d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121378 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/forms/source/component/ComboBox.cxx b/forms/source/component/ComboBox.cxx index 6ef66237a174..9b1bd9b9c7bd 100644 --- a/forms/source/component/ComboBox.cxx +++ b/forms/source/component/ComboBox.cxx @@ -112,7 +112,6 @@ OComboBoxModel::OComboBoxModel(const Reference& _rxFactory) // use the old control name for compatibility reasons ,OEntryListHelper( static_cast(*this) ) ,OErrorBroadcaster( OComponentHelper::rBHelper ) -,m_aListRowSet() ,m_eListSourceType(ListSourceType_TABLE) ,m_bEmptyIsNull(true) { @@ -125,7 +124,6 @@ OComboBoxModel::OComboBoxModel( const OComboBoxModel* _pOriginal, const Referenc :OBoundControlModel( _pOriginal, _rxFactory ) ,OEntryListHelper( *_pOriginal, static_cast(*this) ) ,OErrorBroadcaster( OComponentHelper::rBHelper ) -,m_aListRowSet() ,m_aListSource( _pOriginal->m_aListSource ) ,m_aDefaultText( _pOriginal->m_aDefaultText ) ,m_eListSourceType( _pOriginal->m_eListSourceType ) diff --git a/forms/source/component/Filter.cxx b/forms/source/component/Filter.cxx index 141e011ad792..0bf85648ddba 100644 --- a/forms/source/component/Filter.cxx +++ b/forms/source/component/Filter.cxx @@ -78,8 +78,7 @@ namespace frm using namespace ::connectivity; OFilterControl::OFilterControl( const Reference< XComponentContext >& _rxORB ) -:UnoControl() -,m_aTextListeners( *this ) +:m_aTextListeners( *this ) ,m_xContext( _rxORB ) ,m_nControlClass( FormComponentType::TEXTFIELD ) ,m
[Libreoffice-commits] core.git: forms/source include/svtools include/vcl svtools/source svx/source toolkit/inc toolkit/source vcl/qa vcl/source
forms/source/richtext/richtextcontrol.cxx |2 forms/source/richtext/richtextvclcontrol.cxx |2 forms/source/richtext/richtextvclcontrol.hxx |2 include/svtools/brwbox.hxx |2 include/vcl/InterimItemWindow.hxx |3 - include/vcl/headbar.hxx|2 include/vcl/outdev.hxx |2 include/vcl/print.hxx |1 include/vcl/rendercontext/SystemTextColorFlags.hxx | 37 +++ include/vcl/scrbar.hxx |4 - include/vcl/tabpage.hxx|2 include/vcl/toolkit/button.hxx | 18 +++ include/vcl/toolkit/combobox.hxx |2 include/vcl/toolkit/dialog.hxx |2 include/vcl/toolkit/edit.hxx |2 include/vcl/toolkit/fixed.hxx | 10 ++-- include/vcl/toolkit/group.hxx |4 - include/vcl/toolkit/imgctrl.hxx|2 include/vcl/toolkit/lstbox.hxx |2 include/vcl/toolkit/spin.hxx |2 include/vcl/toolkit/spinfld.hxx|2 include/vcl/toolkit/vclmedit.hxx |2 include/vcl/window.hxx | 15 -- svtools/source/brwbox/brwbox2.cxx |2 svtools/source/brwbox/editbrowsebox.cxx|2 svx/source/fmcomp/gridcell.cxx |2 toolkit/inc/controls/filectrl.hxx |2 toolkit/source/awt/vclxtabpagecontainer.cxx|2 toolkit/source/awt/vclxwindow.cxx |4 - toolkit/source/awt/vclxwindows.cxx |8 +-- toolkit/source/controls/filectrl.cxx |2 vcl/qa/cppunit/outdev.cxx | 20 vcl/source/control/InterimItemWindow.cxx |5 +- vcl/source/control/button.cxx | 50 ++--- vcl/source/control/combobox.cxx|4 - vcl/source/control/edit.cxx|4 - vcl/source/control/fixed.cxx | 18 +++ vcl/source/control/imgctrl.cxx |2 vcl/source/control/listbox.cxx |4 - vcl/source/control/scrbar.cxx | 20 vcl/source/control/spinbtn.cxx |4 - vcl/source/control/spinfld.cxx |6 +- vcl/source/edit/vclmedit.cxx | 19 --- vcl/source/gdi/print.cxx |5 ++ vcl/source/outdev/text.cxx | 16 ++ vcl/source/toolkit/group.cxx | 18 +++ vcl/source/treelist/headbar.cxx|4 - vcl/source/window/dialog.cxx |2 vcl/source/window/tabpage.cxx |2 vcl/source/window/window.cxx |2 50 files changed, 203 insertions(+), 148 deletions(-) New commits: commit a2c8195f465a2e4346169d2b586c34e8fbed253c Author: Chris Sherlock AuthorDate: Wed May 12 20:01:05 2021 +1000 Commit: Mike Kaganski CommitDate: Mon Aug 30 06:09:49 2021 +0200 tdf#74702 vcl: introduce GetSystemTextColor() Also rename DrawFlags to SystemDrawColorFlags, added a unit test. Change-Id: I3cb74b278e43561d1055b3b55b9730cdbdea51aa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113559 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/forms/source/richtext/richtextcontrol.cxx b/forms/source/richtext/richtextcontrol.cxx index 45e898b8ed13..7aeb8410b568 100644 --- a/forms/source/richtext/richtextcontrol.cxx +++ b/forms/source/richtext/richtextcontrol.cxx @@ -330,7 +330,7 @@ namespace frm if ( eTargetUnit != MapUnit::MapPixel ) aPos = pTargetDevice->PixelToLogic( aPos ); -pControl->Draw( pTargetDevice, aPos, DrawFlags::NoControls ); +pControl->Draw( pTargetDevice, aPos, SystemTextColorFlags::NoControls ); } diff --git a/forms/source/richtext/richtextvclcontrol.cxx b/forms/source/richtext/richtextvclcontrol.cxx index 0df141693f54..ff570eb74efa 100644 --- a/forms/source/richtext/richtextvclcontrol.cxx +++ b/forms/source/richtext/richtextvclcontrol.cxx @@ -288,7 +288,7 @@ namespace frm return bDone || Control::EventNotify(_rNEvt); } -void RichTextControl::Draw( OutputDevice* _pDev, const Point& _rPos, DrawFlags /*_nFlags*/ ) +void RichTextControl::Draw( OutputDevice* _pDev, const Point& _rPos, SystemTextColorFlags /*_nFlags*/ ) { m_pImpl->Draw( _pDev, _rPos, _pDev->PixelToLogic(GetSizePixel()) ); } diff --git a/forms/source/richtext/richtextvclcontrol.hxx b/forms/source/richtext/richtextvclcontrol.hxx index 58448c34cd11..92d0
[Libreoffice-commits] core.git: forms/source fpicker/source helpcompiler/source reportdesign/source sc/source
forms/source/xforms/submission/submission_get.cxx |8 ++-- fpicker/source/office/fileview.cxx|8 ++-- helpcompiler/source/HelpLinker.cxx|4 +- helpcompiler/source/HelpLinker_main.cxx |4 +- reportdesign/source/ui/misc/UITools.cxx |4 +- sc/source/core/data/documen8.cxx |4 +- sc/source/core/data/simpleformulacalc.cxx |4 +- sc/source/core/data/stlpool.cxx | 42 +++--- sc/source/core/tool/chgtrack.cxx |4 +- sc/source/core/tool/interpr4.cxx |6 +-- 10 files changed, 44 insertions(+), 44 deletions(-) New commits: commit 6783afe24d43a1bfd0b0239d3ebb97046177111d Author: Noel Grandin AuthorDate: Tue Jun 1 13:41:49 2021 +0200 Commit: Noel Grandin CommitDate: Wed Jun 2 18:23:45 2021 +0200 no need to allocate these on the heap Change-Id: Ie11353c8711e970cc20059227d8283c79e4b126d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116586 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/forms/source/xforms/submission/submission_get.cxx b/forms/source/xforms/submission/submission_get.cxx index 22825328b6cd..880eb1d4df3e 100644 --- a/forms/source/xforms/submission/submission_get.cxx +++ b/forms/source/xforms/submission/submission_get.cxx @@ -47,11 +47,11 @@ CSubmissionGet::CSubmissionGet(const OUString& aURL, const css::uno::Reference< CSubmission::SubmissionResult CSubmissionGet::submit(const css::uno::Reference< css::task::XInteractionHandler >& aInteractionHandler) { // GET always uses application/x-www-formurlencoded -std::unique_ptr< CSerialization > apSerialization(new CSerializationURLEncoded()); -apSerialization->setSource(m_aFragment); -apSerialization->serialize(); +CSerializationURLEncoded aSerialization; +aSerialization.setSource(m_aFragment); +aSerialization.serialize(); -css::uno::Reference< XInputStream > aInStream = apSerialization->getInputStream(); +css::uno::Reference< XInputStream > aInStream = aSerialization.getInputStream(); // create a commandEnvironment and use the default interaction handler rtl::Reference pHelper = new CCommandEnvironmentHelper; diff --git a/fpicker/source/office/fileview.cxx b/fpicker/source/office/fileview.cxx index 548b49c3cd1d..87d134c3edbd 100644 --- a/fpicker/source/office/fileview.cxx +++ b/fpicker/source/office/fileview.cxx @@ -1218,13 +1218,13 @@ FileViewResult SvtFileView_Impl::GetFolderContent_Impl( m_aCurrentAsyncActionHandler = Link(); // minimum time to wait -std::unique_ptr< TimeValue > pTimeout( new TimeValue ); +TimeValue aTimeout; sal_Int32 nMinTimeout = pAsyncDescriptor->nMinTimeout; OSL_ENSURE( nMinTimeout > 0, "SvtFileView_Impl::GetFolderContent_Impl: invalid minimum timeout!" ); if ( nMinTimeout <= 0 ) nMinTimeout = sal_Int32( 1000 ); -pTimeout->Seconds = nMinTimeout / 1000; -pTimeout->Nanosec = ( nMinTimeout % 1000 ) * 100; +aTimeout.Seconds = nMinTimeout / 1000; +aTimeout.Nanosec = ( nMinTimeout % 1000 ) * 100; m_xContentEnumerator->enumerateFolderContent( _rFolder, this ); @@ -1240,7 +1240,7 @@ FileViewResult SvtFileView_Impl::GetFolderContent_Impl( SolarMutexReleaser aSolarRelease; // now wait. Note that if we didn't get a pAsyncDescriptor, then this is an infinite wait. -eResult = m_aAsyncActionFinished.wait( pTimeout.get() ); +eResult = m_aAsyncActionFinished.wait( &aTimeout ); } ::osl::MutexGuard aGuard2( maMutex ); diff --git a/helpcompiler/source/HelpLinker.cxx b/helpcompiler/source/HelpLinker.cxx index b272d2c010e5..f7acc30ecc7d 100644 --- a/helpcompiler/source/HelpLinker.cxx +++ b/helpcompiler/source/HelpLinker.cxx @@ -881,8 +881,8 @@ bool compileExtensionHelp xmlSetStructuredErrorFunc( nullptr, StructuredXMLErrorFunction ); try { -std::unique_ptr pHelpLinker(new HelpLinker()); -pHelpLinker->main( args, &aStdStrExtensionPath, &aStdStrDestination, &aOfficeHelpPath ); +HelpLinker aHelpLinker; +aHelpLinker.main( args, &aStdStrExtensionPath, &aStdStrDestination, &aOfficeHelpPath ); } catch( const HelpProcessingException& e ) { diff --git a/helpcompiler/source/HelpLinker_main.cxx b/helpcompiler/source/HelpLinker_main.cxx index 5c8fe8807336..75ac9f3d3ba1 100644 --- a/helpcompiler/source/HelpLinker_main.cxx +++ b/helpcompiler/source/HelpLinker_main.cxx @@ -30,8 +30,8 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) args.push_back(std::string(argv[i])); try { -std::unique_ptr pHelpLinker(new HelpLinker()); -pHelpLinker->main(args); +HelpLinker aHelpLinker; +aHelpLinker.main(args); } catch (const HelpProcessingException& e) { diff --git a/reportdesign/source/ui/misc/UITools.cxx b/reportdesign/source/ui/misc/UITool
[Libreoffice-commits] core.git: forms/source
forms/source/xforms/model_ui.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit a5bdce555ad7e5bd480c7bd63159869b7a9bc3d3 Author: Caolán McNamara AuthorDate: Thu May 13 14:52:27 2021 +0100 Commit: Caolán McNamara CommitDate: Thu May 13 18:13:37 2021 +0200 comment on suspicious code Change-Id: I92b16c22815a755ec23503db1b8f7bb3444f89e9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115560 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/forms/source/xforms/model_ui.cxx b/forms/source/xforms/model_ui.cxx index 4592fa3efe97..7f39a9f6ed99 100644 --- a/forms/source/xforms/model_ui.cxx +++ b/forms/source/xforms/model_ui.cxx @@ -610,6 +610,8 @@ css::uno::Reference Model::renameNode( const css::uno::Ref Reference xMap = xNode->getAttributes(); sal_Int32 nLength = xMap.is() ? xMap->getLength() : 0; +// looping until nLength is suspicious wrt removeAttributeNode +// presumably shrinking XNamedNodeMap::getLength by 1 for( sal_Int32 n = 0; n < nLength; n++ ) { Reference xAttr( xMap->item(n), UNO_QUERY ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: forms/source
forms/source/component/Columns.cxx |3 +-- forms/source/component/Columns.hxx |7 --- forms/source/xforms/datatyperepository.cxx |2 +- forms/source/xforms/datatypes.cxx |8 forms/source/xforms/datatypes.hxx |9 + 5 files changed, 15 insertions(+), 14 deletions(-) New commits: commit 9c1ec551524a75c20c1468a6fc0101eb2480e8e3 Author: Noel AuthorDate: Thu Feb 25 14:50:15 2021 +0200 Commit: Noel Grandin CommitDate: Fri Feb 26 10:00:06 2021 +0100 loplugin:refcounting in forms Change-Id: Idba46c8b30a3c44f12c0aaa8a00477865ecfb848 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111542 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/forms/source/component/Columns.cxx b/forms/source/component/Columns.cxx index 95438dc86cbf..50a9e05875d6 100644 --- a/forms/source/component/Columns.cxx +++ b/forms/source/component/Columns.cxx @@ -455,8 +455,7 @@ Any OGridColumn::getPropertyDefaultByHandle( sal_Int32 nHandle ) const Reference< XCloneable > SAL_CALL OGridColumn::createClone( ) { -OGridColumn* pNewColumn = createCloneColumn(); -return pNewColumn; +return createCloneColumn(); } // XPersistObject diff --git a/forms/source/component/Columns.hxx b/forms/source/component/Columns.hxx index 010252615930..2f2bb3e846be 100644 --- a/forms/source/component/Columns.hxx +++ b/forms/source/component/Columns.hxx @@ -32,6 +32,7 @@ #include #include #include +#include using namespace comphelper; @@ -106,7 +107,7 @@ protected: static void clearAggregateProperties(css::uno::Sequence< css::beans::Property>& seqProps, bool bAllowDropDown); static void setOwnProperties(css::uno::Sequence< css::beans::Property>& seqProps); -virtual OGridColumn* createCloneColumn() const = 0; +virtual rtl::Reference createCloneColumn() const = 0; }; #define DECL_COLUMN(ClassName) \ @@ -126,7 +127,7 @@ public: css::uno::Sequence< css::beans::Property >& /* [out] */ _rAggregateProps \ ) const override; \ \ -virtual OGridColumn* createCloneColumn() const override; \ +virtual rtl::Reference createCloneColumn() const override; \ }; @@ -160,7 +161,7 @@ void ClassName::fillProperties( \ setOwnProperties(_rProps); \ } \ } \ -OGridColumn* ClassName::createCloneColumn() const \ +rtl::Reference ClassName::createCloneColumn() const \ { \ return new ClassName( this ); \ } \ diff --git a/forms/source/xforms/datatyperepository.cxx b/forms/source/xforms/datatyperepository.cxx index bb0bf4a34135..22a56ce545ee 100644 --- a/forms/source/xforms/datatyperepository.cxx +++ b/forms/source/xforms/datatyperepository.cxx @@ -131,7 +131,7 @@ namespace xforms throw ElementExistException( OUString(), *this ); aTypePos = implLocate( sourceName ); -OXSDDataType* pClone = aTypePos->second->clone( newName ); +rtl::Reference pClone = aTypePos->second->clone( newName ); m_aRepository[ newName ] = pClone; return pClone; diff --git a/forms/source/xforms/datatypes.cxx b/forms/source/xforms/datatypes.cxx index 91175dea907c..c4ce2d941bb4 100644 --- a/forms/source/xforms/datatypes.cxx +++ b/forms/source/xforms/datatypes.cxx @@ -89,9 +89,9 @@ namespace xforms } -OXSDDataType* OXSDDataType::clone( const OUString& _rNewName ) const +rtl::Reference OXSDDataType::clone( const OUString& _rNewName ) const { -OXSDDataType* pClone = createClone( _rNewName ); +rtl::Reference pClone = createClone( _rNewName ); pClone->initializeClone( *this ); return pClone; } @@ -568,7 +568,7 @@ namespace xforms { } -OXSDDataType* OBooleanType::createClone( const OUString& _rName ) const +rtl::Reference OBooleanType::createClone( const OUString& _rName ) const { return new OBooleanType( _rName ); } @@ -695,7 +695,7 @@ namespace xforms :classname##_Base( _rName, DataTypeClass::typeclass ) \ { \ } \ -OXSDDataType* classname::createClone( const OUString& _rName ) const \ +rtl::Reference classname::createClone( const OUString& _rName ) const \ { \ return new classname( _rName ); \ } \ diff --git a/forms/source/xforms/datatypes.hxx b/forms/source/xforms/
[Libreoffice-commits] core.git: forms/source
forms/source/component/DatabaseForm.cxx |4 +--- forms/source/component/FormComponent.cxx |4 forms/source/component/FormattedField.cxx |9 - forms/source/component/FormattedField.hxx |1 + forms/source/component/FormattedFieldWrapper.cxx | 19 +++ forms/source/component/FormsCollection.cxx|7 +++ forms/source/component/Grid.cxx |6 ++ forms/source/component/clickableimage.cxx |2 +- forms/source/component/navigationbar.hxx |1 - forms/source/inc/FormComponent.hxx|4 ++-- forms/source/richtext/richtextcontrol.cxx |6 +++--- forms/source/richtext/richtextmodel.cxx |2 +- forms/source/richtext/richtextmodel.hxx |2 -- forms/source/xforms/binding.cxx |5 ++--- forms/source/xforms/model_ui.cxx |6 +++--- forms/source/xforms/submission.cxx| 15 ++- forms/source/xforms/submission/replace.cxx|5 +++-- forms/source/xforms/submission/submission_get.cxx |4 ++-- 18 files changed, 41 insertions(+), 61 deletions(-) New commits: commit 7ffb71e759e5d29a505188d1cbf506dd57383a4a Author: Noel AuthorDate: Sun Feb 21 13:33:00 2021 +0200 Commit: Noel Grandin CommitDate: Sun Feb 21 16:10:51 2021 +0100 loplugin:refcounting in forms Change-Id: I19d67e54f77e354eaddaaa7de1f3e22c2b7cdbf6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111280 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx index 066eeb45e293..7411abf90351 100644 --- a/forms/source/component/DatabaseForm.cxx +++ b/forms/source/component/DatabaseForm.cxx @@ -1373,10 +1373,8 @@ void SAL_CALL ODatabaseForm::clearWarnings( ) Reference< XCloneable > SAL_CALL ODatabaseForm::createClone( ) { -ODatabaseForm* pClone = new ODatabaseForm( *this ); -osl_atomic_increment( &pClone->m_refCount ); +rtl::Reference pClone = new ODatabaseForm( *this ); pClone->clonedFrom( *this ); -osl_atomic_decrement( &pClone->m_refCount ); return pClone; } diff --git a/forms/source/component/FormComponent.cxx b/forms/source/component/FormComponent.cxx index 8b3047cc176b..e2a6a582ed31 100644 --- a/forms/source/component/FormComponent.cxx +++ b/forms/source/component/FormComponent.cxx @@ -1137,7 +1137,6 @@ OBoundControlModel::OBoundControlModel( ,m_aUpdateListeners(m_aMutex) ,m_aFormComponentListeners( m_aMutex ) ,m_bInputRequired( false ) -,m_pAggPropMultiplexer( nullptr ) ,m_bFormListening( false ) ,m_bLoaded(false) ,m_bRequired(false) @@ -1170,7 +1169,6 @@ OBoundControlModel::OBoundControlModel( ,m_aFormComponentListeners( m_aMutex ) ,m_xValidator( _pOriginal->m_xValidator ) ,m_bInputRequired( false ) -,m_pAggPropMultiplexer( nullptr ) ,m_bFormListening( false ) ,m_bLoaded( false ) ,m_bRequired( false ) @@ -1214,7 +1212,6 @@ OBoundControlModel::~OBoundControlModel() if ( m_pAggPropMultiplexer ) { m_pAggPropMultiplexer->dispose(); -m_pAggPropMultiplexer->release(); m_pAggPropMultiplexer = nullptr; } } @@ -1244,7 +1241,6 @@ void OBoundControlModel::implInitAggMultiplexer( ) if ( m_xAggregateSet.is() ) { m_pAggPropMultiplexer = new OPropertyChangeMultiplexer( this, m_xAggregateSet, false ); -m_pAggPropMultiplexer->acquire(); } osl_atomic_decrement( &m_refCount ); diff --git a/forms/source/component/FormattedField.cxx b/forms/source/component/FormattedField.cxx index ed2f748fb7cd..74e6aaf08e01 100644 --- a/forms/source/component/FormattedField.cxx +++ b/forms/source/component/FormattedField.cxx @@ -72,7 +72,7 @@ namespace frm { namespace { -class StandardFormatsSupplier : protected SvNumberFormatsSupplierObj, public ::utl::ITerminationListener +class StandardFormatsSupplier : public SvNumberFormatsSupplierObj, public ::utl::ITerminationListener { protected: std::unique_ptr m_pMyPrivateFormatter; @@ -113,8 +113,7 @@ Reference< XNumberFormatsSupplier > StandardFormatsSupplier::get( const Referenc // get the Office's locale eSysLanguage = SvtSysLocale().GetLanguageTag().getLanguageType( false); } -StandardFormatsSupplier* pSupplier = new StandardFormatsSupplier( _rxORB, eSysLanguage ); -Reference< XNumberFormatsSupplier > xNewlyCreatedSupplier( pSupplier ); +rtl::Reference pSupplier = new StandardFormatsSupplier( _rxORB, eSysLanguage ); { ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); Reference< XNumberFormatsSupplier > xSupplier = s_xDefaultFormatsSupplier; @@ -122,9 +121,9 @@ Reference< XNumberFormatsSupplier > StandardFormatsSupplier::get( const Referenc // somebody used the s
[Libreoffice-commits] core.git: forms/source
forms/source/component/clickableimage.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit a444a8dd40cf7035c44ee8ef168be2b3e3144c86 Author: Julien Nabet AuthorDate: Thu Feb 4 19:55:55 2021 +0100 Commit: Julien Nabet CommitDate: Thu Feb 4 21:20:08 2021 +0100 tdf#140151: revert fix for tdf#46579 which caused regression Change-Id: I48468d4cef1f4d68dab4759c8da30aead6b99e5d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110425 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/forms/source/component/clickableimage.cxx b/forms/source/component/clickableimage.cxx index 6c5c80313251..f46bbb562545 100644 --- a/forms/source/component/clickableimage.cxx +++ b/forms/source/component/clickableimage.cxx @@ -311,9 +311,9 @@ namespace frm } else { -URL aHyperLink = m_pFeatureInterception->getTransformer().getStrictURL(aURL.Complete); +URL aHyperLink = m_pFeatureInterception->getTransformer().getStrictURL( ".uno:OpenHyperlink" ); -Reference< XDispatch > xDisp = m_pFeatureInterception->queryDispatch(aHyperLink); +Reference< XDispatch > xDisp = Reference< XDispatchProvider > (xFrame,UNO_QUERY_THROW)->queryDispatch(aHyperLink, OUString() , 0); if ( xDisp.is() ) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: forms/source
forms/source/component/ListBox.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 3b352e846e7244c34182fcc925e6653431880ac9 Author: Stephan Bergmann AuthorDate: Tue Dec 29 11:54:16 2020 +0100 Commit: Stephan Bergmann CommitDate: Wed Dec 30 07:43:53 2020 +0100 AppendRowSetValueString is used on a ValueList (aka a vector, so make it work on ORowSetValue. (This will avoid a bogus warning when extending loplugin:stringviewparam to operator +=.) Change-Id: I2c4bbb2f6b4c920f26038053f9c5d4607e8c3378 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108454 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/forms/source/component/ListBox.cxx b/forms/source/component/ListBox.cxx index f33312952e44..42dc08aee90d 100644 --- a/forms/source/component/ListBox.cxx +++ b/forms/source/component/ListBox.cxx @@ -95,7 +95,7 @@ namespace frm { } -void operator()( const OUString& _append ) +void operator()( const ORowSetValue& _append ) { m_string += _append; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: forms/source sdext/source sd/source sw/source
forms/source/xforms/model.cxx |2 +- forms/source/xforms/xforms_services.cxx |2 +- sd/source/ui/presenter/SlideRenderer.cxx|2 +- sdext/source/pdfimport/filterdet.cxx|2 +- sdext/source/pdfimport/pdfiadaptor.cxx |4 ++-- sw/source/uibase/sidebar/SwPanelFactory.cxx |2 +- 6 files changed, 7 insertions(+), 7 deletions(-) New commits: commit ea14c98aaba550ecde4c4736d1a3abdc0fd451ef Author: Bayram Çiçek AuthorDate: Fri Dec 25 17:00:30 2020 + Commit: Julien Nabet CommitDate: Sat Dec 26 17:15:18 2020 +0100 tdf#88205: Adapt uses of css::uno::Sequence to use initializer_list ctor Change-Id: Id4034a57580f37fd71f841deec9edfe9b7c26a67 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108286 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/forms/source/xforms/model.cxx b/forms/source/xforms/model.cxx index 5075222e1459..6eed4d7d06ed 100644 --- a/forms/source/xforms/model.cxx +++ b/forms/source/xforms/model.cxx @@ -610,7 +610,7 @@ sal_Bool Model::supportsService(OUString const & ServiceName) css::uno::Sequence Model::getSupportedServiceNames() { -return css::uno::Sequence{"com.sun.star.xforms.Model"}; +return {"com.sun.star.xforms.Model"}; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* diff --git a/forms/source/xforms/xforms_services.cxx b/forms/source/xforms/xforms_services.cxx index 383afbaeb802..23a1ee400ffb 100644 --- a/forms/source/xforms/xforms_services.cxx +++ b/forms/source/xforms/xforms_services.cxx @@ -43,7 +43,7 @@ class Implementation: css::uno::Sequence SAL_CALL getSupportedServiceNames() override { -return css::uno::Sequence{"com.sun.star.xforms.XForms"}; +return {"com.sun.star.xforms.XForms"}; } }; diff --git a/sd/source/ui/presenter/SlideRenderer.cxx b/sd/source/ui/presenter/SlideRenderer.cxx index f8281e6319bb..3db4c7355ca5 100644 --- a/sd/source/ui/presenter/SlideRenderer.cxx +++ b/sd/source/ui/presenter/SlideRenderer.cxx @@ -70,7 +70,7 @@ sal_Bool SlideRenderer::supportsService(OUString const & ServiceName) css::uno::Sequence SlideRenderer::getSupportedServiceNames() { -return css::uno::Sequence{"com.sun.star.drawing.SlideRenderer"}; +return {"com.sun.star.drawing.SlideRenderer"}; } //- XSlideRenderer diff --git a/sdext/source/pdfimport/filterdet.cxx b/sdext/source/pdfimport/filterdet.cxx index 88f617ecea89..7e6e72f4d707 100644 --- a/sdext/source/pdfimport/filterdet.cxx +++ b/sdext/source/pdfimport/filterdet.cxx @@ -396,7 +396,7 @@ sal_Bool PDFDetector::supportsService(OUString const & ServiceName) css::uno::Sequence PDFDetector::getSupportedServiceNames() { -return css::uno::Sequence{"com.sun.star.document.ImportFilter"}; +return {"com.sun.star.document.ImportFilter"}; } bool checkDocChecksum( const OUString& rInPDFFileURL, diff --git a/sdext/source/pdfimport/pdfiadaptor.cxx b/sdext/source/pdfimport/pdfiadaptor.cxx index 45f35320fe30..a8b045ca0ccc 100644 --- a/sdext/source/pdfimport/pdfiadaptor.cxx +++ b/sdext/source/pdfimport/pdfiadaptor.cxx @@ -201,7 +201,7 @@ sal_Bool PDFIHybridAdaptor::supportsService(OUString const & ServiceName) css::uno::Sequence PDFIHybridAdaptor::getSupportedServiceNames() { -return css::uno::Sequence{"com.sun.star.document.ImportFilter"}; +return {"com.sun.star.document.ImportFilter"}; } PDFIRawAdaptor::PDFIRawAdaptor( OUString const & implementationName, const uno::Reference< uno::XComponentContext >& xContext ) : @@ -323,7 +323,7 @@ sal_Bool PDFIRawAdaptor::supportsService(OUString const & ServiceName) css::uno::Sequence PDFIRawAdaptor::getSupportedServiceNames() { -return css::uno::Sequence{"com.sun.star.document.ImportFilter"}; +return {"com.sun.star.document.ImportFilter"}; } diff --git a/sw/source/uibase/sidebar/SwPanelFactory.cxx b/sw/source/uibase/sidebar/SwPanelFactory.cxx index db9e6f29458a..fcf297dc3100 100644 --- a/sw/source/uibase/sidebar/SwPanelFactory.cxx +++ b/sw/source/uibase/sidebar/SwPanelFactory.cxx @@ -74,7 +74,7 @@ public: { return cppu::supportsService(this, ServiceName); } css::uno::Sequence SAL_CALL getSupportedServiceNames() override -{ return css::uno::Sequence{"com.sun.star.ui.UIElementFactory"}; } +{ return {"com.sun.star.ui.UIElementFactory"}; } }; SwPanelFactory::SwPanelFactory() ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: forms/source
forms/source/component/clickableimage.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit fd670f52523e3a4dd51afe116b0f6ce90ce0d2fe Author: Julien Nabet AuthorDate: Thu Dec 3 13:16:38 2020 +0100 Commit: Julien Nabet CommitDate: Thu Dec 3 18:32:06 2020 +0100 Simplify code in forms/clickableimage following 07be45d03f80fa681c697ca9f5a13084a81c7a26 tdf#46579: fix form fields 'Image Button' in Forms urls have this form: .uno:FormController/moveToFirst .uno:FormController/moveToPrev etc. So we must use these links for hyperlinks + interceptor with ControlFeatureInterception Change-Id: I2cbbfeac9ed65420f11f21a30e1a1f7cb2d70850 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107158 Tested-by: Julien Nabet Reviewed-by: Julien Nabet diff --git a/forms/source/component/clickableimage.cxx b/forms/source/component/clickableimage.cxx index 431506adbf1f..6c5c80313251 100644 --- a/forms/source/component/clickableimage.cxx +++ b/forms/source/component/clickableimage.cxx @@ -311,7 +311,7 @@ namespace frm } else { -URL aHyperLink = m_pFeatureInterception->getTransformer().getStrictURLFromAscii( OUStringToOString(aURL.Complete, RTL_TEXTENCODING_ASCII_US).getStr() ); +URL aHyperLink = m_pFeatureInterception->getTransformer().getStrictURL(aURL.Complete); Reference< XDispatch > xDisp = m_pFeatureInterception->queryDispatch(aHyperLink); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: forms/source
forms/source/component/clickableimage.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 07be45d03f80fa681c697ca9f5a13084a81c7a26 Author: Julien Nabet AuthorDate: Wed Dec 2 00:05:14 2020 +0100 Commit: Julien Nabet CommitDate: Wed Dec 2 21:01:45 2020 +0100 tdf#46579: fix form fields 'Image Button' in Forms urls have this form: .uno:FormController/moveToFirst .uno:FormController/moveToPrev etc. So we must use these links for hyperlinks + interceptor with ControlFeatureInterception Change-Id: I9cff19833d859624239ca6c76152cc88f9cbb278 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107037 Tested-by: Jenkins Reviewed-by: Lionel Mamane Reviewed-by: Julien Nabet diff --git a/forms/source/component/clickableimage.cxx b/forms/source/component/clickableimage.cxx index e3d19da934db..431506adbf1f 100644 --- a/forms/source/component/clickableimage.cxx +++ b/forms/source/component/clickableimage.cxx @@ -311,9 +311,9 @@ namespace frm } else { -URL aHyperLink = m_pFeatureInterception->getTransformer().getStrictURLFromAscii( ".uno:OpenHyperlink" ); +URL aHyperLink = m_pFeatureInterception->getTransformer().getStrictURLFromAscii( OUStringToOString(aURL.Complete, RTL_TEXTENCODING_ASCII_US).getStr() ); -Reference< XDispatch > xDisp = Reference< XDispatchProvider > (xFrame,UNO_QUERY_THROW)->queryDispatch(aHyperLink, OUString() , 0); +Reference< XDispatch > xDisp = m_pFeatureInterception->queryDispatch(aHyperLink); if ( xDisp.is() ) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: forms/source
forms/source/component/DatabaseForm.cxx |2 -- forms/source/runtime/formoperations.cxx |1 - 2 files changed, 3 deletions(-) New commits: commit 3fdf151dcdc00d65633c3ff33182b371da7ebfcb Author: Andrea Gelmini AuthorDate: Tue Dec 1 14:12:09 2020 +0100 Commit: Stephan Bergmann CommitDate: Wed Dec 2 08:20:47 2020 +0100 Removed triplicated includes Change-Id: I91af264306ac7a61c90bf46df0560448b7d2285d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106981 Reviewed-by: Julien Nabet Tested-by: Jenkins diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx index 41753cc0a121..d46cd0b0d3f3 100644 --- a/forms/source/component/DatabaseForm.cxx +++ b/forms/source/component/DatabaseForm.cxx @@ -68,12 +68,10 @@ #include #include #include -#include #include #include #include #include -#include using namespace ::dbtools; using namespace ::comphelper; diff --git a/forms/source/runtime/formoperations.cxx b/forms/source/runtime/formoperations.cxx index e698d29f4051..4aa12bc91233 100644 --- a/forms/source/runtime/formoperations.cxx +++ b/forms/source/runtime/formoperations.cxx @@ -60,7 +60,6 @@ #include #include #include -#include namespace frm ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: forms/source solenv/clang-format
forms/source/component/BaseListBox.hxx |9 forms/source/component/findpos.hxx | 10 +--- forms/source/xforms/boolexpression.cxx | 17 ++-- forms/source/xforms/enumeration.cxx | 18 +++- forms/source/xforms/mip.hxx | 21 -- forms/source/xforms/pathexpression.hxx | 21 -- forms/source/xforms/submission/serialization.hxx|9 +--- forms/source/xforms/submission/serialization_app_xml.hxx|6 +- forms/source/xforms/submission/serialization_urlencoded.hxx |6 +- forms/source/xforms/submission/submission_get.hxx |7 +-- forms/source/xforms/submission/submission_put.hxx |7 +-- forms/source/xforms/unohelper.cxx | 25 forms/source/xforms/xpathlib/extension.hxx | 19 - solenv/clang-format/excludelist | 13 -- 14 files changed, 75 insertions(+), 113 deletions(-) New commits: commit 951764106e2d82fc59dcf39e14bc17838856a00c Author: Philipp Hofer AuthorDate: Thu Nov 12 12:57:37 2020 +0100 Commit: Christian Lohmaier CommitDate: Fri Nov 13 15:17:55 2020 +0100 tdf#123936 Formatting files in module forms with clang-format Change-Id: I230375bd002147642db37728fa0287b6a554e330 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105670 Tested-by: Jenkins Reviewed-by: Christian Lohmaier diff --git a/forms/source/component/BaseListBox.hxx b/forms/source/component/BaseListBox.hxx index ec3b11510307..1e3ee87a1136 100644 --- a/forms/source/component/BaseListBox.hxx +++ b/forms/source/component/BaseListBox.hxx @@ -22,17 +22,12 @@ #include - namespace frm { - -const sal_uInt16 ENTRY_NOT_FOUND = 0x; -const sal_uInt16 BOUNDCOLUMN = 0x0001; - - +const sal_uInt16 ENTRY_NOT_FOUND = 0x; +const sal_uInt16 BOUNDCOLUMN = 0x0001; } - #endif // INCLUDED_FORMS_SOURCE_COMPONENT_BASELISTBOX_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/findpos.hxx b/forms/source/component/findpos.hxx index 3c108ba1d425..b279558fdab0 100644 --- a/forms/source/component/findpos.hxx +++ b/forms/source/component/findpos.hxx @@ -24,13 +24,9 @@ #include #include - -namespace detail { - -sal_Int32 findPos( -const OUString& aStr, -const css::uno::Sequence< OUString >& rList); - +namespace detail +{ +sal_Int32 findPos(const OUString& aStr, const css::uno::Sequence& rList); } #endif diff --git a/forms/source/xforms/boolexpression.cxx b/forms/source/xforms/boolexpression.cxx index 01fd522d7170..6b3f57564d66 100644 --- a/forms/source/xforms/boolexpression.cxx +++ b/forms/source/xforms/boolexpression.cxx @@ -17,34 +17,29 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "boolexpression.hxx" - namespace xforms { - /** BoolExpression represents a computed XPath expression that returns * a bool value and caches the results. * * As this class has no virtual methods, it should never be used * polymorphically. */ -BoolExpression::BoolExpression() : ComputedExpression() +BoolExpression::BoolExpression() +: ComputedExpression() { } -BoolExpression::~BoolExpression() -{ -} +BoolExpression::~BoolExpression() {} -void BoolExpression::setExpression( const OUString& rExpression ) +void BoolExpression::setExpression(const OUString& rExpression) { -ComputedExpression::setExpression( rExpression ); -mbIsSimple = _checkExpression( " *(true)|(false) *\\( *\\) *" ); +ComputedExpression::setExpression(rExpression); +mbIsSimple = _checkExpression(" *(true)|(false) *\\( *\\) *"); } - } // namespace xforms /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/xforms/enumeration.cxx b/forms/source/xforms/enumeration.cxx index 103803f69ac7..e02881fbbfce 100644 --- a/forms/source/xforms/enumeration.cxx +++ b/forms/source/xforms/enumeration.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "enumeration.hxx" #include @@ -32,17 +31,16 @@ using com::sun::star::container::XIndexAccess; using com::sun::star::uno::Any; using com::sun::star::uno::RuntimeException; - -Enumeration::Enumeration( XIndexAccess* pContainer ) -: mxContainer( pContainer ), - mnIndex( 0 ) +Enumeration::Enumeration(XIndexAccess* pContainer) +: mxContainer(pContainer) +, mnIndex(0) { -OSL_ENSURE( mxContainer.is(), "no container?" ); +OSL_ENSURE(mxContainer.is(), "no container?"); } sal_Bool Enumeration::hasMoreElements() { -if( ! mxContainer.is() ) +if (!mxContainer.is()) throw RuntimeException(); return mnIndex < mxContainer->getCount(); @@ -50,12 +48,12 @@ sal_Bool Enumeration::hasMoreElements() Any Enumeration::nextElement() { -i
[Libreoffice-commits] core.git: forms/source formula/source fpicker/source framework/inc framework/source
forms/source/component/imgprod.cxx| 28 +- forms/source/richtext/richtextimplcontrol.cxx | 20 +++ forms/source/runtime/formoperations.hxx |3 - formula/source/ui/dlg/formula.cxx |6 +- formula/source/ui/dlg/funcutl.cxx |2 formula/source/ui/dlg/parawin.cxx |4 - fpicker/source/office/fileview.cxx|4 - framework/inc/uielement/fontsizemenucontroller.hxx|3 - framework/source/accelerators/acceleratorconfiguration.cxx|2 framework/source/dispatch/oxt_handler.cxx |3 - framework/source/layoutmanager/layoutmanager.cxx |4 - framework/source/layoutmanager/toolbarlayoutmanager.cxx |2 framework/source/uiconfiguration/imagemanagerimpl.cxx |6 +- framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx |2 framework/source/uiconfiguration/uiconfigurationmanager.cxx |4 - framework/source/uielement/fontsizemenucontroller.cxx |6 +- framework/source/uielement/spinfieldtoolbarcontroller.cxx |2 framework/source/uielement/toolbarmodemenucontroller.cxx |4 - 18 files changed, 54 insertions(+), 51 deletions(-) New commits: commit 700a833520396604b10c713c478d5138578a60b6 Author: Noel AuthorDate: Wed Oct 21 15:27:33 2020 +0200 Commit: Noel Grandin CommitDate: Thu Oct 22 08:06:43 2020 +0200 long->tools::Long in forms..framework Change-Id: I4cb29aade5ad1d3c3588b9437197e8493292872e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104625 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/forms/source/component/imgprod.cxx b/forms/source/component/imgprod.cxx index 9bd74f9f4792..3e79596bb07f 100644 --- a/forms/source/component/imgprod.cxx +++ b/forms/source/component/imgprod.cxx @@ -365,14 +365,14 @@ void ImageProducer::ImplUpdateConsumer( const Graphic& rGraphic ) Bitmap aMask( aBmpEx.GetMask() ); BitmapReadAccess* pMskAcc = !!aMask ? aMask.AcquireReadAccess() : nullptr; -const long nWidth = pBmpAcc->Width(); -const long nHeight = pBmpAcc->Height(); -const long nStartX = 0; -const long nEndX = nWidth - 1; -const long nStartY = 0; -const long nEndY = nHeight - 1; -const long nPartWidth = nEndX - nStartX + 1; -const long nPartHeight = nEndY - nStartY + 1; +const tools::Long nWidth = pBmpAcc->Width(); +const tools::Long nHeight = pBmpAcc->Height(); +const tools::Long nStartX = 0; +const tools::Long nEndX = nWidth - 1; +const tools::Long nStartY = 0; +const tools::Long nEndY = nHeight - 1; +const tools::Long nPartWidth = nEndX - nStartX + 1; +const tools::Long nPartHeight = nEndY - nStartY + 1; if( !pMskAcc ) { @@ -393,11 +393,11 @@ void ImageProducer::ImplUpdateConsumer( const Graphic& rGraphic ) css::uno::Sequence aData( nPartWidth * nPartHeight ); sal_Int8* pTmp = aData.getArray(); -for( long nY = nStartY; nY <= nEndY; nY++ ) +for( tools::Long nY = nStartY; nY <= nEndY; nY++ ) { Scanline pScanlineMask = pMskAcc->GetScanline( nY ); Scanline pScanline = pBmpAcc->GetScanline( nY ); -for( long nX = nStartX; nX <= nEndX; nX++ ) +for( tools::Long nX = nStartX; nX <= nEndX; nX++ ) { if( pMskAcc->GetPixelFromData( pScanlineMask, nX ) == aWhite ) *pTmp++ = sal::static_int_cast< sal_Int8 >( @@ -416,11 +416,11 @@ void ImageProducer::ImplUpdateConsumer( const Graphic& rGraphic ) css::uno::Sequence aData( nPartWidth * nPartHeight ); sal_Int32* pTmp = aData.getArray(); -for( long nY = nStartY; nY <= nEndY; nY++ ) +for( tools::Long nY = nStartY; nY <= nEndY; nY++ ) { Scanline pScanlineMask = pMskAcc->GetScanline( nY ); Scanline pScanline = pBmpAcc->GetScanline( nY ); -for( long nX = nStartX; nX <= nEndX; nX++ ) +for( tools::Long nX = nStartX; nX <= nEndX; nX++ ) { if( pMskAcc->GetPixelFromData( pScanlineMask, nX ) == aWhite ) *pTmp++ = mnTransIndex; @@ -440,11 +440,11 @@ void ImageProducer::ImplUpdateConsumer( const Graphic& rGraphic ) const BitmapColor aWhite( pMskAcc->GetBestMatchingColor( COL_WHITE ) ); sal_Int32*
[Libreoffice-commits] core.git: forms/source
forms/source/component/Button.cxx |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) New commits: commit 9da6180d4d593b16838fe035261d6c1e568b24c0 Author: Andrea Gelmini AuthorDate: Fri Sep 25 13:26:04 2020 +0200 Commit: Julien Nabet CommitDate: Sat Sep 26 12:49:42 2020 +0200 Fix typo in code It passed "make check" on Linux Change-Id: I823a0ae998addb620b490b649e1369106f8f4e8e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103462 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/forms/source/component/Button.cxx b/forms/source/component/Button.cxx index 0044068c13b3..70f80a6c8c38 100644 --- a/forms/source/component/Button.cxx +++ b/forms/source/component/Button.cxx @@ -200,9 +200,9 @@ void OButtonModel::read(const Reference& _rxInStream) readHelpTextCompatibly(_rxInStream); // DispatchInternal -bool bDispath; -_rxInStream >> bDispath; -setDispatchUrlInternal(bDispath); +bool bDispatch; +_rxInStream >> bDispatch; +setDispatchUrlInternal(bDispatch); } break; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: forms/source
forms/source/component/DatabaseForm.cxx |4 ++-- forms/source/component/DatabaseForm.hxx |2 +- 2 files changed, 3 insertions(+), 3 deletions(-) New commits: commit 61e2da8858df93f5968e66802c205b3a04974ae7 Author: Andrea Gelmini AuthorDate: Wed Sep 23 15:43:31 2020 +0200 Commit: Julien Nabet CommitDate: Wed Sep 23 18:53:27 2020 +0200 Fix typo in code It passed "make check" on Linux Change-Id: I18675a47549d93de241c4d35b437fcef72662654 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103256 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx index 182e3ba34760..3b1f8f6de5f8 100644 --- a/forms/source/component/DatabaseForm.cxx +++ b/forms/source/component/DatabaseForm.cxx @@ -1909,9 +1909,9 @@ void SAL_CALL ODatabaseForm::reset() } -void ODatabaseForm::reset_impl(bool _bAproveByListeners) +void ODatabaseForm::reset_impl(bool _bApproveByListeners) { -if ( _bAproveByListeners ) +if ( _bApproveByListeners ) if ( !m_aResetListeners.approveReset() ) return; diff --git a/forms/source/component/DatabaseForm.hxx b/forms/source/component/DatabaseForm.hxx index 3d23e9aaac16..b64352e5e1f3 100644 --- a/forms/source/component/DatabaseForm.hxx +++ b/forms/source/component/DatabaseForm.hxx @@ -446,7 +446,7 @@ private: voidreload_impl(bool bMoveToFirst, const css::uno::Reference< css::task::XInteractionHandler >& _rxCompletionHandler = css::uno::Reference< css::task::XInteractionHandler >()); voidsubmit_impl(const css::uno::Reference< css::awt::XControl>& Control, const css::awt::MouseEvent& MouseEvt); -voidreset_impl(bool _bAproveByListeners); +voidreset_impl(bool _bApproveByListeners); boolimplEnsureConnection(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: forms/source
forms/source/xforms/xpathlib/xpathlib.cxx | 12 ++-- forms/source/xforms/xpathlib/xpathlib.hxx |6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) New commits: commit 59fee59094a9bf9e4bcd729139f9a43ccea3d35c Author: Andrea Gelmini AuthorDate: Mon Aug 31 15:57:20 2020 +0200 Commit: Julien Nabet CommitDate: Tue Sep 1 15:30:50 2020 +0200 Fix typo in code It passed "make check" Change-Id: I4cbe4a471c18e9bd26f6161d98a49cb32666816f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101791 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/forms/source/xforms/xpathlib/xpathlib.cxx b/forms/source/xforms/xpathlib/xpathlib.cxx index cc4034d87d88..68cb43a6cdba 100644 --- a/forms/source/xforms/xpathlib/xpathlib.cxx +++ b/forms/source/xforms/xpathlib/xpathlib.cxx @@ -74,11 +74,11 @@ xmlXPathFunction xforms_lookupFunc(void *, const xmlChar *xname, const xmlChar * else if ((strcmp("seconds-from-dateTime", name))==0) return xforms_secondsFromDateTimeFunction; else if ((strcmp("seconds", name))==0) -return xforms_secondsFuction; +return xforms_secondsFunction; else if ((strcmp("months", name))==0) -return xforms_monthsFuction; +return xforms_monthsFunction; else if ((strcmp("instance", name))==0) -return xforms_instanceFuction; +return xforms_instanceFunction; else if ((strcmp("current", name))==0) return xforms_currentFunction; else @@ -417,7 +417,7 @@ static bool parseDuration(const xmlChar* aString, bool& bNegative, sal_Int32& nY return true; } -void xforms_secondsFuction(xmlXPathParserContextPtr ctxt, int nargs) +void xforms_secondsFunction(xmlXPathParserContextPtr ctxt, int nargs) { // convert a xsd:duration to seconds // (-)PnYnMnDTnHnMnS @@ -447,7 +447,7 @@ void xforms_secondsFuction(xmlXPathParserContextPtr ctxt, int nargs) xmlXPathReturnNumber(ctxt, xmlXPathNAN); } -void xforms_monthsFuction(xmlXPathParserContextPtr ctxt, int nargs) +void xforms_monthsFunction(xmlXPathParserContextPtr ctxt, int nargs) { // convert a xsd:duration to seconds // (-)PnYnMnDTnHnMnS @@ -477,7 +477,7 @@ void xforms_monthsFuction(xmlXPathParserContextPtr ctxt, int nargs) } // Node-set Functions -void xforms_instanceFuction(xmlXPathParserContextPtr ctxt, int nargs) +void xforms_instanceFunction(xmlXPathParserContextPtr ctxt, int nargs) { if (nargs != 1) XP_ERROR(XPATH_INVALID_ARITY); xmlChar *pString = xmlXPathPopString(ctxt); diff --git a/forms/source/xforms/xpathlib/xpathlib.hxx b/forms/source/xforms/xpathlib/xpathlib.hxx index 05a5baedd235..e1c07965df01 100644 --- a/forms/source/xforms/xpathlib/xpathlib.hxx +++ b/forms/source/xforms/xpathlib/xpathlib.hxx @@ -58,11 +58,11 @@ void xforms_propertyFunction(xmlXPathParserContextPtr ctxt, int nargs); void xforms_nowFunction(xmlXPathParserContextPtr ctxt, int nargs); void xforms_daysFromDateFunction(xmlXPathParserContextPtr ctxt, int nargs); void xforms_secondsFromDateTimeFunction(xmlXPathParserContextPtr ctxt, int nargs); -void xforms_secondsFuction(xmlXPathParserContextPtr ctxt, int nargs); -void xforms_monthsFuction(xmlXPathParserContextPtr ctxt, int nargs); +void xforms_secondsFunction(xmlXPathParserContextPtr ctxt, int nargs); +void xforms_monthsFunction(xmlXPathParserContextPtr ctxt, int nargs); // Node-set Functions -void xforms_instanceFuction(xmlXPathParserContextPtr ctxt, int nargs); +void xforms_instanceFunction(xmlXPathParserContextPtr ctxt, int nargs); // Node-set Functions; XForms 1.1 void xforms_currentFunction(xmlXPathParserContextPtr ctxt, int nargs); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: forms/source
forms/source/component/FormComponent.cxx | 10 +- forms/source/inc/FormComponent.hxx |2 +- 2 files changed, 6 insertions(+), 6 deletions(-) New commits: commit 0d2dbcbebf0004e690feb91c38dd478a32dc6255 Author: Andrea Gelmini AuthorDate: Sat Aug 29 19:28:22 2020 +0200 Commit: Julien Nabet CommitDate: Sun Aug 30 15:16:07 2020 +0200 Fix typo in code Change-Id: Ia2820c68109c84b52173beafe2cf301104d80831 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101652 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/forms/source/component/FormComponent.cxx b/forms/source/component/FormComponent.cxx index 34b5f51c538d..c8bad80d0ae6 100644 --- a/forms/source/component/FormComponent.cxx +++ b/forms/source/component/FormComponent.cxx @@ -1145,7 +1145,7 @@ OBoundControlModel::OBoundControlModel( ,m_bSupportsExternalBinding( _bSupportExternalBinding ) ,m_bSupportsValidation( _bSupportsValidation ) ,m_bForwardValueChanges(true) -,m_bTransferingValue( false ) +,m_bTransferringValue( false ) ,m_bIsCurrentValueValid( true ) ,m_bBindingControlsRO( false ) ,m_bBindingControlsEnable( false ) @@ -1178,7 +1178,7 @@ OBoundControlModel::OBoundControlModel( ,m_bSupportsExternalBinding( _pOriginal->m_bSupportsExternalBinding ) ,m_bSupportsValidation( _pOriginal->m_bSupportsValidation ) ,m_bForwardValueChanges( true ) -,m_bTransferingValue( false ) +,m_bTransferringValue( false ) ,m_bIsCurrentValueValid( _pOriginal->m_bIsCurrentValueValid ) ,m_bBindingControlsRO( false ) ,m_bBindingControlsEnable( false ) @@ -2509,7 +2509,7 @@ void SAL_CALL OBoundControlModel::modified( const EventObject& _rEvent ) { ControlModelLock aLock( *this ); OSL_PRECOND( hasExternalValueBinding(), "OBoundControlModel::modified: Where did this come from?" ); -if ( !m_bTransferingValue && ( m_xExternalBinding == _rEvent.Source ) && m_xExternalBinding.is() ) +if ( !m_bTransferringValue && ( m_xExternalBinding == _rEvent.Source ) && m_xExternalBinding.is() ) { transferExternalValueToControl( aLock ); } @@ -2557,7 +2557,7 @@ void OBoundControlModel::transferControlValueToExternal( ControlModelLock& _rIns return; Any aExternalValue( translateControlValueToExternalValue() ); -m_bTransferingValue = true; +m_bTransferringValue = true; _rInstanceLock.release(); // UNSAFE > try @@ -2572,7 +2572,7 @@ void OBoundControlModel::transferControlValueToExternal( ControlModelLock& _rIns // < UNSAFE _rInstanceLock.acquire(); -m_bTransferingValue = false; +m_bTransferringValue = false; } Sequence< Type > OBoundControlModel::getSupportedBindingTypes() diff --git a/forms/source/inc/FormComponent.hxx b/forms/source/inc/FormComponent.hxx index e13ef797f9fa..4a2fc4bf95ca 100644 --- a/forms/source/inc/FormComponent.hxx +++ b/forms/source/inc/FormComponent.hxx @@ -597,7 +597,7 @@ private: const bool m_bSupportsExternalBinding : 1;// do we support XBindableValue? const bool m_bSupportsValidation : 1;// do we support XValidatable? boolm_bForwardValueChanges : 1;// do we currently handle changes in the bound database field? -boolm_bTransferingValue : 1;// true if we're currently transferring our value to an external binding +boolm_bTransferringValue: 1;// true if we're currently transferring our value to an external binding boolm_bIsCurrentValueValid : 1;// flag specifying whether our current value is valid, relative to our external validator boolm_bBindingControlsRO: 1;// is our ReadOnly property currently controlled by our external binding? boolm_bBindingControlsEnable: 1;// is our Enabled property currently controlled by our external binding? ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: forms/source
forms/source/component/ImageControl.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 2d9d9010ae817c3b9535c52f8a6529c88a0b4bfa Author: Andrea Gelmini AuthorDate: Sat Aug 29 19:53:09 2020 +0200 Commit: Noel Grandin CommitDate: Sun Aug 30 13:52:47 2020 +0200 Fix typos Change-Id: I1f8e27182352ebba878b120875eefc1aa5c7009f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101654 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/forms/source/component/ImageControl.cxx b/forms/source/component/ImageControl.cxx index 97928cff6fa9..b75080bae4a2 100644 --- a/forms/source/component/ImageControl.cxx +++ b/forms/source/component/ImageControl.cxx @@ -326,7 +326,7 @@ void OImageControlModel::describeAggregateProperties( Sequence< Property >& /* [ OBoundControlModel::describeAggregateProperties( o_rAggregateProperties ); // remove ImageURL and Graphic properties, we "override" them. // This is because our aggregate synchronizes those -// two, but we have an own sychronization mechanism. +// two, but we have an own synchronization mechanism. RemoveProperty( o_rAggregateProperties, PROPERTY_IMAGE_URL ); RemoveProperty( o_rAggregateProperties, PROPERTY_GRAPHIC ); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: forms/source sc/inc sc/source svx/source sw/source vcl/inc vcl/source
forms/source/component/clickableimage.hxx|5 + sc/inc/chart2uno.hxx |4 ++-- sc/source/filter/inc/externallinkbuffer.hxx |4 +--- sc/source/filter/oox/condformatbuffer.cxx|3 +-- svx/source/inc/formcontroller.hxx|4 ++-- sw/source/core/txtnode/modeltoviewhelper.cxx |4 +--- sw/source/filter/html/htmltab.cxx| 13 - vcl/inc/impfontcache.hxx |2 -- vcl/source/font/fontcache.cxx|4 ++-- 9 files changed, 14 insertions(+), 29 deletions(-) New commits: commit 9a2c347e76c330b45504c8219510c9ef86503b86 Author: Noel Grandin AuthorDate: Fri Aug 14 12:05:31 2020 +0200 Commit: Noel Grandin CommitDate: Fri Aug 14 15:30:14 2020 +0200 inline some use-once typedefs Change-Id: Ifefdb1ad20d09e257064171e458b2eb33065f5de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100733 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/forms/source/component/clickableimage.hxx b/forms/source/component/clickableimage.hxx index ad823c4209ac..329f2d5ab430 100644 --- a/forms/source/component/clickableimage.hxx +++ b/forms/source/component/clickableimage.hxx @@ -154,12 +154,9 @@ namespace frm class ImageModelMethodGuard : public ::osl::MutexGuard { -private: -typedef ::osl::MutexGuard GuardBase; - public: explicit ImageModelMethodGuard( OClickableImageBaseModel& _rModel ) -:GuardBase( _rModel.getMutex( OClickableImageBaseModel::GuardAccess() ) ) +: ::osl::MutexGuard( _rModel.getMutex( OClickableImageBaseModel::GuardAccess() ) ) { if ( nullptr == _rModel.getImageProducer( OClickableImageBaseModel::GuardAccess() ) ) throw css::lang::DisposedException( diff --git a/sc/inc/chart2uno.hxx b/sc/inc/chart2uno.hxx index fee5e2b211ce..5f63433feef3 100644 --- a/sc/inc/chart2uno.hxx +++ b/sc/inc/chart2uno.hxx @@ -367,13 +367,13 @@ private: // internals typedef std::unique_ptr > RangeIndexMapPtr; -typedef std::unique_ptr ExtRefListenerPtr; sal_Int64 m_nObjectId; ScDocument* m_pDocument; std::vector m_aTokens; RangeIndexMapPtrm_pRangeIndices; -ExtRefListenerPtr m_pExtRefListener; +std::unique_ptr +m_pExtRefListener; SfxItemPropertySet m_aPropSet; std::unique_ptr m_pHiddenListener; diff --git a/sc/source/filter/inc/externallinkbuffer.hxx b/sc/source/filter/inc/externallinkbuffer.hxx index 6e2a528698dc..ce036b04b49b 100644 --- a/sc/source/filter/inc/externallinkbuffer.hxx +++ b/sc/source/filter/inc/externallinkbuffer.hxx @@ -268,8 +268,6 @@ private: ExternalNameRef createExternalName(); private: -typedef RefVector< ExternalName > ExternalNameVector; - ExternalLinkTypemeLinkType; /// Type of this link object. FunctionLibraryType meFuncLibType; /// Type of the function library, if link type is ExternalLinkType::Library. OUStringmaRelId;/// Relation identifier for the external link fragment. @@ -278,7 +276,7 @@ private: css::uno::Reference< css::sheet::XExternalDocLink > mxDocLink; /// Interface for an external document. std::vector< sal_Int32 > maSheetCaches; /// External sheet cache indexes. -ExternalNameVector maExtNames; /// Defined names in external document. +RefVector< ExternalName > maExtNames; /// Defined names in external document. }; typedef std::shared_ptr< ExternalLink > ExternalLinkRef; diff --git a/sc/source/filter/oox/condformatbuffer.cxx b/sc/source/filter/oox/condformatbuffer.cxx index 76369bccbeb0..cca1064223d6 100644 --- a/sc/source/filter/oox/condformatbuffer.cxx +++ b/sc/source/filter/oox/condformatbuffer.cxx @@ -1123,7 +1123,6 @@ void CondFormatBuffer::finalizeImport() { std::unordered_set aDoneExtCFs; typedef std::unordered_map RangeMap; -typedef std::vector> FormatEntries; RangeMap aRangeMap; for (auto& rxCondFormat : maCondFormats) { @@ -1141,7 +1140,7 @@ void CondFormatBuffer::finalizeImport() if (it != aRangeMap.end()) { CondFormat& rCondFormat = *it->second; -const FormatEntries& rEntries = rxExtCondFormat->getEntries(); +const std::vector>& rEntries = rxExtCondFormat->getEntries(); const std::vector& rPriorities = rxExtCondFormat->getPriorities(); size_t nEntryIdx = 0; for (const auto& rxEntry : rEntries) diff --git a/svx/source/inc/formcontroller.hxx b/svx/source/inc/formcontroller.hxx index 80538a8393d5..065852fe9c3a 100644 --- a/svx/source/inc/formcontroller.hxx +++ b/svx/source/inc/formcontroller.hxx @@ -79,7 +79,6 @@ struct FmXTextComponentLess typedef ::std::map< css::uno::Reference< css
[Libreoffice-commits] core.git: forms/source sw/source
forms/source/component/FormComponent.cxx |2 +- sw/source/core/layout/frmtool.cxx|2 +- sw/source/filter/ww8/ww8par.hxx |8 sw/source/ui/table/tabledlg.cxx |2 +- 4 files changed, 7 insertions(+), 7 deletions(-) New commits: commit cfce4865e81db30635cf3a166d77731be41cd9a7 Author: Caolán McNamara AuthorDate: Wed Aug 5 14:43:08 2020 +0100 Commit: Caolán McNamara CommitDate: Wed Aug 5 16:52:26 2020 +0200 dito->ditto Change-Id: I432dcc61dfb53e6b439052c495a602aab8a58f5d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100172 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/forms/source/component/FormComponent.cxx b/forms/source/component/FormComponent.cxx index 450ef822b632..34b5f51c538d 100644 --- a/forms/source/component/FormComponent.cxx +++ b/forms/source/component/FormComponent.cxx @@ -1368,7 +1368,7 @@ void OBoundControlModel::disposing() // disconnect from our external value binding if ( hasExternalValueBinding() ) disconnectExternalValueBinding(); -// dito for the validator +// ditto for the validator if ( hasValidator() ) disconnectValidator( ); } diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx index b9d4f37831d2..9dac5b885233 100644 --- a/sw/source/core/layout/frmtool.cxx +++ b/sw/source/core/layout/frmtool.cxx @@ -875,7 +875,7 @@ SwContentNotify::~SwContentNotify() pFESh->CalcAndSetScale( xObj ); // create client } } -//dito animated graphics +// ditto animated graphics if ( getFrameArea().HasArea() && static_cast(pCnt)->HasAnimation() ) { static_cast(pCnt)->StopAnimation(); diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx index 2ff459b161ca..8b0c6f51f339 100644 --- a/sw/source/filter/ww8/ww8par.hxx +++ b/sw/source/filter/ww8/ww8par.hxx @@ -1269,10 +1269,10 @@ private: // Ini-Flags: sal_uInt32 m_nIniFlags;// flags from writer.ini -sal_uInt32 m_nIniFlags1; // dito ( additional flags ) -sal_uInt32 m_nFieldFlags; // dito for fields -sal_uInt32 m_nFieldTagAlways[3]; // dito for tagging of fields -sal_uInt32 m_nFieldTagBad[3]; // dito for tagging of fields that can't be imported +sal_uInt32 m_nIniFlags1; // ditto ( additional flags ) +sal_uInt32 m_nFieldFlags; // ditto for fields +sal_uInt32 m_nFieldTagAlways[3]; // ditto for tagging of fields +sal_uInt32 m_nFieldTagBad[3]; // ditto for tagging of fields that can't be imported bool m_bRegardHindiDigits; // import digits in CTL scripts as Hindi numbers bool m_bDrawCpOValid; diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx index 082b23ee4214..c56168448f6d 100644 --- a/sw/source/ui/table/tabledlg.cxx +++ b/sw/source/ui/table/tabledlg.cxx @@ -157,7 +157,7 @@ IMPL_LINK( SwFormatTablePage, RelWidthClickHdl, weld::ToggleButton&, rBtn, void m_xLeftMF->SetRefValue(pTableData->GetSpace()); m_xRightMF->SetRefValue(pTableData->GetSpace()); m_xLeftMF->SetMetricFieldMin(0); //will be overwritten by the Percentfield -m_xRightMF->SetMetricFieldMin(0); //dito +m_xRightMF->SetMetricFieldMin(0); //ditto m_xLeftMF->SetMetricFieldMax(99); m_xRightMF->SetMetricFieldMax(99); m_xLeftMF->set_value(m_xLeftMF->NormalizePercent(nLeft ), FieldUnit::TWIP ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: forms/source include/svtools include/svx solenv/sanitizers svtools/Library_svt.mk svtools/source svx/Library_svxcore.mk svx/source svx/uiconfig
forms/source/solar/control/navtoolbar.cxx |2 forms/source/solar/inc/navtoolbar.hxx |2 include/svtools/brwbox.hxx |4 - include/svtools/recorditemwindow.hxx | 13 +++-- include/svx/gridctrl.hxx | 11 ++-- solenv/sanitizers/ui/svx.suppr |3 - svtools/Library_svt.mk |1 svtools/source/brwbox/brwbox1.cxx |6 +- svtools/source/brwbox/brwbox2.cxx |4 - svtools/source/brwbox/recorditemwindow.cxx | 14 - svx/Library_svxcore.mk |1 svx/source/fmcomp/gridctrl.cxx | 72 - svx/source/form/tbxform.cxx|2 svx/source/inc/gridcell.hxx|1 svx/source/inc/tbxform.hxx |2 svx/uiconfig/ui/absrecbox.ui | 22 +++- 16 files changed, 80 insertions(+), 80 deletions(-) New commits: commit b6311393b5a01eee500b1ebe440bce60939aaead Author: Caolán McNamara AuthorDate: Thu Jul 23 10:26:09 2020 +0100 Commit: Caolán McNamara CommitDate: Thu Jul 23 20:45:17 2020 +0200 weld AbsolutePos Change-Id: I273d01bb5d8bf1a1d2dc9066b0c9f099bf115e32 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99311 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/forms/source/solar/control/navtoolbar.cxx b/forms/source/solar/control/navtoolbar.cxx index 2f0147d04307..5c0ee830cbec 100644 --- a/forms/source/solar/control/navtoolbar.cxx +++ b/forms/source/solar/control/navtoolbar.cxx @@ -621,7 +621,7 @@ namespace frm } RecordPositionInput::RecordPositionInput(vcl::Window* pParent) -: RecordItemWindow(pParent) +: RecordItemWindow(pParent, true) , m_pDispatcher( nullptr ) { } diff --git a/forms/source/solar/inc/navtoolbar.hxx b/forms/source/solar/inc/navtoolbar.hxx index 576ddb951293..c96fd141662b 100644 --- a/forms/source/solar/inc/navtoolbar.hxx +++ b/forms/source/solar/inc/navtoolbar.hxx @@ -20,7 +20,7 @@ #ifndef INCLUDED_FORMS_SOURCE_SOLAR_INC_NAVTOOLBAR_HXX #define INCLUDED_FORMS_SOURCE_SOLAR_INC_NAVTOOLBAR_HXX -#include +#include #include namespace frm diff --git a/include/svtools/brwbox.hxx b/include/svtools/brwbox.hxx index 67a3e8fdbb7a..00b68803515b 100644 --- a/include/svtools/brwbox.hxx +++ b/include/svtools/brwbox.hxx @@ -39,7 +39,7 @@ class BrowserColumn; class BrowserHeader; class ScrollBar; -class StatusBar; +class RecordItemWindow; namespace svt { class BrowseBoxImpl; @@ -275,7 +275,7 @@ private: VclPtr pDataWin; // window to display data rows VclPtr pVScroll; // vertical scrollbar VclPtr aHScroll; // horizontal scrollbar -VclPtr aStatusBar; // statusbar, just to measure its height +VclPtr aStatusBarHeight; // statusbar, just to measure its height longnDataRowHeight; // height of a single data-row sal_uInt16 nTitleLines;// number of lines in title row diff --git a/include/svx/recorditemwindow.hxx b/include/svtools/recorditemwindow.hxx similarity index 73% rename from include/svx/recorditemwindow.hxx rename to include/svtools/recorditemwindow.hxx index d49db978c136..576be8766430 100644 --- a/include/svx/recorditemwindow.hxx +++ b/include/svtools/recorditemwindow.hxx @@ -10,23 +10,28 @@ #pragma once #include -#include +#include -class SVXCORE_DLLPUBLIC RecordItemWindow : public InterimItemWindow +class SVT_DLLPUBLIC RecordItemWindow : public InterimItemWindow { public: -RecordItemWindow(vcl::Window* _pParent); +RecordItemWindow(vcl::Window* pParent, bool bHasFrame); virtual void dispose() override; virtual ~RecordItemWindow() override; void set_text(const OUString& rText) { m_xWidget->set_text(rText); } +void set_font(const vcl::Font& rFont) { m_xWidget->set_font(rFont); } + +protected: +virtual bool DoKeyInput(const KeyEvent& rEvt); private: -virtual void PositionFired(sal_Int64 nRecord) = 0; +virtual void PositionFired(sal_Int64 nRecord); std::unique_ptr m_xWidget; DECL_LINK(KeyInputHdl, const KeyEvent&, bool); + DECL_LINK(ActivatedHdl, weld::Entry&, bool); // for invalidating our content when losing the focus DECL_LINK(FocusOutHdl, weld::Widget&, void); diff --git a/include/svx/gridctrl.hxx b/include/svx/gridctrl.hxx index 90eaa9927280..c07f9ed464f1 100644 --- a/include/svx/gridctrl.hxx +++ b/include/svx/gridctrl.hxx @@ -20,12 +20,13 @@ #define INCLUDED_SVX_GRIDCTRL_HXX #include -#include #include #include +#include #include #include +#include #include #include #include @@ -174,13 +175,13 @@ public: class SAL_DLLPRIVATE NavigationBar final : public Control { -class AbsolutePos : public NumericField +class AbsolutePos final : public RecordItemWindow { public: -AbsolutePos(vcl::Window* pPar
[Libreoffice-commits] core.git: forms/source svx/uiconfig
forms/source/solar/control/navtoolbar.cxx | 81 +- forms/source/solar/inc/navtoolbar.hxx | 17 +- svx/uiconfig/ui/absrecbox.ui |3 - 3 files changed, 21 insertions(+), 80 deletions(-) New commits: commit 444f3552ac4ecedc076d9f91e6e0e4e463c1f77a Author: Caolán McNamara AuthorDate: Wed Jul 22 17:29:51 2020 +0100 Commit: Caolán McNamara CommitDate: Thu Jul 23 13:03:31 2020 +0200 weld RecordPositionInput Change-Id: I9ea192c5efe330d150c94d3dcbda6fdc9c15e01d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99248 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/forms/source/solar/control/navtoolbar.cxx b/forms/source/solar/control/navtoolbar.cxx index 687f4dffd1b7..2f0147d04307 100644 --- a/forms/source/solar/control/navtoolbar.cxx +++ b/forms/source/solar/control/navtoolbar.cxx @@ -147,7 +147,6 @@ namespace frm implInit( ); } - NavigationToolBar::~NavigationToolBar( ) { disposeOnce(); @@ -162,7 +161,6 @@ namespace frm vcl::Window::dispose(); } - void NavigationToolBar::setDispatcher( const IFeatureDispatcher* _pDispatcher ) { m_pDispatcher = _pDispatcher; @@ -188,7 +186,6 @@ namespace frm } } - void NavigationToolBar::implEnableItem( sal_uInt16 _nItemId, bool _bEnabled ) { m_pToolbar->EnableItem( _nItemId, _bEnabled ); @@ -200,7 +197,6 @@ namespace frm m_pToolbar->EnableItem( LID_RECORD_FILLER, _bEnabled ); } - void NavigationToolBar::enableFeature( sal_Int16 _nFeatureId, bool _bEnabled ) { DBG_ASSERT( m_pToolbar->GetItemPos( static_cast(_nFeatureId) ) != ToolBox::ITEM_NOTFOUND, @@ -209,7 +205,6 @@ namespace frm implEnableItem( static_cast(_nFeatureId), _bEnabled ); } - void NavigationToolBar::checkFeature( sal_Int16 _nFeatureId, bool _bEnabled ) { DBG_ASSERT( m_pToolbar->GetItemPos( static_cast(_nFeatureId) ) != ToolBox::ITEM_NOTFOUND, @@ -218,7 +213,6 @@ namespace frm m_pToolbar->CheckItem( static_cast(_nFeatureId), _bEnabled ); } - void NavigationToolBar::setFeatureText( sal_Int16 _nFeatureId, const OUString& _rText ) { DBG_ASSERT( m_pToolbar->GetItemPos( static_cast(_nFeatureId) ) != ToolBox::ITEM_NOTFOUND, @@ -229,14 +223,13 @@ namespace frm { if (_nFeatureId == FormFeature::TotalRecords) static_cast(pItemWindow)->set_label(_rText); -else -pItemWindow->SetText( _rText ); +else if (_nFeatureId == FormFeature::MoveAbsolute) + static_cast(pItemWindow)->set_text(_rText); } else m_pToolbar->SetItemText( static_cast(_nFeatureId), _rText ); } - void NavigationToolBar::implInit( ) { m_pToolbar = VclPtr::Create( this ); @@ -488,7 +481,6 @@ namespace frm } } - void NavigationToolBar::Resize() { // resize/position the toolbox as a whole @@ -501,7 +493,6 @@ namespace frm Window::Resize(); } - void NavigationToolBar::SetControlBackground() { Window::SetControlBackground(); @@ -511,7 +502,6 @@ namespace frm implUpdateImages(); } - void NavigationToolBar::SetControlBackground( const Color& _rColor ) { Window::SetControlBackground( _rColor ); @@ -521,7 +511,6 @@ namespace frm implUpdateImages(); } - void NavigationToolBar::SetTextLineColor( ) { Window::SetTextLineColor( ); @@ -529,7 +518,6 @@ namespace frm forEachItemWindow( &NavigationToolBar::setTextLineColor, nullptr ); } - void NavigationToolBar::SetTextLineColor( const Color& _rColor ) { Window::SetTextLineColor( _rColor ); @@ -537,7 +525,6 @@ namespace frm forEachItemWindow( &NavigationToolBar::setTextLineColor, &_rColor ); } - void NavigationToolBar::forEachItemWindow( ItemWindowHandler _handler ) { for ( ToolBox::ImplToolItems::size_type item = 0; item < m_pToolbar->GetItemCount(); ++item ) @@ -568,7 +555,6 @@ namespace frm _pItemWindow->SetControlBackground(); } - void NavigationToolBar::setTextLineColor( sal_uInt16 /* _nItemId */, vcl::Window* _pItemWindow, const void* _pColor ) { if ( _pColor ) @@ -576,14 +562,6 @@ namespace frm else _pItemWindow->SetTextLineColor(); } -#if 0 - -void NavigationToolBar::setItemWindowZoom( sal_uInt16 /* _nItemId */, vcl::Window* _pItemWindow, const void* /* _pParam */ ) const -{ -_pItemWindow->SetZoom( GetZoom() ); -_pItemWindow->SetZoomedPointFont( IsControlFont() ? GetControlFont() : GetPointFont() ); -} -#endif void NavigationToolBar::setItemControlFont( sal_uInt16 /* _nItemId */, vcl::Window* _pItemWindow ) const { @@ -593,7 +571,6
[Libreoffice-commits] core.git: forms/source include/svx svx/inc svx/source
forms/source/solar/control/navtoolbar.cxx | 42 - svx/inc/pch/precompiled_svx.hxx|2 - svx/source/dialog/srchdlg.cxx |2 - svx/source/form/labelitemwindow.cxx|4 +- svx/source/form/tbxform.cxx|2 - svx/source/tbxctrls/tbunosearchcontrollers.cxx |2 - 6 files changed, 22 insertions(+), 32 deletions(-) New commits: commit a9d797ed771632afafb702697a6f31e0c25e80cf Author: Caolán McNamara AuthorDate: Wed Jul 22 15:16:19 2020 +0100 Commit: Caolán McNamara CommitDate: Wed Jul 22 22:16:10 2020 +0200 weld form navigator label item windows Change-Id: I2e49ffda6dc29746819a61db2848b6bcfe5f4a23 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94650 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/forms/source/solar/control/navtoolbar.cxx b/forms/source/solar/control/navtoolbar.cxx index d361aa0a94c5..687f4dffd1b7 100644 --- a/forms/source/solar/control/navtoolbar.cxx +++ b/forms/source/solar/control/navtoolbar.cxx @@ -27,6 +27,8 @@ #include #include +#include + #include #include #include @@ -224,7 +226,12 @@ namespace frm vcl::Window* pItemWindow = m_pToolbar->GetItemWindow( static_cast(_nFeatureId) ); if ( pItemWindow ) -pItemWindow->SetText( _rText ); +{ +if (_nFeatureId == FormFeature::TotalRecords) +static_cast(pItemWindow)->set_label(_rText); +else +pItemWindow->SetText( _rText ); +} else m_pToolbar->SetItemText( static_cast(_nFeatureId), _rText ); } @@ -300,30 +307,14 @@ namespace frm pItemWindow = VclPtr::Create( m_pToolbar ); static_cast< RecordPositionInput* >( pItemWindow )->setDispatcher( m_pDispatcher ); } -else if ( LID_RECORD_FILLER == pSupportedFeatures->nId ) -{ -pItemWindow = VclPtr::Create( m_pToolbar, WB_CENTER | WB_VCENTER ); -pItemWindow->SetBackground(Wallpaper(COL_TRANSPARENT)); -} -else -{ -pItemWindow = VclPtr::Create( m_pToolbar, WB_VCENTER ); -pItemWindow->SetBackground(); -pItemWindow->SetPaintTransparent(true); -} -m_aChildWins.emplace_back(pItemWindow ); - -switch ( pSupportedFeatures->nId ) -{ -case LID_RECORD_LABEL: -pItemWindow->SetText( getLabelString( RID_STR_LABEL_RECORD ) ); -break; - -case LID_RECORD_FILLER: -pItemWindow->SetText( getLabelString( RID_STR_LABEL_OF ) ); -break; -} +else if (pSupportedFeatures->nId == LID_RECORD_FILLER) +pItemWindow = VclPtr::Create(m_pToolbar, getLabelString(RID_STR_LABEL_OF)); +else if (pSupportedFeatures->nId == LID_RECORD_LABEL) +pItemWindow = VclPtr::Create(m_pToolbar, getLabelString(RID_STR_LABEL_RECORD)); +else if (pSupportedFeatures->nId == FormFeature::TotalRecords) +pItemWindow = VclPtr::Create(m_pToolbar, ""); +m_aChildWins.emplace_back(pItemWindow ); m_pToolbar->SetItemWindow( pSupportedFeatures->nId, pItemWindow ); } } @@ -642,7 +633,6 @@ namespace frm m_pToolbar->SetItemWindow( _nItemId, _pItemWindow ); } - void NavigationToolBar::enableItemRTL( sal_uInt16 /*_nItemId*/, vcl::Window* _pItemWindow, const void* _pIsRTLEnabled ) { _pItemWindow->EnableRTL( *static_cast< const sal_Bool* >( _pIsRTLEnabled ) ); @@ -660,13 +650,11 @@ namespace frm SetBorderStyle( WindowBorderStyle::MONO ); } - void RecordPositionInput::setDispatcher( const IFeatureDispatcher* _pDispatcher ) { m_pDispatcher = _pDispatcher; } - void RecordPositionInput::FirePosition( bool _bForce ) { if ( _bForce || IsValueChangedFromSaved() ) diff --git a/svx/inc/labelitemwindow.hxx b/include/svx/labelitemwindow.hxx similarity index 100% rename from svx/inc/labelitemwindow.hxx rename to include/svx/labelitemwindow.hxx diff --git a/svx/inc/pch/precompiled_svx.hxx b/svx/inc/pch/precompiled_svx.hxx index b2ce7362b84e..0c96cace089e 100644 --- a/svx/inc/pch/precompiled_svx.hxx +++ b/svx/inc/pch/precompiled_svx.hxx @@ -376,7 +376,6 @@ #include #include #include -#include #include #include #include @@ -401,6 +400,7 @@ #include #include #include +#include #include #include #include diff --git a/svx/source/dialog/srchdlg.cxx
[Libreoffice-commits] core.git: forms/source framework/source include/basic include/codemaker include/sfx2 include/svl include/svtools include/toolkit include/unotools include/vbahelper registry/tools
forms/source/xforms/pathexpression.hxx |9 +++-- forms/source/xforms/xformsevent.hxx|7 ++- framework/source/inc/pattern/frame.hxx |8 ++-- include/basic/vbahelper.hxx|6 ++ include/codemaker/unotype.hxx |5 + include/sfx2/filedlghelper.hxx | 21 - include/sfx2/frame.hxx | 15 +++ include/svl/cryptosign.hxx | 13 ++--- include/svl/sigstruct.hxx |6 ++ include/svtools/imageresourceaccess.hxx|7 ++- include/toolkit/helper/property.hxx|7 ++- include/unotools/textsearch.hxx| 11 +-- include/unotools/ucbstreamhelper.hxx | 11 +-- include/vbahelper/helperdecl.hxx |6 ++ include/vbahelper/vbaaccesshelper.hxx |5 + include/vbahelper/vbahelper.hxx|7 ++- include/vbahelper/vbareturntypes.hxx |7 ++- registry/tools/fileurl.hxx |7 ++- registry/tools/options.hxx |7 ++- scaddins/source/analysis/bessel.hxx|6 ++ scaddins/source/pricing/pricing.hxx|6 ++ sfx2/inc/thumbnailviewitem.hxx |1 - sfx2/source/inc/appdata.hxx|4 +--- sfx2/source/inc/partwnd.hxx| 14 +- shell/source/backends/kf5be/kf5access.hxx | 11 +-- starmath/source/smdetect.hxx | 14 +- uui/source/secmacrowarnings.hxx|8 ++-- xmloff/inc/fasttokenhandler.hxx|6 ++ xmloff/source/chart/ColorPropertySet.hxx |7 ++- xmlsecurity/inc/documentsignaturehelper.hxx| 12 xmlsecurity/inc/documentsignaturemanager.hxx |8 +--- xmlsecurity/inc/pdfio/pdfdocument.hxx | 12 +++- xmlsecurity/inc/pdfsignaturehelper.hxx | 13 ++--- xmlsecurity/inc/xmlsignaturehelper.hxx | 16 +++- xmlsecurity/inc/xmlsignaturehelper2.hxx| 12 xmlsecurity/source/helper/ooxmlsecexporter.hxx | 13 ++--- 36 files changed, 75 insertions(+), 253 deletions(-) New commits: commit da7489eb6aa9dfedb43f9be6e1b90e3ae06a75cc Author: Noel Grandin AuthorDate: Fri Jul 10 15:19:30 2020 +0200 Commit: Noel Grandin CommitDate: Mon Jul 20 10:12:57 2020 +0200 compact namespace decl used git grep -lw namespace | xargs perl -i -p0e 's/(\w+)\s*.\{.\s*namespace\s*(\w+)/\1::\2/smg;' to do the initial replace, then compiled and fixed. Change-Id: If69904d75940c851aeffab0e78c4ba02cc968d44 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98526 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/forms/source/xforms/pathexpression.hxx b/forms/source/xforms/pathexpression.hxx index 7f01c673ce72..23a35a033d27 100644 --- a/forms/source/xforms/pathexpression.hxx +++ b/forms/source/xforms/pathexpression.hxx @@ -25,13 +25,10 @@ #include // forward declaractions -namespace com::sun::star +namespace com::sun::star::xml::dom { -namespace xml::dom -{ -class XNodeList; -namespace events { class XEventListener; } -} +class XNodeList; +namespace events { class XEventListener; } } diff --git a/forms/source/xforms/xformsevent.hxx b/forms/source/xforms/xformsevent.hxx index df4f5bcd20da..bfe7b2593026 100644 --- a/forms/source/xforms/xformsevent.hxx +++ b/forms/source/xforms/xformsevent.hxx @@ -25,10 +25,7 @@ #include #include -namespace com { -namespace sun { -namespace star { -namespace xforms { +namespace com::sun::star::xforms { class XFormsEventConcrete : public cppu::WeakImplHelper< XFormsEvent > { @@ -67,7 +64,7 @@ class XFormsEventConcrete : public cppu::WeakImplHelper< XFormsEvent > { bool m_cancelable; }; -} } } } +} #endif diff --git a/framework/source/inc/pattern/frame.hxx b/framework/source/inc/pattern/frame.hxx index 9585af25665c..46b86f56f891 100644 --- a/framework/source/inc/pattern/frame.hxx +++ b/framework/source/inc/pattern/frame.hxx @@ -27,9 +27,7 @@ // namespaces -namespace framework{ -namespace pattern{ -namespace frame{ +namespace framework::pattern::frame{ /** @short close (or dispose) the given resource. @@ -77,9 +75,7 @@ inline bool closeIt(const css::uno::Reference< css::uno::XInterface >& xResource return true; } -} // namespace frame -} // namespace pattern -} // namespace framework +} // namespace framework::pattern::frame #endif // INCLUDED_FRAMEWORK_SOURCE_INC_PATTERN_FRAME_HXX diff --git a/include/basic/vbahelper.hxx b/include/basic/vbahelper.hxx index 10372abf392b..8d18b66b1d10 100644 --- a/include/basic/vbahelper.hx
[Libreoffice-commits] core.git: forms/source sd/source svx/source toolkit/source
forms/source/component/Date.cxx | 43 -- sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx |9 svx/source/accessibility/AccessibleGraphicShape.cxx | 12 svx/source/accessibility/AccessibleOLEShape.cxx | 12 svx/source/accessibility/AccessibleShape.cxx | 45 -- svx/source/table/accessiblecell.cxx | 13 toolkit/source/controls/tkspinbutton.cxx | 12 toolkit/source/controls/unocontrols.cxx | 252 -- 8 files changed, 117 insertions(+), 281 deletions(-) New commits: commit 8d414f3a8de5c25bcd830b1d4d8a7be3c34a2ed4 Author: Michael Warner AuthorDate: Sat May 30 22:18:29 2020 -0400 Commit: Stephan Bergmann CommitDate: Wed Jun 10 08:17:31 2020 +0200 tdf#88205 Adapt uses of css::uno::Sequence to use initializer_list ctor Change-Id: Id747848b222f69af3293a2095a62542f1e1116d8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95215 Reviewed-by: Stephan Bergmann Tested-by: Jenkins diff --git a/forms/source/component/Date.cxx b/forms/source/component/Date.cxx index cca3e06821d7..1d16109ce672 100644 --- a/forms/source/component/Date.cxx +++ b/forms/source/component/Date.cxx @@ -55,16 +55,10 @@ Sequence ODateControl::_getTypes() return OBoundControl::_getTypes(); } - css::uno::Sequence SAL_CALL ODateControl::getSupportedServiceNames() { -css::uno::Sequence aSupported = OBoundControl::getSupportedServiceNames(); -aSupported.realloc(aSupported.getLength() + 2); - -OUString*pArray = aSupported.getArray(); -pArray[aSupported.getLength()-1] = FRM_SUN_CONTROL_DATEFIELD; -pArray[aSupported.getLength()-2] = STARDIV_ONE_FORM_CONTROL_DATEFIELD; -return aSupported; +const css::uno::Sequence vals { FRM_SUN_CONTROL_DATEFIELD, STARDIV_ONE_FORM_CONTROL_DATEFIELD }; +return comphelper::concatSequences(OBoundControl::getSupportedServiceNames(), vals); } @@ -122,26 +116,19 @@ IMPLEMENT_DEFAULT_CLONING( ODateModel ) css::uno::Sequence SAL_CALL ODateModel::getSupportedServiceNames() { -css::uno::Sequence aSupported = OBoundControlModel::getSupportedServiceNames(); - -sal_Int32 nOldLen = aSupported.getLength(); -aSupported.realloc( nOldLen + 9 ); -OUString* pStoreTo = aSupported.getArray() + nOldLen; - -*pStoreTo++ = BINDABLE_CONTROL_MODEL; -*pStoreTo++ = DATA_AWARE_CONTROL_MODEL; -*pStoreTo++ = VALIDATABLE_CONTROL_MODEL; - -*pStoreTo++ = BINDABLE_DATA_AWARE_CONTROL_MODEL; -*pStoreTo++ = VALIDATABLE_BINDABLE_CONTROL_MODEL; - -*pStoreTo++ = FRM_SUN_COMPONENT_DATEFIELD; -*pStoreTo++ = FRM_SUN_COMPONENT_DATABASE_DATEFIELD; -*pStoreTo++ = BINDABLE_DATABASE_DATE_FIELD; - -*pStoreTo++ = FRM_COMPONENT_DATEFIELD; - -return aSupported; +const css::uno::Sequence vals { + BINDABLE_CONTROL_MODEL, + DATA_AWARE_CONTROL_MODEL, + VALIDATABLE_CONTROL_MODEL, + BINDABLE_DATA_AWARE_CONTROL_MODEL, + VALIDATABLE_BINDABLE_CONTROL_MODEL, + FRM_SUN_COMPONENT_DATEFIELD, + FRM_SUN_COMPONENT_DATABASE_DATEFIELD, + BINDABLE_DATABASE_DATE_FIELD, + FRM_COMPONENT_DATEFIELD +}; + +return comphelper::concatSequences(OBoundControlModel::getSupportedServiceNames(), vals); } diff --git a/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx b/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx index 6d13f723e14c..c042eac6254f 100644 --- a/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx +++ b/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx @@ -383,16 +383,11 @@ css::uno::Sequence< OUString> SAL_CALL AccessibleDrawDocumentView::getSupportedServiceNames() { ThrowIfDisposed(); -// Get list of supported service names from base class... +const css::uno::Sequence vals { "com.sun.star.drawing.AccessibleDrawDocumentView" }; uno::Sequence aServiceNames = AccessibleDocumentViewBase::getSupportedServiceNames(); -sal_Int32 nCount (aServiceNames.getLength()); -// ...and add additional names. -aServiceNames.realloc (nCount + 1); -aServiceNames[nCount] = "com.sun.star.drawing.AccessibleDrawDocumentView"; - -return aServiceNames; +return comphelper::concatSequences(aServiceNames, vals); } //= XInterface == diff --git a/svx/source/accessibility/AccessibleGraphicShape.cxx b/svx/source/accessibility/AccessibleGraphicShape.cxx index 10f4d8b2..c7fe3c6fe40b 100644 --- a/svx/source/accessibility/AccessibleGraphicShape.cxx +++ b/svx/source/accessibility/AccessibleGraphicShape.cxx @@ -104,16 +104,8 @@ css::uno::Sequence< OUString> SAL_CALL AccessibleGraphicShape::getSupportedServiceNames() { ThrowIfDisposed (); -// Get list of supported service names from base class... -uno::Sequence aServiceNames = -AccessibleShape::getSupportedServiceNames(); -
[Libreoffice-commits] core.git: forms/source
forms/source/xforms/submission/replace.cxx |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) New commits: commit ddb1bbf0ab481d143aedb9346115d65e797b704b Author: Stephan Bergmann AuthorDate: Wed Jun 3 22:42:49 2020 +0200 Commit: Stephan Bergmann CommitDate: Thu Jun 4 09:08:04 2020 +0200 Upcoming loplugin:elidestringvar: forms Change-Id: Ic95f4dc57dd19654e2dace60883c0c6f1d14b9ac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95464 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/forms/source/xforms/submission/replace.cxx b/forms/source/xforms/submission/replace.cxx index f772fd6e46f3..e0823397d7d7 100644 --- a/forms/source/xforms/submission/replace.cxx +++ b/forms/source/xforms/submission/replace.cxx @@ -67,8 +67,7 @@ CSubmission::SubmissionResult CSubmission::replace(const OUString& aReplace, con -1, makeAny(true), PropertyState_DIRECT_VALUE); OUString aURL = m_aURLObj.GetMainURL(INetURLObject::DecodeMechanism::NONE); -OUString aTarget = "_default"; -xLoader->loadComponentFromURL(aURL, aTarget, FrameSearchFlag::ALL, descriptor); +xLoader->loadComponentFromURL(aURL, "_default", FrameSearchFlag::ALL, descriptor); return CSubmission::SUCCESS; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: forms/source include/oox linguistic/source sc/inc sc/source sd/source sfx2/source svx/source sw/source ucb/source vcl/inc
forms/source/component/GroupManager.hxx |4 +--- include/oox/helper/propertymap.hxx |3 +-- linguistic/source/lngsvcmgr.cxx |3 +-- sc/inc/dpgroup.hxx | 11 --- sc/inc/orcusxml.hxx |9 +++-- sc/inc/recursionhelper.hxx |3 +-- sc/source/filter/inc/formulabuffer.hxx | 19 ++- sc/source/filter/inc/htmlpars.hxx|3 +-- sc/source/filter/inc/pivotcachebuffer.hxx| 10 -- sc/source/filter/inc/scenariobuffer.hxx |4 +--- sc/source/filter/inc/viewsettings.hxx|6 ++ sc/source/filter/inc/worksheetbuffer.hxx |7 ++- sc/source/filter/oox/numberformatsbuffer.cxx |3 +-- sc/source/filter/oox/revisionfragment.cxx|4 +--- sc/source/filter/xml/XMLExportDatabaseRanges.cxx |4 +--- sc/source/filter/xml/XMLStylesExportHelper.hxx |4 +--- sc/source/filter/xml/pivotsource.hxx | 15 --- sc/source/ui/docshell/docfunc.cxx| 22 ++ sc/source/ui/inc/AccessibleCsvControl.hxx|4 +--- sc/source/ui/inc/navipi.hxx |3 +-- sc/source/ui/unoobj/cellsuno.cxx |4 +--- sc/source/ui/vba/vbainterior.cxx |4 ++-- sd/source/filter/sdfilter.cxx|3 +-- sd/source/ui/inc/tools/SlotStateListener.hxx |3 +-- sfx2/source/control/bindings.cxx |5 ++--- sfx2/source/doc/docfac.cxx | 12 +--- svx/source/inc/fmvwimp.hxx |3 +-- sw/source/filter/ww8/writerwordglue.cxx |8 ++-- ucb/source/ucp/file/filtask.hxx |4 +--- vcl/inc/svdata.hxx |5 ++--- vcl/inc/unx/gtk/gtksys.hxx |4 +--- 31 files changed, 66 insertions(+), 130 deletions(-) New commits: commit 468e8d53fbb07dce271a1f7fabf5711993e01eb7 Author: Noel Grandin AuthorDate: Fri May 29 15:04:53 2020 +0200 Commit: Noel Grandin CommitDate: Tue Jun 2 08:39:44 2020 +0200 inline some use-once typedefs Change-Id: I335e0c5cf7944efa487e4535a9e6a5baab2f36dd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95140 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/forms/source/component/GroupManager.hxx b/forms/source/component/GroupManager.hxx index 10ce1fc8f173..d3734b751d28 100644 --- a/forms/source/component/GroupManager.hxx +++ b/forms/source/component/GroupManager.hxx @@ -104,8 +104,6 @@ public: sal_Int16 GetTabIndex() const { return m_nTabIndex; } }; -typedef std::vector OGroupCompArr; - class OGroupComp; class OGroupCompAcc @@ -126,7 +124,7 @@ public: class OGroup final { -OGroupCompArr m_aCompArray; +std::vectorm_aCompArray; std::vector m_aCompAccArray; OUStringm_aGroupName; diff --git a/include/oox/helper/propertymap.hxx b/include/oox/helper/propertymap.hxx index db7b0297d680..85635f314d5e 100644 --- a/include/oox/helper/propertymap.hxx +++ b/include/oox/helper/propertymap.hxx @@ -40,7 +40,6 @@ namespace oox { struct PropertyNameVector; -typedef ::std::map< sal_Int32, css::uno::Any > PropertyMapType; typedef ::std::map< OUString, css::uno::Any > PropertyNameMap; /** A helper that maps property identifiers to property values. @@ -118,7 +117,7 @@ private: const PropertyNameVector* mpPropNames; protected: -PropertyMapType maProperties; +std::map< sal_Int32, css::uno::Any > maProperties; }; diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx index 16581700d890..e5f6fd3aa4e9 100644 --- a/linguistic/source/lngsvcmgr.cxx +++ b/linguistic/source/lngsvcmgr.cxx @@ -614,8 +614,7 @@ void LngSvcMgr::UpdateAll() using lang::Locale; using uno::Sequence; -typedef Sequence< OUString > Sequence_OUString_t; -typedef std::map< OUString, Sequence_OUString_t > list_entry_map_t; +typedef std::map< OUString, Sequence< OUString > > list_entry_map_t; SvtLinguConfig aCfg; diff --git a/sc/inc/dpgroup.hxx b/sc/inc/dpgroup.hxx index 4616cde16938..7d6ecf035c53 100644 --- a/sc/inc/dpgroup.hxx +++ b/sc/inc/dpgroup.hxx @@ -50,14 +50,12 @@ public: voidFillGroupFilter( ScDPFilteredCache::GroupFilter& rFilter ) const; }; -typedef ::std::vector ScDPGroupItemVec; - class ScDPGroupDimension { longnSourceDim; longnGroupDim; -OUString aGroupName; -ScDPGroupItemVecaItems; +OUStringaGroupName; +std::vector aItems; mutable std::vector maMemberEntries; bool mbDateDimension; public: @@ -87,8 +85,6 @@ public: bool IsDateDimension() const { return mbDateDimension;} }; -type
[Libreoffice-commits] core.git: forms/source include/svtools include/vcl svtools/source svx/source sw/inc sw/source toolkit/inc toolkit/source vcl/source
forms/source/richtext/richtextcontrol.cxx|6 +- forms/source/richtext/richtextvclcontrol.cxx |6 ++ forms/source/richtext/richtextvclcontrol.hxx |2 +- include/svtools/brwbox.hxx |2 +- include/svtools/editbrowsebox.hxx|2 +- include/vcl/button.hxx |6 +++--- include/vcl/edit.hxx |2 +- include/vcl/fixed.hxx|8 include/vcl/headbar.hxx |2 +- include/vcl/lstbox.hxx |2 +- include/vcl/scrbar.hxx |2 +- include/vcl/spinfld.hxx |2 +- include/vcl/tabpage.hxx |2 +- include/vcl/toolkit/combobox.hxx |2 +- include/vcl/toolkit/dialog.hxx |2 +- include/vcl/toolkit/group.hxx|2 +- include/vcl/toolkit/imgctrl.hxx |2 +- include/vcl/toolkit/spin.hxx |2 +- include/vcl/vclmedit.hxx |2 +- include/vcl/window.hxx |2 +- svtools/source/brwbox/brwbox2.cxx| 14 +++--- svtools/source/brwbox/ebbcontrols.cxx|6 ++ svx/source/fmcomp/gridcell.cxx |7 --- sw/inc/AnnotationWin.hxx |2 +- sw/source/uibase/docvw/AnnotationWin2.cxx| 25 + sw/source/uibase/docvw/PostItMgr.cxx |3 +-- sw/source/uibase/docvw/SidebarTxtControl.cxx |3 +-- sw/source/uibase/docvw/SidebarTxtControl.hxx |2 +- toolkit/inc/controls/filectrl.hxx|2 +- toolkit/source/awt/vclxtabpagecontainer.cxx |6 +- toolkit/source/awt/vclxwindow.cxx| 12 +++- toolkit/source/awt/vclxwindows.cxx | 16 toolkit/source/controls/filectrl.cxx |7 +-- vcl/source/control/button.cxx| 12 ++-- vcl/source/control/combobox.cxx | 15 ++- vcl/source/control/edit.cxx |9 ++--- vcl/source/control/fixed.cxx | 14 +++--- vcl/source/control/imgctrl.cxx |4 ++-- vcl/source/control/listbox.cxx |4 ++-- vcl/source/control/scrbar.cxx|2 +- vcl/source/control/spinbtn.cxx |4 ++-- vcl/source/control/spinfld.cxx |6 +++--- vcl/source/edit/vclmedit.cxx |4 ++-- vcl/source/toolkit/group.cxx |4 ++-- vcl/source/treelist/headbar.cxx |4 ++-- vcl/source/window/dialog.cxx |4 ++-- vcl/source/window/tabpage.cxx|4 ++-- vcl/source/window/window.cxx |2 +- 48 files changed, 120 insertions(+), 135 deletions(-) New commits: commit c200aa27ee4a0f5a89af6e970c2c22580029eded Author: Caolán McNamara AuthorDate: Thu May 21 15:54:15 2020 +0100 Commit: Caolán McNamara CommitDate: Fri May 22 13:17:30 2020 +0200 remove Size arg from Window::Draw and depend on GetSizePixel 90% of cases pass GetSizePixel as the Size arg already and this aligns Window::Draw with how Window::PaintToDevice works Change-Id: If5b024179a4b7a3b099177c2f6d4b1fb006b95ef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94644 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/forms/source/richtext/richtextcontrol.cxx b/forms/source/richtext/richtextcontrol.cxx index 1c96b9870361..a22d36d52424 100644 --- a/forms/source/richtext/richtextcontrol.cxx +++ b/forms/source/richtext/richtextcontrol.cxx @@ -325,17 +325,13 @@ namespace frm if ( !pTargetDevice ) return; -::Size aSize = pControl->GetSizePixel(); const MapUnit eTargetUnit = pTargetDevice->GetMapMode().GetMapUnit(); -if ( eTargetUnit != MapUnit::MapPixel ) -aSize = pTargetDevice->PixelToLogic( aSize ); - ::Point aPos( _nX, _nY ); // the XView::draw API talks about pixels, always ... if ( eTargetUnit != MapUnit::MapPixel ) aPos = pTargetDevice->PixelToLogic( aPos ); -pControl->Draw( pTargetDevice, aPos, aSize, DrawFlags::NoControls ); +pControl->Draw( pTargetDevice, aPos, DrawFlags::NoControls ); } diff --git a/forms/source/richtext/richtextvclcontrol.cxx b/forms/source/richtext/richtextvclcontrol.cxx index 492b08134d20..0df141693f54 100644 --- a/forms/source/richtext/richtextvclcontrol.cxx +++ b/forms/source/richtext/richtextvclcontrol.cxx @@ -288,13 +288,11 @@ namespace frm return bDone || Control::EventNotify(_rNEvt); } - -void RichTextControl::Draw( OutputDevice* _pDev, const Point& _rPos, const Size& _rSize, DrawFlags /*_nFlags*/ ) +void RichTextControl::Draw( OutputDevice* _pDev, const Point& _rPos, DrawFlags /*_nFlags*/ )
[Libreoffice-commits] core.git: forms/source
forms/source/xforms/submission.cxx|3 +++ forms/source/xforms/submission/submission.hxx |6 ++ 2 files changed, 9 insertions(+) New commits: commit a5458d1f219c8a67d2c4c90fdbdf8ffba40d769d Author: Caolán McNamara AuthorDate: Mon May 11 20:46:43 2020 +0100 Commit: Caolán McNamara CommitDate: Tue May 12 17:03:35 2020 +0200 limit forms to http[s] Change-Id: I3ed0bc626f693ec03f610dc7361f93cad914c9d8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94015 Tested-by: Jenkins Reviewed-by: Michael Stahl Reviewed-by: Caolán McNamara diff --git a/forms/source/xforms/submission.cxx b/forms/source/xforms/submission.cxx index 84d8599f8cb1..6b759e18453e 100644 --- a/forms/source/xforms/submission.cxx +++ b/forms/source/xforms/submission.cxx @@ -250,6 +250,9 @@ bool Submission::doSubmit( const Reference< XInteractionHandler >& xHandler ) return false; } +if (!xSubmission->IsWebProtocol()) +return false; + CSubmission::SubmissionResult aResult = xSubmission->submit( xHandler ); if (aResult == CSubmission::SUCCESS) diff --git a/forms/source/xforms/submission/submission.hxx b/forms/source/xforms/submission/submission.hxx index 5818a159594c..8a346e26 100644 --- a/forms/source/xforms/submission/submission.hxx +++ b/forms/source/xforms/submission/submission.hxx @@ -121,6 +121,12 @@ public: , m_xContext(::comphelper::getProcessComponentContext()) {} +bool IsWebProtocol() const +{ +INetProtocol eProtocol = m_aURLObj.GetProtocol(); +return eProtocol == INetProtocol::Http || eProtocol == INetProtocol::Https; +} + virtual ~CSubmission() {} virtual SubmissionResult submit(const css::uno::Reference< css::task::XInteractionHandler >& ) = 0; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: forms/source
forms/source/component/clickableimage.cxx | 11 --- 1 file changed, 11 deletions(-) New commits: commit a892669ec2887f5e51c403b3a9710d9191909443 Author: Caolán McNamara AuthorDate: Mon May 11 14:10:07 2020 +0100 Commit: Caolán McNamara CommitDate: Mon May 11 16:57:08 2020 +0200 USE_REGISTER_TRANSFER is never defined and each branch of the ifdef is the same anyway Change-Id: Iebffb0120915f6f7f735a37dc84f3f9bc6fd76ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93966 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/forms/source/component/clickableimage.cxx b/forms/source/component/clickableimage.cxx index a78b1908fc65..68861e42cf30 100644 --- a/forms/source/component/clickableimage.cxx +++ b/forms/source/component/clickableimage.cxx @@ -752,7 +752,6 @@ namespace frm SfxObjectShell *pObjSh = GetObjectShell(); -#ifdef USE_REGISTER_TRANSFER if( pObjSh ) { // Transfer target frame, so that javascript: URLs @@ -761,16 +760,6 @@ namespace frm if( pShMedium ) m_pMedium->SetLoadTargetFrame(pShMedium->GetLoadTargetFrame()); } -#else -if( pObjSh ) -{ -// Transfer target frame, so that javascript: URLs -// can also be "loaded" -const SfxMedium *pShMedium = pObjSh->GetMedium(); -if( pShMedium ) - m_pMedium->SetLoadTargetFrame(pShMedium->GetLoadTargetFrame()); -} -#endif m_bProdStarted = false; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: forms/source
forms/source/component/clickableimage.cxx | 90 -- forms/source/component/clickableimage.hxx |5 + 2 files changed, 51 insertions(+), 44 deletions(-) New commits: commit 318d5bf2a3d70300268c778074919fa908a0dcee Author: Caolán McNamara AuthorDate: Mon May 11 13:44:44 2020 +0100 Commit: Caolán McNamara CommitDate: Mon May 11 16:56:52 2020 +0200 factor out finding the matching SfxObjectShell Change-Id: I8d73e55e8fe836f495a44a0e24ac085f15bfcf4b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93965 Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara diff --git a/forms/source/component/clickableimage.cxx b/forms/source/component/clickableimage.cxx index e606ea2f549e..a78b1908fc65 100644 --- a/forms/source/component/clickableimage.cxx +++ b/forms/source/component/clickableimage.cxx @@ -684,6 +684,52 @@ namespace frm } } +SfxObjectShell* OClickableImageBaseModel::GetObjectShell() +{ +// Find the XModel to get to the Object shell or at least the +// Referer. +// There's only a Model if we load HTML documents and the URL is +// changed in a document that is already loaded. There's no way +// we can get to the Model during loading. +Reference< XModel > xModel; +css::uno::Reference xIfc( *this ); +while( !xModel.is() && xIfc.is() ) +{ +Reference xChild( xIfc, UNO_QUERY ); +xIfc = xChild->getParent(); +xModel.set(xIfc, css::uno::UNO_QUERY); +} + +// Search for the Object shell by iterating over all Object shells +// and comparing their XModel to ours. +// As an optimization, we try the current Object shell first. +SfxObjectShell *pObjSh = nullptr; + +if( xModel.is() ) +{ +SfxObjectShell *pTestObjSh = SfxObjectShell::Current(); +if( pTestObjSh ) +{ +Reference< XModel > xTestModel = pTestObjSh->GetModel(); +if( xTestModel == xModel ) +pObjSh = pTestObjSh; +} +if( !pObjSh ) +{ +pTestObjSh = SfxObjectShell::GetFirst(); +while( !pObjSh && pTestObjSh ) +{ +Reference< XModel > xTestModel = pTestObjSh->GetModel(); +if( xTestModel == xModel ) +pObjSh = pTestObjSh; +else +pTestObjSh = SfxObjectShell::GetNext( *pTestObjSh ); +} +} +} + +return pObjSh; +} void OClickableImageBaseModel::SetURL( const OUString& rURL ) { @@ -701,50 +747,10 @@ namespace frm return; if (!rURL.isEmpty() && !::svt::GraphicAccess::isSupportedURL( rURL ) ) - { +{ m_pMedium.reset(new SfxMedium(rURL, StreamMode::STD_READ)); -// Find the XModel to get to the Object shell or at least the -// Referer. -// There's only a Model if we load HTML documents and the URL is -// changed in a document that is already loaded. There's no way -// we can get to the Model during loading. -Reference< XModel > xModel; -css::uno::Reference xIfc( *this ); -while( !xModel.is() && xIfc.is() ) -{ -Reference xChild( xIfc, UNO_QUERY ); -xIfc = xChild->getParent(); -xModel.set(xIfc, css::uno::UNO_QUERY); -} - -// Search for the Object shell by iterating over all Object shells -// and comparing their XModel to ours. -// As an optimization, we try the current Object shell first. -SfxObjectShell *pObjSh = nullptr; - -if( xModel.is() ) -{ -SfxObjectShell *pTestObjSh = SfxObjectShell::Current(); -if( pTestObjSh ) -{ -Reference< XModel > xTestModel = pTestObjSh->GetModel(); -if( xTestModel == xModel ) -pObjSh = pTestObjSh; -} -if( !pObjSh ) -{ -pTestObjSh = SfxObjectShell::GetFirst(); -while( !pObjSh && pTestObjSh ) -{ -Reference< XModel > xTestModel = pTestObjSh->GetModel(); -if( xTestModel == xModel ) -pObjSh = pTestObjSh; -else -pTestObjSh = SfxObjectShell::GetNext( *pTestObjSh ); -} -} -} +SfxObjectShell *pObjSh = GetObjectShell(); #ifdef USE_REGISTER_TRANSFER if( pObjSh ) diff --git a/forms/source/component/clickableimage.hxx b/forms/source/component/clickableimage.hx
[Libreoffice-commits] core.git: forms/source
forms/source/component/Columns.cxx | 26 +- forms/source/component/Currency.cxx| 68 +++--- forms/source/component/DatabaseForm.cxx| 158 +++--- forms/source/component/Date.cxx| 22 +- forms/source/component/Edit.cxx| 38 +-- forms/source/component/EventThread.cxx | 30 +- forms/source/component/FormComponent.cxx | 267 - forms/source/component/FormattedField.cxx | 54 ++--- forms/source/component/ImageControl.cxx| 28 +- forms/source/component/RadioButton.cxx | 144 ++--- forms/source/component/Time.cxx| 22 +- forms/source/component/entrylisthelper.cxx | 42 +-- forms/source/component/imgprod.cxx | 238 +++--- forms/source/helper/formnavigation.cxx | 56 ++--- forms/source/misc/InterfaceContainer.cxx | 117 +- forms/source/misc/limitedformats.cxx | 126 +-- forms/source/richtext/richtextcontrol.cxx | 72 +++--- forms/source/richtext/rtattributehandler.cxx | 34 +-- forms/source/runtime/formoperations.cxx| 54 ++--- forms/source/solar/component/navbarcontrol.cxx | 66 +++--- forms/source/xforms/binding.cxx| 88 forms/source/xforms/model.cxx | 36 +-- forms/source/xforms/model_ui.cxx | 96 forms/source/xforms/submission.cxx | 22 +- 24 files changed, 951 insertions(+), 953 deletions(-) New commits: commit fcabb9a7263d4128ae934636b5a8eebc2a0217cc Author: Noel Grandin AuthorDate: Tue Apr 14 12:39:50 2020 +0200 Commit: Noel Grandin CommitDate: Tue Apr 14 13:33:20 2020 +0200 loplugin:flatten in forms Change-Id: I7e264cc1e60280b80a4e2e87b8944de4912c563d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92162 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/forms/source/component/Columns.cxx b/forms/source/component/Columns.cxx index ae1b1cb88897..95438dc86cbf 100644 --- a/forms/source/component/Columns.cxx +++ b/forms/source/component/Columns.cxx @@ -197,23 +197,23 @@ OGridColumn::OGridColumn( const Reference& _rContext, const O { // Create the UnoControlModel -if ( !m_aModelName.isEmpty() ) // is there a to-be-aggregated model? -{ -osl_atomic_increment( &m_refCount ); +if ( m_aModelName.isEmpty() ) // is there a to-be-aggregated model? +return; -{ -m_xAggregate.set( _rContext->getServiceManager()->createInstanceWithContext( m_aModelName, _rContext ), UNO_QUERY ); -setAggregation( m_xAggregate ); -} +osl_atomic_increment( &m_refCount ); -if ( m_xAggregate.is() ) -{ // don't omit those brackets - they ensure that the following temporary is properly deleted -m_xAggregate->setDelegator( static_cast< ::cppu::OWeakObject* >( this ) ); -} +{ +m_xAggregate.set( _rContext->getServiceManager()->createInstanceWithContext( m_aModelName, _rContext ), UNO_QUERY ); +setAggregation( m_xAggregate ); +} -// Set refcount back to zero -osl_atomic_decrement( &m_refCount ); +if ( m_xAggregate.is() ) +{ // don't omit those brackets - they ensure that the following temporary is properly deleted +m_xAggregate->setDelegator( static_cast< ::cppu::OWeakObject* >( this ) ); } + +// Set refcount back to zero +osl_atomic_decrement( &m_refCount ); } diff --git a/forms/source/component/Currency.cxx b/forms/source/component/Currency.cxx index e39a5e8c419d..5c682aa6474c 100644 --- a/forms/source/component/Currency.cxx +++ b/forms/source/component/Currency.cxx @@ -61,46 +61,46 @@ css::uno::Sequence SAL_CALL OCurrencyControl::getSupportedServiceNames void OCurrencyModel::implConstruct() { -if (m_xAggregateSet.is()) +if (!m_xAggregateSet.is()) +return; + +try { -try -{ -// get the system international information -const SvtSysLocale aSysLocale; -const LocaleDataWrapper& aLocaleInfo = aSysLocale.GetLocaleData(); +// get the system international information +const SvtSysLocale aSysLocale; +const LocaleDataWrapper& aLocaleInfo = aSysLocale.GetLocaleData(); -OUString sCurrencySymbol; -bool bPrependCurrencySymbol = false; -switch ( aLocaleInfo.getCurrPositiveFormat() ) -{ -case 0: // $1 -sCurrencySymbol = aLocaleInfo.getCurrSymbol(); -bPrependCurrencySymbol = true; -break; -case 1: // 1$ -sCurrencySymbol = aLocaleInfo.getCurrSymbol(); -bPrependCurrencySymbol = false; -break; -case 2: // $ 1 -sCurrencySy
[Libreoffice-commits] core.git: forms/source
forms/source/component/Columns.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit d70fcbd9e42a3c4925e2a7fc3ed4826668cc4889 Author: Andrea Gelmini AuthorDate: Sat Mar 21 01:28:51 2020 +0100 Commit: Julien Nabet CommitDate: Sat Mar 21 09:36:13 2020 +0100 Fix typo Change-Id: Ifcdd81ef6aefcfd80e8958195b52bbfbdc2d9960 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90851 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/forms/source/component/Columns.cxx b/forms/source/component/Columns.cxx index 234431affdf4..ae1b1cb88897 100644 --- a/forms/source/component/Columns.cxx +++ b/forms/source/component/Columns.cxx @@ -93,7 +93,7 @@ sal_Int32 getColumnTypeByModelName(const OUString& aModelName) #ifdef DBG_UTIL sal_Int32 nCompatiblePrefixPos = aModelName.indexOf(aCompatibleModelPrefix); DBG_ASSERT( (nPrefixPos != -1) || (nCompatiblePrefixPos != -1), -"::getColumnTypeByModelName() : wrong servivce !"); +"::getColumnTypeByModelName() : wrong service!"); #endif OUString aColumnType = (nPrefixPos != -1) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: forms/source include/vcl vcl/source
forms/source/component/imgprod.cxx |4 ++-- include/vcl/graph.hxx |4 ++-- vcl/source/filter/graphicfilter.cxx |8 vcl/source/filter/igif/gifread.cxx |6 +++--- vcl/source/filter/ixbm/xbmread.cxx |6 +++--- vcl/source/filter/ixpm/xpmread.cxx |6 +++--- vcl/source/filter/jpeg/jpeg.cxx |6 +++--- vcl/source/gdi/graph.cxx|4 ++-- 8 files changed, 22 insertions(+), 22 deletions(-) New commits: commit ec85ed21a960a198a01778cdb89a91fabcb5d0c0 Author: Tomaž Vajngerl AuthorDate: Tue Mar 3 12:46:19 2020 +0100 Commit: Tomaž Vajngerl CommitDate: Wed Mar 4 11:31:45 2020 +0100 vcl: rename GetContext to GetReaderContext in Graphic GetContext is a very generic method name, so rename it to a more specific GetReaderContext name. It is easier to find references. Change-Id: Ieb05ac63080598357107dc3e485b481910cd79cc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89929 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl diff --git a/forms/source/component/imgprod.cxx b/forms/source/component/imgprod.cxx index e95ce18fc1b9..930fa60c26df 100644 --- a/forms/source/component/imgprod.cxx +++ b/forms/source/component/imgprod.cxx @@ -241,7 +241,7 @@ void ImageProducer::setImage( css::uno::Reference< css::io::XInputStream > const void ImageProducer::NewDataAvailable() { -if( ( GraphicType::NONE == mpGraphic->GetType() ) || mpGraphic->GetContext() ) +if( ( GraphicType::NONE == mpGraphic->GetType() ) || mpGraphic->GetReaderContext() ) startProduction(); } @@ -257,7 +257,7 @@ void ImageProducer::startProduction() { // if we already have a graphic, we don't have to import again; // graphic is cleared if a new Stream is set -if( ( mpGraphic->GetType() == GraphicType::NONE ) || mpGraphic->GetContext() ) +if( ( mpGraphic->GetType() == GraphicType::NONE ) || mpGraphic->GetReaderContext() ) { if ( ImplImportGraphic( *mpGraphic ) ) maDoneHdl.Call( mpGraphic.get() ); diff --git a/include/vcl/graph.hxx b/include/vcl/graph.hxx index c1fadb49d9cb..6986f5f9b0b1 100644 --- a/include/vcl/graph.hxx +++ b/include/vcl/graph.hxx @@ -182,8 +182,8 @@ public: public: -std::shared_ptr& GetContext(); -voidSetContext( const std::shared_ptr &pReader ); +std::shared_ptr& GetReaderContext(); +voidSetReaderContext( const std::shared_ptr &pReader ); voidSetDummyContext(bool value); boolIsDummyContext() const; private: diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx index 9ae7e393c8b7..1c87416115e9 100644 --- a/vcl/source/filter/graphicfilter.cxx +++ b/vcl/source/filter/graphicfilter.cxx @@ -1109,7 +1109,7 @@ void GraphicFilter::ImportGraphics(std::vector< std::shared_ptr >& rGra { rContext.m_pAccess.reset(); -if (rContext.m_nStatus == ERRCODE_NONE && (rContext.m_eLinkType != GfxLinkType::NONE) && !rContext.m_pGraphic->GetContext()) +if (rContext.m_nStatus == ERRCODE_NONE && (rContext.m_eLinkType != GfxLinkType::NONE) && !rContext.m_pGraphic->GetReaderContext()) { std::unique_ptr pGraphicContent; @@ -1456,7 +1456,7 @@ ErrCode GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPath, } } -std::shared_ptr pContext = rGraphic.GetContext(); +std::shared_ptr pContext = rGraphic.GetReaderContext(); bool bDummyContext = rGraphic.IsDummyContext(); if( !pContext || bDummyContext ) { @@ -1786,7 +1786,7 @@ ErrCode GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPath, } } -if( nStatus == ERRCODE_NONE && bCreateNativeLink && ( eLinkType != GfxLinkType::NONE ) && !rGraphic.GetContext() && !bLinkSet ) +if( nStatus == ERRCODE_NONE && bCreateNativeLink && ( eLinkType != GfxLinkType::NONE ) && !rGraphic.GetReaderContext() && !bLinkSet ) { if (!pGraphicContent) { @@ -2237,7 +2237,7 @@ IMPL_LINK( GraphicFilter, FilterCallback, ConvertData&, rData, bool ) default: break; } -if( GraphicType::NONE == rData.maGraphic.GetType() || rData.maGraphic.GetContext() ) // Import +if( GraphicType::NONE == rData.maGraphic.GetType() || rData.maGraphic.GetReaderContext() ) // Import { // Import nFormat = GetImportFormatNumberForShortName( OStringToOUString( aShortName, RTL_TEXTENCODING_UTF8) ); diff --git a/vcl/source/filter/igif/gifread.cxx b/vcl/source/filter/igif/gifread.cxx index f940bff2416a..47d9acb53c2a 100644 --- a/vcl/source/filter/igif/gifread.cxx +++ b/vcl/source/filter/igif/gifread.cxx @@ -960,8 +960,8 @@ bool IsGIFAnimated(SvStream & rStm) VCL_DLLPUBLIC bool ImportGIF( SvStream & rStm, Graphic& rGraphic )
[Libreoffice-commits] core.git: forms/source
forms/source/component/Edit.hxx |5 + forms/source/component/EditBase.hxx |6 +- forms/source/component/EventThread.hxx |6 +- forms/source/component/entrylisthelper.hxx |6 +- forms/source/component/errorbroadcaster.hxx |6 +- 5 files changed, 5 insertions(+), 24 deletions(-) New commits: commit 349695bf846e6193f78d1a8c8751ad38e9a3a501 Author: Aleyna Doğrucan AuthorDate: Sat Dec 28 16:59:30 2019 +0300 Commit: Muhammet Kara CommitDate: Sun Dec 29 21:02:04 2019 +0100 tdf#124176: Use pragma once instead of include guards Change-Id: Ida50f8460a0f2b992674a359d5d7608b11412fbb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85925 Tested-by: Jenkins Reviewed-by: Muhammet Kara diff --git a/forms/source/component/Edit.hxx b/forms/source/component/Edit.hxx index 755ae41bc1c5..a19d6b93a09a 100644 --- a/forms/source/component/Edit.hxx +++ b/forms/source/component/Edit.hxx @@ -17,8 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_FORMS_SOURCE_COMPONENT_EDIT_HXX -#define INCLUDED_FORMS_SOURCE_COMPONENT_EDIT_HXX +#pragma once #include #include "EditBase.hxx" @@ -166,6 +165,4 @@ private: } -#endif // INCLUDED_FORMS_SOURCE_COMPONENT_EDIT_HXX - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/EditBase.hxx b/forms/source/component/EditBase.hxx index 0a71fa228fcb..2cf9377d541b 100644 --- a/forms/source/component/EditBase.hxx +++ b/forms/source/component/EditBase.hxx @@ -17,8 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_FORMS_SOURCE_COMPONENT_EDITBASE_HXX -#define INCLUDED_FORMS_SOURCE_COMPONENT_EDITBASE_HXX +#pragma once #include #include @@ -96,7 +95,4 @@ protected: } - -#endif // INCLUDED_FORMS_SOURCE_COMPONENT_EDITBASE_HXX - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/EventThread.hxx b/forms/source/component/EventThread.hxx index eb3062080d73..cf7b73b9c794 100644 --- a/forms/source/component/EventThread.hxx +++ b/forms/source/component/EventThread.hxx @@ -17,8 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_FORMS_SOURCE_COMPONENT_EVENTTHREAD_HXX -#define INCLUDED_FORMS_SOURCE_COMPONENT_EVENTTHREAD_HXX +#pragma once #include @@ -103,7 +102,4 @@ private: } // namespace frm - -#endif // INCLUDED_FORMS_SOURCE_COMPONENT_EVENTTHREAD_HXX - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/entrylisthelper.hxx b/forms/source/component/entrylisthelper.hxx index f358ba53273d..55ecd7969f8c 100644 --- a/forms/source/component/entrylisthelper.hxx +++ b/forms/source/component/entrylisthelper.hxx @@ -17,8 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_FORMS_SOURCE_COMPONENT_ENTRYLISTHELPER_HXX -#define INCLUDED_FORMS_SOURCE_COMPONENT_ENTRYLISTHELPER_HXX +#pragma once #include #include @@ -195,7 +194,4 @@ namespace frm } // namespace frm - -#endif // INCLUDED_FORMS_SOURCE_COMPONENT_ENTRYLISTHELPER_HXX - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/errorbroadcaster.hxx b/forms/source/component/errorbroadcaster.hxx index b60bfcecce0f..c8ad66c1ee17 100644 --- a/forms/source/component/errorbroadcaster.hxx +++ b/forms/source/component/errorbroadcaster.hxx @@ -17,8 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_FORMS_SOURCE_COMPONENT_ERRORBROADCASTER_HXX -#define INCLUDED_FORMS_SOURCE_COMPONENT_ERRORBROADCASTER_HXX +#pragma once #include #include @@ -58,7 +57,4 @@ namespace frm } // namespace frm - -#endif // INCLUDED_FORMS_SOURCE_COMPONENT_ERRORBROADCASTER_HXX - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: forms/source
forms/source/component/Currency.hxx |6 +- forms/source/component/DatabaseForm.hxx |7 +-- forms/source/component/Date.hxx |6 +- 3 files changed, 3 insertions(+), 16 deletions(-) New commits: commit 53ba2c95e9ff2a102f29e81a62fcbab39dd0f3e0 Author: Aleyna Doğrucan AuthorDate: Sat Dec 28 15:40:24 2019 +0300 Commit: Muhammet Kara CommitDate: Sun Dec 29 21:00:23 2019 +0100 tdf#124176: Use pragma once instead of include guards Change-Id: I630771422da12cd4acb84836892ef7eff9f8f8eb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85923 Tested-by: Jenkins Reviewed-by: Muhammet Kara diff --git a/forms/source/component/Currency.hxx b/forms/source/component/Currency.hxx index a0113fd1372e..1deca259533f 100644 --- a/forms/source/component/Currency.hxx +++ b/forms/source/component/Currency.hxx @@ -17,8 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_FORMS_SOURCE_COMPONENT_CURRENCY_HXX -#define INCLUDED_FORMS_SOURCE_COMPONENT_CURRENCY_HXX +#pragma once #include "EditBase.hxx" @@ -76,7 +75,4 @@ public: } // namespace frm - -#endif // INCLUDED_FORMS_SOURCE_COMPONENT_CURRENCY_HXX - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/DatabaseForm.hxx b/forms/source/component/DatabaseForm.hxx index 3e5c161f5743..3f347f0527b7 100644 --- a/forms/source/component/DatabaseForm.hxx +++ b/forms/source/component/DatabaseForm.hxx @@ -17,8 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_FORMS_SOURCE_COMPONENT_DATABASEFORM_HXX -#define INCLUDED_FORMS_SOURCE_COMPONENT_DATABASEFORM_HXX +#pragma once #include @@ -529,8 +528,4 @@ protected: } // namespace frm - -#endif // INCLUDED_FORMS_SOURCE_COMPONENT_DATABASEFORM_HXX - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/Date.hxx b/forms/source/component/Date.hxx index 44ed97320ad5..36a04acc79fa 100644 --- a/forms/source/component/Date.hxx +++ b/forms/source/component/Date.hxx @@ -17,8 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_FORMS_SOURCE_COMPONENT_DATE_HXX -#define INCLUDED_FORMS_SOURCE_COMPONENT_DATE_HXX +#pragma once #include "EditBase.hxx" #include @@ -106,7 +105,4 @@ public: } // namespace frm - -#endif // INCLUDED_FORMS_SOURCE_COMPONENT_DATE_HXX - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: forms/source
forms/source/component/Button.hxx |6 +- forms/source/component/CheckBox.hxx |6 +- forms/source/component/Columns.hxx|5 + forms/source/component/cachedrowset.hxx |6 +- forms/source/component/clickableimage.hxx |6 +- 5 files changed, 5 insertions(+), 24 deletions(-) New commits: commit 1c7fb79ad1c9356424ff1ed489cc2ac04cc1d68d Author: Onur Yilmaz AuthorDate: Thu Dec 19 03:24:31 2019 +0300 Commit: Muhammet Kara CommitDate: Fri Dec 20 21:10:29 2019 +0100 tdf#124176: Use pragma once instead of include guards Change-Id: I083ae8efad8bdf116ef98038fa1e15037655aba9 Reviewed-on: https://gerrit.libreoffice.org/85459 Tested-by: Jenkins Reviewed-by: Muhammet Kara diff --git a/forms/source/component/Button.hxx b/forms/source/component/Button.hxx index 341ea2dc2c00..fa77e4abd3a7 100644 --- a/forms/source/component/Button.hxx +++ b/forms/source/component/Button.hxx @@ -17,8 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_FORMS_SOURCE_COMPONENT_BUTTON_HXX -#define INCLUDED_FORMS_SOURCE_COMPONENT_BUTTON_HXX +#pragma once #include "clickableimage.hxx" #include @@ -192,7 +191,4 @@ private: } // namespace frm - -#endif // INCLUDED_FORMS_SOURCE_COMPONENT_BUTTON_HXX - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/CheckBox.hxx b/forms/source/component/CheckBox.hxx index ea2e633a28ca..7f4ab7103153 100644 --- a/forms/source/component/CheckBox.hxx +++ b/forms/source/component/CheckBox.hxx @@ -17,8 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_FORMS_SOURCE_COMPONENT_CHECKBOX_HXX -#define INCLUDED_FORMS_SOURCE_COMPONENT_CHECKBOX_HXX +#pragma once #include "refvaluecomponent.hxx" @@ -74,7 +73,4 @@ public: } - -#endif // INCLUDED_FORMS_SOURCE_COMPONENT_CHECKBOX_HXX - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/Columns.hxx b/forms/source/component/Columns.hxx index 2db0bfb2218a..c24ca8a013de 100644 --- a/forms/source/component/Columns.hxx +++ b/forms/source/component/Columns.hxx @@ -17,8 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_FORMS_SOURCE_COMPONENT_COLUMNS_HXX -#define INCLUDED_FORMS_SOURCE_COMPONENT_COLUMNS_HXX +#pragma once #include #include @@ -198,6 +197,4 @@ DECL_COLUMN(FormattedFieldColumn) } // namespace frm -#endif // INCLUDED_FORMS_SOURCE_COMPONENT_COLUMNS_HXX - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/cachedrowset.hxx b/forms/source/component/cachedrowset.hxx index 03dd635c724e..9e61e57596e0 100644 --- a/forms/source/component/cachedrowset.hxx +++ b/forms/source/component/cachedrowset.hxx @@ -17,8 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_FORMS_SOURCE_COMPONENT_CACHEDROWSET_HXX -#define INCLUDED_FORMS_SOURCE_COMPONENT_CACHEDROWSET_HXX +#pragma once #include #include @@ -78,7 +77,4 @@ namespace frm } // namespace frm - -#endif // INCLUDED_FORMS_SOURCE_COMPONENT_CACHEDROWSET_HXX - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/clickableimage.hxx b/forms/source/component/clickableimage.hxx index 30342d060601..d4a5065e0383 100644 --- a/forms/source/component/clickableimage.hxx +++ b/forms/source/component/clickableimage.hxx @@ -17,8 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_FORMS_SOURCE_COMPONENT_CLICKABLEIMAGE_HXX -#define INCLUDED_FORMS_SOURCE_COMPONENT_CLICKABLEIMAGE_HXX +#pragma once #include #include @@ -275,7 +274,4 @@ namespace frm } // namespace frm - -#endif // INCLUDED_FORMS_SOURCE_COMPONENT_CLICKABLEIMAGE_HXX - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: forms/source fpicker/source framework/inc framework/source
forms/source/component/DatabaseForm.cxx |2 +- forms/source/helper/controlfeatureinterception.cxx |2 +- forms/source/helper/formnavigation.cxx |6 +++--- forms/source/helper/urltransformer.cxx |4 ++-- forms/source/inc/controlfeatureinterception.hxx |2 +- forms/source/inc/featuredispatcher.hxx |2 +- forms/source/inc/formnavigation.hxx |2 +- forms/source/inc/urltransformer.hxx |4 ++-- forms/source/misc/limitedformats.cxx|6 +++--- forms/source/richtext/richtextvclcontrol.cxx|6 +++--- forms/source/solar/control/navtoolbar.cxx |2 +- forms/source/xforms/computedexpression.cxx |2 +- forms/source/xforms/computedexpression.hxx |2 +- forms/source/xforms/submission/serialization_urlencoded.cxx |4 ++-- forms/source/xforms/submission/serialization_urlencoded.hxx |2 +- fpicker/source/aqua/FPentry.mm |2 +- fpicker/source/office/OfficeControlAccess.cxx |4 ++-- fpicker/source/office/fps_office.cxx|2 +- fpicker/source/office/iodlg.cxx |2 +- fpicker/source/win32/FPentry.cxx|2 +- framework/inc/jobs/joburl.hxx |2 +- framework/inc/macros/registration.hxx |2 +- framework/inc/uielement/uicommanddescription.hxx|2 +- framework/source/jobs/joburl.cxx|2 +- framework/source/uielement/menubarmerger.cxx|2 +- framework/source/uielement/uicommanddescription.cxx |2 +- 26 files changed, 36 insertions(+), 36 deletions(-) New commits: commit 02b24d77476f93887691dde564351d6f8b770b8f Author: Noel Grandin AuthorDate: Thu Dec 19 09:31:15 2019 +0200 Commit: Noel Grandin CommitDate: Thu Dec 19 09:33:33 2019 +0100 sal_Char->char in forms..framework Change-Id: I756c1f54d50403aa9b4f03dbbc2a387556f07084 Reviewed-on: https://gerrit.libreoffice.org/85475 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx index 3bd03fce0b03..5ffb57f11678 100644 --- a/forms/source/component/DatabaseForm.cxx +++ b/forms/source/component/DatabaseForm.cxx @@ -933,7 +933,7 @@ void ODatabaseForm::InsertTextPart( INetMIMEMessage& rParent, const OUString& rN pChild->SetContentDisposition(aContentDisp); rtl_TextEncoding eSystemEncoding = osl_getThreadTextEncoding(); -const sal_Char* pBestMatchingEncoding = rtl_getBestMimeCharsetFromTextEncoding( eSystemEncoding ); +const char* pBestMatchingEncoding = rtl_getBestMimeCharsetFromTextEncoding( eSystemEncoding ); OUString aBestMatchingEncoding = OUString::createFromAscii(pBestMatchingEncoding); pChild->SetContentType( "text/plain; charset=\"" + aBestMatchingEncoding + "\""); diff --git a/forms/source/helper/controlfeatureinterception.cxx b/forms/source/helper/controlfeatureinterception.cxx index 16fa4154935d..1e0d0fbcd03d 100644 --- a/forms/source/helper/controlfeatureinterception.cxx +++ b/forms/source/helper/controlfeatureinterception.cxx @@ -135,7 +135,7 @@ namespace frm } -Reference< XDispatch > ControlFeatureInterception::queryDispatch( const sal_Char* _pAsciiURL ) +Reference< XDispatch > ControlFeatureInterception::queryDispatch( const char* _pAsciiURL ) { return queryDispatch( m_pUrlTransformer->getStrictURLFromAscii( _pAsciiURL ) ); } diff --git a/forms/source/helper/formnavigation.cxx b/forms/source/helper/formnavigation.cxx index 7c7186e11905..96e2b6b8e935 100644 --- a/forms/source/helper/formnavigation.cxx +++ b/forms/source/helper/formnavigation.cxx @@ -264,7 +264,7 @@ namespace frm } -void OFormNavigationHelper::dispatchWithArgument( sal_Int16 _nFeatureId, const sal_Char* _pParamAsciiName, +void OFormNavigationHelper::dispatchWithArgument( sal_Int16 _nFeatureId, const char* _pParamAsciiName, const Any& _rParamValue ) const { FeatureMap::const_iterator aInfo = m_aSupportedFeatures.find( _nFeatureId ); @@ -377,9 +377,9 @@ namespace frm struct FeatureURL { const sal_Int16 nFormFeature; -const sal_Char* pAsciiURL; +const char* pAsciiURL; -FeatureURL( const sal_Int16 _nFormFeature, const sal_Char* _pAsciiURL ) +FeatureURL( const sal_Int16 _nFormFeature, const char* _pAsciiURL ) :nFormFeature( _nFormFeature ) ,pAsciiURL( _pAsciiURL ) { diff --git a/forms/source/helper/urltransformer.cxx b/forms/source/helper/urltransformer.cxx index fa4655780e44.
[Libreoffice-commits] core.git: forms/source
forms/source/helper/commandimageprovider.cxx | 38 + forms/source/inc/commandimageprovider.hxx | 29 +-- forms/source/solar/component/navbarcontrol.cxx |2 - forms/source/solar/control/navtoolbar.cxx |4 +- forms/source/solar/inc/navtoolbar.hxx |6 +-- 5 files changed, 18 insertions(+), 61 deletions(-) New commits: commit 1d1366bd15de157371cd3353d43fc7873dcaa3af Author: Noel Grandin AuthorDate: Mon Dec 2 09:57:02 2019 +0200 Commit: Noel Grandin CommitDate: Tue Dec 3 10:57:41 2019 +0100 loplugin:mergeclases ICommandImageProvider with DocumentCommandImageProvider Change-Id: Ia6997489a8f21f33287e11e39fab1bb059070c89 Reviewed-on: https://gerrit.libreoffice.org/84195 Reviewed-by: Noel Grandin Tested-by: Noel Grandin diff --git a/forms/source/helper/commandimageprovider.cxx b/forms/source/helper/commandimageprovider.cxx index 6569c8a4373e..ca2d7052567f 100644 --- a/forms/source/helper/commandimageprovider.cxx +++ b/forms/source/helper/commandimageprovider.cxx @@ -52,30 +52,7 @@ namespace frm namespace ImageType = ::com::sun::star::ui::ImageType; -namespace { - -class DocumentCommandImageProvider : public ICommandImageProvider -{ -public: -DocumentCommandImageProvider( const Reference& _rContext, const Reference< XModel >& _rxDocument ) -{ -impl_init_nothrow( _rContext, _rxDocument ); -} - -// ICommandImageProvider -virtual CommandImages getCommandImages( const css::uno::Sequence< OUString >& _rCommandURLs, const bool _bLarge ) const override; - -private: -voidimpl_init_nothrow( const Reference& _rContext, const Reference< XModel >& _rxDocument ); - -private: -Reference< XImageManager >m_xDocumentImageManager; -Reference< XImageManager >m_xModuleImageManager; -}; - -} - -void DocumentCommandImageProvider::impl_init_nothrow( const Reference& _rContext, const Reference< XModel >& _rxDocument ) +DocumentCommandImageProvider::DocumentCommandImageProvider( const Reference& _rContext, const Reference< XModel >& _rxDocument ) { OSL_ENSURE( _rxDocument.is(), "DocumentCommandImageProvider::impl_init_nothrow: no document => no images!" ); if ( !_rxDocument.is() ) @@ -112,10 +89,10 @@ namespace frm } -CommandImages DocumentCommandImageProvider::getCommandImages( const css::uno::Sequence< OUString >& _rCommandURLs, const bool _bLarge ) const +std::vector DocumentCommandImageProvider::getCommandImages( const css::uno::Sequence< OUString >& _rCommandURLs, const bool _bLarge ) const { const size_t nCommandCount = _rCommandURLs.getLength(); -CommandImages aImages( nCommandCount ); +std::vector aImages( nCommandCount ); try { const sal_Int16 nImageType = ImageType::COLOR_NORMAL @@ -150,15 +127,6 @@ namespace frm return aImages; } - -PCommandImageProvider createDocumentCommandImageProvider( -const Reference& _rContext, const Reference< XModel >& _rxDocument ) -{ -PCommandImageProvider pImageProvider( new DocumentCommandImageProvider( _rContext, _rxDocument ) ); -return pImageProvider; -} - - } // namespace frm diff --git a/forms/source/inc/commandimageprovider.hxx b/forms/source/inc/commandimageprovider.hxx index 560be1dc5c74..3a67df02256a 100644 --- a/forms/source/inc/commandimageprovider.hxx +++ b/forms/source/inc/commandimageprovider.hxx @@ -22,6 +22,7 @@ #include #include +#include #include @@ -31,32 +32,20 @@ namespace frm { - -//= ICommandImageProvider - -typedef ::std::vector< Image > CommandImages; - -class SAL_NO_VTABLE ICommandImageProvider +class DocumentCommandImageProvider { public: -virtual CommandImages getCommandImages( -const css::uno::Sequence< OUString >& _rCommandURLs, -const bool _bLarge -) const = 0; +DocumentCommandImageProvider( const css::uno::Reference& _rContext, const css::uno::Reference< css::frame::XModel >& _rxDocument ); -virtual ~ICommandImageProvider() { } -}; - -typedef std::shared_ptr< const ICommandImageProvider > PCommandImageProvider; +std::vector getCommandImages( const css::uno::Sequence< OUString >& _rCommandURLs, bool _bLarge ) const; +private: +css::uno::Reference< css::ui::XImageManager > m_xDocumentImageManager; +css::uno::Reference< css::ui::XImageManager >m_xModuleImageManager; +}; -//= factory -PCommandImageProvider -createDocumentCommandImageProvider( -const css::uno::Reference& _rContext, -const css::uno::Reference< css::frame::XModel >& _rxDocument -); +typedef st
[Libreoffice-commits] core.git: forms/source
forms/source/component/Columns.cxx | 77 ++--- 1 file changed, 39 insertions(+), 38 deletions(-) New commits: commit 9bbdf2273394f7b9d619973cb8a73e7f846c334f Author: Julien Nabet AuthorDate: Mon Dec 2 20:16:14 2019 +0100 Commit: Noel Grandin CommitDate: Tue Dec 3 07:15:03 2019 +0100 Use initializer set instead of using several inserts (forms/Columns) while at it, replace "EnableVisible" by "PROPERTY_ENABLEVISIBLE" Change-Id: Ibde140e84acdecd02a67e2cfb7f422098afad4d1 Reviewed-on: https://gerrit.libreoffice.org/84269 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/forms/source/component/Columns.cxx b/forms/source/component/Columns.cxx index 8ed4217b1c75..a911e3ff2f86 100644 --- a/forms/source/component/Columns.cxx +++ b/forms/source/component/Columns.cxx @@ -292,44 +292,45 @@ void OGridColumn::disposing() void OGridColumn::clearAggregateProperties( Sequence< Property >& _rProps, bool bAllowDropDown ) { // some properties are not to be exposed to the outer world -::std::set< OUString > aForbiddenProperties; -aForbiddenProperties.insert( PROPERTY_ALIGN ); -aForbiddenProperties.insert( PROPERTY_AUTOCOMPLETE ); -aForbiddenProperties.insert( PROPERTY_BACKGROUNDCOLOR ); -aForbiddenProperties.insert( PROPERTY_BORDER ); -aForbiddenProperties.insert( PROPERTY_BORDERCOLOR ); -aForbiddenProperties.insert( PROPERTY_ECHO_CHAR ); -aForbiddenProperties.insert( PROPERTY_FILLCOLOR ); -aForbiddenProperties.insert( PROPERTY_FONT ); -aForbiddenProperties.insert( PROPERTY_FONT_NAME ); -aForbiddenProperties.insert( PROPERTY_FONT_STYLENAME ); -aForbiddenProperties.insert( PROPERTY_FONT_FAMILY ); -aForbiddenProperties.insert( PROPERTY_FONT_CHARSET ); -aForbiddenProperties.insert( PROPERTY_FONT_HEIGHT ); -aForbiddenProperties.insert( PROPERTY_FONT_WEIGHT ); -aForbiddenProperties.insert( PROPERTY_FONT_SLANT ); -aForbiddenProperties.insert( PROPERTY_FONT_UNDERLINE ); -aForbiddenProperties.insert( PROPERTY_FONT_STRIKEOUT ); -aForbiddenProperties.insert( PROPERTY_FONT_WORDLINEMODE ); -aForbiddenProperties.insert( PROPERTY_TEXTLINECOLOR ); -aForbiddenProperties.insert( PROPERTY_FONTEMPHASISMARK ); -aForbiddenProperties.insert( PROPERTY_FONTRELIEF ); -aForbiddenProperties.insert( PROPERTY_HARDLINEBREAKS ); -aForbiddenProperties.insert( PROPERTY_HSCROLL ); -aForbiddenProperties.insert( PROPERTY_LABEL ); -aForbiddenProperties.insert( PROPERTY_LINECOLOR ); -aForbiddenProperties.insert( PROPERTY_MULTISELECTION ); -aForbiddenProperties.insert( PROPERTY_PRINTABLE ); -aForbiddenProperties.insert( PROPERTY_TABINDEX ); -aForbiddenProperties.insert( PROPERTY_TABSTOP ); -aForbiddenProperties.insert( PROPERTY_TEXTCOLOR ); -aForbiddenProperties.insert( PROPERTY_VSCROLL ); -aForbiddenProperties.insert( PROPERTY_CONTROLLABEL ); -aForbiddenProperties.insert( PROPERTY_RICH_TEXT ); -aForbiddenProperties.insert( PROPERTY_VERTICAL_ALIGN ); -aForbiddenProperties.insert( PROPERTY_IMAGE_URL ); -aForbiddenProperties.insert( PROPERTY_IMAGE_POSITION ); -aForbiddenProperties.insert( OUString( "EnableVisible" ) ); +::std::set< OUString > aForbiddenProperties { + PROPERTY_ALIGN, + PROPERTY_AUTOCOMPLETE, + PROPERTY_BACKGROUNDCOLOR, + PROPERTY_BORDER, + PROPERTY_BORDERCOLOR, + PROPERTY_ECHO_CHAR, + PROPERTY_FILLCOLOR, + PROPERTY_FONT, + PROPERTY_FONT_NAME, + PROPERTY_FONT_STYLENAME, + PROPERTY_FONT_FAMILY, + PROPERTY_FONT_CHARSET, + PROPERTY_FONT_HEIGHT, + PROPERTY_FONT_WEIGHT, + PROPERTY_FONT_SLANT, + PROPERTY_FONT_UNDERLINE, + PROPERTY_FONT_STRIKEOUT, + PROPERTY_FONT_WORDLINEMODE, + PROPERTY_TEXTLINECOLOR, + PROPERTY_FONTEMPHASISMARK, + PROPERTY_FONTRELIEF, + PROPERTY_HARDLINEBREAKS, + PROPERTY_HSCROLL, + PROPERTY_LABEL, + PROPERTY_LINECOLOR, + PROPERTY_MULTISELECTION, + PROPERTY_PRINTABLE, + PROPERTY_TABINDEX, + PROPERTY_TABSTOP, + PROPERTY_TEXTCOLOR, + PROPERTY_VSCROLL, + PROPERTY_CONTROLLABEL, + PROPERTY_RICH_TEXT, + PROPERTY_VERTICAL_ALIGN, + PROPERTY_IMAGE_URL, + PROPERTY_IMAGE_POSITION, + PROPERTY_ENABLEVISIBLE +}; if ( !bAllowDropDown ) aForbiddenProperties.insert( PROPERTY_DROPDOWN ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits