[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - xmloff/source

2014-11-27 Thread Caolán McNamara
 xmloff/source/draw/ximpshap.cxx |   32 
 1 file changed, 24 insertions(+), 8 deletions(-)

New commits:
commit ecf0d01e091ab0dde5845fe9b0a47ba1a961eda2
Author: Caolán McNamara caol...@redhat.com
Date:   Thu Nov 27 11:30:45 2014 +

Resolves: fdo#84043 don't create duplicate Mirrored[X|Y] properties

regression from 13ef16423e78d3ea825172594f08c47d2f9bfd09

commit 13ef16423e78d3ea825172594f08c47d2f9bfd09
Author: Armin Le Grand a...@apache.org
Date:   Wed Nov 21 13:23:01 2012 +

For backward compatibility take mirrorings in setTransformation into 
account

Also found an error in SdrObjCustomShape::TRGetBaseGeometry when 
MirrorY was used

(cherry picked from commit 4116c33b12d3787c406f0348f89efcb1cf409507)

Change-Id: I7bfb5dea32b8ab8498e3d92975c49b830c81e6fb
(cherry picked from commit 751e5b32c5c361995bf0ba3295f773341fd92c23)
Reviewed-on: https://gerrit.libreoffice.org/13149
Reviewed-by: Michael Stahl mst...@redhat.com
Tested-by: Michael Stahl mst...@redhat.com
(cherry picked from commit d3b7bf16a58c02af2d1fdf5db2fa149c6815095c)
Signed-off-by: Michael Stahl mst...@redhat.com

diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx
index 65c3084..d4ec1b8 100644
--- a/xmloff/source/draw/ximpshap.cxx
+++ b/xmloff/source/draw/ximpshap.cxx
@@ -3694,22 +3694,38 @@ void SdXMLCustomShapeContext::EndElement()
 
 if(bFlippedX || bFlippedY)
 {
-beans::PropertyValue aNewPoroperty;
+OUString sName;
 
 if(bFlippedX)
+sName = MirroredX;
+else
+sName = MirroredY;
+
+//fdo#84043 overwrite the property if it already exists, otherwise 
append it
+beans::PropertyValue* pItem;
+std::vector beans::PropertyValue ::iterator 
aI(maCustomShapeGeometry.begin());
+std::vector beans::PropertyValue ::iterator 
aE(maCustomShapeGeometry.end());
+while (aI != aE)
+{
+if (aI-Name == sName)
+break;
+++aI;
+}
+if (aI != aE)
 {
-aNewPoroperty.Name = MirroredX;
+beans::PropertyValue rItem = *aI;
+pItem = rItem;
 }
 else
 {
-aNewPoroperty.Name = MirroredY;
+maCustomShapeGeometry.push_back(beans::PropertyValue());
+pItem = maCustomShapeGeometry.back();
 }
 
-aNewPoroperty.Handle = -1;
-aNewPoroperty.Value = sal_True;
-aNewPoroperty.State = beans::PropertyState_DIRECT_VALUE;
-
-maCustomShapeGeometry.push_back(aNewPoroperty);
+pItem-Name = sName;
+pItem-Handle = -1;
+pItem-Value = sal_True;
+pItem-State = beans::PropertyState_DIRECT_VALUE;
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - xmloff/source

2014-07-23 Thread Oliver-Rainer Wittmann
 xmloff/source/draw/shapeexport.cxx |   32 +++-
 1 file changed, 19 insertions(+), 13 deletions(-)

New commits:
commit 8148157bfbc82c5aeaff8dd622307437fa4441e7
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Wed Jul 23 08:53:15 2014 +

Resolves: #i125289# do apply possible changed GraphicStreamURL...

only for embedded images which already have its stream inside the package

fixes also issue 125290

(cherry picked from commit 9602a121b458e7456fc533dad86f434f846a72ba)

Conflicts:
xmloff/source/draw/shapeexport2.cxx

Change-Id: I5af0093b20f2f291d3a94c690bfbdb59a59320c3
(cherry picked from commit fd641c7b23ce4205c29fc0c564b73336cb2cfb07)
Reviewed-on: https://gerrit.libreoffice.org/10488
Reviewed-by: David Tardon dtar...@redhat.com
Tested-by: David Tardon dtar...@redhat.com

diff --git a/xmloff/source/draw/shapeexport.cxx 
b/xmloff/source/draw/shapeexport.cxx
index bddf0ac..87d5708 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -2264,9 +2264,12 @@ void XMLShapeExport::ImpExportGraphicObjectShape(
 OUString aResolveURL( sImageURL );
 const OUString sPackageURL( vnd.sun.star.Package: );
 
-// trying to preserve the filename
+// trying to preserve the filename for embedded images which 
already have its stream inside the package
+bool bIsEmbeddedImageWithExistingStreamInPackage = false;
 if ( aStreamURL.match( sPackageURL, 0 ) )
 {
+bIsEmbeddedImageWithExistingStreamInPackage = true;
+
 OUString sRequestedName( aStreamURL.copy( 
sPackageURL.getLength(), aStreamURL.getLength() - sPackageURL.getLength() ) );
 sal_Int32 nLastIndex = sRequestedName.lastIndexOf( '/' ) + 
1;
 if ( ( nLastIndex  0 )  ( nLastIndex  
sRequestedName.getLength() ) )
@@ -2286,20 +2289,23 @@ void XMLShapeExport::ImpExportGraphicObjectShape(
 
 if( !aStr.isEmpty() )
 {
-aStreamURL = sPackageURL;
-if( aStr[ 0 ] == '#' )
-{
-aStreamURL = aStreamURL.concat( aStr.copy( 1, 
aStr.getLength() - 1 ) );
-}
-else
+// apply possible changed stream URL to embedded image 
object
+if ( bIsEmbeddedImageWithExistingStreamInPackage )
 {
-aStreamURL = aStreamURL.concat( aStr );
-}
+aStreamURL = sPackageURL;
+if ( aStr[0] == '#' )
+{
+aStreamURL = aStreamURL.concat( aStr.copy( 1, 
aStr.getLength() - 1 ) );
+}
+else
+{
+aStreamURL = aStreamURL.concat( aStr );
+}
 
-// update stream URL for load on demand
-uno::Any aAny;
-aAny = aStreamURL;
-xPropSet-setPropertyValue(GraphicStreamURL, aAny );
+uno::Any aAny;
+aAny = aStreamURL;
+xPropSet-setPropertyValue( 
OUString(GraphicStreamURL), aAny );
+}
 
 mrExport.AddAttribute(XML_NAMESPACE_XLINK, XML_TYPE, 
XML_SIMPLE );
 mrExport.AddAttribute(XML_NAMESPACE_XLINK, XML_SHOW, 
XML_EMBED );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - xmloff/source

2014-06-29 Thread Michael Stahl
 xmloff/source/style/XMLClipPropertyHandler.cxx |7 +++
 1 file changed, 7 insertions(+)

New commits:
commit c6fe783c0ebec2ca95463605e7758e80c17d3f7e
Author: Michael Stahl mst...@redhat.com
Date:   Sat Jun 28 00:09:43 2014 +0200

fdo#80009: xmloff: ignore excessive fo:clip values

These cause problems in drawinglayer, and nobody needs a 5km clip.

Change-Id: Ic485250413194adbcd0ccf855f12e89e532d7120
(cherry picked from commit 924a28a7b1dc2f89e6940630057557f5f03494df)
Reviewed-on: https://gerrit.libreoffice.org/9947
Reviewed-by: Miklos Vajna vmik...@collabora.co.uk
Tested-by: Miklos Vajna vmik...@collabora.co.uk

diff --git a/xmloff/source/style/XMLClipPropertyHandler.cxx 
b/xmloff/source/style/XMLClipPropertyHandler.cxx
index 92f145f..ea5518d 100644
--- a/xmloff/source/style/XMLClipPropertyHandler.cxx
+++ b/xmloff/source/style/XMLClipPropertyHandler.cxx
@@ -81,6 +81,13 @@ bool XMLClipPropertyHandler::importXML( const OUString 
rStrImpValue, uno::Any
 !rUnitConverter.convertMeasureToCore( nVal, aToken ) )
 break;
 
+// fdo#80009 such nonsense could be written via WW8 import 
fdo#77454
+if (abs(nVal)  40)
+{
+SAL_INFO(xmloff.style, ignoring excessive clip   aToken);
+nVal = 0;
+}
+
 switch( nPos )
 {
 case 0: aCrop.Top = nVal;   break;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - xmloff/source

2014-06-05 Thread Kohei Yoshida
 xmloff/source/chart/SchXMLTableContext.cxx |9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

New commits:
commit 2b959fb871a68f08a06850909abd16f71033aa3a
Author: Kohei Yoshida kohei.yosh...@collabora.com
Date:   Thu Jun 5 15:17:00 2014 -0400

fdo#72727: Revert -Werror=unused-but-set-variable second try

This reverts commit ccf7b15c0a5776c6431fdcb0c0e2b0f3935ae3dc.
(cherry picked from commit 61d958f37ed2aad6be2eab7bb507e0fb77716eec)

Change-Id: I3fbb037200d3df0e392b66bdd0c9cafc573e1a57
Reviewed-on: https://gerrit.libreoffice.org/9659
Tested-by: Markus Mohrhard markus.mohrh...@googlemail.com
Reviewed-by: Markus Mohrhard markus.mohrh...@googlemail.com

diff --git a/xmloff/source/chart/SchXMLTableContext.cxx 
b/xmloff/source/chart/SchXMLTableContext.cxx
index bab2a9f..6c0398c 100644
--- a/xmloff/source/chart/SchXMLTableContext.cxx
+++ b/xmloff/source/chart/SchXMLTableContext.cxx
@@ -856,6 +856,7 @@ void 
SchXMLTableHelper::switchRangesFromOuterToInternalIfNecessary(
 
 const OUString lcl_aCategoriesRange(aCategoriesRange);
 
+bool bCategoriesApplied = false;
 // translate ranges (using the map created before)
 for( tSchXMLLSequencesPerIndex::const_iterator aLSeqIt( 
rLSequencesPerIndex.begin());
  aLSeqIt != rLSequencesPerIndex.end(); ++aLSeqIt )
@@ -884,7 +885,12 @@ void 
SchXMLTableHelper::switchRangesFromOuterToInternalIfNecessary(
 }
 else
 {
-if( !lcl_tableOfRangeMatches( aRange, 
rTable.aTableNameOfFile ))
+if( lcl_tableOfRangeMatches( aRange, 
rTable.aTableNameOfFile ))
+{
+if( aLSeqIt-first.first == SCH_XML_CATEGORIES_INDEX )
+bCategoriesApplied = true;
+}
+else
 {
 if( aLSeqIt-first.first == SCH_XML_CATEGORIES_INDEX )
 {
@@ -895,6 +901,7 @@ void 
SchXMLTableHelper::switchRangesFromOuterToInternalIfNecessary(
 SchXMLTools::copyProperties(
 xOldSequenceProp, Reference 
beans::XPropertySet ( xNewSequence, uno::UNO_QUERY ));
 aLSeqIt-second-setValues( xNewSequence );
+bCategoriesApplied = true;
 }
 else
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - xmloff/source

2014-06-05 Thread Kohei Yoshida
 xmloff/source/chart/SchXMLTableContext.cxx |   10 ++
 1 file changed, 10 insertions(+)

New commits:
commit 5a53dfa86a2b61154f4c2c7cb356d32a569aaf69
Author: Kohei Yoshida kohei.yosh...@collabora.com
Date:   Thu Jun 5 15:02:48 2014 -0400

fdo#72727: Revert fdo#68663 don't blindly force categories when there are

This reverts commit b090cbdf82e0827234caf5969124f6631311ef35.
(cherry picked from commit 91ca3a92c54a08ad13497d7e8ac1916e7b68bbfd)

Change-Id: Ic9ca56ba1d2d98602810dafd9fc3b48106d05ea7
Reviewed-on: https://gerrit.libreoffice.org/9658
Tested-by: Markus Mohrhard markus.mohrh...@googlemail.com
Reviewed-by: Markus Mohrhard markus.mohrh...@googlemail.com

diff --git a/xmloff/source/chart/SchXMLTableContext.cxx 
b/xmloff/source/chart/SchXMLTableContext.cxx
index a3ccd4f..bab2a9f 100644
--- a/xmloff/source/chart/SchXMLTableContext.cxx
+++ b/xmloff/source/chart/SchXMLTableContext.cxx
@@ -943,6 +943,16 @@ void 
SchXMLTableHelper::switchRangesFromOuterToInternalIfNecessary(
 }
 }
 
+// there exist files with own data without a categories element but with 
row
+// descriptions.  The row descriptions were used as categories even without
+// the categories element
+if( ! bCategoriesApplied )
+{
+SchXMLTools::CreateCategories(
+xDataProv, xChartDoc, OUString(categories),
+0 /* nCooSysIndex */, 0 /* nDimension */ );
+}
+
 //i91578 display of hidden values (copy paste scenario; use hidden flag 
during migration to locale table upon paste )
 //remove series that consist only of hidden columns
 Reference chart2::XInternalDataProvider  xInternalDataProvider( 
xDataProv, uno::UNO_QUERY );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - xmloff/source

2014-05-08 Thread Laurent Balland-Poirier
 xmloff/source/draw/ximpshap.cxx |   10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

New commits:
commit 6a1c8a0b53c8ec1c822e60913c1ccdfd2eaa21ce
Author: Laurent Balland-Poirier laurent.balland-poir...@laposte.net
Date:   Tue Apr 15 14:34:50 2014 +0200

fdo#77451 Detect AOO 4.x for SvXMLImport::needFixPositionAfterZ

Old versions of OOo and AOO need a fix for Z paths. But AOO 4.0 did not
fix it neither.

Change-Id: I29af75035c7c059b69fcdc3a1ce27b617a30dbd1
Reviewed-on: https://gerrit.libreoffice.org/9012
Tested-by: Michael Stahl mst...@redhat.com
Reviewed-by: Michael Stahl mst...@redhat.com
(cherry picked from commit 3d2a17fd2e9cde29f12268ddfccc3f5b51455722)
Signed-off-by: Michael Stahl mst...@redhat.com

diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx
index ae94d31..65c3084 100644
--- a/xmloff/source/draw/ximpshap.cxx
+++ b/xmloff/source/draw/ximpshap.cxx
@@ -1755,10 +1755,12 @@ bool SvXMLImport::needFixPositionAfterZ() const
 bool bWrongPositionAfterZ( false );
 sal_Int32 nUPD( 0 );
 sal_Int32 nBuildId( 0 );
-if ( getBuildIds( nUPD, nBuildId ) 
-   ( ( nUPD == 641 ) || ( nUPD == 645 ) || ( nUPD == 680 ) || ( nUPD == 
300 ) ||
- ( nUPD == 310 ) || ( nUPD == 320 ) || ( nUPD == 330 ) || ( nUPD == 
340 ) ||
- ( nUPD == 350  nBuildId  202 ) ) )
+if ( getBuildIds( nUPD, nBuildId )  // test OOo and old versions of LibO 
and AOO
+   ( ( ( nUPD == 641 ) || ( nUPD == 645 ) || ( nUPD == 680 ) || ( nUPD == 
300 ) ||
+   ( nUPD == 310 ) || ( nUPD == 320 ) || ( nUPD == 330 ) || ( nUPD == 
340 ) ||
+   ( nUPD == 350  nBuildId  202 ) )
+   || ( getGeneratorVersion() = SvXMLImport::AOO_40x // test if AOO 
4.x
+  getGeneratorVersion()  SvXMLImport::AOO_4x ) ) )
 {
 bWrongPositionAfterZ = true;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - xmloff/source

2014-04-16 Thread Michael Stahl
 xmloff/source/meta/xmlmetai.cxx |   14 --
 1 file changed, 8 insertions(+), 6 deletions(-)

New commits:
commit e290cc1ceb31315905288e29945c9843b6588342
Author: Michael Stahl mst...@redhat.com
Date:   Wed Apr 16 00:26:33 2014 +0200

ODF import: detect LibreOfficeDev in meta:generator too

(cherry picked from commit 74d7911abf77643544c58a0d3e5fb956add76c44)

xmloff: we used to call it LOdev back in 4.0 so check that too
(cherry picked from commit 5d53cabb52648507086a39e06803624949e4a301)

Change-Id: Icea3086975dab1afedf111364683e6a7de50ce41
Reviewed-on: https://gerrit.libreoffice.org/9063
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com

diff --git a/xmloff/source/meta/xmlmetai.cxx b/xmloff/source/meta/xmlmetai.cxx
index 6db2452..9ff8e75 100644
--- a/xmloff/source/meta/xmlmetai.cxx
+++ b/xmloff/source/meta/xmlmetai.cxx
@@ -266,17 +266,19 @@ void SvXMLMetaDocumentContext::setBuildId(OUString const 
i_rBuildId, const uno:
 }
 }
 
-if (i_rBuildId.startsWith(LibreOffice/))
+OUString rest;
+if (i_rBuildId.startsWith(LibreOffice/, rest) ||
+i_rBuildId.startsWith(LibreOfficeDev/, rest) ||
+i_rBuildId.startsWith(LOdev/, rest))
 {
 OUStringBuffer sNumber;
-for (sal_Int32 i = sizeof(LibreOffice/) - 1;
-i  i_rBuildId.getLength(); ++i)
+for (sal_Int32 i = 0; i  rest.getLength(); ++i)
 {
-if (isdigit(i_rBuildId[i]))
+if (isdigit(rest[i]))
 {
-sNumber.append(i_rBuildId[i]);
+sNumber.append(rest[i]);
 }
-else if ('.' != i_rBuildId[i])
+else if ('.' != rest[i])
 {
 break;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - xmloff/source

2014-04-04 Thread Eike Rathke
 xmloff/source/style/xmlnumfi.cxx |9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

New commits:
commit 42ab5947518d92db9f0e1ccf063b211a3fd308ff
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/8834
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 20500af..8773f3a 100644
--- a/xmloff/source/style/xmlnumfi.cxx
+++ b/xmloff/source/style/xmlnumfi.cxx
@@ -2068,7 +2068,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-2' - xmloff/source

2014-04-02 Thread Kohei Yoshida
 xmloff/source/style/bordrhdl.cxx |   51 +--
 1 file changed, 17 insertions(+), 34 deletions(-)

New commits:
commit 7f3105323f1db11bc0a3ff5c5c71e1dc62338cc4
Author: Kohei Yoshida kohei.yosh...@collabora.com
Date:   Sun Feb 2 18:23:48 2014 -0500

fdo#76697: Remove this duplicate and use the UNO constant values instead.

(cherry picked from commit 72b2fafebfc44fa90f08cc198e2fa5fc26154c5b)

Conflicts:
xmloff/source/style/bordrhdl.cxx

This fixes the bug because in XMLBorderHdl::importXML() the value none
was rejected as invalid because API_LINE_NONE pointlessly had a
different value than BorderLineStyle::NONE.

Change-Id: Id81aacc6c594ad25d97f6f6dc578ed9ca16549ab
Signed-off-by: Michael Stahl mst...@redhat.com

diff --git a/xmloff/source/style/bordrhdl.cxx b/xmloff/source/style/bordrhdl.cxx
index e0c7be5..cecc3b1 100644
--- a/xmloff/source/style/bordrhdl.cxx
+++ b/xmloff/source/style/bordrhdl.cxx
@@ -29,23 +29,6 @@
 using namespace ::com::sun::star;
 using namespace ::xmloff::token;
 
-const sal_uInt16 API_LINE_SOLID   = 0;
-const sal_uInt16 API_LINE_DOTTED  = 1;
-const sal_uInt16 API_LINE_DASHED  = 2;
-const sal_uInt16 API_LINE_DOUBLE  = 3;
-const sal_uInt16 API_LINE_THINTHICK_SMALLGAP  = 4;
-const sal_uInt16 API_LINE_THINTHICK_MEDIUMGAP  = 5;
-const sal_uInt16 API_LINE_THINTHICK_LARGEGAP  = 6;
-const sal_uInt16 API_LINE_THICKTHIN_SMALLGAP  = 7;
-const sal_uInt16 API_LINE_THICKTHIN_MEDIUMGAP  = 8;
-const sal_uInt16 API_LINE_THICKTHIN_LARGEGAP  = 9;
-const sal_uInt16 API_LINE_EMBOSSED  = 10;
-const sal_uInt16 API_LINE_ENGRAVED  = 11;
-const sal_uInt16 API_LINE_OUTSET  = 12;
-const sal_uInt16 API_LINE_INSET  = 13;
-const sal_uInt16 API_LINE_FINE_DASHED  = 14;
-const sal_uInt16 API_LINE_NONE = USHRT_MAX;
-
 #define DEF_LINE_WIDTH_01
 #define DEF_LINE_WIDTH_135
 #define DEF_LINE_WIDTH_288
@@ -90,7 +73,7 @@ static sal_uInt16 const aBorderWidths[] =
 static void lcl_frmitems_setXMLBorderStyle( table::BorderLine2  rBorderLine, 
sal_uInt16 nStyle )
 {
 sal_Int16 eStyle = -1; // None
-if ( nStyle != API_LINE_NONE )
+if (nStyle != table::BorderLineStyle::NONE)
 eStyle = sal_Int16( nStyle );
 
 rBorderLine.LineStyle = eStyle;
@@ -238,7 +221,7 @@ bool XMLBorderHdl::importXML( const OUString rStrImpValue, 
uno::Any rValue, co
 
 // if there is no style or a different style than none but no width,
// then the declaration is not valid.
-if( !bHasStyle || (API_LINE_NONE != nStyle  !bHasWidth) )
+if (!bHasStyle || (table::BorderLineStyle::NONE != nStyle  !bHasWidth))
 return false;
 
 table::BorderLine2 aBorderLine;
@@ -252,7 +235,7 @@ bool XMLBorderHdl::importXML( const OUString rStrImpValue, 
uno::Any rValue, co
 }
 
 // first of all, delete an empty line
-if( (bHasStyle  API_LINE_NONE == nStyle) ||
+if ((bHasStyle  table::BorderLineStyle::NONE == nStyle) ||
 (bHasWidth  USHRT_MAX == nNamedWidth  0 == nWidth) )
 {
 aBorderLine.InnerLineWidth = 0;
@@ -312,34 +295,34 @@ bool XMLBorderHdl::exportXML( OUString rStrExpValue, 
const uno::Any rValue, co
 XMLTokenEnum eStyleToken = XML_SOLID;
 switch ( aBorderLine.LineStyle )
 {
-case API_LINE_DASHED:
+case table::BorderLineStyle::DASHED:
 eStyleToken = XML_DASHED;
 break;
-case API_LINE_DOTTED:
+case table::BorderLineStyle::DOTTED:
 eStyleToken = XML_DOTTED;
 break;
-case API_LINE_DOUBLE:
-case API_LINE_THINTHICK_SMALLGAP:
-case API_LINE_THINTHICK_MEDIUMGAP:
-case API_LINE_THINTHICK_LARGEGAP:
-case API_LINE_THICKTHIN_SMALLGAP:
-case API_LINE_THICKTHIN_MEDIUMGAP:
-case API_LINE_THICKTHIN_LARGEGAP:
+case table::BorderLineStyle::DOUBLE:
+case table::BorderLineStyle::THINTHICK_SMALLGAP:
+case table::BorderLineStyle::THINTHICK_MEDIUMGAP:
+case table::BorderLineStyle::THINTHICK_LARGEGAP:
+case table::BorderLineStyle::THICKTHIN_SMALLGAP:
+case table::BorderLineStyle::THICKTHIN_MEDIUMGAP:
+case table::BorderLineStyle::THICKTHIN_LARGEGAP:
 eStyleToken = XML_DOUBLE;
 break;
-case API_LINE_EMBOSSED:
+case table::BorderLineStyle::EMBOSSED:
 eStyleToken = XML_RIDGE;
 break;
-case API_LINE_ENGRAVED:
+case table::BorderLineStyle::ENGRAVED:
 eStyleToken = XML_GROOVE;
 break;
-case API_LINE_OUTSET:
+case table::BorderLineStyle::OUTSET:
 eStyleToken = XML_OUTSET;
 break;
-case API_LINE_INSET:
+case table::BorderLineStyle::INSET:
 eStyleToken = XML_INSET;
 

[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - xmloff/source

2014-03-15 Thread Markus Mohrhard
 xmloff/source/chart/PropertyMap.hxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 63508c5e56e201d1e5470e9f3d176bd6ff723888
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/8579
Reviewed-by: Miklos Vajna vmik...@collabora.co.uk
Tested-by: Miklos Vajna vmik...@collabora.co.uk

diff --git a/xmloff/source/chart/PropertyMap.hxx 
b/xmloff/source/chart/PropertyMap.hxx
index 8e1a3ff..9f5d509 100644
--- a/xmloff/source/chart/PropertyMap.hxx
+++ b/xmloff/source/chart/PropertyMap.hxx
@@ -209,6 +209,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-2' - xmloff/source

2014-03-11 Thread Markus Mohrhard
 xmloff/source/chart/PropertyMap.hxx |   27 +++
 1 file changed, 19 insertions(+), 8 deletions(-)

New commits:
commit d7cc3e7d8a093cfe300f52c0fe51aecd80a34fff
Author: Markus Mohrhard markus.mohrh...@collabora.co.uk
Date:   Mon Mar 10 19:15:45 2014 +0100

fix odf validation errors around new chart regression curves

Change-Id: If67207abb204b5aca8365737088437b12ac6eaf1
Reviewed-on: https://gerrit.libreoffice.org/8523
Reviewed-by: Tomaž Vajngerl qui...@gmail.com
Tested-by: Tomaž Vajngerl qui...@gmail.com

diff --git a/xmloff/source/chart/PropertyMap.hxx 
b/xmloff/source/chart/PropertyMap.hxx
index 9d1f6fd..8e1a3ff 100644
--- a/xmloff/source/chart/PropertyMap.hxx
+++ b/xmloff/source/chart/PropertyMap.hxx
@@ -87,6 +87,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 }
@@ -185,14 +186,24 @@ const XMLPropertyMapEntry aXMLChartPropMap[] =
 // regression curve properties
 MAP_SPECIAL( RegressionType, CHART, XML_REGRESSION_TYPE, 
XML_TYPE_STRING, XML_SCH_CONTEXT_SPECIAL_REGRESSION_TYPE ),
 
-MAP_ENTRY_ODF_EXT( CurveName, CHART, XML_REGRESSION_CURVE_NAME, 
XML_TYPE_STRING ),
-MAP_ENTRY_ODF_EXT( PolynomialDegree, CHART, XML_REGRESSION_MAX_DEGREE, 
XML_TYPE_NUMBER ),
-MAP_ENTRY_ODF_EXT( MovingAveragePeriod, CHART, XML_REGRESSION_PERIOD, 
XML_TYPE_NUMBER ),
-MAP_ENTRY_ODF_EXT( MovingAverageType, CHART, XML_REGRESSION_MOVING_TYPE, 
XML_TYPE_STRING ),
-MAP_ENTRY_ODF_EXT( ExtrapolateForward, CHART, 
XML_REGRESSION_EXTRAPOLATE_FORWARD, XML_TYPE_DOUBLE ),
-MAP_ENTRY_ODF_EXT( ExtrapolateBackward, CHART, 
XML_REGRESSION_EXTRAPOLATE_BACKWARD, XML_TYPE_DOUBLE ),
-MAP_ENTRY_ODF_EXT( ForceIntercept, CHART, 
XML_REGRESSION_FORCE_INTERCEPT, XML_TYPE_BOOL ),
-MAP_ENTRY_ODF_EXT( InterceptValue, CHART, 
XML_REGRESSION_INTERCEPT_VALUE, XML_TYPE_DOUBLE ),
+MAP_ENTRY_ODF_EXT( CurveName, LO_EXT, XML_REGRESSION_CURVE_NAME, 
XML_TYPE_STRING ),
+MAP_ENTRY_ODF_EXT( PolynomialDegree, LO_EXT, XML_REGRESSION_MAX_DEGREE, 
XML_TYPE_NUMBER ),
+MAP_ENTRY_ODF_EXT( MovingAveragePeriod, LO_EXT, XML_REGRESSION_PERIOD, 
XML_TYPE_NUMBER ),
+MAP_ENTRY_ODF_EXT( MovingAverageType, LO_EXT, 
XML_REGRESSION_MOVING_TYPE, XML_TYPE_STRING ),
+MAP_ENTRY_ODF_EXT( ExtrapolateForward, LO_EXT, 
XML_REGRESSION_EXTRAPOLATE_FORWARD, XML_TYPE_DOUBLE ),
+MAP_ENTRY_ODF_EXT( ExtrapolateBackward, LO_EXT, 
XML_REGRESSION_EXTRAPOLATE_BACKWARD, XML_TYPE_DOUBLE ),
+MAP_ENTRY_ODF_EXT( ForceIntercept, LO_EXT, 
XML_REGRESSION_FORCE_INTERCEPT, XML_TYPE_BOOL ),
+MAP_ENTRY_ODF_EXT( InterceptValue, LO_EXT, 
XML_REGRESSION_INTERCEPT_VALUE, XML_TYPE_DOUBLE ),
+
+// import mapping for broken files
+MAP_ENTRY_ODF_EXT_IMPORT( CurveName, CHART, XML_REGRESSION_CURVE_NAME, 
XML_TYPE_STRING ),
+MAP_ENTRY_ODF_EXT_IMPORT( PolynomialDegree, CHART, 
XML_REGRESSION_MAX_DEGREE, XML_TYPE_NUMBER ),
+MAP_ENTRY_ODF_EXT_IMPORT( MovingAveragePeriod, CHART, 
XML_REGRESSION_PERIOD, XML_TYPE_NUMBER ),
+MAP_ENTRY_ODF_EXT_IMPORT( MovingAverageType, CHART, 
XML_REGRESSION_MOVING_TYPE, XML_TYPE_STRING ),
+MAP_ENTRY_ODF_EXT_IMPORT( ExtrapolateForward, CHART, 
XML_REGRESSION_EXTRAPOLATE_FORWARD, XML_TYPE_DOUBLE ),
+MAP_ENTRY_ODF_EXT_IMPORT( ExtrapolateBackward, CHART, 
XML_REGRESSION_EXTRAPOLATE_BACKWARD, XML_TYPE_DOUBLE ),
+MAP_ENTRY_ODF_EXT_IMPORT( ForceIntercept, CHART, 
XML_REGRESSION_FORCE_INTERCEPT, XML_TYPE_BOOL ),
+MAP_ENTRY_ODF_EXT_IMPORT( InterceptValue, CHART, 
XML_REGRESSION_INTERCEPT_VALUE, XML_TYPE_DOUBLE ),
 
 MAP_SPECIAL_ODF12( ErrorBarRangePositive, CHART, XML_ERROR_UPPER_RANGE, 
XML_TYPE_STRING, XML_SCH_CONTEXT_SPECIAL_ERRORBAR_RANGE ), // export only
 MAP_SPECIAL_ODF12( ErrorBarRangeNegative, CHART, XML_ERROR_LOWER_RANGE, 
XML_TYPE_STRING, 

[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - xmloff/source

2014-02-09 Thread Michael Stahl
 xmloff/source/draw/sdpropls.cxx |7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 63756b6bd3bc1c755b7a703fdbcc164fbff6acc2
Author: Michael Stahl mst...@redhat.com
Date:   Fri Feb 7 16:25:06 2014 +0100

fdo#74230: ODF export: write stroke and fill color in graphic defaults

The pool defaults for svg:stroke-color and draw:fill-color were changed
and while previously (effective, manually overridden) defaults were
written into ODF files, this was lost with the change; restore that.

(regression from c0eb5e7772c848806db8ab461f77f9549c1d8b2b)

Change-Id: Ibcd863260976aa42116175c7f19cb33760af986f
(cherry picked from commit 45d3577bc5726eee44f491fd30a7f11dc428431a)
Reviewed-on: https://gerrit.libreoffice.org/7929
Reviewed-by: Miklos Vajna vmik...@collabora.co.uk
Tested-by: Miklos Vajna vmik...@collabora.co.uk

diff --git a/xmloff/source/draw/sdpropls.cxx b/xmloff/source/draw/sdpropls.cxx
index 7ee4ecc..f76c661 100644
--- a/xmloff/source/draw/sdpropls.cxx
+++ b/xmloff/source/draw/sdpropls.cxx
@@ -74,6 +74,7 @@ using namespace ::xmloff::token;
 #define _MAP(name,prefix,token,type,context)  { name, sizeof(name)-1, prefix, 
token, type, context, SvtSaveOptions::ODFVER_010, false }
 #define _MAPV(name,prefix,token,type,context,version)  { name, sizeof(name)-1, 
prefix, token, type, context, version, false }
 #define GMAP(name,prefix,token,type,context) 
_MAP(name,prefix,token,type|XML_TYPE_PROP_GRAPHIC,context)
+#define GMAP_D(name,prefix,token,type,context) 
_MAP(name,prefix,token,type|XML_TYPE_PROP_GRAPHIC|MID_FLAG_DEFAULT_ITEM_EXPORT,context)
 #define GMAPV(name,prefix,token,type,context,version) 
_MAPV(name,prefix,token,type|XML_TYPE_PROP_GRAPHIC,context,version)
 #define DPMAP(name,prefix,token,type,context) 
_MAP(name,prefix,token,type|XML_TYPE_PROP_DRAWING_PAGE,context)
 #define TMAP(name,prefix,token,type,context) 
_MAP(name,prefix,token,type|XML_TYPE_PROP_TEXT,context)
@@ -93,7 +94,7 @@ const XMLPropertyMapEntry aXMLSDProperties[] =
 GMAP( LineStyle,  XML_NAMESPACE_DRAW, XML_STROKE,
 XML_SD_TYPE_STROKE, 0 ),
 GMAP( LineDashName,   XML_NAMESPACE_DRAW, 
XML_STROKE_DASH,XML_TYPE_STYLENAME|MID_FLAG_NO_PROPERTY_IMPORT , 
CTF_DASHNAME ),
 GMAP( LineWidth,  XML_NAMESPACE_SVG,  
XML_STROKE_WIDTH,   XML_TYPE_MEASURE, 0 ),
-GMAP( LineColor,  XML_NAMESPACE_SVG,  
XML_STROKE_COLOR,   XML_TYPE_COLOR, 0 ),
+GMAP_D(LineColor, XML_NAMESPACE_SVG,  
XML_STROKE_COLOR,   XML_TYPE_COLOR, 0),
 GMAP( LineStartName,  XML_NAMESPACE_DRAW, 
XML_MARKER_START,   XML_TYPE_STYLENAME|MID_FLAG_NO_PROPERTY_IMPORT, 
CTF_LINESTARTNAME ),
 GMAP( LineStartWidth, XML_NAMESPACE_DRAW, 
XML_MARKER_START_WIDTH, XML_TYPE_MEASURE, 0 ),
 GMAP( LineStartCenter,XML_NAMESPACE_DRAW, 
XML_MARKER_START_CENTER,XML_TYPE_BOOL, 0 ),
@@ -106,8 +107,8 @@ const XMLPropertyMapEntry aXMLSDProperties[] =
 
 // fill attributes
 GMAP( FillStyle,  XML_NAMESPACE_DRAW, XML_FILL,  
 XML_SD_TYPE_FILLSTYLE, 0 ),
-GMAP( FillColor,  XML_NAMESPACE_DRAW, 
XML_FILL_COLOR, XML_TYPE_COLOR, 0 ),
-GMAP( FillColor2, XML_NAMESPACE_DRAW, 
XML_SECONDARY_FILL_COLOR,   XML_TYPE_COLOR, 0 ),
+GMAP_D(FillColor, XML_NAMESPACE_DRAW, 
XML_FILL_COLOR, XML_TYPE_COLOR, 0),
+GMAP_D(FillColor2,XML_NAMESPACE_DRAW, 
XML_SECONDARY_FILL_COLOR,   XML_TYPE_COLOR, 0),
 GMAP( FillGradientName,   XML_NAMESPACE_DRAW, 
XML_FILL_GRADIENT_NAME, XML_TYPE_STYLENAME|MID_FLAG_NO_PROPERTY_IMPORT, 
CTF_FILLGRADIENTNAME ),
 GMAP( FillGradientStepCount,  XML_NAMESPACE_DRAW, 
XML_GRADIENT_STEP_COUNT,XML_TYPE_NUMBER16, 0 ),
 GMAP( FillHatchName,  XML_NAMESPACE_DRAW, 
XML_FILL_HATCH_NAME,XML_TYPE_STYLENAME|MID_FLAG_NO_PROPERTY_IMPORT, 
CTF_FILLHATCHNAME ),
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - xmloff/source

2014-02-08 Thread Kohei Yoshida
 xmloff/source/style/cdouthdl.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 54583b6dec8ba17246f3422695b57795c64bc65d
Author: Kohei Yoshida kohei.yosh...@collabora.com
Date:   Fri Feb 7 21:47:19 2014 -0500

fdo#73281: Why!?

This restriction makes absolutely no sense.  It was likely someone's
temporarily hack that was totally forgotten in the past 10 years...

Not to mention removing this fixes my bug.

Change-Id: I7394cccdc9fe486fda6cdd9b7eaf98fd291895a9
(cherry picked from commit 503b7191737eafa5621dc0aa552092793676c998)
Reviewed-on: https://gerrit.libreoffice.org/7942
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com

diff --git a/xmloff/source/style/cdouthdl.cxx b/xmloff/source/style/cdouthdl.cxx
index e2bf0e2..d559eb8 100644
--- a/xmloff/source/style/cdouthdl.cxx
+++ b/xmloff/source/style/cdouthdl.cxx
@@ -135,7 +135,7 @@ bool XMLCrossedOutTypePropHdl::exportXML( OUString 
rStrExpValue, const uno::Any
 sal_Int16 nValue = sal_Int16();
 OUStringBuffer aOut;
 
-if( (rValue = nValue)  awt::FontStrikeout::DOUBLE==nValue )
+if (rValue = nValue)
 {
 bRet = SvXMLUnitConverter::convertEnum(
 aOut, (sal_uInt16)nValue, pXML_CrossedoutType_Enum );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - xmloff/source

2014-01-27 Thread Caolán McNamara
 xmloff/source/draw/ximpshap.cxx |6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

New commits:
commit 6eac0306a61066e91ff748a7cb2a6a86a94820ac
Author: Caolán McNamara caol...@redhat.com
Date:   Mon Jan 27 10:58:39 2014 +

Resolves: fdo#73814 wrong name for drawing::PointSequenceSequence property

examining svx/source/unodraw/unoprov.cxx Geometry is a
indeed a drawing::PolyPolygonBezierCoords for the BezierShapes
and a drawing::PointSequenceSequence for the PolyShapes

regression since e44335abe006d05f0f915279605a03ef084116d6 because after
223f6b631c1b087754c0f9051fb55f029f2503ce we started getting
drawing::PointSequenceSequences in maPath which is the wrong type for the
argument to property PolyPolygonBezier for those shapes.  Which led me to
incorrectly assume that the all PolyPolygonBezier properties were named
PolyPolygonBezier which isn't the case.

so reverting the non maPath hunks of 
e44335abe006d05f0f915279605a03ef084116d6

Change-Id: I013a66778d11a472fc4567e53a9e17e73e2b91ce
(cherry picked from commit df2ad69d5df350636c1eb1772b16a2e203a88fa7)
Reviewed-on: https://gerrit.libreoffice.org/7685
Reviewed-by: Michael Stahl mst...@redhat.com
Tested-by: Michael Stahl mst...@redhat.com

diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx
index d227f16..bb3a49f 100644
--- a/xmloff/source/draw/ximpshap.cxx
+++ b/xmloff/source/draw/ximpshap.cxx
@@ -1470,8 +1470,6 @@ void SdXMLPathShapeContext::StartElement(const 
uno::Reference xml::sax::XAttrib
 aPolyPolygon,
 aSourcePolyPolygon);
 aAny = aSourcePolyPolygon;
-
-
xPropSet-setPropertyValue(OUString(PolyPolygonBezier), aAny);
 }
 else
 {
@@ -1481,9 +1479,9 @@ void SdXMLPathShapeContext::StartElement(const 
uno::Reference xml::sax::XAttrib
 aPolyPolygon,
 aSourcePolyPolygon);
 aAny = aSourcePolyPolygon;
-
-xPropSet-setPropertyValue(OUString(Geometry), 
aAny);
 }
+
+xPropSet-setPropertyValue(OUString(Geometry), aAny);
 }
 
 // set pos, size, shear and rotate
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - xmloff/source

2013-12-20 Thread Eike Rathke
 xmloff/source/text/txtprmap.cxx |8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

New commits:
commit 116e214a82dcdce9d4764646ff43b60d5c7c9392
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)

diff --git a/xmloff/source/text/txtprmap.cxx b/xmloff/source/text/txtprmap.cxx
index ae30b11..1e4ed6f 100644
--- a/xmloff/source/text/txtprmap.cxx
+++ b/xmloff/source/text/txtprmap.cxx
@@ -69,6 +69,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 }
 
@@ -90,7 +95,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-2' - xmloff/source

2013-12-18 Thread Michael Stahl
 xmloff/source/text/XMLTextHeaderFooterContext.cxx |1 
 xmloff/source/text/XMLTextMasterPageExport.cxx|   24 +++---
 2 files changed, 13 insertions(+), 12 deletions(-)

New commits:
commit 8d00de2114f148857291aee9a5dc31e92597412d
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)

diff --git a/xmloff/source/text/XMLTextHeaderFooterContext.cxx 
b/xmloff/source/text/XMLTextHeaderFooterContext.cxx
index b1ef767..2a711b0 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 fa473ec..b82cace 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
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - xmloff/source

2013-12-13 Thread Eike Rathke
 xmloff/source/text/txtfldi.cxx |2 +-
 xmloff/source/text/txtimp.cxx  |3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

New commits:
commit be63a5d34d4659b2fb8341a6e662b926e9d7f852
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)

diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx
index bea669e..73aa7aa 100644
--- a/xmloff/source/text/txtfldi.cxx
+++ b/xmloff/source/text/txtfldi.cxx
@@ -3658,7 +3658,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 ff88ffc..192013e 100644
--- a/xmloff/source/text/txtimp.cxx
+++ b/xmloff/source/text/txtimp.cxx
@@ -154,7 +154,8 @@ static const 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-2' - xmloff/source

2013-12-13 Thread Eike Rathke
 xmloff/source/text/txtflde.cxx |   38 +++---
 1 file changed, 27 insertions(+), 11 deletions(-)

New commits:
commit 4031765b004dded31f04c54f9a055b7a3d0053f2
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

diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx
index cc9ca75..f4ce99c 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-2' - xmloff/source

2013-12-09 Thread Eike Rathke
 xmloff/source/style/xmlnumfe.cxx |2 +-
 xmloff/source/style/xmlnumfi.cxx |3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

New commits:
commit e06569ab7f137e0c5173bd70231c856cb67badac
Author: Eike Rathke er...@redhat.com
Date:   Mon Dec 9 21:04:03 2013 +0100

resolved fdo#72537 write loext:fill-character

... instead of number:fill-character but read both.

Change-Id: Ia620fad575782f6174a9ee5fbbd8b396b21948e3
(cherry picked from commit 9f87de91cee05656808a98ab1bd65ad9509ef7df)

diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx
index 8abe415..6658a3e 100644
--- a/xmloff/source/style/xmlnumfe.cxx
+++ b/xmloff/source/style/xmlnumfe.cxx
@@ -503,7 +503,7 @@ void SvXMLNumFmtExport::WriteMinutesElement_Impl( sal_Bool 
bLong )
 void SvXMLNumFmtExport::WriteRepeatedElement_Impl( sal_Unicode nChar )
 {
 FinishTextElement_Impl();
-SvXMLElementExport aElem( rExport, XML_NAMESPACE_NUMBER, 
XML_FILL_CHARACTER,
+SvXMLElementExport aElem( rExport, XML_NAMESPACE_LO_EXT, 
XML_FILL_CHARACTER,
   sal_True, sal_False );
 rExport.Characters( OUString( nChar ) );
 }
diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx
index c87f754..20500af 100644
--- a/xmloff/source/style/xmlnumfi.cxx
+++ b/xmloff/source/style/xmlnumfi.cxx
@@ -497,7 +497,8 @@ const SvXMLTokenMap SvXMLNumImpData::GetStyleElemTokenMap()
 {
 //  elements in a style
 { XML_NAMESPACE_NUMBER, XML_TEXT,   XML_TOK_STYLE_TEXT 
 },
-{ XML_NAMESPACE_NUMBER, XML_FILL_CHARACTER,   
XML_TOK_STYLE_FILL_CHARACTER   },
+{ XML_NAMESPACE_LO_EXT, XML_FILL_CHARACTER, 
XML_TOK_STYLE_FILL_CHARACTER},
+{ XML_NAMESPACE_NUMBER, XML_FILL_CHARACTER, 
XML_TOK_STYLE_FILL_CHARACTER},
 { XML_NAMESPACE_NUMBER, XML_NUMBER, 
XML_TOK_STYLE_NUMBER},
 { XML_NAMESPACE_NUMBER, XML_SCIENTIFIC_NUMBER,  
XML_TOK_STYLE_SCIENTIFIC_NUMBER },
 { XML_NAMESPACE_NUMBER, XML_FRACTION,   
XML_TOK_STYLE_FRACTION  },
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits