[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - xmloff/source
xmloff/source/style/xmlnumfi.cxx |9 - 1 file changed, 8 insertions(+), 1 deletion(-) New commits: commit bfab5b3bccf34f65d4238d0b43743c7c0365f859 Author: Eike Rathke er...@redhat.com Date: Fri Apr 4 11:57:43 2014 +0200 accept proper number style condition != as not equal operator, fdo#76777 ODF 1.2 specifies '!=' as not equal operator in number:number-style style:map style:condition attribute. So far '' is written, accept the correct operator. Change-Id: I6087992ee35fff5c7aa52b7cec2b83b0a78dbac1 (cherry picked from commit dfcc851d65c8d81988843ef31a75b5d30051ddfd) Reviewed-on: https://gerrit.libreoffice.org/8836 Reviewed-by: Miklos Vajna vmik...@collabora.co.uk Tested-by: Miklos Vajna vmik...@collabora.co.uk diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx index ece3ea8..3debbf4 100644 --- a/xmloff/source/style/xmlnumfi.cxx +++ b/xmloff/source/style/xmlnumfi.cxx @@ -2067,7 +2067,14 @@ void SvXMLNumFormatContext::AddCondition( const sal_Int32 nIndex ) if (!bDefaultCond) { -sal_Int32 nPos = sRealCond.indexOf( '.' ); +// Convert != to +sal_Int32 nPos = sRealCond.indexOf( != ); +if ( nPos = 0 ) +{ +sRealCond = sRealCond.replaceAt( nPos, 2, ); +} + +nPos = sRealCond.indexOf( '.' ); if ( nPos = 0 ) { // #i8026# #103991# localize decimal separator ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - xmloff/source
xmloff/source/chart/PropertyMap.hxx |1 + 1 file changed, 1 insertion(+) New commits: commit 2b54ede7e2c3b4f2c0baeb53bb798f507ba15719 Author: Markus Mohrhard markus.mohrh...@collabora.co.uk Date: Fri Mar 14 01:13:19 2014 +0100 fix odf validation error This is the import only change for older release branches. New elements must not be exported into the chart namespace. Change-Id: I295d61224e255dff04ea8564b01a5a438876afc1 Reviewed-on: https://gerrit.libreoffice.org/8580 Tested-by: Michael Stahl mst...@redhat.com Reviewed-by: Michael Stahl mst...@redhat.com diff --git a/xmloff/source/chart/PropertyMap.hxx b/xmloff/source/chart/PropertyMap.hxx index 809c043..5b9338f 100644 --- a/xmloff/source/chart/PropertyMap.hxx +++ b/xmloff/source/chart/PropertyMap.hxx @@ -189,6 +189,7 @@ const XMLPropertyMapEntry aXMLChartPropMap[] = MAP_SPECIAL_ODF12( ErrorBarRangeNegative, CHART, XML_ERROR_LOWER_RANGE, XML_TYPE_STRING, XML_SCH_CONTEXT_SPECIAL_ERRORBAR_RANGE ), // export only // errorbars properties (chart2) +MAP_ENTRY_ODF_EXT_IMPORT( Weight, LO_EXT, XML_ERROR_STANDARD_WEIGHT, XML_TYPE_DOUBLE), MAP_ENTRY_ODF_EXT( Weight, CHART, XML_ERROR_STANDARD_WEIGHT, XML_TYPE_DOUBLE), // series/data-point properties ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - xmloff/source
xmloff/source/chart/PropertyMap.hxx |1 + 1 file changed, 1 insertion(+) New commits: commit 14f6e6353cce7a83e9c125252ec67ad54c4f8aac Author: Markus Mohrhard markus.mohrh...@collabora.co.uk Date: Mon Mar 17 15:55:34 2014 +0100 part of fix odf validation errors around new chart regression curves need MAP_ENTRY_ODF_EXT_IMPORT definition from 4c7116413af091a30f5fa60c63d29bc694730518 Change-Id: I5bd4340186beca95eb3c615f713056007fcc5ee1 Reviewed-on: https://gerrit.libreoffice.org/8629 Reviewed-by: Michael Stahl mst...@redhat.com Reviewed-by: Markus Mohrhard markus.mohrh...@googlemail.com Tested-by: Markus Mohrhard markus.mohrh...@googlemail.com diff --git a/xmloff/source/chart/PropertyMap.hxx b/xmloff/source/chart/PropertyMap.hxx index 5b9338f..c8153ae 100644 --- a/xmloff/source/chart/PropertyMap.hxx +++ b/xmloff/source/chart/PropertyMap.hxx @@ -88,6 +88,7 @@ #define MAP_ENTRY( a, ns, nm, t ){ a, sizeof(a)-1, XML_NAMESPACE_##ns, xmloff::token::nm, t|XML_TYPE_PROP_CHART, 0, SvtSaveOptions::ODFVER_010, false } #define MAP_ENTRY_ODF12( a, ns, nm, t ) { a, sizeof(a)-1, XML_NAMESPACE_##ns, xmloff::token::nm, t|XML_TYPE_PROP_CHART, 0, SvtSaveOptions::ODFVER_012, false } #define MAP_ENTRY_ODF_EXT( a, ns, nm, t ){ a, sizeof(a)-1, XML_NAMESPACE_##ns, xmloff::token::nm, t|XML_TYPE_PROP_CHART, 0, SvtSaveOptions::ODFVER_012_EXT_COMPAT, false } +#define MAP_ENTRY_ODF_EXT_IMPORT( a, ns, nm, t ){ a, sizeof(a)-1, XML_NAMESPACE_##ns, xmloff::token::nm, t|XML_TYPE_PROP_CHART, 0, SvtSaveOptions::ODFVER_012_EXT_COMPAT, true } #define MAP_CONTEXT( a, ns, nm, t, c ) { a, sizeof(a)-1, XML_NAMESPACE_##ns, xmloff::token::nm, t|XML_TYPE_PROP_CHART, c, SvtSaveOptions::ODFVER_010, false } #define MAP_SPECIAL( a, ns, nm, t, c ) { a, sizeof(a)-1, XML_NAMESPACE_##ns, xmloff::token::nm, t|XML_TYPE_PROP_CHART | MID_FLAG_SPECIAL_ITEM, c, SvtSaveOptions::ODFVER_010, false } #define MAP_SPECIAL_ODF12( a, ns, nm, t, c ) { a, sizeof(a)-1, XML_NAMESPACE_##ns, xmloff::token::nm, t|XML_TYPE_PROP_CHART | MID_FLAG_SPECIAL_ITEM, c, SvtSaveOptions::ODFVER_012, false } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - xmloff/source
xmloff/source/text/txtprmap.cxx |8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) New commits: commit 6c90074b8dcfbb10ab03acfa082ac746ea38df6e Author: Eike Rathke er...@redhat.com Date: Fri Dec 20 21:15:03 2013 +0100 prepare to accept loext:contextual-spacing, fdo#58112 Change-Id: I58e151743bf910b8b51f1b453e0bfcb4ed767d9d (cherry picked from commit ef5e7b69440baa9f222d1ec870668d31d08268f0) Reviewed-on: https://gerrit.libreoffice.org/7151 Reviewed-by: Miklos Vajna vmik...@collabora.co.uk Tested-by: Miklos Vajna vmik...@collabora.co.uk diff --git a/xmloff/source/text/txtprmap.cxx b/xmloff/source/text/txtprmap.cxx index 26d04d8..abdba43 100644 --- a/xmloff/source/text/txtprmap.cxx +++ b/xmloff/source/text/txtprmap.cxx @@ -67,6 +67,11 @@ using namespace ::xmloff::token; #define MR_E( a, p, l, t, c ) \ _M_E( a, p, l, (t|XML_TYPE_PROP_RUBY), c ) +// extensions import/export +#define MAP_EXT(name,prefix,token,type,context) { name, sizeof(name)-1, prefix, token, type, context, SvtSaveOptions::ODFVER_012_EXT_COMPAT, false } +// extensions import only +#define MAP_EXT_I(name,prefix,token,type,context) { name, sizeof(name)-1, prefix, token, type, context, SvtSaveOptions::ODFVER_012_EXT_COMPAT, true } + #define M_END() \ { NULL, 0, 0, XML_TOKEN_INVALID, 0, 0, SvtSaveOptions::ODFVER_010, false } @@ -88,7 +93,8 @@ XMLPropertyMapEntry aXMLParaPropMap[] = MP_E( ParaTopMarginRelative, FO, MARGIN_TOP, XML_TYPE_PERCENT16, CTF_PARATOPMARGIN_REL ), MP_E( ParaBottomMargin, FO, MARGIN_BOTTOM, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, CTF_PARABOTTOMMARGIN ), MP_E( ParaBottomMarginRelative,FO,MARGIN_BOTTOM, XML_TYPE_PERCENT16, CTF_PARABOTTOMMARGIN_REL ), -{ ParaContextMargin, sizeof(ParaContextMargin)-1, XML_NAMESPACE_STYLE, XML_CONTEXTUAL_SPACING, XML_TYPE_BOOL|XML_TYPE_PROP_PARAGRAPH, 0, SvtSaveOptions::ODFVER_012_EXT_COMPAT, false }, +MAP_EXT( ParaContextMargin, XML_NAMESPACE_STYLE, XML_CONTEXTUAL_SPACING, XML_TYPE_BOOL|XML_TYPE_PROP_PARAGRAPH, 0 ), // proposed ODF 1.2+ +MAP_EXT_I( ParaContextMargin, XML_NAMESPACE_LO_EXT, XML_CONTEXTUAL_SPACING, XML_TYPE_BOOL|XML_TYPE_PROP_PARAGRAPH, 0 ), // extension namespace // RES_CHRATR_CASEMAP MT_E( CharCaseMap,FO, FONT_VARIANT, XML_TYPE_TEXT_CASEMAP_VAR, 0 ), MT_E( CharCaseMap,FO, TEXT_TRANSFORM, XML_TYPE_TEXT_CASEMAP, 0 ), ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - xmloff/source
xmloff/source/text/XMLTextHeaderFooterContext.cxx |1 xmloff/source/text/XMLTextMasterPageExport.cxx| 24 +++--- 2 files changed, 13 insertions(+), 12 deletions(-) New commits: commit 854866140bff2ae4c587c7adc9b3170f06135437 Author: Michael Stahl mst...@redhat.com Date: Wed Dec 18 23:34:54 2013 +0100 fdo#72850: ODF export: don't export spurious style:display=false ... on style:header-left, style:header-first, style:footer-left, style:footer-first. (regression from d92345561c998f7382cf9ef0fdcd29096f978435) Change-Id: I48c51fcd2b07ae8b0e3ec2c1087a388c6900b366 (cherry picked from commit 8f73c7615ebe60ef71d6e8b49a0f19ddac6f03a0) Reviewed-on: https://gerrit.libreoffice.org/7141 Reviewed-by: Miklos Vajna vmik...@collabora.co.uk Tested-by: Miklos Vajna vmik...@collabora.co.uk diff --git a/xmloff/source/text/XMLTextHeaderFooterContext.cxx b/xmloff/source/text/XMLTextHeaderFooterContext.cxx index ba423dc..335d95b 100644 --- a/xmloff/source/text/XMLTextHeaderFooterContext.cxx +++ b/xmloff/source/text/XMLTextHeaderFooterContext.cxx @@ -54,6 +54,7 @@ XMLTextHeaderFooterContext::XMLTextHeaderFooterContext( SvXMLImport rImport, sa bLeft( bLft ), bFirst( bFrst ) { +// NOTE: if this ever handles XML_DISPLAY attr then beware of fdo#72850 ! if( bLeft || bFirst ) { Any aAny; diff --git a/xmloff/source/text/XMLTextMasterPageExport.cxx b/xmloff/source/text/XMLTextMasterPageExport.cxx index aafe94a..cb3b2f5 100644 --- a/xmloff/source/text/XMLTextMasterPageExport.cxx +++ b/xmloff/source/text/XMLTextMasterPageExport.cxx @@ -128,18 +128,18 @@ void XMLTextMasterPageExport::exportMasterPageContent( sal_Bool bHeader = sal_False; aAny = bHeader; -sal_Bool bHeaderFirst = sal_False; +sal_Bool bHeaderFirstShared = sal_False; if( bHeader ) { aAny = rPropSet-getPropertyValue( sFirstShareContent ); -aAny = bHeaderFirst; +aAny = bHeaderFirstShared; } -sal_Bool bHeaderLeft = sal_False; +sal_Bool bHeaderLeftShared = sal_False; if( bHeader ) { aAny = rPropSet-getPropertyValue( sHeaderShareContent ); -aAny = bHeaderLeft; +aAny = bHeaderLeftShared; } if( xHeaderText.is() ) @@ -154,7 +154,7 @@ void XMLTextMasterPageExport::exportMasterPageContent( if( xHeaderTextFirst.is() xHeaderTextFirst != xHeaderText ) { -if( !bHeaderFirst ) +if (bHeaderFirstShared) GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_DISPLAY, XML_FALSE ); SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_STYLE, @@ -164,7 +164,7 @@ void XMLTextMasterPageExport::exportMasterPageContent( if( xHeaderTextLeft.is() xHeaderTextLeft != xHeaderText ) { -if( !bHeaderLeft ) +if (bHeaderLeftShared) GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_DISPLAY, XML_FALSE ); SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_STYLE, @@ -176,18 +176,18 @@ void XMLTextMasterPageExport::exportMasterPageContent( sal_Bool bFooter = sal_False; aAny = bFooter; -sal_Bool bFooterFirst = sal_False; +sal_Bool bFooterFirstShared = sal_False; if( bFooter ) { aAny = rPropSet-getPropertyValue( sFirstShareContent ); -aAny = bFooterFirst; +aAny = bFooterFirstShared; } -sal_Bool bFooterLeft = sal_False; +sal_Bool bFooterLeftShared = sal_False; if( bFooter ) { aAny = rPropSet-getPropertyValue( sFooterShareContent ); -aAny = bFooterLeft; +aAny = bFooterLeftShared; } if( xFooterText.is() ) @@ -202,7 +202,7 @@ void XMLTextMasterPageExport::exportMasterPageContent( if( xFooterTextFirst.is() xFooterTextFirst != xFooterText ) { -if( !bFooterFirst ) +if (bFooterFirstShared) GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_DISPLAY, XML_FALSE ); SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_STYLE, @@ -212,7 +212,7 @@ void XMLTextMasterPageExport::exportMasterPageContent( if( xFooterTextLeft.is() xFooterTextLeft != xFooterText ) { -if( !bFooterLeft ) +if (bFooterLeftShared) GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_DISPLAY, XML_FALSE ); SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_STYLE, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - xmloff/source
xmloff/source/text/txtfldi.cxx |2 +- xmloff/source/text/txtimp.cxx |3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) New commits: commit bedc707bffdfe906a15036a40da1b9179d91b4fc Author: Eike Rathke er...@redhat.com Date: Fri Dec 13 23:05:06 2013 +0100 fdo#72697 accept future loext:sender-initials ... of to-be text:sender-initials Change-Id: Ia601c0debc5d66682aa92e14fb063395f9f48ab5 (cherry picked from commit 1379294741ff85d4c09d9ded7579ad50dea88fb7) Reviewed-on: https://gerrit.libreoffice.org/7076 Reviewed-by: Miklos Vajna vmik...@collabora.co.uk Tested-by: Miklos Vajna vmik...@collabora.co.uk diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx index 875677c..3d99acf 100644 --- a/xmloff/source/text/txtfldi.cxx +++ b/xmloff/source/text/txtfldi.cxx @@ -3669,7 +3669,7 @@ SvXMLImportContext* XMLAnnotationImportContext::CreateChildContext( pContext = new XMLStringBufferImportContext(GetImport(), nPrefix, rLocalName, aDateBuffer); } -else if( XML_NAMESPACE_TEXT == nPrefix ) +else if( XML_NAMESPACE_TEXT == nPrefix || XML_NAMESPACE_LO_EXT == nPrefix ) { if( IsXMLToken( rLocalName, XML_SENDER_INITIALS ) ) pContext = new XMLStringBufferImportContext(GetImport(), nPrefix, diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx index b5028ae..24221a6 100644 --- a/xmloff/source/text/txtimp.cxx +++ b/xmloff/source/text/txtimp.cxx @@ -155,7 +155,8 @@ static SvXMLTokenMapEntry aTextPElemTokenMap[] = // sender fields { XML_NAMESPACE_TEXT, XML_SENDER_FIRSTNAME,XML_TOK_TEXT_SENDER_FIRSTNAME}, { XML_NAMESPACE_TEXT, XML_SENDER_LASTNAME, XML_TOK_TEXT_SENDER_LASTNAME }, -{ XML_NAMESPACE_TEXT, XML_SENDER_INITIALS, XML_TOK_TEXT_SENDER_INITIALS }, +{ XML_NAMESPACE_LO_EXT, XML_SENDER_INITIALS, XML_TOK_TEXT_SENDER_INITIALS }, +{ XML_NAMESPACE_TEXT, XML_SENDER_INITIALS, XML_TOK_TEXT_SENDER_INITIALS }, { XML_NAMESPACE_TEXT, XML_SENDER_TITLE, XML_TOK_TEXT_SENDER_TITLE }, { XML_NAMESPACE_TEXT, XML_SENDER_POSITION, XML_TOK_TEXT_SENDER_POSITION }, { XML_NAMESPACE_TEXT, XML_SENDER_EMAIL, XML_TOK_TEXT_SENDER_EMAIL }, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - xmloff/source
xmloff/source/text/txtflde.cxx | 38 +++--- 1 file changed, 27 insertions(+), 11 deletions(-) New commits: commit c062276a068a14df530fa21e9099a489a26b2096 Author: Eike Rathke er...@redhat.com Date: Fri Dec 13 23:30:34 2013 +0100 fdo#72697 actually write this only in ODF 1.2 extended (cherry picked from commit 49f9694e34d07468cff4a7e4de332f11be3e0dd8) Conflicts: xmloff/source/text/txtflde.cxx Change-Id: I32097cc4b8a67615b0b6d6172cafd0edad7469b6 (cherry picked from commit 4031765b004dded31f04c54f9a055b7a3d0053f2) Reviewed-on: https://gerrit.libreoffice.org/7078 Reviewed-by: Miklos Vajna vmik...@collabora.co.uk Tested-by: Miklos Vajna vmik...@collabora.co.uk diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx index 0ad8fcb..6855a3b 100644 --- a/xmloff/source/text/txtflde.cxx +++ b/xmloff/source/text/txtflde.cxx @@ -1752,14 +1752,17 @@ void XMLTextFieldExport::ExportFieldHelper( GetExport().Characters(aBuffer.makeStringAndClear()); } -// initials -OUString aInitials( GetStringProperty(sPropertyInitials, rPropSet) ); -if( !aInitials.isEmpty() ) +if (SvtSaveOptions().GetODFDefaultVersion() SvtSaveOptions::ODFVER_012) { -SvXMLElementExport aCreatorElem( GetExport(), XML_NAMESPACE_TEXT, - XML_SENDER_INITIALS, sal_True, - sal_False ); -GetExport().Characters(aInitials); +// initials +OUString aInitials( GetStringProperty(sPropertyInitials, rPropSet) ); +if( !aInitials.isEmpty() ) +{ +SvXMLElementExport aCreatorElem( GetExport(), XML_NAMESPACE_TEXT, +XML_SENDER_INITIALS, sal_True, +sal_False ); +GetExport().Characters(aInitials); +} } com::sun::star::uno::Reference com::sun::star::text::XText xText; @@ -2226,10 +2229,23 @@ void XMLTextFieldExport::ExportElement(enum XMLTokenEnum eElementName, if (eElementName != XML_TOKEN_INVALID) { // Element -SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_TEXT, - eElementName, bAddSpace, bAddSpace ); -// export content -GetExport().Characters(sContent); +if (eElementName == XML_SENDER_INITIALS) +{ +if (SvtSaveOptions().GetODFDefaultVersion() SvtSaveOptions::ODFVER_012) +{ +SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_TEXT, +eElementName, bAddSpace, bAddSpace ); +// export content +GetExport().Characters(sContent); +} +} +else +{ +SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_TEXT, + eElementName, bAddSpace, bAddSpace ); +// export content +GetExport().Characters(sContent); +} } else { // always export content GetExport().Characters(sContent); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - xmloff/source
xmloff/source/text/XMLTextFrameContext.cxx | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) New commits: commit 0763cf6ed7bdc629e59b5df757b9ef4f5273f393 Author: Michael Stahl mst...@redhat.com Date: Mon Dec 2 23:28:20 2013 +0100 fdo#71450 fdo#71698: ODF import: fix frame name corner cases Trying to set a name that is already in use will throw an exception (and set a different, generated name); if there is actually no name in the file then there's no point trying to set anything. (regression from b69d152cfa1da868ba960345d72ba78f9f8e1b35) Change-Id: Ie54d4a830cc23e2853a6efeb81f77dcc788192ea (cherry picked from commit 8171e713e74e3d09e86592c28abfe05d0400c071) Reviewed-on: https://gerrit.libreoffice.org/6907 Reviewed-by: Miklos Vajna vmik...@collabora.co.uk Tested-by: Miklos Vajna vmik...@collabora.co.uk diff --git a/xmloff/source/text/XMLTextFrameContext.cxx b/xmloff/source/text/XMLTextFrameContext.cxx index 3ca7e86..745ff63 100644 --- a/xmloff/source/text/XMLTextFrameContext.cxx +++ b/xmloff/source/text/XMLTextFrameContext.cxx @@ -1291,12 +1291,20 @@ void XMLTextFrameContext_Impl::SetHyperlink( const OUString rHRef, void XMLTextFrameContext_Impl::SetName() { ReferenceXNamed xNamed(xPropSet, UNO_QUERY); -if (xNamed.is()) +if (!m_sOrigName.isEmpty() xNamed.is()) { OUString const name(xNamed-getName()); if (name != m_sOrigName) { -xNamed-setName(m_sOrigName); +try +{ +xNamed-setName(m_sOrigName); +} +catch (uno::Exception const e) +{ // fdo#71698 document contains 2 frames with same draw:name +SAL_INFO(xmloff.text, SetName(): exception setting \ + m_sOrigName \: e.Message); +} } } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - xmloff/source
xmloff/source/chart/SchXMLChartContext.cxx |4 +-- xmloff/source/chart/SchXMLTableContext.cxx | 33 + xmloff/source/chart/SchXMLTableContext.hxx |5 +--- 3 files changed, 6 insertions(+), 36 deletions(-) New commits: commit cc502dadd01658e80a4f36fe43ac16c46e819b30 Author: Markus Mohrhard markus.mohrh...@googlemail.com Date: Sat Nov 2 20:44:38 2013 +0100 Revert transpose data in rows ranges for internal data provider, fdo#62057 This reverts commit 14fa5488a829936275f79a7693b13da55114220e. Signed-off-by: Michael Meeks michael.me...@collabora.com Conflicts: xmloff/source/chart/SchXMLTableContext.cxx Signed-off-by: Michael Meeks michael.me...@collabora.com diff --git a/xmloff/source/chart/SchXMLChartContext.cxx b/xmloff/source/chart/SchXMLChartContext.cxx index 69410a5..5aeb93b 100644 --- a/xmloff/source/chart/SchXMLChartContext.cxx +++ b/xmloff/source/chart/SchXMLChartContext.cxx @@ -788,7 +788,7 @@ void SchXMLChartContext::EndElement() //own data or only rectangular range available if( xNewDoc-hasInternalDataProvider() ) -SchXMLTableHelper::applyTableToInternalDataProvider( maTable, xNewDoc, meDataRowSource ); +SchXMLTableHelper::applyTableToInternalDataProvider( maTable, xNewDoc ); bool bOlderThan2_3 = SchXMLTools::isDocumentGeneratedWithOpenOfficeOlderThan2_3( Reference frame::XModel ( xNewDoc, uno::UNO_QUERY )); bool bOldFileWithOwnDataFromRows = (bOlderThan2_3 bHasOwnData (meDataRowSource==chart::ChartDataRowSource_ROWS)); // in this case there are range addresses that are simply wrong. @@ -825,7 +825,7 @@ void SchXMLChartContext::EndElement() if( !xNewDoc-hasInternalDataProvider() ) { xNewDoc-createInternalDataProvider( sal_False /* bCloneExistingData */ ); -SchXMLTableHelper::applyTableToInternalDataProvider( maTable, xNewDoc, meDataRowSource ); +SchXMLTableHelper::applyTableToInternalDataProvider( maTable, xNewDoc ); try { lcl_ApplyDataFromRectangularRangeToDiagram( xNewDoc, msChartAddress, meDataRowSource, mbRowHasLabels, mbColHasLabels, bHasOwnData, msColTrans, msRowTrans ); diff --git a/xmloff/source/chart/SchXMLTableContext.cxx b/xmloff/source/chart/SchXMLTableContext.cxx index ea877d6..206e5e8 100644 --- a/xmloff/source/chart/SchXMLTableContext.cxx +++ b/xmloff/source/chart/SchXMLTableContext.cxx @@ -775,35 +775,9 @@ static void lcl_ApplyCellToComplexLabel( const SchXMLCell rCell, Sequence uno: } } -namespace { - -void transposeTable(SchXMLTable rTable) -{ -std::vectorstd::vectorSchXMLCell aNewData; -sal_Int32 nRows = rTable.aData.size(); -aNewData.resize(rTable.nMaxColumnIndex+1); -for(sal_Int32 i = 0; i nRows; ++i) -{ -sal_Int32 nCols = rTable.aData[i].size(); -for(sal_Int32 j = 0; j nCols; ++j) -{ -SchXMLCell rCell = rTable.aData[i][j]; -aNewData[j].push_back(rCell); -} -} -bool bHasRowHeader = rTable.bHasHeaderRow; -bool bHasColHeader = rTable.bHasHeaderColumn; -rTable.bHasHeaderColumn = bHasRowHeader; -rTable.bHasHeaderRow = bHasColHeader; -rTable.nMaxColumnIndex = nRows; -rTable.aData = aNewData; -} - -} - void SchXMLTableHelper::applyTableToInternalDataProvider( -SchXMLTable rTable, -uno::Reference chart2::XChartDocument xChartDoc, chart::ChartDataRowSource eDataRowSource ) +const SchXMLTable rTable, +uno::Reference chart2::XChartDocument xChartDoc ) { // apply all data read from the local table to the internal data provider if( !xChartDoc.is() || !xChartDoc-hasInternalDataProvider() ) @@ -812,9 +786,6 @@ void SchXMLTableHelper::applyTableToInternalDataProvider( if( !xDataProv.is() ) return; -if(eDataRowSource == chart::ChartDataRowSource_ROWS) -transposeTable(rTable); - //prepare the read local table data sal_Int32 nNumRows( static_cast sal_Int32 ( rTable.aData.size())); sal_Int32 nRowOffset = 0; diff --git a/xmloff/source/chart/SchXMLTableContext.hxx b/xmloff/source/chart/SchXMLTableContext.hxx index 811e921..1d06dd5 100644 --- a/xmloff/source/chart/SchXMLTableContext.hxx +++ b/xmloff/source/chart/SchXMLTableContext.hxx @@ -82,9 +82,8 @@ private: sal_Int32 nRows, sal_Int32 nColumns ); public: -static void applyTableToInternalDataProvider( SchXMLTable rTable, -com::sun::star::uno::Reference com::sun::star::chart2::XChartDocument xChartDoc, -com::sun::star::chart::ChartDataRowSource eDataRowSource ); +static void applyTableToInternalDataProvider( const SchXMLTable rTable, +com::sun::star::uno::Reference
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - xmloff/source
xmloff/source/draw/ximpstyl.cxx | 45 ++-- 1 file changed, 43 insertions(+), 2 deletions(-) New commits: commit 0964a73d03bf9f5b9f485ff39f97c7e7b54339b3 Author: Caolán McNamara caol...@redhat.com Date: Mon Sep 9 16:54:30 2013 +0100 Resolves: fdo#34987 skip autoheight reset if it will be set to the same value Triggered by aa9af08b389a106fcfb53842ac7669b208a27205 which explicitly sets rSet.Put( SdrTextAutoGrowHeightItem(FALSE) ); so there is something set on the style which is being overwritten. The code here resets the style to the default of true before going on to set it to the explicit false again. In that window of time the master shapes listen to the property change, on being set to autoheight they resize and on being unset, they remain stuck on their autoheight calculated size. Reviewed-on: https://gerrit.libreoffice.org/5887 Reviewed-by: mhofmann bor...@web.de Reviewed-by: Thorsten Behrens t...@documentfoundation.org Tested-by: Thorsten Behrens t...@documentfoundation.org (cherry picked from commit 14e7a290dab7fead66ef6ff7f94c6a425d80ceb6) Conflicts: xmloff/source/draw/ximpstyl.cxx Change-Id: I567a791b2bbbcb3a1a111633fabf509142984645 Reviewed-on: https://gerrit.libreoffice.org/5929 Reviewed-by: Fridrich Strba fridr...@documentfoundation.org Tested-by: Fridrich Strba fridr...@documentfoundation.org diff --git a/xmloff/source/draw/ximpstyl.cxx b/xmloff/source/draw/ximpstyl.cxx index db902df..d5fae19 100644 --- a/xmloff/source/draw/ximpstyl.cxx +++ b/xmloff/source/draw/ximpstyl.cxx @@ -1312,6 +1312,43 @@ void SdXMLStylesContext::ImpSetCellStyles() const } } +//Resolves: fdo#34987 if the style's auto height before and after is the same +//then don't reset it back to the underlying default of true for the small +//period before its going to be reset to false again. Doing this avoids the +//master page shapes from resizing themselves due to autoheight becoming +//enabled before having autoheight turned off again and getting stuck on that +//autosized height +static bool canSkipReset(const OUString rName, const XMLPropStyleContext* pPropStyle, +const uno::Reference beans::XPropertySet rPropSet, const UniReference XMLPropertySetMapper rPrMap) +{ +bool bCanSkipReset = false; +if (pPropStyle rName == TextAutoGrowHeight) +{ +sal_Bool bOldStyleTextAutoGrowHeight(sal_False); +rPropSet-getPropertyValue(TextAutoGrowHeight) = bOldStyleTextAutoGrowHeight; + +sal_Int32 nIndexStyle = rPrMap-GetEntryIndex(XML_NAMESPACE_DRAW, auto-grow-height, 0); +if (nIndexStyle != -1) +{ +const ::std::vector XMLPropertyState rProperties = pPropStyle-GetProperties(); +::std::vector XMLPropertyState ::const_iterator property = rProperties.begin(); +for(; property != rProperties.end(); ++property) +{ +sal_Int32 nIdx = property-mnIndex; +if (nIdx == nIndexStyle) +{ +sal_Bool bNewStyleTextAutoGrowHeight(sal_False); +property-maValue = bNewStyleTextAutoGrowHeight; +if (bNewStyleTextAutoGrowHeight == bOldStyleTextAutoGrowHeight) +bCanSkipReset = true;; +break; +} +} +} +} +return bCanSkipReset; +} + // // help function used by ImpSetGraphicStyles() and ImpSetMasterPageStyles() // @@ -1341,6 +1378,7 @@ void SdXMLStylesContext::ImpSetGraphicStyles( uno::Reference container::XNameAc if(nFamily == pStyle-GetFamily() !pStyle-IsDefaultStyle()) { OUString aStyleName(pStyle-GetDisplayName()); + if( nPrefLen ) { sal_Int32 nStylePrefLen = aStyleName.lastIndexOf( sal_Unicode('-') ) + 1; @@ -1350,6 +1388,8 @@ void SdXMLStylesContext::ImpSetGraphicStyles( uno::Reference container::XNameAc aStyleName = aStyleName.copy( nPrefLen ); } +XMLPropStyleContext* pPropStyle = dynamic_cast XMLPropStyleContext* (const_cast SvXMLStyleContext* ( pStyle ) ); + uno::Reference style::XStyle xStyle; if(xPageStyles-hasByName(aStyleName)) { @@ -1378,6 +1418,9 @@ void SdXMLStylesContext::ImpSetGraphicStyles( uno::Reference container::XNameAc const OUString rName = xPrMap-GetEntryAPIName( i ); if( xPropSetInfo-hasPropertyByName( rName ) beans::PropertyState_DIRECT_VALUE == xPropState-getPropertyState( rName ) ) { +bool bCanSkipReset = canSkipReset(rName, pPropStyle, xPropSet, xPrMap); +
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - xmloff/source
xmloff/source/text/txtexppr.cxx | 59 +++- 1 file changed, 41 insertions(+), 18 deletions(-) New commits: commit ba85d483d392f2fa37a92e5fda56c0c121c6d8bc Author: Caolán McNamara caol...@redhat.com Date: Tue Aug 20 11:37:04 2013 +0100 Resolves: fdo#67665 font names filtered out on odp/odg export Change-Id: Ia529992d15152db981379a1e0a4dec63b2dad40c (cherry picked from commit 26dc5f2ee67342bd474640e1cc39b96d3220721b) Reviewed-on: https://gerrit.libreoffice.org/5533 Reviewed-by: Thorsten Behrens tbehr...@suse.com Tested-by: Thorsten Behrens tbehr...@suse.com diff --git a/xmloff/source/text/txtexppr.cxx b/xmloff/source/text/txtexppr.cxx index eb89488..a13c587 100644 --- a/xmloff/source/text/txtexppr.cxx +++ b/xmloff/source/text/txtexppr.cxx @@ -217,25 +217,48 @@ void XMLTextExportPropertySetMapper::ContextFontFilter( if( pFontCharsetState (pFontCharsetState-maValue = nTmp ) ) eEnc = (rtl_TextEncoding)nTmp; -OUString sName( ((SvXMLExport)GetExport()).GetFontAutoStylePool()-Find( -sFamilyName, sStyleName, nFamily, nPitch, eEnc ) ); -if( !sName.isEmpty() ) +//Resolves: fdo#67665 The purpose here appears to be to replace +//FontFamilyName and FontStyleName etc with a single FontName property. The +//problem is that repeated calls to here will first set +//pFontFamilyNameState-mnIndex to -1 to indicate it is disabled, so the +//next time pFontFamilyNameState is not passed here at all, which gives an +//empty sFamilyName resulting in disabling pFontNameState-mnIndex to -1. +//That doesn't seem right to me. +// +//So assuming that the main purpose is just to convert the properties in +//the main when we can, and to leave them alone when we can't. And with a +//secondary purpose to filter out empty font properties, then is would +//appear to make sense to base attempting the conversion if we have +//both of the major facts of the font description +// +//An alternative solution is to *not* fill the FontAutoStylePool with +//every font in the document, but to partition the fonts into the +//hard-attribute fonts which go into that pool and the style-attribute +//fonts which go into some additional pool which get merged just for +//the purposes of writing the embedded fonts but are not queried by +//Find which restores the original logic. +if (pFontFamilyNameState || pFontStyleNameState) { -pFontNameState-maValue = sName; -if( pFontFamilyNameState ) -pFontFamilyNameState-mnIndex = -1; -if( pFontStyleNameState ) -pFontStyleNameState-mnIndex = -1; -if( pFontFamilyState ) -pFontFamilyState-mnIndex = -1; -if( pFontPitchState ) -pFontPitchState-mnIndex = -1; -if( pFontCharsetState ) -pFontCharsetState-mnIndex = -1; -} -else -{ -pFontNameState-mnIndex = -1; +OUString sName( ((SvXMLExport)GetExport()).GetFontAutoStylePool()-Find( +sFamilyName, sStyleName, nFamily, nPitch, eEnc ) ); +if( !sName.isEmpty() ) +{ +pFontNameState-maValue = sName; +if( pFontFamilyNameState ) +pFontFamilyNameState-mnIndex = -1; +if( pFontStyleNameState ) +pFontStyleNameState-mnIndex = -1; +if( pFontFamilyState ) +pFontFamilyState-mnIndex = -1; +if( pFontPitchState ) +pFontPitchState-mnIndex = -1; +if( pFontCharsetState ) +pFontCharsetState-mnIndex = -1; +} +else +{ +pFontNameState-mnIndex = -1; +} } if( pFontFamilyNameState sFamilyName.isEmpty() ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - xmloff/source
xmloff/source/forms/elementimport.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 5038dba4783e69c94acbf61858b39ad7055cbc56 Author: Lionel Elie Mamane lio...@mamane.lu Date: Sun Jul 28 16:10:17 2013 +0200 surely this is a typo Change-Id: Ic7a6b330094c597aaed09377cde55c2e7be1b08f Reviewed-on: https://gerrit.libreoffice.org/5152 Reviewed-by: Norbert Thiebaud nthieb...@gmail.com Tested-by: Norbert Thiebaud nthieb...@gmail.com diff --git a/xmloff/source/forms/elementimport.cxx b/xmloff/source/forms/elementimport.cxx index 9d180b0..ae66105 100644 --- a/xmloff/source/forms/elementimport.cxx +++ b/xmloff/source/forms/elementimport.cxx @@ -717,8 +717,8 @@ namespace xmloff case OControlElement::IMAGE_FRAME: pServiceName = com.sun.star.form.component.DatabaseImageControl; break; case OControlElement::HIDDEN:pServiceName = com.sun.star.form.component.HiddenControl; break; case OControlElement::GRID: pServiceName = com.sun.star.form.component.GridControl; break; -case OControlElement::TIME: pServiceName = com.sun.star.form.component.DateField; break; -case OControlElement::DATE: pServiceName = com.sun.star.form.component.TimeField; break; +case OControlElement::TIME: pServiceName = com.sun.star.form.component.TimeField; break; +case OControlElement::DATE: pServiceName = com.sun.star.form.component.DateField; break; default: break; } if ( pServiceName != NULL ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - xmloff/source
xmloff/source/chart/SchXMLChartContext.cxx |4 +-- xmloff/source/chart/SchXMLTableContext.cxx | 33 +++-- xmloff/source/chart/SchXMLTableContext.hxx |5 ++-- 3 files changed, 36 insertions(+), 6 deletions(-) New commits: commit 6e6c25a4c18169e7f07a8fd23058ed17d719f44f Author: Markus Mohrhard markus.mohrh...@googlemail.com Date: Sun Jun 30 03:44:05 2013 +0200 transpose data in rows ranges for internal data provider, fdo#62057 This is an ugly hack but it at least works. This regression has been introduced by the merge from the AOO code. The order of calls during import is totally screwed and I have no idea how to properly fix all these problems without introducing new regressions. The best solution would be to move the import/export code into chart2 where we could manipulate tese properties directly and would not need to transform the same information N times until it is written into the chart code. (cherry picked from commit 14fa5488a829936275f79a7693b13da55114220e) Conflicts: xmloff/source/chart/SchXMLTableContext.cxx Change-Id: Id53c49441c683b19a973a48884135a3f4e89de03 Reviewed-on: https://gerrit.libreoffice.org/4628 Reviewed-by: David Tardon dtar...@redhat.com Tested-by: David Tardon dtar...@redhat.com diff --git a/xmloff/source/chart/SchXMLChartContext.cxx b/xmloff/source/chart/SchXMLChartContext.cxx index 5aeb93b..69410a5 100644 --- a/xmloff/source/chart/SchXMLChartContext.cxx +++ b/xmloff/source/chart/SchXMLChartContext.cxx @@ -788,7 +788,7 @@ void SchXMLChartContext::EndElement() //own data or only rectangular range available if( xNewDoc-hasInternalDataProvider() ) -SchXMLTableHelper::applyTableToInternalDataProvider( maTable, xNewDoc ); +SchXMLTableHelper::applyTableToInternalDataProvider( maTable, xNewDoc, meDataRowSource ); bool bOlderThan2_3 = SchXMLTools::isDocumentGeneratedWithOpenOfficeOlderThan2_3( Reference frame::XModel ( xNewDoc, uno::UNO_QUERY )); bool bOldFileWithOwnDataFromRows = (bOlderThan2_3 bHasOwnData (meDataRowSource==chart::ChartDataRowSource_ROWS)); // in this case there are range addresses that are simply wrong. @@ -825,7 +825,7 @@ void SchXMLChartContext::EndElement() if( !xNewDoc-hasInternalDataProvider() ) { xNewDoc-createInternalDataProvider( sal_False /* bCloneExistingData */ ); -SchXMLTableHelper::applyTableToInternalDataProvider( maTable, xNewDoc ); +SchXMLTableHelper::applyTableToInternalDataProvider( maTable, xNewDoc, meDataRowSource ); try { lcl_ApplyDataFromRectangularRangeToDiagram( xNewDoc, msChartAddress, meDataRowSource, mbRowHasLabels, mbColHasLabels, bHasOwnData, msColTrans, msRowTrans ); diff --git a/xmloff/source/chart/SchXMLTableContext.cxx b/xmloff/source/chart/SchXMLTableContext.cxx index 206e5e8..ea877d6 100644 --- a/xmloff/source/chart/SchXMLTableContext.cxx +++ b/xmloff/source/chart/SchXMLTableContext.cxx @@ -775,9 +775,35 @@ static void lcl_ApplyCellToComplexLabel( const SchXMLCell rCell, Sequence uno: } } +namespace { + +void transposeTable(SchXMLTable rTable) +{ +std::vectorstd::vectorSchXMLCell aNewData; +sal_Int32 nRows = rTable.aData.size(); +aNewData.resize(rTable.nMaxColumnIndex+1); +for(sal_Int32 i = 0; i nRows; ++i) +{ +sal_Int32 nCols = rTable.aData[i].size(); +for(sal_Int32 j = 0; j nCols; ++j) +{ +SchXMLCell rCell = rTable.aData[i][j]; +aNewData[j].push_back(rCell); +} +} +bool bHasRowHeader = rTable.bHasHeaderRow; +bool bHasColHeader = rTable.bHasHeaderColumn; +rTable.bHasHeaderColumn = bHasRowHeader; +rTable.bHasHeaderRow = bHasColHeader; +rTable.nMaxColumnIndex = nRows; +rTable.aData = aNewData; +} + +} + void SchXMLTableHelper::applyTableToInternalDataProvider( -const SchXMLTable rTable, -uno::Reference chart2::XChartDocument xChartDoc ) +SchXMLTable rTable, +uno::Reference chart2::XChartDocument xChartDoc, chart::ChartDataRowSource eDataRowSource ) { // apply all data read from the local table to the internal data provider if( !xChartDoc.is() || !xChartDoc-hasInternalDataProvider() ) @@ -786,6 +812,9 @@ void SchXMLTableHelper::applyTableToInternalDataProvider( if( !xDataProv.is() ) return; +if(eDataRowSource == chart::ChartDataRowSource_ROWS) +transposeTable(rTable); + //prepare the read local table data sal_Int32 nNumRows( static_cast sal_Int32 ( rTable.aData.size())); sal_Int32 nRowOffset = 0; diff --git a/xmloff/source/chart/SchXMLTableContext.hxx b/xmloff/source/chart/SchXMLTableContext.hxx index 1d06dd5..811e921 100644 ---
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - xmloff/source
xmloff/source/draw/sdxmlexp.cxx | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) New commits: commit 411bd0b8a7184720c2bcbcf468c98fd7158481b3 Author: Caolán McNamara caol...@redhat.com Date: Sun Jun 23 20:46:07 2013 +0100 Resolves: rhbz#976304 gallery elements may not support document.Settings so the createInstance throws, so the element doesn't get inserted into the documents. regression since f0cd6fe9075cd0aa00162474784ad804a07ed138 Change-Id: Ie6cef7a4f0d5ac8a34d41139c3439fc04e9c7f20 (cherry picked from commit fd240ba81b317a54fc4512aaec33650cd7a30e29) Reviewed-on: https://gerrit.libreoffice.org/4466 Reviewed-by: David Tardon dtar...@redhat.com Tested-by: David Tardon dtar...@redhat.com diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx index 6e86da3..c9149b9 100644 --- a/xmloff/source/draw/sdxmlexp.cxx +++ b/xmloff/source/draw/sdxmlexp.cxx @@ -2915,15 +2915,16 @@ XMLFontAutoStylePool* SdXMLExport::CreateFontAutoStylePool() Reference lang::XMultiServiceFactory xFac( GetModel(), UNO_QUERY ); if( xFac.is() ) { -Referencebeans::XPropertySet const xProps( xFac-createInstance( - com.sun.star.document.Settings), UNO_QUERY ); -if (xProps.is()) +try { -try // clipboard document doesn't have shell so throws here -{ -xProps-getPropertyValue(EmbedFonts) = bEmbedFonts; -} -catch (uno::Exception const) { } +Referencebeans::XPropertySet const xProps( xFac-createInstance( + com.sun.star.document.Settings), UNO_QUERY_THROW ); +xProps-getPropertyValue(EmbedFonts) = bEmbedFonts; +} +catch (...) +{ +// clipboard document doesn't have shell so throws from getPropertyValue +// gallery elements may not support com.sun.star.document.Settings so throws from createInstance } } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits