summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorJian Fang Zhang <zhangjf@apache.org>2012-09-12 11:19:10 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-05-31 13:58:08 +0100
commit0181f258e5598ee59b1c4847818944b8da16bd51 (patch)
tree36a8dae21eb74c0981d167407c81acd4cde40fcc /sw
parent0f33ad3847da22350e69fd998d7494e4334c1ed9 (diff)
Resolves: #i119558# set default page mode value to false for docx
To avoid default page mode affect the calculation of table row height Found by: xiao ting xiao, tingxiaox@gmail.com Patch by: zhaoshzh, aoo.zhaoshzh@gmail.com Review by: zhangjf (cherry picked from commit 28e1cb1240e7c7a274a04756c7cab2f5797de400) Conflicts: sw/inc/unomap.hxx sw/inc/unoprnms.hxx sw/source/core/unocore/unomap.cxx sw/source/core/unocore/unoprnms.cxx sw/source/ui/uno/unotxdoc.cxx writerfilter/source/dmapper/PropertyIds.cxx Change-Id: I41745eb9d727a5ae87d34872f9dc3f4442c7bc8d
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/unomap.hxx3
-rw-r--r--sw/inc/unoprnms.hxx4
-rw-r--r--sw/source/core/unocore/unomap.cxx1
-rw-r--r--sw/source/core/unocore/unoprnms.cxx1
-rw-r--r--sw/source/ui/uno/unotxdoc.cxx8
5 files changed, 15 insertions, 2 deletions
diff --git a/sw/inc/unomap.hxx b/sw/inc/unomap.hxx
index 7f130a210a8a..128570c3b1ee 100644
--- a/sw/inc/unomap.hxx
+++ b/sw/inc/unomap.hxx
@@ -237,7 +237,8 @@
#define WID_DOC_LOCK_UPDATES 1016
#define WID_DOC_HAS_VALID_SIGNATURES 1017
#define WID_DOC_BUILDID 1024
-#define WID_DOC_ISTEMPLATEID 1025
+#define WID_DOC_ISTEMPLATEID 1025
+#define WID_DOC_DEFAULT_PAGE_MODE 1069
// MailMerge
#define WID_SELECTION 1071
diff --git a/sw/inc/unoprnms.hxx b/sw/inc/unoprnms.hxx
index 42027aff2028..fb6e9d372adf 100644
--- a/sw/inc/unoprnms.hxx
+++ b/sw/inc/unoprnms.hxx
@@ -820,7 +820,9 @@ enum SwPropNameIds
/* 0758 */ UNO_NAME_FILL_GRADIENT,
/* 0759 */ UNO_NAME_FILL_GRADIENT_NAME,
-/* 0760 */ SW_PROPNAME_END
+/* 0760 */ UNO_NAME_DEFAULT_PAGE_MODE,
+
+/* 0761 */ SW_PROPNAME_END
// new items in this array must match SwPropNameTab aPropNameTab
};
diff --git a/sw/source/core/unocore/unomap.cxx b/sw/source/core/unocore/unomap.cxx
index 5f3cfc282fec..a9bf548d72c2 100644
--- a/sw/source/core/unocore/unomap.cxx
+++ b/sw/source/core/unocore/unomap.cxx
@@ -1559,6 +1559,7 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPropertyMapEntries(s
{ SW_PROP_NMID(UNO_NAME_LOCK_UPDATES), WID_DOC_LOCK_UPDATES, CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 0},
{ SW_PROP_NMID(UNO_NAME_HAS_VALID_SIGNATURES), WID_DOC_HAS_VALID_SIGNATURES, CPPU_E2T(CPPUTYPE_BOOLEAN), PropertyAttribute::READONLY, 0},
{ SW_PROP_NMID(UNO_NAME_BUILDID), WID_DOC_BUILDID, CPPU_E2T(CPPUTYPE_OUSTRING), 0, 0},
+ { SW_PROP_NMID(UNO_NAME_DEFAULT_PAGE_MODE), WID_DOC_DEFAULT_PAGE_MODE, CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 0},
{0,0,0,0,0,0}
};
aMapEntriesArr[nPropertyId] = aDocMap_Impl;
diff --git a/sw/source/core/unocore/unoprnms.cxx b/sw/source/core/unocore/unoprnms.cxx
index f1e0f196a4d0..f28e927ee4cf 100644
--- a/sw/source/core/unocore/unoprnms.cxx
+++ b/sw/source/core/unocore/unoprnms.cxx
@@ -789,6 +789,7 @@ const SwPropNameTab aPropNameTab = {
/* 0757 UNO_NAME_FILL_STYLE */ {MAP_CHAR_LEN("FillStyle")},
/* 0758 UNO_NAME_FILL_GRADIENT */ {MAP_CHAR_LEN("FillGradient")},
/* 0759 UNO_NAME_FILL_GRADIENT_NAME */ {MAP_CHAR_LEN("FillGradientName")},
+/* 0760 UNO_NAME_DEFAULT_PAGE_MODE */ {MAP_CHAR_LEN("DefaultPageMode")}
// new items in this array must match enum SwPropNameIds
};
diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx
index f8d33f0ce148..84e2930e497b 100644
--- a/sw/source/ui/uno/unotxdoc.cxx
+++ b/sw/source/ui/uno/unotxdoc.cxx
@@ -1991,6 +1991,14 @@ void SwXTextDocument::setPropertyValue(const OUString& rPropertyName,
aValue >>= maBuildId;
break;
+ case WID_DOC_DEFAULT_PAGE_MODE:
+ {
+ bool bDefaultPageMode( false );
+ aValue >>= bDefaultPageMode;
+ pDocShell->GetDoc()->SetDefaultPageMode( bDefaultPageMode );
+ }
+ break;
+
default:
{
const SfxPoolItem& rItem = pDocShell->GetDoc()->GetDefault(pEntry->nWID);