[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.1' - 44 commits - connectivity/source cppcanvas/source dbaccess/source desktop/source desktop/test editeng/source filter/source framework/source include/connectivity include/editeng include/sax include/xmloff liborcus/liborcus-handle-invalid-xml.patch.1 liborcus/UnpackedTarball_liborcus.mk linguistic/source mysqlc/source odk/examples odk/settings reportdesign/source sax/qa sax/source sc/qa sc/source sc/uiconfig svl/source svtools/source svx/source sw/inc sw/qa sw/source sw/uiconfig vcl/aqua vcl/source vcl/unx wizards/source writerfilter/source xmloff/inc xmloff/qa xmloff/source
Eike Rathke
erack at redhat.com
Fri Jan 3 01:24:54 PST 2014
connectivity/source/commontools/dbconversion.cxx | 16
connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx | 18
cppcanvas/source/mtfrenderer/emfplus.cxx | 34 -
dbaccess/source/core/api/RowSet.cxx | 3
dbaccess/source/filter/xml/xmlExport.cxx | 8
dbaccess/source/filter/xml/xmlHelper.cxx | 27 -
dbaccess/source/filter/xml/xmlHelper.hxx | 8
dbaccess/source/filter/xml/xmlfilter.cxx | 6
desktop/source/deployment/gui/dp_gui_extlistbox.cxx | 6
desktop/test/deployment/active/active_native.cxx | 7
desktop/test/deployment/passive/passive_native.cxx | 7
editeng/source/items/flditem.cxx | 14
editeng/source/uno/unofield.cxx | 2
filter/source/graphicfilter/icgm/class5.cxx | 15
filter/source/svg/svgreader.cxx | 17
framework/source/layoutmanager/toolbarlayoutmanager.cxx | 26 -
include/connectivity/dbconversion.hxx | 2
include/editeng/flditem.hxx | 6
include/sax/tools/converter.hxx | 9
include/xmloff/maptype.hxx | 8
include/xmloff/txtprmap.hxx | 2
include/xmloff/xmlnmspe.hxx | 3
include/xmloff/xmlprmap.hxx | 26 -
include/xmloff/xmltoken.hxx | 3
liborcus/UnpackedTarball_liborcus.mk | 3
liborcus/liborcus-handle-invalid-xml.patch.1 | 12
linguistic/source/lngopt.hxx | 2
mysqlc/source/mysqlc_services.cxx | 7
odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/component.cxx | 8
odk/examples/DevelopersGuide/Components/CppComponent/service2_impl.cxx | 7
odk/examples/DevelopersGuide/Database/DriverSkeleton/SServices.cxx | 7
odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/fdcomp.cxx | 7
odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/FlatXml.cxx | 7
odk/examples/DevelopersGuide/examples.html | 4
odk/examples/cpp/complextoolbarcontrols/ListenerHelper.h | 9
odk/examples/cpp/complextoolbarcontrols/exports.cxx | 7
odk/examples/cpp/counter/counter.cxx | 8
odk/examples/cpp/custompanel/ctp_services.cxx | 8
odk/examples/cpp/remoteclient/remoteclient.cxx | 8
odk/settings/component.uno.def | 1
reportdesign/source/filter/xml/xmlExport.cxx | 12
reportdesign/source/filter/xml/xmlHelper.cxx | 16
reportdesign/source/filter/xml/xmlHelper.hxx | 2
reportdesign/source/filter/xml/xmlStyleImport.cxx | 2
reportdesign/source/filter/xml/xmlfilter.cxx | 8
sax/qa/cppunit/test_converter.cxx | 138 ++++++
sax/source/tools/converter.cxx | 223 +++++++---
sc/qa/unit/subsequent_export-test.cxx | 4
sc/source/filter/excel/excrecds.cxx | 30 -
sc/source/filter/oox/worksheetsettings.cxx | 30 -
sc/source/filter/xml/xmlcvali.cxx | 6
sc/source/filter/xml/xmlexprt.cxx | 10
sc/source/filter/xml/xmlimprt.cxx | 8
sc/source/filter/xml/xmlstyle.cxx | 12
sc/source/ui/view/tabvwsh.cxx | 1
sc/uiconfig/scalc/menubar/menubar.xml | 1
svl/source/items/dateitem.cxx | 6
svtools/source/contnr/imivctl1.cxx | 13
svtools/source/graphic/grfmgr.cxx | 3
svx/source/table/accessibletableshape.cxx | 6
svx/source/table/svdotable.cxx | 20
sw/inc/doc.hxx | 4
sw/inc/pagedesc.hxx | 10
sw/qa/extras/ooxmlimport/data/fdo65090.docx |binary
sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 12
sw/qa/extras/rtfimport/data/fdo65090.rtf | 6
sw/qa/extras/rtfimport/rtfimport.cxx | 12
sw/source/core/doc/docdesc.cxx | 97 +++-
sw/source/core/doc/docfld.cxx | 3
sw/source/core/doc/docfmt.cxx | 20
sw/source/core/doc/poolfmt.cxx | 5
sw/source/core/layout/frmtool.cxx | 13
sw/source/core/layout/pagedesc.cxx | 23 -
sw/source/core/text/EnhancedPDFExportHelper.cxx | 11
sw/source/core/text/txthyph.cxx | 12
sw/source/core/txtnode/fntcache.cxx | 8
sw/source/core/undo/SwUndoPageDesc.cxx | 46 +-
sw/source/core/unocore/unostyle.cxx | 4
sw/source/core/unocore/unotbl.cxx | 2
sw/source/filter/html/htmlfld.cxx | 5
sw/source/filter/ww8/wrtw8sty.cxx | 2
sw/source/filter/ww8/ww8atr.cxx | 2
sw/source/filter/ww8/ww8par.cxx | 8
sw/source/filter/ww8/ww8par6.cxx | 8
sw/source/ui/uiview/view0.cxx | 1
sw/uiconfig/sglobal/menubar/menubar.xml | 1
sw/uiconfig/sweb/menubar/menubar.xml | 1
sw/uiconfig/swform/menubar/menubar.xml | 1
sw/uiconfig/swreport/menubar/menubar.xml | 1
sw/uiconfig/swriter/menubar/menubar.xml | 1
sw/uiconfig/swxform/menubar/menubar.xml | 1
vcl/aqua/source/app/salinst.cxx | 1
vcl/source/gdi/gdimtf.cxx | 14
vcl/unx/generic/printer/cupsmgr.cxx | 2
wizards/source/euro/AutoPilotRun.xba | 60 --
writerfilter/source/dmapper/DomainMapperTableHandler.cxx | 43 +
writerfilter/source/dmapper/DomainMapperTableHandler.hxx | 17
writerfilter/source/dmapper/DomainMapperTableManager.cxx | 8
writerfilter/source/dmapper/PropertyIds.cxx | 1
writerfilter/source/dmapper/PropertyIds.hxx | 1
writerfilter/source/rtftok/rtfdocumentimpl.cxx | 12
xmloff/inc/XMLChartPropertySetMapper.hxx | 4
xmloff/inc/txtflde.hxx | 6
xmloff/qa/unit/uxmloff.cxx | 2
xmloff/source/chart/PropertyMap.hxx | 16
xmloff/source/chart/PropertyMaps.cxx | 4
xmloff/source/chart/SchXMLExport.cxx | 2
xmloff/source/core/xmlexp.cxx | 3
xmloff/source/core/xmlimp.cxx | 2
xmloff/source/core/xmltoken.cxx | 2
xmloff/source/draw/sdpropls.cxx | 11
xmloff/source/draw/sdpropls.hxx | 2
xmloff/source/draw/sdxmlexp.cxx | 4
xmloff/source/draw/shapeexport.cxx | 4
xmloff/source/draw/shapeimport.cxx | 8
xmloff/source/forms/controlpropertymap.cxx | 8
xmloff/source/forms/layerexport.cxx | 2
xmloff/source/style/PageMasterPropMapper.cxx | 9
xmloff/source/style/PageMasterPropMapper.hxx | 5
xmloff/source/style/PageMasterStyleMap.cxx | 4
xmloff/source/style/XMLPageExport.cxx | 2
xmloff/source/style/xmlnumfe.cxx | 2
xmloff/source/style/xmlnumfi.cxx | 3
xmloff/source/style/xmlprmap.cxx | 38 +
xmloff/source/style/xmlstyle.cxx | 4
xmloff/source/table/XMLTableExport.cxx | 8
xmloff/source/table/XMLTableImport.cxx | 5
xmloff/source/text/XMLTextHeaderFooterContext.cxx | 1
xmloff/source/text/XMLTextMasterPageExport.cxx | 24 -
xmloff/source/text/txtflde.cxx | 62 ++
xmloff/source/text/txtfldi.cxx | 6
xmloff/source/text/txtimp.cxx | 25 -
xmloff/source/text/txtparae.cxx | 20
xmloff/source/text/txtprmap.cxx | 28 -
xmloff/source/text/txtstyle.cxx | 4
135 files changed, 1240 insertions(+), 498 deletions(-)
New commits:
commit b4d7387e326f898f359a4f15e4b58bfbf508a54e
Author: Eike Rathke <erack at redhat.com>
Date: Fri Jan 3 00:34:06 2014 +0100
die binfilter die die die
Euro Converter tried to obtain filters for names of binary filters that
don't exist anymore and can't be resolved hence the TypeDetection
GetByName() bailed out with an exception when calling the file picker
(e.g. when attempting to select a document), stopping in Basic
environment and effectively rendering the wizard useless.
Change-Id: Ifdef6f59abdc16bedd0f54ec317dc44af8f1e628
(cherry picked from commit e625d00439f725b01f3818859e95e431e6173d57)
Reviewed-on: https://gerrit.libreoffice.org/7264
Reviewed-by: Andras Timar <andras.timar at collabora.com>
Tested-by: Andras Timar <andras.timar at collabora.com>
diff --git a/wizards/source/euro/AutoPilotRun.xba b/wizards/source/euro/AutoPilotRun.xba
index 47d7959..fe2bed7 100644
--- a/wizards/source/euro/AutoPilotRun.xba
+++ b/wizards/source/euro/AutoPilotRun.xba
@@ -28,7 +28,7 @@ Public Source as String
Public SubstFile as String
Public SubstDir as String
Public NoArgs()
-Public TypeList(14) as String
+Public TypeList(6) as String
Public GoOn as Boolean
Public DoUnprotect as Integer
Public Password as String
@@ -74,21 +74,13 @@ Dim bDisposable as Boolean
TargetStemDir = TargetDir
TypeList(0) = "calc8"
TypeList(1) = "calc_StarOffice_XML_Calc"
- TypeList(2) = "calc_StarCalc_30"
- TypeList(3) = "calc_StarCalc_40"
- TypeList(4) = "calc_StarCalc_50"
If DialogModel.chkTextDocuments.State = 1 Then
- ReDim Preserve TypeList(13) as String
-
- TypeList(5) = "writer8"
- TypeList(6) = "writerglobal8"
- TypeList(7) = "writer_StarOffice_XML_Writer"
- TypeList(8) = "writer_globaldocument_StarOffice_XML_Writer_GlobalDocument"
- TypeList(9) = "writer_StarWriter_30"
- TypeList(10) = "writer_StarWriter_40"
- TypeList(11) = "writer_globaldocument_StarWriter_40GlobalDocument"
- TypeList(12) = "writer_StarWriter_50"
- TypeList(13) = "writer_globaldocument_StarWriter_50GlobalDocument"
+ ReDim Preserve TypeList(5) as String
+
+ TypeList(2) = "writer8"
+ TypeList(3) = "writerglobal8"
+ TypeList(4) = "writer_StarOffice_XML_Writer"
+ TypeList(5) = "writer_globaldocument_StarOffice_XML_Writer_GlobalDocument"
End If
FilesList() = ReadDirectories(SourceDir, bRecursive, True, False, TypeList())
TotDocCount = Ubound(FilesList(),1) + 1
@@ -387,34 +379,26 @@ Sub CallFilePicker()
oTypes() = oMasterKey.Types
oUIKey = GetRegistryKeyContent("org.openoffice.Office.UI/FilterClassification/LocalFilters")
If DialogModel.chkTextDocuments.State = 1 Then
- Dim FilterNames(11,1) as String
- FilterNames(6,0) = oTypes.GetByName("writer_StarOffice_XML_Writer").UIName
- FilterNames(6,1) = "*.sxw"
- FilterNames(7,0) = oTypes.GetByName("writer_StarOffice_XML_Writer_Template").UIName
- FilterNames(7,1) = "*.stw"
- FilterNames(8,0) = oUIKey.Classes.GetByName("sw3to5").DisplayName
- FilterNames(8,1) = "*.sdw"
- FilterNames(9,0) = oUIKey.Classes.GetByName("sw3to5templ").DisplayName
- Filternames(9,1) = "*.vor"
- FilterNames(10,0) = oTypes.GetByName("writer8").UIName
- FilterNames(10,1) = "*.odt"
- FilterNames(11,0) = oTypes.GetByName("writer8_template").UIName
- FilterNames(11,1) = "*.ott"
+ Dim FilterNames(7,1) as String
+ FilterNames(4,0) = oTypes.GetByName("writer_StarOffice_XML_Writer").UIName
+ FilterNames(4,1) = "*.sxw"
+ FilterNames(5,0) = oTypes.GetByName("writer_StarOffice_XML_Writer_Template").UIName
+ FilterNames(5,1) = "*.stw"
+ FilterNames(6,0) = oTypes.GetByName("writer8").UIName
+ FilterNames(6,1) = "*.odt"
+ FilterNames(7,0) = oTypes.GetByName("writer8_template").UIName
+ FilterNames(7,1) = "*.ott"
Else
- ReDim FilterNames(5,1) as String
+ ReDim FilterNames(3,1) as String
End If
- FilterNames(0,0) = oTypes.GetByName("calc_StarOffice_XML_Calc").UIName
+ FilterNames(0,0) = oTypes.GetByName("calc_StarOffice_XML_Calc").UIName
Filternames(0,1) = "*.sxc"
FilterNames(1,0) = oTypes.GetByName("calc_StarOffice_XML_Calc_Template").UIName
Filternames(1,1) = "*.stc"
- FilterNames(2,0) = oUIKey.Classes.GetByName("sc345").DisplayName
- FilterNames(2,1) = "*.sdc"
- FilterNames(3,0) = oUIKey.Classes.GetByName("sc345templ").DisplayName
- Filternames(3,1) = "*.vor"
- FilterNames(4,0) = oTypes.GetByName("calc8").UIName
- Filternames(4,1) = "*.ods"
- FilterNames(5,0) = oTypes.GetByName("calc8_template").UIName
- Filternames(5,1) = "*.ots"
+ FilterNames(2,0) = oTypes.GetByName("calc8").UIName
+ Filternames(2,1) = "*.ods"
+ FilterNames(3,0) = oTypes.GetByName("calc8_template").UIName
+ Filternames(3,1) = "*.ots"
GetFileName(DialogModel.txtSource, Filternames())
Else
GetFolderName(DialogModel.txtSource)
commit 3c102b7b3413a3cd95a4211cd9118708ff810887
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Wed Oct 9 12:06:41 2013 +0200
Make CalcFocusRect look right
...at least for its (only, it appears) uses at the left of the "Insert -
Hyperlink" dialog and at the left of a Database window. As aBmpRect and
aTextRect never extend aBoundRect (and aTextRect always leaving a gap left and
right towards aBoundRect, it appears, with the text abbreviated with an ellipsis
if it would be too wide), there should be no need to eventually adjust "the
focus rectangle [to] not touch the text," and for calculating the top of the
focus rect aBoundRect can be used just as well as aBmpRect. (Though for
calculating the bottom, aBoundRect apparently stretches "too far" compareed to
aTextRect; whatever... The offsets look somewhat "magic" anyway, but appear to
produce the desired visual results.)
Change-Id: Ic324561294fb6172c0d02a697fc261717e01c87c
Reviewed-on: https://gerrit.libreoffice.org/6165
Reviewed-by: Eike Rathke <erack at redhat.com>
Tested-by: Eike Rathke <erack at redhat.com>
(cherry picked from commit 143bb92761f54cb7b8e41e5ac83bd274d4f7079b)
Signed-off-by: Eike Rathke <erack at redhat.com>
diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx
index 01f733d..b0ea082 100644
--- a/svtools/source/contnr/imivctl1.cxx
+++ b/svtools/source/contnr/imivctl1.cxx
@@ -2703,18 +2703,11 @@ const Size& SvxIconChoiceCtrl_Impl::GetItemSize( SvxIconChoiceCtrlEntry*,
Rectangle SvxIconChoiceCtrl_Impl::CalcFocusRect( SvxIconChoiceCtrlEntry* pEntry )
{
- Rectangle aBmpRect( CalcBmpRect( pEntry ) );
Rectangle aTextRect( CalcTextRect( pEntry ) );
Rectangle aBoundRect( GetEntryBoundRect( pEntry ) );
- Rectangle aFocusRect( aBoundRect.Left(), aBmpRect.Top() - 1,
- aBoundRect.Right() - 4, aTextRect.Bottom() + 1 );
- // the focus rectangle should not touch the text
- if( aFocusRect.Left() > ::std::numeric_limits<long>::min() && aFocusRect.Left() - 1 >= pEntry->aRect.Left() )
- aFocusRect.Left()--;
- if( aFocusRect.Right() < ::std::numeric_limits<long>::max() && aFocusRect.Right() + 1 <= pEntry->aRect.Right() )
- aFocusRect.Right()++;
-
- return aFocusRect;
+ return Rectangle(
+ aBoundRect.Left(), aBoundRect.Top() - 1, aBoundRect.Right() - 1,
+ aTextRect.Bottom() + 1);
}
// the hot spot is the inner 50 % of the rectangle
commit 50023f92a93d4e3684353ddea4244e4cf06dce1e
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Wed Jan 1 21:39:13 2014 +0100
Resolves: fdo#72464 Character line break is set to 0 Options/.../Writing Aids
Change-Id: I9f3d1c64fde064fc7ba9bdfcb9e35032a0c40255
Reviewed-on: https://gerrit.libreoffice.org/7253
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/linguistic/source/lngopt.hxx b/linguistic/source/lngopt.hxx
index c4bbc6c..c6d0bc6 100644
--- a/linguistic/source/lngopt.hxx
+++ b/linguistic/source/lngopt.hxx
@@ -149,7 +149,7 @@ public:
virtual void SAL_CALL setIsSpellCapitalization(sal_Bool p1) throw (css::uno::RuntimeException)
{ setProperty(UPN_IS_SPELL_CAPITALIZATION, p1); }
virtual sal_Int16 SAL_CALL getHyphMinLeading() throw (css::uno::RuntimeException)
- { return getPropertyBool(UPN_HYPH_MIN_LEADING); }
+ { return getPropertyInt16(UPN_HYPH_MIN_LEADING); }
virtual void SAL_CALL setHyphMinLeading(sal_Int16 p1) throw (css::uno::RuntimeException)
{ setProperty(UPN_HYPH_MIN_LEADING, p1); }
virtual sal_Int16 SAL_CALL getHyphMinTrailing() throw (css::uno::RuntimeException)
commit aa0970d263d6adc1411a0fea0a2f9eef9fb2337b
Author: Michael Meeks <michael.meeks at collabora.com>
Date: Tue Dec 31 10:07:20 2013 +0000
fdo#39007: blind fix for renamed OS X restore-state file
Remove also a potential restorecount.txt file (as reported in the bug) in addition to a potential restorecount.plist.
Change-Id: I96fb688e9dda804f240cad8f2109c5880b544302
Reviewed-on: https://gerrit.libreoffice.org/7239
Reviewed-by: Tor Lillqvist <tml at collabora.com>
Tested-by: Tor Lillqvist <tml at collabora.com>
Signed-off-by: Tor Lillqvist <tml at collabora.com>
diff --git a/vcl/aqua/source/app/salinst.cxx b/vcl/aqua/source/app/salinst.cxx
index 790b987..6ac7094 100644
--- a/vcl/aqua/source/app/salinst.cxx
+++ b/vcl/aqua/source/app/salinst.cxx
@@ -198,6 +198,7 @@ static void initNSApp()
sal_Bool ImplSVMainHook( int * pnInit )
{
unlink([[NSString stringWithFormat:@"%@/Library/Saved Application State/%s.savedState/restorecount.plist", NSHomeDirectory(), MACOSX_BUNDLE_IDENTIFIER] UTF8String]);
+ unlink([[NSString stringWithFormat:@"%@/Library/Saved Application State/%s.savedState/restorecount.txt", NSHomeDirectory(), MACOSX_BUNDLE_IDENTIFIER] UTF8String]);
gpnInit = pnInit;
commit b47839bf85754b27f5a33e12f6b24fa5d0202a67
Author: Andrzej Hunt <andrzej.hunt at collabora.com>
Date: Wed Jan 1 17:07:56 2014 +0000
EMF+: mapping can rotate the width vector, so use resulting length.
Otherwise (i.e. with non-vertical lines) the width will be incorrect,
and can result in lines disappearing as the resulting X component
can be tiny/approaching zero.
Change-Id: Icf3b7c10c627594600b517b8ff445f8df87c56f8
(cherry picked from commit 83f2b3c590120a60b5e94fb1a15054ebe0745dbb)
Reviewed-on: https://gerrit.libreoffice.org/7249
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx
index a247f4f..07d8f6e 100644
--- a/cppcanvas/source/mtfrenderer/emfplus.cxx
+++ b/cppcanvas/source/mtfrenderer/emfplus.cxx
@@ -789,7 +789,7 @@ namespace cppcanvas
SAL_INFO ("cppcanvas.emf", "TODO: pen with zero width - using minimal which might not be correct\n");
}
#endif
- rStrokeAttributes.StrokeWidth = fabs((rState.mapModeTransform * rR.MapSize (width == 0.0 ? 0.05 : width, 0)).getX());
+ rStrokeAttributes.StrokeWidth = fabs((rState.mapModeTransform * rR.MapSize (width == 0.0 ? 0.05 : width, 0)).getLength());
}
void SetStrokeAttributes(rendering::StrokeAttributes& rStrokeAttributes)
commit 148ad3353454c4e00978d3a28dc7f3809375a1e4
Author: Andrzej Hunt <andrzej.hunt at collabora.com>
Date: Wed Jan 1 17:36:54 2014 +0000
EMF+: actually use lineJoin attribute for polygons.
Change-Id: I5b369703333332598353d9817f0253bbe5fc3601
(cherry picked from commit 9b1ceabd5f696500d4fe2acb89170bd987966a9b)
Reviewed-on: https://gerrit.libreoffice.org/7248
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx
index 01ea3c6..a247f4f 100644
--- a/cppcanvas/source/mtfrenderer/emfplus.cxx
+++ b/cppcanvas/source/mtfrenderer/emfplus.cxx
@@ -620,6 +620,19 @@ namespace cppcanvas
return rendering::PathCapType::BUTT;
}
+ sal_Int8 lcl_convertLineJoinType(sal_uInt32 nEmfLineJoin)
+ {
+ switch (nEmfLineJoin)
+ {
+ case EmfPlusLineJoinTypeMiter: // fall-through
+ case EmfPlusLineJoinTypeMiterClipped: return rendering::PathJoinType::MITER;
+ case EmfPlusLineJoinTypeBevel: return rendering::PathJoinType::BEVEL;
+ case EmfPlusLineJoinTypeRound: return rendering::PathJoinType::ROUND;
+ }
+ assert(false); // Line Join type isn't in specification.
+ return 0;
+ }
+
struct EMFPCustomLineCap : public EMFPObject
{
sal_uInt32 type;
@@ -641,14 +654,7 @@ namespace cppcanvas
{
aAttributes.StartCapType = lcl_convertStrokeCap(strokeStartCap);
aAttributes.EndCapType = lcl_convertStrokeCap(strokeEndCap);
-
- switch (strokeJoin)
- {
- case EmfPlusLineJoinTypeMiter: // fall-through
- case EmfPlusLineJoinTypeMiterClipped: aAttributes.JoinType = rendering::PathJoinType::MITER; break;
- case EmfPlusLineJoinTypeBevel: aAttributes.JoinType = rendering::PathJoinType::BEVEL; break;
- case EmfPlusLineJoinTypeRound: aAttributes.JoinType = rendering::PathJoinType::ROUND; break;
- }
+ aAttributes.JoinType = lcl_convertLineJoinType(strokeJoin);
aAttributes.MiterLimit = miterLimit;
}
@@ -786,8 +792,10 @@ namespace cppcanvas
rStrokeAttributes.StrokeWidth = fabs((rState.mapModeTransform * rR.MapSize (width == 0.0 ? 0.05 : width, 0)).getX());
}
- void SetStrokeDashing(rendering::StrokeAttributes& rStrokeAttributes)
+ void SetStrokeAttributes(rendering::StrokeAttributes& rStrokeAttributes)
{
+ rStrokeAttributes.JoinType = lcl_convertLineJoinType(lineJoin);
+
if (dashStyle != EmfPlusLineStyleSolid)
{
const float dash[] = {3, 3};
@@ -1393,7 +1401,7 @@ namespace cppcanvas
// but eg. dashing has to be additionally set only on the
// polygon
rendering::StrokeAttributes aPolygonAttributes(aCommonAttributes);
- pen->SetStrokeDashing(aPolygonAttributes);
+ pen->SetStrokeAttributes(aPolygonAttributes);
basegfx::B2DPolyPolygon aFinalPolyPolygon;
commit b89d82438bd20808098ac7001cd192133864295b
Author: Andrzej Hunt <andrzej.hunt at collabora.com>
Date: Thu Dec 26 18:57:28 2013 +0000
EMF+: Integer coordinate values are signed.
Previously any coordinates with negative values would not be rendered
(as they would incorrectly appear to be outside the visible area).
(cherry picked from commit d8dedc775cedf0e9daf9284bc7e3a0331ccd2963)
Change-Id: I5babcec50d48dc2a6288a01685db61fbb7058680
Reviewed-on: https://gerrit.libreoffice.org/7247
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx
index 434ecd0..01ea3c6 100644
--- a/cppcanvas/source/mtfrenderer/emfplus.cxx
+++ b/cppcanvas/source/mtfrenderer/emfplus.cxx
@@ -169,8 +169,8 @@ namespace cppcanvas
{
for (int i = 0; i < nPoints; i ++) {
if (pathFlags & 0x4000) {
- // points are stored in short 16bit integer format
- sal_uInt16 x, y;
+ // points are stored in signed short 16bit integer format
+ sal_Int16 x, y;
s >> x >> y;
SAL_INFO ("cppcanvas.emf", "EMF+\tpoint [x,y]: " << x << "," << y);
commit 48c5674b494f1ef13396ca69fb33cce813855aa9
Author: Samuel Mehrbrodt <s.mehrbrodt at gmail.com>
Date: Sat Dec 7 12:14:40 2013 +0100
fdo#39206 Add support for image transformation in SVG Import
Change-Id: I268599b0c13bbacf5db526fed79453a5443145a5
Reviewed-on: https://gerrit.libreoffice.org/6968
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>
(cherry picked from commit fb978b8123a47123d184daf390ce17eaacbc05d9)
diff --git a/filter/source/svg/svgreader.cxx b/filter/source/svg/svgreader.cxx
index e74f669..e3f1af3 100644
--- a/filter/source/svg/svgreader.cxx
+++ b/filter/source/svg/svgreader.cxx
@@ -1421,7 +1421,7 @@ struct ShapeWritingVisitor
// collect attributes
const sal_Int32 nNumAttrs( xAttributes->getLength() );
OUString sAttributeValue;
- double x=0.0,y=0.0,width=0.0,height=0.0;
+ double x=0.0, y=0.0, width=0.0, height=0.0;
for( sal_Int32 i=0; i<nNumAttrs; ++i )
{
sAttributeValue = xAttributes->item(i)->getNodeValue();
@@ -1446,6 +1446,20 @@ struct ShapeWritingVisitor
break;
}
}
+ // extract basic transformations out of CTM
+ basegfx::B2DTuple aScale, aTranslate;
+ double fRotate, fShearX;
+ if (maCurrState.maCTM.decompose(aScale, aTranslate, fRotate, fShearX))
+ {
+ // apply transform
+ x *= aScale.getX();
+ width *= aScale.getX();
+ y *= aScale.getY();
+ height *= aScale.getY();
+ x += aTranslate.getX();
+ y += aTranslate.getY();
+ //TODO: Rotate
+ }
OUString sValue = xElem->hasAttribute("href") ? xElem->getAttribute("href") : "";
OString aValueUtf8( sValue.getStr(), sValue.getLength(), RTL_TEXTENCODING_UTF8 );
@@ -1508,6 +1522,7 @@ struct ShapeWritingVisitor
y *= aScale.getY();
x += aTranslate.getX();
y += aTranslate.getY();
+ //TODO: Rotate
}
else {
// some heuristic attempts to have text output
commit 93be3192420f7f222bedf83b56bffaa3c40259bc
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Sun Dec 29 19:06:11 2013 +0100
Resolves: fdo#72961 Crash when you open ODFver.1.0/1.1 created by LibO-3.5/3.6
It seems pAction may be NULL so let's keep on to check it.
Change-Id: Ie1a48c96bfa930364053c7c3ad0c940559544e33
Reviewed-on: https://gerrit.libreoffice.org/7228
Reviewed-by: Andrzej Hunt <andrzej.hunt at collabora.com>
Tested-by: Andrzej Hunt <andrzej.hunt at collabora.com>
(cherry picked from commit 6cc888babdc3e6414e55f57c0df65135f2ef4804)
diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx
index 1240500..90e691b 100644
--- a/vcl/source/gdi/gdimtf.cxx
+++ b/vcl/source/gdi/gdimtf.cxx
@@ -2765,15 +2765,17 @@ SvStream& operator>>( SvStream& rIStm, GDIMetaFile& rGDIMetaFile )
{
pAction = MetaAction::ReadMetaAction( rIStm, &aReadData );
- if (pAction->GetType() == META_COMMENT_ACTION)
- {
- MetaCommentAction* pCommentAct = static_cast<MetaCommentAction*>(pAction);
- if ( pCommentAct->GetComment() == "EMF_PLUS" )
- rGDIMetaFile.UseCanvas( sal_True );
- }
if( pAction )
+ {
+ if (pAction->GetType() == META_COMMENT_ACTION)
+ {
+ MetaCommentAction* pCommentAct = static_cast<MetaCommentAction*>(pAction);
+ if ( pCommentAct->GetComment() == "EMF_PLUS" )
+ rGDIMetaFile.UseCanvas( sal_True );
+ }
rGDIMetaFile.AddAction( pAction );
+ }
}
}
else
commit 7eeb09e2baba6ea9b3dbc0d567614871b371e285
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Fri Dec 27 20:46:50 2013 +0100
fdo#65090 RTF filter: import RTF_CLMGF and RTF_CLMRG
These describe an explicit horizontal merge, that is not something Word
itself creates, but it turns out the Calc RTF export does.
(cherry picked from commits bb562304c1e1c61a882e6db65806cfdf8601bcbf,
97dcf77841d19d344d58d5bdacdab141cdea4817 and
6eb02ac8a77f9f89f256b190281029f6cbd60d95)
Conflicts:
sw/qa/extras/ooxmlimport/ooxmlimport.cxx
writerfilter/source/dmapper/PropertyIds.cxx
writerfilter/source/dmapper/PropertyIds.hxx
writerfilter/source/rtftok/rtfdocumentimpl.cxx
Reviewed-on: https://gerrit.libreoffice.org/7220
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
Conflicts:
sw/qa/extras/ooxmlimport/ooxmlimport.cxx
sw/qa/extras/rtfimport/rtfimport.cxx
writerfilter/source/dmapper/PropertyIds.cxx
writerfilter/source/dmapper/PropertyIds.hxx
Change-Id: I1b6ec10bb8e8bd40e24791ccc96f2f066dd0d5d5
diff --git a/sw/qa/extras/ooxmlimport/data/fdo65090.docx b/sw/qa/extras/ooxmlimport/data/fdo65090.docx
new file mode 100644
index 0000000..4d45737
Binary files /dev/null and b/sw/qa/extras/ooxmlimport/data/fdo65090.docx differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index c5ccc89..e9be826 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -141,6 +141,7 @@ public:
void testFdo66474();
void testBnc780044Spacing();
void testRPrChangeClosed();
+ void testFdo65090();
CPPUNIT_TEST_SUITE(Test);
#if !defined(MACOSX) && !defined(WNT)
@@ -246,6 +247,7 @@ void Test::run()
{"fdo66474.docx", &Test::testFdo66474},
{"bnc780044_spacing.docx", &Test::testBnc780044Spacing},
{"rprchange_closed.docx",&Test::testRPrChangeClosed},
+ {"fdo65090.docx", &Test::testFdo65090},
};
header();
for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i)
@@ -1710,6 +1712,16 @@ void Test::testRPrChangeClosed()
CPPUNIT_ASSERT_EQUAL(false, hasProperty(getRun(getParagraph(2), 1), "RedlineType"));
}
+void Test::testFdo65090()
+{
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables( ), uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTextTable(xTables->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<table::XTableRows> xTableRows(xTextTable->getRows(), uno::UNO_QUERY);
+ // The first row had two cells, instead of a single horizontally merged one.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty< uno::Sequence<text::TableColumnSeparator> >(xTableRows->getByIndex(0), "TableColumnSeparators").getLength());
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/qa/extras/rtfimport/data/fdo65090.rtf b/sw/qa/extras/rtfimport/data/fdo65090.rtf
new file mode 100644
index 0000000..8a3eabd
--- /dev/null
+++ b/sw/qa/extras/rtfimport/data/fdo65090.rtf
@@ -0,0 +1,6 @@
+{\rtf\ansi
+{
+\trowd\trgaph30\trleft-30\trrh242\clmgf\clvertalc\cellx1280\clmrg\clvertalb\cellx2560\clvertalb\cellx3840\pard\plain\intbl
+\qc a\cell\cell\ql b\cell\row
+}
+}
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx
index c971ed6..f8989da 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -162,6 +162,7 @@ public:
void testFdo68291();
void testFdo69384();
void testFdo70221();
+ void testFdo65090();
void testN823675();
void testCp1000018();
@@ -309,6 +310,7 @@ void Test::run()
{"fdo68291.odt", &Test::testFdo68291},
{"hello.rtf", &Test::testFdo69384},
{"fdo70221.rtf", &Test::testFdo70221},
+ {"fdo65090.rtf", &Test::testFdo65090},
{"n823675.rtf", &Test::testN823675},
{"cp1000018.rtf", &Test::testCp1000018},
};
@@ -1523,6 +1525,16 @@ void Test::testCp1000018()
CPPUNIT_ASSERT_EQUAL(aExpected, xTextRange->getString());
}
+void Test::testFdo65090()
+{
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables( ), uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTextTable(xTables->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<table::XTableRows> xTableRows(xTextTable->getRows(), uno::UNO_QUERY);
+ // The first row had 3 cells, instead of a horizontally merged one and a normal one (2 -> 1 separator).
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), getProperty< uno::Sequence<text::TableColumnSeparator> >(xTableRows->getByIndex(0), "TableColumnSeparators").getLength());
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx
index 49fc1a3..3fd2350 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -1709,7 +1709,7 @@ sal_Bool SwXTextTableCursor::mergeRange(void) throw( uno::RuntimeException )
if(bRet)
{
size_t nCount = pTblCrsr->GetSelectedBoxesCount();
- while (--nCount)
+ while (nCount--)
{
pTblCrsr->DeleteBox(nCount);
}
diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
index b613c07..28be09c 100644
--- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
@@ -536,7 +536,7 @@ TableStyleSheetEntry * DomainMapperTableHandler::endTableGetTableStyle(TableInfo
#define CNF_LAST_ROW_LAST_COLUMN 0x002
#define CNF_LAST_ROW_FIRST_COLUMN 0x001
-CellPropertyValuesSeq_t DomainMapperTableHandler::endTableGetCellProperties(TableInfo & rInfo)
+CellPropertyValuesSeq_t DomainMapperTableHandler::endTableGetCellProperties(TableInfo & rInfo, std::vector<HorizontallyMergedCell>& rMerges)
{
#ifdef DEBUG_DMAPPER_TABLE_HANDLER
dmapper_logger->startElement("getCellProperties");
@@ -692,6 +692,25 @@ CellPropertyValuesSeq_t DomainMapperTableHandler::endTableGetCellProperties(Tabl
aCellIterator->get()->Insert( PROP_BOTTOM_BORDER_DISTANCE, false,
uno::makeAny((sal_Int32) rInfo.nBottomBorderDistance ) );
+ // Horizontal merge is not an UNO property, extract that info here to rMerges, and then remove it from the map.
+ const PropertyMap::const_iterator aHorizontalMergeIter = aCellIterator->get()->find(PropertyDefinition(PROP_HORIZONTAL_MERGE, false));
+ if (aHorizontalMergeIter != aCellIterator->get()->end())
+ {
+ if (aHorizontalMergeIter->second.get<sal_Bool>())
+ {
+ // first cell in a merge
+ HorizontallyMergedCell aMerge(nRow, nCell);
+ rMerges.push_back(aMerge);
+ }
+ else if (!rMerges.empty())
+ {
+ // resuming an earlier merge
+ HorizontallyMergedCell& rMerge = rMerges.back();
+ rMerge.m_nLastRow = nRow;
+ rMerge.m_nLastCol = nCell;
+ }
+ aCellIterator->get()->erase(PropertyDefinition(PROP_HORIZONTAL_MERGE, false));
+ }
pSingleCellProperties[nCell] = aCellIterator->get()->GetPropertyValues();
#ifdef DEBUG_DMAPPER_TABLE_HANDLER
dmapper_logger->endElement();
@@ -804,7 +823,8 @@ void DomainMapperTableHandler::endTable(unsigned int nestedTableLevel)
aTableInfo.pTableStyle = endTableGetTableStyle(aTableInfo, aFrameProperties);
// expands to uno::Sequence< Sequence< beans::PropertyValues > >
- CellPropertyValuesSeq_t aCellProperties = endTableGetCellProperties(aTableInfo);
+ std::vector<HorizontallyMergedCell> aMerges;
+ CellPropertyValuesSeq_t aCellProperties = endTableGetCellProperties(aTableInfo, aMerges);
RowPropertyValuesSeq_t aRowProperties = endTableGetRowProperties();
@@ -837,8 +857,27 @@ void DomainMapperTableHandler::endTable(unsigned int nestedTableLevel)
aTableInfo.aTableProperties);
if (xTable.is())
+ {
m_xTableRange = xTable->getAnchor( );
+ if (!aMerges.empty())
+ {
+ // Perform horizontal merges in reverse order, so the fact that merging changes the position of cells won't cause a problem for us.
+ for (std::vector<HorizontallyMergedCell>::reverse_iterator it = aMerges.rbegin(); it != aMerges.rend(); ++it)
+ {
+ uno::Reference<table::XCellRange> xCellRange(xTable, uno::UNO_QUERY_THROW);
+ uno::Reference<beans::XPropertySet> xCell(xCellRange->getCellByPosition(it->m_nFirstCol, it->m_nFirstRow), uno::UNO_QUERY_THROW);
+ OUString aFirst = xCell->getPropertyValue("CellName").get<OUString>();
+ xCell.set(xCellRange->getCellByPosition(it->m_nLastCol, it->m_nLastRow), uno::UNO_QUERY_THROW);
+ OUString aLast = xCell->getPropertyValue("CellName").get<OUString>();
+
+ uno::Reference<text::XTextTableCursor> xCursor = xTable->createCursorByCellName(aFirst);
+ xCursor->gotoCellByName(aLast, true);
+ xCursor->mergeRange();
+ }
+ }
+ }
+
// OOXML table style may container paragraph properties, apply these now.
for (int i = 0; i < aTableInfo.aTableProperties.getLength(); ++i)
{
diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.hxx b/writerfilter/source/dmapper/DomainMapperTableHandler.hxx
index 792b978..6b284f7 100644
--- a/writerfilter/source/dmapper/DomainMapperTableHandler.hxx
+++ b/writerfilter/source/dmapper/DomainMapperTableHandler.hxx
@@ -50,6 +50,21 @@ typedef std::vector<PropertyMapVector1> PropertyMapVector2;
class DomainMapper_Impl;
class TableStyleSheetEntry;
struct TableInfo;
+
+/// A horizontally merged cell is in fact a range of cells till its merge is performed.
+struct HorizontallyMergedCell
+{
+ sal_Int32 m_nFirstRow;
+ sal_Int32 m_nFirstCol;
+ sal_Int32 m_nLastRow;
+ sal_Int32 m_nLastCol;
+ HorizontallyMergedCell(sal_Int32 nFirstRow, sal_Int32 nFirstCol)
+ : m_nFirstRow(nFirstRow),
+ m_nFirstCol(nFirstCol)
+ {
+ }
+};
+
class WRITERFILTER_DLLPRIVATE DomainMapperTableHandler : public TableDataHandler<Handle_t , TablePropertyMapPtr >
{
TextReference_t m_xText;
@@ -69,7 +84,7 @@ class WRITERFILTER_DLLPRIVATE DomainMapperTableHandler : public TableDataHandler
sal_Int32 m_nRowIndex;
TableStyleSheetEntry * endTableGetTableStyle(TableInfo & rInfo, uno::Sequence<beans::PropertyValue>& rFrameProperties);
- CellPropertyValuesSeq_t endTableGetCellProperties(TableInfo & rInfo);
+ CellPropertyValuesSeq_t endTableGetCellProperties(TableInfo & rInfo, std::vector<HorizontallyMergedCell>& rMerges);
RowPropertyValuesSeq_t endTableGetRowProperties();
public:
diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.cxx b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
index d86693a..d2380a2 100644
--- a/writerfilter/source/dmapper/DomainMapperTableManager.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
@@ -302,6 +302,14 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm)
cellProps( pMergeProps);
}
break;
+ case NS_ooxml::LN_CT_TcPrBase_hMerge:
+ {
+ // values can be: LN_Value_ST_Merge_restart, LN_Value_ST_Merge_continue, in reality the second one is a 0
+ TablePropertyMapPtr pMergeProps(new TablePropertyMap());
+ pMergeProps->Insert(PROP_HORIZONTAL_MERGE, false, uno::makeAny(bool(sal::static_int_cast<Id>(nIntValue) == NS_ooxml::LN_Value_ST_Merge_restart)));
+ cellProps(pMergeProps);
+ }
+ break;
case NS_ooxml::LN_CT_TcPrBase_gridSpan: //number of grid positions spanned by this cell
{
#ifdef DEBUG_DOMAINMAPPER
diff --git a/writerfilter/source/dmapper/PropertyIds.cxx b/writerfilter/source/dmapper/PropertyIds.cxx
index 1c8f129..4fb61af 100644
--- a/writerfilter/source/dmapper/PropertyIds.cxx
+++ b/writerfilter/source/dmapper/PropertyIds.cxx
@@ -326,6 +326,7 @@ const OUString& PropertyNameSupplier::GetName( PropertyIds eId ) const
case PROP_GRAPHIC_BITMAP: sName = "GraphicBitmap"; break;
case PROP_LABEL_CATEGORY: sName = "LabelCategory"; break;
case PROP_SURROUND_TEXT_WRAP_SMALL: sName = "SurroundTextWrapSmall"; break;
+ case PROP_HORIZONTAL_MERGE: sName = "HorizontalMerge"; break;
}
::std::pair<PropertyNameMap_t::iterator,bool> aInsertIt =
m_pImpl->aNameMap.insert( PropertyNameMap_t::value_type( eId, sName ));
diff --git a/writerfilter/source/dmapper/PropertyIds.hxx b/writerfilter/source/dmapper/PropertyIds.hxx
index c4ba7f55..a10a0f6 100644
--- a/writerfilter/source/dmapper/PropertyIds.hxx
+++ b/writerfilter/source/dmapper/PropertyIds.hxx
@@ -297,6 +297,7 @@ enum PropertyIds
,PROP_GRAPHIC_URL
,PROP_GRAPHIC_BITMAP
,PROP_SURROUND_TEXT_WRAP_SMALL
+ ,PROP_HORIZONTAL_MERGE
};
struct PropertyNameSupplier_Impl;
class PropertyNameSupplier
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index cc34b8a..da6ce92 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -2386,6 +2386,18 @@ int RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
m_aStates.top().nBorderState = BORDER_PARAGRAPH;
}
break;
+ case RTF_CLMGF:
+ {
+ RTFValue::Pointer_t pValue(new RTFValue(NS_ooxml::LN_Value_ST_Merge_restart));
+ m_aStates.top().aTableCellSprms.set(NS_ooxml::LN_CT_TcPrBase_hMerge, pValue);
+ }
+ break;
+ case RTF_CLMRG:
+ {
+ RTFValue::Pointer_t pValue(new RTFValue(NS_ooxml::LN_Value_ST_Merge_continue));
+ m_aStates.top().aTableCellSprms.set(NS_ooxml::LN_CT_TcPrBase_hMerge, pValue);
+ }
+ break;
case RTF_CLVMGF:
{
RTFValue::Pointer_t pValue(new RTFValue(NS_ooxml::LN_Value_ST_Merge_restart));
commit 87a55d8d89b7534b18584b4dc422914ed6e4662b
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date: Sat Dec 21 10:37:11 2013 +0100
fdo#72916 correct rounding of time part of DateTime
Change-Id: I135478755f9e5a844119129b470fef8de2cd0409
diff --git a/connectivity/source/commontools/dbconversion.cxx b/connectivity/source/commontools/dbconversion.cxx
index 847f45f..15276a6 100644
--- a/connectivity/source/commontools/dbconversion.cxx
+++ b/connectivity/source/commontools/dbconversion.cxx
@@ -28,6 +28,7 @@
#include <com/sun/star/util/Time.hpp>
#include <com/sun/star/util/DateTime.hpp>
#include <rtl/ustrbuf.hxx>
+#include <rtl/math.hxx>
#include <unotools/datetime.hxx>
#include <sstream>
#include <iomanip>
@@ -355,10 +356,15 @@ namespace dbtools
return aRet;
}
// -------------------------------------------------------------------------
- utl::Time DBTypeConversion::toTime(double dVal)
+ utl::Time DBTypeConversion::toTime(double dVal, short nDigits)
{
sal_Int32 nDays = (sal_Int32)dVal;
- sal_Int64 nNS = static_cast<sal_Int64>((dVal - (double)nDays) * fNanoSecondsPerDay + 0.5);
+ sal_Int64 nNS;
+ {
+ double fSeconds((dVal - (double)nDays) * (fNanoSecondsPerDay / nanoSecInSec));
+ fSeconds = ::rtl::math::round( fSeconds, nDigits );
+ nNS = fSeconds * nanoSecInSec;
+ }
sal_Int16 nSign;
if ( nNS < 0 )
@@ -401,7 +407,11 @@ namespace dbtools
utl::DateTime DBTypeConversion::toDateTime(double dVal, const utl::Date& _rNullDate)
{
utl::Date aDate = toDate(dVal, _rNullDate);
- utl::Time aTime = toTime(dVal);
+ // there is not enough precision in a double to have both a date
+ // and a time up to nanoseconds -> limit to microseconds to have
+ // correct rounding, that is e.g. 13:00:00.000000000 instead of
+ // 12:59:59.999999790
+ utl::Time aTime = toTime(dVal, 6);
utl::DateTime xRet;
diff --git a/include/connectivity/dbconversion.hxx b/include/connectivity/dbconversion.hxx
index 9536c79..b11442b 100644
--- a/include/connectivity/dbconversion.hxx
+++ b/include/connectivity/dbconversion.hxx
@@ -105,7 +105,7 @@ namespace dbtools
static ::com::sun::star::util::Date toDate(double dVal, const ::com::sun::star::util::Date& _rNullDate = getStandardDate());
static ::com::sun::star::util::Date toDate(const OUString& _sSQLDate);
- static ::com::sun::star::util::Time toTime(double dVal);
+ static ::com::sun::star::util::Time toTime(double dVal, short nDigits = 9);
static ::com::sun::star::util::Time toTime(const OUString& _sSQLDate);
static ::com::sun::star::util::DateTime toDateTime(double dVal, const ::com::sun::star::util::Date& _rNullDate = getStandardDate());
static ::com::sun::star::util::DateTime toDateTime(const OUString& _sSQLDate);
commit 57fc0fa914d4c9d002f4059235b1fc56c40d7227
Author: Khaled Hosny <khaledhosny at eglug.org>
Date: Sun Dec 22 01:02:19 2013 +0200
fdo#67370: Hyphens are not visible in tagged PDF
One requirement of tagged PDF is to represent automatically inserted
hyphens using the soft hyphen (U+00AD) character, so we were doing this
by simply passing that character to text layout code when exporting a
tagged PDF (which is the literal suggestion of old PDF specification).
This is wrong, though, since the soft hyphen is a control character and
should not have a visible output by itself (and fonts might not even
have a visible glyph there), but this happened to work because non of
the layout engines we are using treated soft hyphen specially and was
just showing whatever glyph the font had there. This broke with the
switch to HarfBuzz since it will not show any visible glyph for Unicode
control characters (by default), which is the right thing to do.
Latest versions of PDF spec suggest using either ToUnicode mapping or an
ActualText text entry to encode the soft hyphen instead, I found it
easier to use ActualText since we already have code that handles
non-standard hyphenation using it already.
Conflicts:
sw/source/core/text/EnhancedPDFExportHelper.cxx
sw/source/core/text/txthyph.cxx
Change-Id: I88deadf3a806f69775b2e0ccff2f9b2f61a0f2e2
Reviewed-on: https://gerrit.libreoffice.org/7177
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx
index 3933837..9538de6 100644
--- a/sw/source/core/text/EnhancedPDFExportHelper.cxx
+++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx
@@ -766,7 +766,8 @@ void SwTaggedPDFHelper::SetAttributes( vcl::PDFWriter::StructElement eType )
case vcl::PDFWriter::Span :
case vcl::PDFWriter::Quote :
case vcl::PDFWriter::Code :
- if( POR_HYPHSTR == pPor->GetWhichPor() || POR_SOFTHYPHSTR == pPor->GetWhichPor() )
+ if( POR_HYPHSTR == pPor->GetWhichPor() || POR_SOFTHYPHSTR == pPor->GetWhichPor() ||
+ POR_HYPH == pPor->GetWhichPor() || POR_SOFTHYPH == pPor->GetWhichPor() )
bActualText = true;
else
{
@@ -789,7 +790,11 @@ void SwTaggedPDFHelper::SetAttributes( vcl::PDFWriter::StructElement eType )
if ( bActualText )
{
- const String aActualTxt( rInf.GetTxt(), rInf.GetIdx(), pPor->GetLen() );
+ String aActualTxt;
+ if (pPor->GetWhichPor() == POR_SOFTHYPH || pPor->GetWhichPor() == POR_HYPH)
+ aActualTxt = (sal_Unicode)0xad; // soft hyphen
+ else
+ aActualTxt = String(rInf.GetTxt(), rInf.GetIdx(), pPor->GetLen());
mpPDFExtOutDevData->SetActualText( aActualTxt );
}
@@ -1373,6 +1378,8 @@ void SwTaggedPDFHelper::BeginInlineStructureElements()
switch ( pPor->GetWhichPor() )
{
+ case POR_HYPH :
+ case POR_SOFTHYPH :
// Check for alternative spelling:
case POR_HYPHSTR :
case POR_SOFTHYPHSTR :
diff --git a/sw/source/core/text/txthyph.cxx b/sw/source/core/text/txthyph.cxx
index 62b3ad4..6b32a9f 100644
--- a/sw/source/core/text/txthyph.cxx
+++ b/sw/source/core/text/txthyph.cxx
@@ -20,7 +20,6 @@
#include <hintids.hxx>
#include <editeng/unolingu.hxx>
#include <com/sun/star/i18n/WordType.hpp>
-#include <EnhancedPDFExportHelper.hxx>
#include <viewopt.hxx> // SwViewOptions
#include <viewsh.hxx>
#include <SwPortionHandler.hxx>
@@ -370,16 +369,9 @@ sal_Bool SwTxtPortion::CreateHyphen( SwTxtFormatInfo &rInf, SwTxtGuess &rGuess )
* virtual SwHyphPortion::GetExpTxt()
*************************************************************************/
-sal_Bool SwHyphPortion::GetExpTxt( const SwTxtSizeInfo &rInf, OUString &rTxt ) const
+sal_Bool SwHyphPortion::GetExpTxt( const SwTxtSizeInfo &/*rInf*/, OUString &rTxt ) const
{
- // #i16816# tagged pdf support
- const sal_Unicode cChar = rInf.GetVsh() &&
- rInf.GetVsh()->GetViewOptions()->IsPDFExport() &&
- SwTaggedPDFHelper::IsExportTaggedPDF( *rInf.GetOut() ) ?
- 0xad :
- '-';
-
- rTxt = OUString(cChar);
+ rTxt = "-";
return sal_True;
}
commit caba02db6e344ef0026568edfed83222258b06d7
Author: Eike Rathke <erack at 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 <vmiklos at collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos at 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 ),
commit f2202b22d75c577ec8de115beee0b4c9053eefa4
Author: Eike Rathke <erack at redhat.com>
Date: Fri Dec 20 17:12:00 2013 +0100
prepare to read loext:vertical-justify, fdo#72922
Change-Id: I56d72d5cb8ea95aa63d4659899cba2f295ce9bea
(cherry picked from commit 11a73705d9dd10ebefa2bcdefa560f55e7024a1b)
Reviewed-on: https://gerrit.libreoffice.org/7150
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>
diff --git a/sc/source/filter/xml/xmlstyle.cxx b/sc/source/filter/xml/xmlstyle.cxx
index 88fdef7..3264a5d 100644
--- a/sc/source/filter/xml/xmlstyle.cxx
+++ b/sc/source/filter/xml/xmlstyle.cxx
@@ -55,7 +55,10 @@ using namespace ::xmloff::token;
using namespace ::formula;
#define MAP(name,prefix,token,type,context) { name, sizeof(name)-1, prefix, token, type, context, SvtSaveOptions::ODFVER_010, false }
+// 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 MAP_END() { NULL, 0, 0, XML_TOKEN_INVALID, 0, 0, SvtSaveOptions::ODFVER_010, false }
const XMLPropertyMapEntry aXMLScCellStylesProperties[] =
@@ -106,7 +109,8 @@ const XMLPropertyMapEntry aXMLScCellStylesProperties[] =
MAP( "UserDefinedAttributes", XML_NAMESPACE_TEXT, XML_XMLNS, XML_TYPE_PROP_TABLE_CELL|XML_TYPE_ATTRIBUTE_CONTAINER | MID_FLAG_SPECIAL_ITEM, 0 ),
MAP( "ValidationXML", XML_NAMESPACE_TABLE, XML_CONTENT_VALIDATION, XML_TYPE_PROP_TABLE_CELL|XML_TYPE_BUILDIN_CMP_ONLY, CTF_SC_VALIDATION ),
MAP( "VertJustify", XML_NAMESPACE_STYLE, XML_VERTICAL_ALIGN, XML_TYPE_PROP_TABLE_CELL|XML_SC_TYPE_VERTJUSTIFY, 0),
- MAP_EXT( SC_UNONAME_CELLVJUS_METHOD, XML_NAMESPACE_STYLE, XML_VERTICAL_JUSTIFY, XML_TYPE_PROP_TABLE_CELL|XML_SC_TYPE_VERTJUSTIFY_METHOD, 0 ),
+ MAP_EXT( SC_UNONAME_CELLVJUS_METHOD, XML_NAMESPACE_STYLE, XML_VERTICAL_JUSTIFY, XML_TYPE_PROP_TABLE_CELL|XML_SC_TYPE_VERTJUSTIFY_METHOD, 0 ), // proposed ODF 1.2+
+ MAP_EXT_I( SC_UNONAME_CELLVJUS_METHOD, XML_NAMESPACE_LO_EXT, XML_VERTICAL_JUSTIFY, XML_TYPE_PROP_TABLE_CELL|XML_SC_TYPE_VERTJUSTIFY_METHOD, 0 ), // extension namespace
MAP_END()
};
commit 8f45461d8e46b73f660f685977e7f2cbd91bd14a
Author: Eike Rathke <erack at redhat.com>
Date: Fri Dec 20 12:57:15 2013 +0100
XMLPropertyMapEntry::mbImportOnly and XMLPropertySetMapper bForExport
Although a rather large change this does not change the property
mappings or import/export behavior yet, but prepares for further
changes that add mappings for generating correct ODF and consuming
both old and new namespace/element/attribute names.
This is a combination of 4 commits:
added bool bForExport parameter to XMLPropertySetMapper ctor
Set to true for export, false for import. If export true, an
XMLPropertyMapEntry with mbImportOnly==true is not added to the
mappings. This to be able to have more than one mappings for import
(for example a current extension namespace and the future namespace
proposed to the ODF-TC, or corrected typos in element or attribute
names), but map only to one entry on export, of course.
(cherry picked from commit ebc1b2fe50c7ed1002ed8431410b8e2ac6e795b9)
Conflicts:
dbaccess/source/filter/xml/xmlHelper.cxx
xmloff/source/chart/PropertyMaps.cxx
xmloff/source/draw/sdpropls.cxx
xmloff/source/style/PageMasterPropMapper.cxx
xmloff/source/table/XMLTableImport.cxx
prepared XMLPropertyMapEntry with mbImportOnly flag
(cherry picked from commit 9dd7ee88bd9835ae2bae36093100fcd651fd3aeb)
Conflicts:
dbaccess/source/filter/xml/xmlHelper.cxx
xmloff/source/table/XMLTableExport.cxx
xmloff/source/text/txtprmap.cxx
just beautify this a little
(cherry picked from commit 44b4973fbd0f190906f36321b31215d80b363d52)
reordered member variables for 4 byte alignment
(cherry picked from commit dd902b8e256867b5d5fed06b52995f14d969f67d)
Change-Id: I15b03870fd14f110833037b6c0ff934624d72de1
Reviewed-on: https://gerrit.libreoffice.org/7144
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>
diff --git a/dbaccess/source/filter/xml/xmlExport.cxx b/dbaccess/source/filter/xml/xmlExport.cxx
index 135ef75..538cfd3 100644
--- a/dbaccess/source/filter/xml/xmlExport.cxx
+++ b/dbaccess/source/filter/xml/xmlExport.cxx
@@ -232,7 +232,7 @@ ODBExport::ODBExport(const Reference< XComponentContext >& _rxContext,sal_uInt16
m_xColumnExportHelper = new OSpecialHanldeXMLExportPropertyMapper(GetColumnStylesPropertySetMapper());
m_xCellExportHelper = new OSpecialHanldeXMLExportPropertyMapper(GetCellStylesPropertySetMapper());
- m_xRowExportHelper = new OSpecialHanldeXMLExportPropertyMapper(OXMLHelper::GetRowStylesPropertySetMapper());
+ m_xRowExportHelper = new OSpecialHanldeXMLExportPropertyMapper(OXMLHelper::GetRowStylesPropertySetMapper( true));
GetAutoStylePool()->AddFamily(
XML_STYLE_FAMILY_TABLE_TABLE,
@@ -1401,7 +1401,7 @@ UniReference < XMLPropertySetMapper > ODBExport::GetTableStylesPropertySetMapper
{
if ( !m_xTableStylesPropertySetMapper.is() )
{
- m_xTableStylesPropertySetMapper = OXMLHelper::GetTableStylesPropertySetMapper();
+ m_xTableStylesPropertySetMapper = OXMLHelper::GetTableStylesPropertySetMapper( true);
}
return m_xTableStylesPropertySetMapper;
}
@@ -1410,7 +1410,7 @@ UniReference < XMLPropertySetMapper > ODBExport::GetCellStylesPropertySetMapper(
{
if ( !m_xCellStylesPropertySetMapper.is() )
{
- m_xCellStylesPropertySetMapper = OXMLHelper::GetCellStylesPropertySetMapper();
+ m_xCellStylesPropertySetMapper = OXMLHelper::GetCellStylesPropertySetMapper( true);
}
return m_xCellStylesPropertySetMapper;
}
@@ -1419,7 +1419,7 @@ UniReference < XMLPropertySetMapper > ODBExport::GetColumnStylesPropertySetMappe
{
if ( !m_xColumnStylesPropertySetMapper.is() )
{
- m_xColumnStylesPropertySetMapper = OXMLHelper::GetColumnStylesPropertySetMapper();
+ m_xColumnStylesPropertySetMapper = OXMLHelper::GetColumnStylesPropertySetMapper( true);
}
return m_xColumnStylesPropertySetMapper;
}
diff --git a/dbaccess/source/filter/xml/xmlHelper.cxx b/dbaccess/source/filter/xml/xmlHelper.cxx
index a410f08..921581d 100644
--- a/dbaccess/source/filter/xml/xmlHelper.cxx
+++ b/dbaccess/source/filter/xml/xmlHelper.cxx
@@ -71,21 +71,20 @@ const XMLPropertyHandler* OPropertyHandlerFactory::GetPropertyHandler(sal_Int32
return pHandler;
}
// -----------------------------------------------------------------------------
-#define MAP_END() { NULL, 0, 0, XML_TOKEN_INVALID, 0 , 0, SvtSaveOptions::ODFVER_010}
-// -----------------------------------------------------------------------------
-UniReference < XMLPropertySetMapper > OXMLHelper::GetTableStylesPropertySetMapper()
+#define MAP_END() { NULL, 0, 0, XML_TOKEN_INVALID, 0 , 0, SvtSaveOptions::ODFVER_010, false}
+UniReference < XMLPropertySetMapper > OXMLHelper::GetTableStylesPropertySetMapper( bool bForExport )
{
static const XMLPropertyMapEntry s_aTableStylesProperties[] =
{
MAP_END()
};
UniReference < XMLPropertyHandlerFactory> xFac = new ::xmloff::OControlPropertyHandlerFactory();
- return new XMLPropertySetMapper((XMLPropertyMapEntry*)s_aTableStylesProperties, xFac);
+ return new XMLPropertySetMapper((XMLPropertyMapEntry*)s_aTableStylesProperties, xFac, bForExport);
}
// -----------------------------------------------------------------------------
-UniReference < XMLPropertySetMapper > OXMLHelper::GetColumnStylesPropertySetMapper()
+UniReference < XMLPropertySetMapper > OXMLHelper::GetColumnStylesPropertySetMapper( bool bForExport )
{
-#define MAP_CONST_COLUMN( name, prefix, token, type, context ) { name, sizeof(name)-1, prefix, token, type|XML_TYPE_PROP_TABLE_COLUMN, context, SvtSaveOptions::ODFVER_010 }
+#define MAP_CONST_COLUMN( name, prefix, token, type, context ) { name, sizeof(name)-1, prefix, token, type|XML_TYPE_PROP_TABLE_COLUMN, context, SvtSaveOptions::ODFVER_010, false }
static const XMLPropertyMapEntry s_aColumnStylesProperties[] =
{
MAP_CONST_COLUMN( PROPERTY_WIDTH, XML_NAMESPACE_STYLE, XML_COLUMN_WIDTH, XML_TYPE_MEASURE, 0),
@@ -94,13 +93,13 @@ UniReference < XMLPropertySetMapper > OXMLHelper::GetColumnStylesPropertySetMapp
MAP_END()
};
UniReference < XMLPropertyHandlerFactory> xFac = new OPropertyHandlerFactory();
- return new XMLPropertySetMapper((XMLPropertyMapEntry*)s_aColumnStylesProperties, xFac);
+ return new XMLPropertySetMapper((XMLPropertyMapEntry*)s_aColumnStylesProperties, xFac, bForExport);
}
// -----------------------------------------------------------------------------
-UniReference < XMLPropertySetMapper > OXMLHelper::GetCellStylesPropertySetMapper()
+UniReference < XMLPropertySetMapper > OXMLHelper::GetCellStylesPropertySetMapper( bool bForExport )
{
-#define MAP_CONST_CELL( name, prefix, token, type, context ) { name, sizeof(name)-1, prefix, token, type|XML_TYPE_PROP_PARAGRAPH, context, SvtSaveOptions::ODFVER_010 }
-#define MAP_CONST_TEXT( name, prefix, token, type, context ) { name, sizeof(name)-1, prefix, token, type|XML_TYPE_PROP_TEXT, context, SvtSaveOptions::ODFVER_010 }
+#define MAP_CONST_CELL( name, prefix, token, type, context ) { name, sizeof(name)-1, prefix, token, type|XML_TYPE_PROP_PARAGRAPH, context, SvtSaveOptions::ODFVER_010, false }
+#define MAP_CONST_TEXT( name, prefix, token, type, context ) { name, sizeof(name)-1, prefix, token, type|XML_TYPE_PROP_TEXT, context, SvtSaveOptions::ODFVER_010, false }
static const XMLPropertyMapEntry s_aCellStylesProperties[] =
{
MAP_CONST_CELL( PROPERTY_ALIGN, XML_NAMESPACE_FO, XML_TEXT_ALIGN, XML_TYPE_TEXT_ALIGN, CTF_DB_COLUMN_TEXT_ALIGN),
@@ -135,19 +134,19 @@ UniReference < XMLPropertySetMapper > OXMLHelper::GetCellStylesPropertySetMapper
MAP_END()
};
UniReference < XMLPropertyHandlerFactory> xFac = new /*OPropertyHandlerFactory*/::xmloff::OControlPropertyHandlerFactory();
- return new XMLPropertySetMapper((XMLPropertyMapEntry*)s_aCellStylesProperties, xFac);
+ return new XMLPropertySetMapper((XMLPropertyMapEntry*)s_aCellStylesProperties, xFac, bForExport);
}
// -----------------------------------------------------------------------------
-UniReference < XMLPropertySetMapper > OXMLHelper::GetRowStylesPropertySetMapper()
+UniReference < XMLPropertySetMapper > OXMLHelper::GetRowStylesPropertySetMapper( bool bForExport )
{
-#define MAP_CONST_ROW( name, prefix, token, type, context ) { name, sizeof(name)-1, prefix, token, type|XML_TYPE_PROP_TABLE_ROW, context, SvtSaveOptions::ODFVER_010 }
+#define MAP_CONST_ROW( name, prefix, token, type, context ) { name, sizeof(name)-1, prefix, token, type|XML_TYPE_PROP_TABLE_ROW, context, SvtSaveOptions::ODFVER_010, false }
static const XMLPropertyMapEntry s_aStylesProperties[] =
{
MAP_CONST_ROW( PROPERTY_ROW_HEIGHT, XML_NAMESPACE_STYLE, XML_ROW_HEIGHT, XML_TYPE_MEASURE, 0),
MAP_END()
};
UniReference < XMLPropertyHandlerFactory> xFac = new OPropertyHandlerFactory();
- return new XMLPropertySetMapper((XMLPropertyMapEntry*)s_aStylesProperties, xFac);
+ return new XMLPropertySetMapper((XMLPropertyMapEntry*)s_aStylesProperties, xFac, bForExport);
}
// -----------------------------------------------------------------------------
}
diff --git a/dbaccess/source/filter/xml/xmlHelper.hxx b/dbaccess/source/filter/xml/xmlHelper.hxx
index aa7a76e..a9ec5fd 100644
--- a/dbaccess/source/filter/xml/xmlHelper.hxx
+++ b/dbaccess/source/filter/xml/xmlHelper.hxx
@@ -50,10 +50,10 @@ namespace dbaxml
class OXMLHelper
{
public:
- static UniReference < XMLPropertySetMapper > GetTableStylesPropertySetMapper();
- static UniReference < XMLPropertySetMapper > GetColumnStylesPropertySetMapper();
- static UniReference < XMLPropertySetMapper > GetCellStylesPropertySetMapper();
- static UniReference < XMLPropertySetMapper > GetRowStylesPropertySetMapper();
+ static UniReference < XMLPropertySetMapper > GetTableStylesPropertySetMapper( bool bForExport );
+ static UniReference < XMLPropertySetMapper > GetColumnStylesPropertySetMapper( bool bForExport );
+ static UniReference < XMLPropertySetMapper > GetCellStylesPropertySetMapper( bool bForExport );
+ static UniReference < XMLPropertySetMapper > GetRowStylesPropertySetMapper( bool bForExport );
};
// -----------------------------------------------------------------------------
} // dbaxml
diff --git a/dbaccess/source/filter/xml/xmlfilter.cxx b/dbaccess/source/filter/xml/xmlfilter.cxx
index 96ea9ed..d8186fb 100644
--- a/dbaccess/source/filter/xml/xmlfilter.cxx
+++ b/dbaccess/source/filter/xml/xmlfilter.cxx
@@ -858,7 +858,7 @@ UniReference < XMLPropertySetMapper > ODBFilter::GetTableStylesPropertySetMapper
{
if ( !m_xTableStylesPropertySetMapper.is() )
{
- m_xTableStylesPropertySetMapper = OXMLHelper::GetTableStylesPropertySetMapper();
+ m_xTableStylesPropertySetMapper = OXMLHelper::GetTableStylesPropertySetMapper( false);
}
return m_xTableStylesPropertySetMapper;
}
@@ -867,7 +867,7 @@ UniReference < XMLPropertySetMapper > ODBFilter::GetColumnStylesPropertySetMappe
{
if ( !m_xColumnStylesPropertySetMapper.is() )
{
- m_xColumnStylesPropertySetMapper = OXMLHelper::GetColumnStylesPropertySetMapper();
+ m_xColumnStylesPropertySetMapper = OXMLHelper::GetColumnStylesPropertySetMapper( false);
}
return m_xColumnStylesPropertySetMapper;
}
@@ -876,7 +876,7 @@ UniReference < XMLPropertySetMapper > ODBFilter::GetCellStylesPropertySetMapper(
{
if ( !m_xCellStylesPropertySetMapper.is() )
{
- m_xCellStylesPropertySetMapper = OXMLHelper::GetCellStylesPropertySetMapper();
+ m_xCellStylesPropertySetMapper = OXMLHelper::GetCellStylesPropertySetMapper( false);
}
return m_xCellStylesPropertySetMapper;
}
diff --git a/include/xmloff/maptype.hxx b/include/xmloff/maptype.hxx
index bfd0463..756238f 100644
--- a/include/xmloff/maptype.hxx
+++ b/include/xmloff/maptype.hxx
@@ -43,6 +43,14 @@ struct XMLPropertyMapEntry
to im/export the porperty */
sal_Int16 mnContextId; /// User defined id for context filtering
SvtSaveOptions::ODFDefaultVersion mnEarliestODFVersionForExport;// no export when the used ODF version is lower than this
+
+ /** Flag to specify whether entry is only used during import.
+
+ Allows to handle more than one Namespace/XML-Name to Property-Name
+ mapping, i.e. for extensions. If several entries for the same
+ Property-Name exist, all except one must have this flag set.
+ */
+ bool mbImportOnly;
};
///////////////////////////////////////////////////////////////////////////
diff --git a/include/xmloff/txtprmap.hxx b/include/xmloff/txtprmap.hxx
index 92285911..fe5f80d 100644
--- a/include/xmloff/txtprmap.hxx
+++ b/include/xmloff/txtprmap.hxx
@@ -193,7 +193,7 @@
class XMLOFF_DLLPUBLIC XMLTextPropertySetMapper : public XMLPropertySetMapper
{
public:
- XMLTextPropertySetMapper( sal_uInt16 nType );
+ XMLTextPropertySetMapper( sal_uInt16 nType, bool bForExport );
virtual ~XMLTextPropertySetMapper();
static const XMLPropertyMapEntry* getPropertyMapForType( sal_uInt16 _nType );
diff --git a/include/xmloff/xmlprmap.hxx b/include/xmloff/xmlprmap.hxx
index 2105d6f..ad04bce 100644
--- a/include/xmloff/xmlprmap.hxx
+++ b/include/xmloff/xmlprmap.hxx
@@ -53,13 +53,14 @@ class XMLPropertyHandler;
*/
struct XMLPropertySetMapperEntry_Impl
{
- OUString sXMLAttributeName;
- OUString sAPIPropertyName;
- sal_uInt16 nXMLNameSpace;
- sal_Int32 nType;
- sal_Int16 nContextId;
- SvtSaveOptions::ODFDefaultVersion nEarliestODFVersionForExport;
- const XMLPropertyHandler *pHdl;
+ OUString sXMLAttributeName;
+ OUString sAPIPropertyName;
+ sal_Int32 nType;
+ sal_uInt16 nXMLNameSpace;
+ sal_Int16 nContextId;
+ SvtSaveOptions::ODFDefaultVersion nEarliestODFVersionForExport;
+ bool bImportOnly;
+ const XMLPropertyHandler *pHdl;
XMLPropertySetMapperEntry_Impl(
const XMLPropertyMapEntry& rMapEntry,
@@ -75,12 +76,19 @@ class XMLOFF_DLLPUBLIC XMLPropertySetMapper : public UniRefBase
{
::std::vector< XMLPropertySetMapperEntry_Impl > aMapEntries;
::std::vector< UniReference < XMLPropertyHandlerFactory > > aHdlFactories;
+ bool mbOnlyExportMappings;
public:
- /** The last element of the XMLPropertyMapEntry-array must contain NULL-values */
+ /** The last element of the XMLPropertyMapEntry-array must contain NULL-values.
+
+ @param bForExport
+ If TRUE, only entries that have the mbImportOnly flag not set
+ will be in the mappings.
+ */
XMLPropertySetMapper(
const XMLPropertyMapEntry* pEntries,
- const UniReference< XMLPropertyHandlerFactory >& rFactory );
+ const UniReference< XMLPropertyHandlerFactory >& rFactory,
+ bool bForExport );
virtual ~XMLPropertySetMapper();
void AddMapperEntry( const UniReference < XMLPropertySetMapper >& rMapper );
diff --git a/reportdesign/source/filter/xml/xmlExport.cxx b/reportdesign/source/filter/xml/xmlExport.cxx
index 1b17eec..96efbf3 100644
--- a/reportdesign/source/filter/xml/xmlExport.cxx
+++ b/reportdesign/source/filter/xml/xmlExport.cxx
@@ -270,23 +270,23 @@ ORptExport::ORptExport(const Reference< XComponentContext >& _rxContext,sal_uInt
m_xPropHdlFactory = new OXMLRptPropHdlFactory();
UniReference < XMLPropertyHandlerFactory> xFac = new ::xmloff::OControlPropertyHandlerFactory();
- UniReference < XMLPropertySetMapper > xTableStylesPropertySetMapper1 = new XMLPropertySetMapper(OXMLHelper::GetTableStyleProps(),xFac);
- UniReference < XMLPropertySetMapper > xTableStylesPropertySetMapper2 = new XMLTextPropertySetMapper(TEXT_PROP_MAP_TABLE_DEFAULTS );
+ UniReference < XMLPropertySetMapper > xTableStylesPropertySetMapper1 = new XMLPropertySetMapper(OXMLHelper::GetTableStyleProps(),xFac, true);
+ UniReference < XMLPropertySetMapper > xTableStylesPropertySetMapper2 = new XMLTextPropertySetMapper(TEXT_PROP_MAP_TABLE_DEFAULTS, true );
xTableStylesPropertySetMapper1->AddMapperEntry(xTableStylesPropertySetMapper2);
m_xTableStylesExportPropertySetMapper = new SvXMLExportPropertyMapper(xTableStylesPropertySetMapper1);
- m_xCellStylesPropertySetMapper = OXMLHelper::GetCellStylePropertyMap();
+ m_xCellStylesPropertySetMapper = OXMLHelper::GetCellStylePropertyMap( false, true);
m_xCellStylesExportPropertySetMapper = new OSpecialHanldeXMLExportPropertyMapper(m_xCellStylesPropertySetMapper);
m_xCellStylesExportPropertySetMapper->ChainExportMapper(XMLTextParagraphExport::CreateParaExtPropMapper(*this));
- UniReference < XMLPropertySetMapper > xColumnStylesPropertySetMapper = new XMLPropertySetMapper(OXMLHelper::GetColumnStyleProps(), m_xPropHdlFactory);
+ UniReference < XMLPropertySetMapper > xColumnStylesPropertySetMapper = new XMLPropertySetMapper(OXMLHelper::GetColumnStyleProps(), m_xPropHdlFactory, true);
m_xColumnStylesExportPropertySetMapper = new OSpecialHanldeXMLExportPropertyMapper(xColumnStylesPropertySetMapper);
- UniReference < XMLPropertySetMapper > xRowStylesPropertySetMapper = new XMLPropertySetMapper(OXMLHelper::GetRowStyleProps(), m_xPropHdlFactory);
+ UniReference < XMLPropertySetMapper > xRowStylesPropertySetMapper = new XMLPropertySetMapper(OXMLHelper::GetRowStyleProps(), m_xPropHdlFactory, true);
m_xRowStylesExportPropertySetMapper = new OSpecialHanldeXMLExportPropertyMapper(xRowStylesPropertySetMapper);
- UniReference < XMLPropertySetMapper > xPropMapper(new XMLTextPropertySetMapper( TEXT_PROP_MAP_PARA ));
+ UniReference < XMLPropertySetMapper > xPropMapper(new XMLTextPropertySetMapper( TEXT_PROP_MAP_PARA, true ));
m_xParaPropMapper = new OSpecialHanldeXMLExportPropertyMapper( xPropMapper);
OUString sFamily( GetXMLToken(XML_PARAGRAPH) );
diff --git a/reportdesign/source/filter/xml/xmlHelper.cxx b/reportdesign/source/filter/xml/xmlHelper.cxx
index 8537f94..1b1ada3 100644
--- a/reportdesign/source/filter/xml/xmlHelper.cxx
+++ b/reportdesign/source/filter/xml/xmlHelper.cxx
@@ -104,13 +104,13 @@ const XMLPropertyHandler* OPropertyHandlerFactory::GetPropertyHandler(sal_Int32
return pHandler;
}
// -----------------------------------------------------------------------------
-#define MAP_CONST_T_ASCII( name, prefix, token, type, context ) { name, sizeof(name)-1, XML_NAMESPACE_##prefix, XML_##token, type|XML_TYPE_PROP_TABLE, context, SvtSaveOptions::ODFVER_010 }
-#define MAP_CONST_P_ASCII( name, prefix, token, type, context ) { name, sizeof(name)-1, XML_NAMESPACE_##prefix, XML_##token, type|XML_TYPE_PROP_PARAGRAPH, context, SvtSaveOptions::ODFVER_010 }
-#define MAP_CONST_S( name, prefix, token, type, context ) { name, sizeof(name)-1, XML_NAMESPACE_##prefix, XML_##token, type|XML_TYPE_PROP_SECTION, context, SvtSaveOptions::ODFVER_010 }
-#define MAP_CONST_C_ASCII( name, prefix, token, type, context ) { name, sizeof(name)-1, XML_NAMESPACE_##prefix, XML_##token, type|XML_TYPE_PROP_TABLE_CELL, context, SvtSaveOptions::ODFVER_010 }
-#define MAP_END() { NULL, 0, 0, XML_TOKEN_INVALID, 0 ,0, SvtSaveOptions::ODFVER_010}
+#define MAP_CONST_T_ASCII( name, prefix, token, type, context ) { name, sizeof(name)-1, XML_NAMESPACE_##prefix, XML_##token, type|XML_TYPE_PROP_TABLE, context, SvtSaveOptions::ODFVER_010, false }
+#define MAP_CONST_P_ASCII( name, prefix, token, type, context ) { name, sizeof(name)-1, XML_NAMESPACE_##prefix, XML_##token, type|XML_TYPE_PROP_PARAGRAPH, context, SvtSaveOptions::ODFVER_010, false }
+#define MAP_CONST_S( name, prefix, token, type, context ) { name, sizeof(name)-1, XML_NAMESPACE_##prefix, XML_##token, type|XML_TYPE_PROP_SECTION, context, SvtSaveOptions::ODFVER_010, false }
+#define MAP_CONST_C_ASCII( name, prefix, token, type, context ) { name, sizeof(name)-1, XML_NAMESPACE_##prefix, XML_##token, type|XML_TYPE_PROP_TABLE_CELL, context, SvtSaveOptions::ODFVER_010, false }
+#define MAP_END() { NULL, 0, 0, XML_TOKEN_INVALID, 0 ,0, SvtSaveOptions::ODFVER_010, false}
// -----------------------------------------------------------------------------
-UniReference < XMLPropertySetMapper > OXMLHelper::GetCellStylePropertyMap(bool _bOldFormat)
+UniReference < XMLPropertySetMapper > OXMLHelper::GetCellStylePropertyMap(bool _bOldFormat, bool bForExport)
{
if ( _bOldFormat )
{
@@ -133,7 +133,7 @@ UniReference < XMLPropertySetMapper > OXMLHelper::GetCellStylePropertyMap(bool _
MAP_CONST_C_ASCII( "BorderBottom", FO, BORDER_BOTTOM, XML_TYPE_BORDER, 0 ),
MAP_END()
};
- return new XMLPropertySetMapper((XMLPropertyMapEntry*)s_aXMLCellStylesProperties,new OPropertyHandlerFactory());
+ return new XMLPropertySetMapper((XMLPropertyMapEntry*)s_aXMLCellStylesProperties,new OPropertyHandlerFactory(), bForExport);
}
else
{
@@ -153,7 +153,7 @@ UniReference < XMLPropertySetMapper > OXMLHelper::GetCellStylePropertyMap(bool _
MAP_CONST_C_ASCII( "BorderBottom", FO, BORDER_BOTTOM, XML_TYPE_BORDER, 0 ),
MAP_END()
};
- return new XMLPropertySetMapper((XMLPropertyMapEntry*)s_aXMLCellStylesProperties,new OPropertyHandlerFactory());
+ return new XMLPropertySetMapper((XMLPropertyMapEntry*)s_aXMLCellStylesProperties,new OPropertyHandlerFactory(), bForExport);
}
}
// -----------------------------------------------------------------------------
diff --git a/reportdesign/source/filter/xml/xmlHelper.hxx b/reportdesign/source/filter/xml/xmlHelper.hxx
index 6cc32dc..d3fbac9 100644
--- a/reportdesign/source/filter/xml/xmlHelper.hxx
+++ b/reportdesign/source/filter/xml/xmlHelper.hxx
@@ -56,7 +56,7 @@ namespace rptxml
class OXMLHelper
{
public:
- static UniReference < XMLPropertySetMapper > GetCellStylePropertyMap(bool _bOldFormat = false);
+ static UniReference < XMLPropertySetMapper > GetCellStylePropertyMap(bool _bOldFormat, bool bForExport);
static const SvXMLEnumMapEntry* GetReportPrintOptions();
static const SvXMLEnumMapEntry* GetForceNewPageOptions();
diff --git a/reportdesign/source/filter/xml/xmlStyleImport.cxx b/reportdesign/source/filter/xml/xmlStyleImport.cxx
index a79a9c2..eb19a01 100644
--- a/reportdesign/source/filter/xml/xmlStyleImport.cxx
+++ b/reportdesign/source/filter/xml/xmlStyleImport.cxx
@@ -241,7 +241,7 @@ UniReference < SvXMLImportPropertyMapper >
if( !m_xTableImpPropMapper.is() )
{
UniReference < XMLPropertyHandlerFactory> xFac = new ::xmloff::OControlPropertyHandlerFactory();
- m_xTableImpPropMapper = new SvXMLImportPropertyMapper( new XMLPropertySetMapper(OXMLHelper::GetTableStyleProps(), xFac), m_rImport );
+ m_xTableImpPropMapper = new SvXMLImportPropertyMapper( new XMLPropertySetMapper(OXMLHelper::GetTableStyleProps(), xFac, false), m_rImport );
}
xMapper = m_xTableImpPropMapper;
}
diff --git a/reportdesign/source/filter/xml/xmlfilter.cxx b/reportdesign/source/filter/xml/xmlfilter.cxx
index fa83c16..23115e8 100644
--- a/reportdesign/source/filter/xml/xmlfilter.cxx
+++ b/reportdesign/source/filter/xml/xmlfilter.cxx
@@ -387,10 +387,10 @@ ORptFilter::ORptFilter( const uno::Reference< XComponentContext >& _rxContext,sa
XML_NAMESPACE_REPORT );
m_xPropHdlFactory = new OXMLRptPropHdlFactory;
- m_xCellStylesPropertySetMapper = OXMLHelper::GetCellStylePropertyMap(true);
- m_xColumnStylesPropertySetMapper = new XMLPropertySetMapper(OXMLHelper::GetColumnStyleProps(), m_xPropHdlFactory);
- m_xRowStylesPropertySetMapper = new XMLPropertySetMapper(OXMLHelper::GetRowStyleProps(), m_xPropHdlFactory);
- m_xTableStylesPropertySetMapper = new XMLTextPropertySetMapper( TEXT_PROP_MAP_TABLE_DEFAULTS );
+ m_xCellStylesPropertySetMapper = OXMLHelper::GetCellStylePropertyMap(true, false);
+ m_xColumnStylesPropertySetMapper = new XMLPropertySetMapper(OXMLHelper::GetColumnStyleProps(), m_xPropHdlFactory, false);
+ m_xRowStylesPropertySetMapper = new XMLPropertySetMapper(OXMLHelper::GetRowStyleProps(), m_xPropHdlFactory, false);
+ m_xTableStylesPropertySetMapper = new XMLTextPropertySetMapper( TEXT_PROP_MAP_TABLE_DEFAULTS, false );
}
// -----------------------------------------------------------------------------
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index 73b3aec..0fbc692 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -476,10 +476,10 @@ ScXMLExport::ScXMLExport(
// document is not set here - create ScChangeTrackingExportHelper later
xScPropHdlFactory = new XMLScPropHdlFactory;
- xCellStylesPropertySetMapper = new XMLPropertySetMapper((XMLPropertyMapEntry*)aXMLScCellStylesProperties, xScPropHdlFactory);
- xColumnStylesPropertySetMapper = new XMLPropertySetMapper((XMLPropertyMapEntry*)aXMLScColumnStylesProperties, xScPropHdlFactory);
- xRowStylesPropertySetMapper = new XMLPropertySetMapper((XMLPropertyMapEntry*)aXMLScRowStylesProperties, xScPropHdlFactory);
- xTableStylesPropertySetMapper = new XMLPropertySetMapper((XMLPropertyMapEntry*)aXMLScTableStylesProperties, xScPropHdlFactory);
+ xCellStylesPropertySetMapper = new XMLPropertySetMapper((XMLPropertyMapEntry*)aXMLScCellStylesProperties, xScPropHdlFactory, true);
+ xColumnStylesPropertySetMapper = new XMLPropertySetMapper((XMLPropertyMapEntry*)aXMLScColumnStylesProperties, xScPropHdlFactory, true);
+ xRowStylesPropertySetMapper = new XMLPropertySetMapper((XMLPropertyMapEntry*)aXMLScRowStylesProperties, xScPropHdlFactory, true);
+ xTableStylesPropertySetMapper = new XMLPropertySetMapper((XMLPropertyMapEntry*)aXMLScTableStylesProperties, xScPropHdlFactory, true);
xCellStylesExportPropertySetMapper = new ScXMLCellExportPropertyMapper(xCellStylesPropertySetMapper);
xCellStylesExportPropertySetMapper->ChainExportMapper(XMLTextParagraphExport::CreateParaExtPropMapper(*this));
xColumnStylesExportPropertySetMapper = new ScXMLColumnExportPropertyMapper(xColumnStylesPropertySetMapper);
@@ -4638,7 +4638,7 @@ sal_uInt32 ScXMLExport::exportDoc( enum XMLTokenEnum eClass )
SfxObjectShell* pFoundShell = reinterpret_cast<SfxObjectShell*>( xObjShellTunnel.is() ? xObjShellTunnel->getSomething(SfxObjectShell::getUnoTunnelId()) : 0 );
if ( pFoundShell && ooo::vba::isAlienExcelDoc( *pFoundShell ) )
{
- xRowStylesPropertySetMapper = new XMLPropertySetMapper((XMLPropertyMapEntry*)aXMLScFromXLSRowStylesProperties, xScPropHdlFactory);
+ xRowStylesPropertySetMapper = new XMLPropertySetMapper((XMLPropertyMapEntry*)aXMLScFromXLSRowStylesProperties, xScPropHdlFactory, true);
xRowStylesExportPropertySetMapper = new ScXMLRowExportPropertyMapper(xRowStylesPropertySetMapper);
GetAutoStylePool()->SetFamilyPropSetMapper( XML_STYLE_FAMILY_TABLE_ROW,
xRowStylesExportPropertySetMapper );
diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx
index fd40dc7..28c3ace 100644
--- a/sc/source/filter/xml/xmlimprt.cxx
+++ b/sc/source/filter/xml/xmlimprt.cxx
@@ -2078,10 +2078,10 @@ ScXMLImport::ScXMLImport(
pStylesImportHelper = new ScMyStylesImportHelper(*this);
xScPropHdlFactory = new XMLScPropHdlFactory;
- xCellStylesPropertySetMapper = new XMLPropertySetMapper((XMLPropertyMapEntry*)aXMLScCellStylesProperties, xScPropHdlFactory);
- xColumnStylesPropertySetMapper = new XMLPropertySetMapper((XMLPropertyMapEntry*)aXMLScColumnStylesProperties, xScPropHdlFactory);
- xRowStylesPropertySetMapper = new XMLPropertySetMapper((XMLPropertyMapEntry*)aXMLScRowStylesImportProperties, xScPropHdlFactory);
- xTableStylesPropertySetMapper = new XMLPropertySetMapper((XMLPropertyMapEntry*)aXMLScTableStylesImportProperties, xScPropHdlFactory);
+ xCellStylesPropertySetMapper = new XMLPropertySetMapper((XMLPropertyMapEntry*)aXMLScCellStylesProperties, xScPropHdlFactory, false);
+ xColumnStylesPropertySetMapper = new XMLPropertySetMapper((XMLPropertyMapEntry*)aXMLScColumnStylesProperties, xScPropHdlFactory, false);
+ xRowStylesPropertySetMapper = new XMLPropertySetMapper((XMLPropertyMapEntry*)aXMLScRowStylesImportProperties, xScPropHdlFactory, false);
+ xTableStylesPropertySetMapper = new XMLPropertySetMapper((XMLPropertyMapEntry*)aXMLScTableStylesImportProperties, xScPropHdlFactory, false);
// #i66550# needed for 'presentation:event-listener' element for URLs in shapes
GetNamespaceMap().Add(
diff --git a/sc/source/filter/xml/xmlstyle.cxx b/sc/source/filter/xml/xmlstyle.cxx
index 3a5fe2b..88fdef7 100644
--- a/sc/source/filter/xml/xmlstyle.cxx
+++ b/sc/source/filter/xml/xmlstyle.cxx
@@ -54,9 +54,9 @@ using namespace com::sun::star;
using namespace ::xmloff::token;
using namespace ::formula;
-#define MAP(name,prefix,token,type,context) { name, sizeof(name)-1, prefix, token, type, context, SvtSaveOptions::ODFVER_010 }
-#define MAP_EXT(name,prefix,token,type,context) { name, sizeof(name)-1, prefix, token, type, context, SvtSaveOptions::ODFVER_012_EXT_COMPAT }
-#define MAP_END() { NULL, 0, 0, XML_TOKEN_INVALID, 0, 0, SvtSaveOptions::ODFVER_010 }
+#define MAP(name,prefix,token,type,context) { name, sizeof(name)-1, prefix, token, type, context, SvtSaveOptions::ODFVER_010, false }
+#define MAP_EXT(name,prefix,token,type,context) { name, sizeof(name)-1, prefix, token, type, context, SvtSaveOptions::ODFVER_012_EXT_COMPAT, false }
+#define MAP_END() { NULL, 0, 0, XML_TOKEN_INVALID, 0, 0, SvtSaveOptions::ODFVER_010, false }
const XMLPropertyMapEntry aXMLScCellStylesProperties[] =
{
diff --git a/xmloff/inc/XMLChartPropertySetMapper.hxx b/xmloff/inc/XMLChartPropertySetMapper.hxx
index e2463e2..051910e 100644
--- a/xmloff/inc/XMLChartPropertySetMapper.hxx
+++ b/xmloff/inc/XMLChartPropertySetMapper.hxx
@@ -47,8 +47,8 @@ public:
class XMLChartPropertySetMapper : public XMLPropertySetMapper
{
public:
- XMLChartPropertySetMapper();
- ~XMLChartPropertySetMapper();
+ explicit XMLChartPropertySetMapper( bool bForExport );
+ ~XMLChartPropertySetMapper();
};
// ----------------------------------------
diff --git a/xmloff/qa/unit/uxmloff.cxx b/xmloff/qa/unit/uxmloff.cxx
index a0bd430..4380a9e 100644
--- a/xmloff/qa/unit/uxmloff.cxx
+++ b/xmloff/qa/unit/uxmloff.cxx
@@ -62,7 +62,7 @@ void Test::testAutoStylePool()
UniReference< SvXMLAutoStylePoolP > xPool(
new SvXMLAutoStylePoolP( *pExport ) );
UniReference< XMLPropertySetMapper > xSetMapper(
- new XMLChartPropertySetMapper );
+ new XMLChartPropertySetMapper( true) );
UniReference< XMLChartExportPropertyMapper > xExportPropMapper(
new XMLChartExportPropertyMapper( xSetMapper, *pExport ) );
diff --git a/xmloff/source/chart/PropertyMap.hxx b/xmloff/source/chart/PropertyMap.hxx
index f19b365..809c043 100644
--- a/xmloff/source/chart/PropertyMap.hxx
+++ b/xmloff/source/chart/PropertyMap.hxx
@@ -84,14 +84,14 @@
#define XML_SCH_CONTEXT_SPECIAL_ERRORBAR_RANGE ( XML_SCH_CTF_START + 25 )
-#define MAP_FULL( ApiName, NameSpace, XMLTokenName, XMLType, ContextId, EarliestODFVersionForExport ) { ApiName, sizeof(ApiName)-1, XML_NAMESPACE_##NameSpace, xmloff::token::XMLTokenName, XMLType|XML_TYPE_PROP_CHART, ContextId, EarliestODFVersionForExport }
-#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 }
-#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 }
-#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 }
-#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 }
-#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 }
-#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 }
-#define MAP_ENTRY_END { 0,0,0,xmloff::token::XML_TOKEN_INVALID,0,0,SvtSaveOptions::ODFVER_010 }
+#define MAP_FULL( ApiName, NameSpace, XMLTokenName, XMLType, ContextId, EarliestODFVersionForExport ) { ApiName, sizeof(ApiName)-1, XML_NAMESPACE_##NameSpace, xmloff::token::XMLTokenName, XMLType|XML_TYPE_PROP_CHART, ContextId, EarliestODFVersionForExport, false }
+#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_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 }
+#define MAP_ENTRY_END { 0,0,0,xmloff::token::XML_TOKEN_INVALID,0,0,SvtSaveOptions::ODFVER_010, false }
// ---------------------------------------------------------
// PropertyMap for Chart properties drawing- and
diff --git a/xmloff/source/chart/PropertyMaps.cxx b/xmloff/source/chart/PropertyMaps.cxx
index da81152..dd7b59a 100644
--- a/xmloff/source/chart/PropertyMaps.cxx
+++ b/xmloff/source/chart/PropertyMaps.cxx
@@ -171,8 +171,8 @@ const XMLPropertyHandler* XMLChartPropHdlFactory::GetPropertyHandler( sal_Int32
// ----------------------------------------
-XMLChartPropertySetMapper::XMLChartPropertySetMapper() :
- XMLPropertySetMapper( aXMLChartPropMap, new XMLChartPropHdlFactory )
+XMLChartPropertySetMapper::XMLChartPropertySetMapper( bool bForExport ) :
+ XMLPropertySetMapper( aXMLChartPropMap, new XMLChartPropHdlFactory, bForExport )
{
}
diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx
index 89a8dae..8cd6416 100644
--- a/xmloff/source/chart/SchXMLExport.cxx
+++ b/xmloff/source/chart/SchXMLExport.cxx
@@ -1064,7 +1064,7 @@ SchXMLExportHelper_Impl::SchXMLExportHelper_Impl(
msTableName = OUString( "local-table" );
// create property set mapper
- mxPropertySetMapper = new XMLChartPropertySetMapper;
+ mxPropertySetMapper = new XMLChartPropertySetMapper( true);
mxExpPropMapper = new XMLChartExportPropertyMapper( mxPropertySetMapper, rExport );
// register chart auto-style family
diff --git a/xmloff/source/draw/sdpropls.cxx b/xmloff/source/draw/sdpropls.cxx
index 8e243fa..5486a18 100644
--- a/xmloff/source/draw/sdpropls.cxx
+++ b/xmloff/source/draw/sdpropls.cxx
@@ -72,14 +72,14 @@ using ::com::sun::star::uno::Reference;
using namespace ::com::sun::star;
using namespace ::xmloff::token;
-#define _MAP(name,prefix,token,type,context) { name, sizeof(name)-1, prefix, token, type, context, SvtSaveOptions::ODFVER_010 }
-#define _MAPV(name,prefix,token,type,context,version) { name, sizeof(name)-1, prefix, token, type, context, version }
+#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 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)
#define PMAP(name,prefix,token,type,context) _MAP(name,prefix,token,type|XML_TYPE_PROP_PARAGRAPH,context)
-#define MAP_END() { 0L, 0, 0, XML_EMPTY, 0 ,0, SvtSaveOptions::ODFVER_010}
+#define MAP_END() { 0L, 0, 0, XML_EMPTY, 0 ,0, SvtSaveOptions::ODFVER_010, false }
//////////////////////////////////////////////////////////////////////////////
// entry list for graphic properties
@@ -1180,8 +1180,9 @@ const XMLPropertyHandler* XMLSdPropHdlFactory::GetPropertyHandler( sal_Int32 nTy
//////////////////////////////////////////////////////////////////////////////
-XMLShapePropertySetMapper::XMLShapePropertySetMapper(const UniReference< XMLPropertyHandlerFactory >& rFactoryRef)
-: XMLPropertySetMapper( aXMLSDProperties, rFactoryRef )
+XMLShapePropertySetMapper::XMLShapePropertySetMapper(const UniReference< XMLPropertyHandlerFactory >& rFactoryRef,
+ bool bForExport)
+: XMLPropertySetMapper( aXMLSDProperties, rFactoryRef, bForExport )
{
}
diff --git a/xmloff/source/draw/sdpropls.hxx b/xmloff/source/draw/sdpropls.hxx
index 70ac1b7..e10199c 100644
--- a/xmloff/source/draw/sdpropls.hxx
+++ b/xmloff/source/draw/sdpropls.hxx
@@ -244,7 +244,7 @@ public:
class XMLShapePropertySetMapper : public XMLPropertySetMapper
{
public:
- XMLShapePropertySetMapper(const UniReference< XMLPropertyHandlerFactory >& rFactoryRef);
+ XMLShapePropertySetMapper(const UniReference< XMLPropertyHandlerFactory >& rFactoryRef, bool bForExport);
~XMLShapePropertySetMapper();
};
diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx
index c9149b9..5bbdce5 100644
--- a/xmloff/source/draw/sdxmlexp.cxx
+++ b/xmloff/source/draw/sdxmlexp.cxx
@@ -444,7 +444,7 @@ void SAL_CALL SdXMLExport::setSourceDocument( const Reference< lang::XComponent
const UniReference< XMLPropertyHandlerFactory > aFactoryRef = mpSdPropHdlFactory;
// construct PropertySetMapper
- UniReference < XMLPropertySetMapper > xMapper = new XMLShapePropertySetMapper( aFactoryRef);
+ UniReference < XMLPropertySetMapper > xMapper = new XMLShapePropertySetMapper( aFactoryRef, true);
// get or create text paragraph export
GetTextParagraphExport();
@@ -456,7 +456,7 @@ void SAL_CALL SdXMLExport::setSourceDocument( const Reference< lang::XComponent
mpPropertySetMapper->ChainExportMapper(XMLTextParagraphExport::CreateParaExtPropMapper(*this));
// construct PresPagePropsMapper
- xMapper = new XMLPropertySetMapper((XMLPropertyMapEntry*)aXMLSDPresPageProps, aFactoryRef);
+ xMapper = new XMLPropertySetMapper((XMLPropertyMapEntry*)aXMLSDPresPageProps, aFactoryRef, true);
mpPresPagePropsMapper = new XMLPageExportPropertyMapper( xMapper, *this );
if(mpPresPagePropsMapper)
diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx
index 14ec5c8..30c0230 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -1014,7 +1014,7 @@ SvXMLExportPropertyMapper* XMLShapeExport::CreateShapePropMapper(
SvXMLExport& rExport )
{
UniReference< XMLPropertyHandlerFactory > xFactory = new XMLSdPropHdlFactory( rExport.GetModel(), rExport );
- UniReference < XMLPropertySetMapper > xMapper = new XMLShapePropertySetMapper( xFactory );
+ UniReference < XMLPropertySetMapper > xMapper = new XMLShapePropertySetMapper( xFactory, true );
rExport.GetTextParagraphExport(); // get or create text paragraph export
SvXMLExportPropertyMapper* pResult =
new XMLShapeExportPropertyMapper( xMapper, rExport );
@@ -1259,7 +1259,7 @@ const rtl::Reference< XMLTableExport >& XMLShapeExport::GetShapeTableExport()
if( !mxShapeTableExport.is() )
{
rtl::Reference< XMLPropertyHandlerFactory > xFactory( new XMLSdPropHdlFactory( mrExport.GetModel(), mrExport ) );
- UniReference < XMLPropertySetMapper > xMapper( new XMLShapePropertySetMapper( xFactory.get() ) );
+ UniReference < XMLPropertySetMapper > xMapper( new XMLShapePropertySetMapper( xFactory.get(), true ) );
mrExport.GetTextParagraphExport(); // get or create text paragraph export
rtl::Reference< SvXMLExportPropertyMapper > xPropertySetMapper( new XMLShapeExportPropertyMapper( xMapper, mrExport ) );
mxShapeTableExport = new XMLTableExport( mrExport, xPropertySetMapper, xFactory );
diff --git a/xmloff/source/draw/shapeimport.cxx b/xmloff/source/draw/shapeimport.cxx
index fb41110..7a4619ae 100644
--- a/xmloff/source/draw/shapeimport.cxx
+++ b/xmloff/source/draw/shapeimport.cxx
@@ -154,7 +154,7 @@ XMLShapeImportHelper::XMLShapeImportHelper(
mpSdPropHdlFactory->acquire();
// construct PropertySetMapper
- UniReference < XMLPropertySetMapper > xMapper = new XMLShapePropertySetMapper(mpSdPropHdlFactory);
+ UniReference < XMLPropertySetMapper > xMapper = new XMLShapePropertySetMapper(mpSdPropHdlFactory, false);
mpPropertySetMapper = new SvXMLImportPropertyMapper( xMapper, rImporter );
// set lock to avoid deletion
mpPropertySetMapper->acquire();
@@ -170,7 +170,7 @@ XMLShapeImportHelper::XMLShapeImportHelper(
mpPropertySetMapper->ChainImportMapper(XMLTextImportHelper::CreateParaDefaultExtPropMapper(rImporter));
// construct PresPagePropsMapper
- xMapper = new XMLPropertySetMapper((XMLPropertyMapEntry*)aXMLSDPresPageProps, mpSdPropHdlFactory);
+ xMapper = new XMLPropertySetMapper((XMLPropertyMapEntry*)aXMLSDPresPageProps, mpSdPropHdlFactory, false);
mpPresPagePropsMapper = new SvXMLImportPropertyMapper( xMapper, rImporter );
if(mpPresPagePropsMapper)
{
@@ -1055,7 +1055,7 @@ void XMLShapeImportHelper::restoreConnections()
SvXMLImportPropertyMapper* XMLShapeImportHelper::CreateShapePropMapper( const uno::Reference< frame::XModel>& rModel, SvXMLImport& rImport )
{
UniReference< XMLPropertyHandlerFactory > xFactory = new XMLSdPropHdlFactory( rModel, rImport );
- UniReference < XMLPropertySetMapper > xMapper = new XMLShapePropertySetMapper( xFactory );
+ UniReference < XMLPropertySetMapper > xMapper = new XMLShapePropertySetMapper( xFactory, false );
SvXMLImportPropertyMapper* pResult = new SvXMLImportPropertyMapper( xMapper, rImport );
// chain text attributes
@@ -1160,7 +1160,7 @@ const rtl::Reference< XMLTableImport >& XMLShapeImportHelper::GetShapeTableImpor
if( !mxShapeTableImport.is() )
{
rtl::Reference< XMLPropertyHandlerFactory > xFactory( new XMLSdPropHdlFactory( mrImporter.GetModel(), mrImporter ) );
- rtl::Reference< XMLPropertySetMapper > xPropertySetMapper( new XMLShapePropertySetMapper( xFactory.get() ) );
+ rtl::Reference< XMLPropertySetMapper > xPropertySetMapper( new XMLShapePropertySetMapper( xFactory.get(), false ) );
mxShapeTableImport = new XMLTableImport( mrImporter, xPropertySetMapper, xFactory );
}
diff --git a/xmloff/source/forms/controlpropertymap.cxx b/xmloff/source/forms/controlpropertymap.cxx
index 2f0dc04..59e5986 100644
--- a/xmloff/source/forms/controlpropertymap.cxx
+++ b/xmloff/source/forms/controlpropertymap.cxx
@@ -35,10 +35,10 @@ namespace xmloff
{
//.........................................................................
-#define MAP_ASCII( name, prefix, token, type, context ) { name, sizeof(name)-1, prefix, token, type|XML_TYPE_PROP_TEXT, context, SvtSaveOptions::ODFVER_010 }
-#define MAP_CONST( name, prefix, token, type, context ) { name, sizeof(name)-1, prefix, token, type|XML_TYPE_PROP_TEXT, context, SvtSaveOptions::ODFVER_010 }
-#define MAP_CONST_P( name, prefix, token, type, context ){ name, sizeof(name)-1, prefix, token, type|XML_TYPE_PROP_PARAGRAPH, context, SvtSaveOptions::ODFVER_010 }
-#define MAP_END() { NULL, 0, 0, XML_TOKEN_INVALID, 0, 0, SvtSaveOptions::ODFVER_010 }
+#define MAP_ASCII( name, prefix, token, type, context ) { name, sizeof(name)-1, prefix, token, type|XML_TYPE_PROP_TEXT, context, SvtSaveOptions::ODFVER_010, false }
+#define MAP_CONST( name, prefix, token, type, context ) { name, sizeof(name)-1, prefix, token, type|XML_TYPE_PROP_TEXT, context, SvtSaveOptions::ODFVER_010, false }
+#define MAP_CONST_P( name, prefix, token, type, context ){ name, sizeof(name)-1, prefix, token, type|XML_TYPE_PROP_PARAGRAPH, context, SvtSaveOptions::ODFVER_010, false }
+#define MAP_END() { NULL, 0, 0, XML_TOKEN_INVALID, 0, 0, SvtSaveOptions::ODFVER_010, false }
XMLPropertyMapEntry* getControlStylePropertyMap_Access( )
{
diff --git a/xmloff/source/forms/layerexport.cxx b/xmloff/source/forms/layerexport.cxx
index c880662..663609a 100644
--- a/xmloff/source/forms/layerexport.cxx
+++ b/xmloff/source/forms/layerexport.cxx
@@ -89,7 +89,7 @@ namespace xmloff
// add our style family to the export context's style pool
m_xPropertyHandlerFactory = new OControlPropertyHandlerFactory();
- ::rtl::Reference< XMLPropertySetMapper > xStylePropertiesMapper = new XMLPropertySetMapper( getControlStylePropertyMap(), m_xPropertyHandlerFactory.get() );
+ ::rtl::Reference< XMLPropertySetMapper > xStylePropertiesMapper = new XMLPropertySetMapper( getControlStylePropertyMap(), m_xPropertyHandlerFactory.get(), true );
m_xStyleExportMapper = new OFormComponentStyleExportMapper( xStylePropertiesMapper.get() );
// our style family
diff --git a/xmloff/source/style/PageMasterPropMapper.cxx b/xmloff/source/style/PageMasterPropMapper.cxx
index 273e1c3..639fbb0 100644
--- a/xmloff/source/style/PageMasterPropMapper.cxx
+++ b/xmloff/source/style/PageMasterPropMapper.cxx
@@ -31,15 +31,16 @@ using namespace ::com::sun::star::beans;
//______________________________________________________________________________
-XMLPageMasterPropSetMapper::XMLPageMasterPropSetMapper():
- XMLPropertySetMapper( aXMLPageMasterStyleMap, new XMLPageMasterPropHdlFactory())
+XMLPageMasterPropSetMapper::XMLPageMasterPropSetMapper( bool bForExport ):
+ XMLPropertySetMapper( aXMLPageMasterStyleMap, new XMLPageMasterPropHdlFactory(), bForExport)
{
}
XMLPageMasterPropSetMapper::XMLPageMasterPropSetMapper(
const XMLPropertyMapEntry* pEntries,
- const UniReference< XMLPropertyHandlerFactory >& rFactory ) :
- XMLPropertySetMapper( pEntries, rFactory )
+ const UniReference< XMLPropertyHandlerFactory >& rFactory,
+ bool bForExport ) :
+ XMLPropertySetMapper( pEntries, rFactory, bForExport )
{
}
diff --git a/xmloff/source/style/PageMasterPropMapper.hxx b/xmloff/source/style/PageMasterPropMapper.hxx
index 231a359..392fe17 100644
--- a/xmloff/source/style/PageMasterPropMapper.hxx
+++ b/xmloff/source/style/PageMasterPropMapper.hxx
@@ -28,10 +28,11 @@
class XMLPageMasterPropSetMapper : public XMLPropertySetMapper
{
public:
- XMLPageMasterPropSetMapper();
+ XMLPageMasterPropSetMapper( bool bForExport );
XMLPageMasterPropSetMapper(
const XMLPropertyMapEntry* pEntries,
- const UniReference< XMLPropertyHandlerFactory >& rFactory );
+ const UniReference< XMLPropertyHandlerFactory >& rFactory,
+ bool bForExport );
virtual ~XMLPageMasterPropSetMapper();
};
diff --git a/xmloff/source/style/PageMasterStyleMap.cxx b/xmloff/source/style/PageMasterStyleMap.cxx
index 8726729..18d6ea2 100644
--- a/xmloff/source/style/PageMasterStyleMap.cxx
+++ b/xmloff/source/style/PageMasterStyleMap.cxx
@@ -24,7 +24,7 @@
using namespace ::xmloff::token;
-#define MAP(name,prefix,token,type,context,version) { name, sizeof(name)-1, prefix, token, type, context, version }
+#define MAP(name,prefix,token,type,context,version) { name, sizeof(name)-1, prefix, token, type, context, version, false }
#define PLMAP(name,prefix,token,type,context) \
MAP(name,prefix,token,type|XML_TYPE_PROP_PAGE_LAYOUT,context, SvtSaveOptions::ODFVER_010)
#define PLMAP_12(name,prefix,token,type,context) \
@@ -186,7 +186,7 @@ const XMLPropertyMapEntry aXMLPageMasterStyleMap[] =
HFMAP( "FooterBackGraphicURL", XML_NAMESPACE_STYLE, XML_BACKGROUND_IMAGE, XML_TYPE_STRING | MID_FLAG_ELEMENT_ITEM, CTF_PM_FOOTERGRAPHICURL ),
HFMAP( "FooterDynamicSpacing", XML_NAMESPACE_STYLE, XML_DYNAMIC_SPACING, XML_TYPE_BOOL, CTF_PM_FOOTERFLAG ),
- { 0L, 0, 0, XML_EMPTY, 0, 0, SvtSaveOptions::ODFVER_010 }
+ { 0L, 0, 0, XML_EMPTY, 0, 0, SvtSaveOptions::ODFVER_010, false }
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/source/style/XMLPageExport.cxx b/xmloff/source/style/XMLPageExport.cxx
index 48e4295..7278eb9 100644
--- a/xmloff/source/style/XMLPageExport.cxx
+++ b/xmloff/source/style/XMLPageExport.cxx
@@ -161,7 +161,7 @@ XMLPageExport::XMLPageExport( SvXMLExport& rExp ) :
xPageMasterPropHdlFactory = new XMLPageMasterPropHdlFactory;
xPageMasterPropSetMapper = new XMLPageMasterPropSetMapper(
(XMLPropertyMapEntry*) aXMLPageMasterStyleMap,
- xPageMasterPropHdlFactory );
+ xPageMasterPropHdlFactory, true );
xPageMasterExportPropMapper = new XMLPageMasterExportPropMapper(
xPageMasterPropSetMapper, rExp);
diff --git a/xmloff/source/style/xmlprmap.cxx b/xmloff/source/style/xmlprmap.cxx
index 351c912..1ea9a6f 100644
--- a/xmloff/source/style/xmlprmap.cxx
+++ b/xmloff/source/style/xmlprmap.cxx
@@ -40,10 +40,11 @@ XMLPropertySetMapperEntry_Impl::XMLPropertySetMapperEntry_Impl(
sXMLAttributeName( GetXMLToken(rMapEntry.meXMLName) ),
sAPIPropertyName( OUString(rMapEntry.msApiName, rMapEntry.nApiNameLength,
RTL_TEXTENCODING_ASCII_US ) ),
- nXMLNameSpace( rMapEntry.mnNameSpace ),
nType( rMapEntry.mnType ),
+ nXMLNameSpace( rMapEntry.mnNameSpace ),
nContextId( rMapEntry.mnContextId ),
nEarliestODFVersionForExport( rMapEntry.mnEarliestODFVersionForExport ),
+ bImportOnly( rMapEntry.mbImportOnly),
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list