summaryrefslogtreecommitdiff
path: root/sw/source/ui
diff options
context:
space:
mode:
authorCédric Bosdonnat <cedric.bosdonnat@free.fr>2012-08-20 11:29:29 +0200
committerCédric Bosdonnat <cedric.bosdonnat@free.fr>2012-08-20 11:32:57 +0200
commitb95d203bc17c83ec0fe5139f519d53ed1d842d3a (patch)
tree71e9834149b782991a69580d4900a8dc771ac6a3 /sw/source/ui
parent4967a9d8f96987354b8b55d861e2e3f6fa93e7a4 (diff)
fdo#53175: Don't load the default values of the styles in writerfilter
...or we may have some additional properties set on some styles. Change-Id: I5a5d307931a2a6c1f25bd2da93381d8de65c2480
Diffstat (limited to 'sw/source/ui')
-rw-r--r--sw/source/ui/uno/SwXDocumentSettings.cxx16
1 files changed, 15 insertions, 1 deletions
diff --git a/sw/source/ui/uno/SwXDocumentSettings.cxx b/sw/source/ui/uno/SwXDocumentSettings.cxx
index ff56b003f2a6..69e44a679104 100644
--- a/sw/source/ui/uno/SwXDocumentSettings.cxx
+++ b/sw/source/ui/uno/SwXDocumentSettings.cxx
@@ -125,7 +125,8 @@ enum SwDocumentSettingsPropertyHandles
HANDLE_COLLAPSE_EMPTY_CELL_PARA,
HANDLE_SMALL_CAPS_PERCENTAGE_66,
HANDLE_TAB_OVERFLOW,
- HANDLE_UNBREAKABLE_NUMBERINGS
+ HANDLE_UNBREAKABLE_NUMBERINGS,
+ HANDLE_STYLES_NODEFAULT
};
MasterPropertySetInfo * lcl_createSettingsInfo()
@@ -188,6 +189,7 @@ MasterPropertySetInfo * lcl_createSettingsInfo()
{ RTL_CONSTASCII_STRINGPARAM("SmallCapsPercentage66"), HANDLE_SMALL_CAPS_PERCENTAGE_66, CPPUTYPE_BOOLEAN, 0, 0},
{ RTL_CONSTASCII_STRINGPARAM("TabOverflow"), HANDLE_TAB_OVERFLOW, CPPUTYPE_BOOLEAN, 0, 0},
{ RTL_CONSTASCII_STRINGPARAM("UnbreakableNumberings"), HANDLE_UNBREAKABLE_NUMBERINGS, CPPUTYPE_BOOLEAN, 0, 0},
+ { RTL_CONSTASCII_STRINGPARAM("StylesNoDefault"), HANDLE_STYLES_NODEFAULT, CPPUTYPE_BOOLEAN, 0, 0},
/*
* As OS said, we don't have a view when we need to set this, so I have to
* find another solution before adding them to this property set - MTG
@@ -747,6 +749,12 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInf
mpDoc->set(IDocumentSettingAccess::UNBREAKABLE_NUMBERINGS, bTmp);
}
break;
+ case HANDLE_STYLES_NODEFAULT:
+ {
+ sal_Bool bTmp = *(sal_Bool*)rValue.getValue();
+ mpDoc->set(IDocumentSettingAccess::STYLES_NODEFAULT, bTmp);
+ }
+ break;
default:
throw UnknownPropertyException();
}
@@ -1119,6 +1127,12 @@ void SwXDocumentSettings::_getSingleValue( const comphelper::PropertyInfo & rInf
rValue.setValue( &bTmp, ::getBooleanCppuType() );
}
break;
+ case HANDLE_STYLES_NODEFAULT:
+ {
+ sal_Bool bTmp = mpDoc->get( IDocumentSettingAccess::STYLES_NODEFAULT );
+ rValue.setValue( &bTmp, ::getBooleanCppuType() );
+ }
+ break;
default:
throw UnknownPropertyException();
}