[Libreoffice-commits] .: 5 commits - offapi/com offapi/type_reference offapi/UnoApi_offapi.mk qadevOOo/tests svl/source sw/qa sw/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Dec 3 16:01:24 PST 2012
offapi/UnoApi_offapi.mk | 2
offapi/com/sun/star/text/DocumentIndexFormat.idl | 71 ----------
offapi/com/sun/star/text/LineNumberingSettings.idl | 92 -------------
offapi/type_reference/types.rdb |binary
qadevOOo/tests/java/mod/_sw/CharacterStyle.java | 2
qadevOOo/tests/java/mod/_sw/ConditionalParagraphStyle.java | 2
qadevOOo/tests/java/mod/_sw/PageStyle.java | 2
qadevOOo/tests/java/mod/_sw/ParagraphStyle.java | 2
svl/source/items/itemprop.cxx | 3
sw/qa/unoapi/knownissues.xcl | 4
sw/source/core/unocore/unostyle.cxx | 15 +-
11 files changed, 18 insertions(+), 177 deletions(-)
New commits:
commit 324d189c9059392dbdf800d2ba02590791355050
Author: Michael Stahl <mstahl at redhat.com>
Date: Tue Dec 4 00:04:31 2012 +0100
API CHANGE: remove com.sun.star.text.DocumentIndexFormat
This service is deprecated and has never been implemented.
EXISTENCE: published key "/UCR/com/sun/star/text/DocumentIndexFormat"
exists only in registry 1
Change-Id: I55777a2ded54ecc19afced6deb191fb3437b2ca4
diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index 5284b52..487a94c 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -1237,7 +1237,6 @@ $(eval $(call gb_UnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/text,\
Defaults \
DependentTextField \
DocumentIndex \
- DocumentIndexFormat \
DocumentIndexLevelFormat \
DocumentIndexMark \
DocumentIndexMarkAsian \
diff --git a/offapi/com/sun/star/text/DocumentIndexFormat.idl b/offapi/com/sun/star/text/DocumentIndexFormat.idl
deleted file mode 100644
index 93bcb75..0000000
--- a/offapi/com/sun/star/text/DocumentIndexFormat.idl
+++ /dev/null
@@ -1,71 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#ifndef __com_sun_star_text_DocumentIndexFormat_idl__
-#define __com_sun_star_text_DocumentIndexFormat_idl__
-
-
-
-module com { module sun { module star { module text {
-
-/** specifies the formatting of document indexes.
-
- @deprecated
- the service was never implemented, none of it's properties do exist.
-
-*/
-published service DocumentIndexFormat
-{
- /** This property contains the name of the paragraph style that is
- used for the index title.
-
- */
- [property] string TitleStyle;
-
- /** This property contains the name of the paragraph style that is
- used for the separator. This entry is ignored for user indexes
- and content indexes.
-
- */
- [property] string SeparatorStyle;
-
- /** contains the number of levels in the document index.
- */
- [readonly, property] short LevelCount;
-
- /** This sequence contains the names of the paragraph styles that are
- applied to the level corresponding to the position in the sequence.
- */
- [property] sequence<string> LevelStyles;
-
- /** This method specifies whether the form supports hyperlinks.
- */
- [readonly, property] boolean HasHyperlinks;
-
- /** return an object that provides the service "com.sun.star.text.DocumentIndexLevelFormat"
- @see com.sun.star.text.DocumentIndexLevelFormat
- */
- [property] sequence<string> LevelFormat;
-};
-
-
-}; }; }; };
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/type_reference/types.rdb b/offapi/type_reference/types.rdb
index 100b6ac..dee384c 100644
Binary files a/offapi/type_reference/types.rdb and b/offapi/type_reference/types.rdb differ
commit d34ad7274cd45086aef54b4072a665da0a8015a8
Author: Michael Stahl <mstahl at redhat.com>
Date: Tue Dec 4 00:01:04 2012 +0100
API CHANGE: remove com.sun.star.text.LineNumberingSettings
The service is deprecated and was never implemented.
EXISTENCE: published key "/UCR/com/sun/star/text/LineNumberingSettings"
exists only in registry 1
Change-Id: Id720f8685eba6c78ed7f57c2365db6ab3c7ba8a4
diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index f6f5180..5284b52 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -1255,7 +1255,6 @@ $(eval $(call gb_UnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/text,\
IllustrationsIndex \
InContentMetadata \
LineNumberingProperties \
- LineNumberingSettings \
MailMerge \
NumberingLevel \
NumberingRules \
diff --git a/offapi/com/sun/star/text/LineNumberingSettings.idl b/offapi/com/sun/star/text/LineNumberingSettings.idl
deleted file mode 100644
index 4655653..0000000
--- a/offapi/com/sun/star/text/LineNumberingSettings.idl
+++ /dev/null
@@ -1,92 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#ifndef __com_sun_star_text_LineNumberingSettings_idl__
-#define __com_sun_star_text_LineNumberingSettings_idl__
-
-
-
- module com { module sun { module star { module text {
-
-
-/** provides access to the settings of the line numbering.
- @deprecated
-
- Actually there never was an implementation for this service.
- */
-published service LineNumberingSettings
-{
-
- /** If <TRUE/>, line numbering is used.
- */
- [property] boolean On;
-
-
- /** The name of the character style that is used for the line number.
- */
- [property] string CharStyle;
-
-
- /** If <TRUE/>, empty lines are counted.
- */
- [property] boolean CountEmptyLines;
-
-
- /** If <TRUE/>, lines in frames are included in counting.
- */
- [property] boolean CountLinesInFrames;
-
-
- /** specifies the distance between the line number and the start or
- end of the text area.
- */
- [property] long Distance;
-
-
- /** Line numbers are shown on every <var>LineInterval</var>th line.
- */
- [property] short LineInterval;
-
-
- /** specifies the symbol that is shown between the line numbers.
- */
- [property] string LineSeparator;
-
-
- /** The line separator is shown every <var>SeparatorLineDistance</var>th line.
- */
- [property] short SeparatorLineDistance;
-
-
- /** specifies the position of the line number
- (constant <type scope="com::sun::star::style::">LineNumberPosition</type> - left/right/inside/outside).
- */
- [property] short NumberPosition;
-
-
- /** specifies the type of the numbering.
- */
- [property] short NumberingType;
-
-};
-
-
-}; }; }; };
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/type_reference/types.rdb b/offapi/type_reference/types.rdb
index d70c98f..100b6ac 100644
Binary files a/offapi/type_reference/types.rdb and b/offapi/type_reference/types.rdb differ
commit 57d97807f704883b1631323da254163e187b2dc5
Author: Michael Stahl <mstahl at redhat.com>
Date: Mon Dec 3 23:23:23 2012 +0100
i#25473: this was fixed by previous commit, so enable...
...those tests again. Also there does not appear to be a reason to
exclude MAYBEVOID properties.
Change-Id: Ic73adb8800aee7f65e86394cecfe13b7b24eed13
diff --git a/qadevOOo/tests/java/mod/_sw/CharacterStyle.java b/qadevOOo/tests/java/mod/_sw/CharacterStyle.java
index da479a8..9a8e900 100644
--- a/qadevOOo/tests/java/mod/_sw/CharacterStyle.java
+++ b/qadevOOo/tests/java/mod/_sw/CharacterStyle.java
@@ -182,7 +182,7 @@ public class CharacterStyle extends TestCase {
XPropertySet xStyleProp = UnoRuntime.queryInterface(XPropertySet.class, oMyStyle);
- short exclude = PropertyAttribute.MAYBEVOID + PropertyAttribute.READONLY;
+ short exclude = PropertyAttribute.READONLY;
tEnv.addObjRelation("PropertyNames",utils.getFilteredPropertyNames(xStyleProp, (short)0, exclude));
return tEnv;
diff --git a/qadevOOo/tests/java/mod/_sw/ConditionalParagraphStyle.java b/qadevOOo/tests/java/mod/_sw/ConditionalParagraphStyle.java
index e5d53a4..5d71f1f 100644
--- a/qadevOOo/tests/java/mod/_sw/ConditionalParagraphStyle.java
+++ b/qadevOOo/tests/java/mod/_sw/ConditionalParagraphStyle.java
@@ -176,7 +176,7 @@ public class ConditionalParagraphStyle extends TestCase {
tEnv.addObjRelation("PoolStyle", oStyle);
XPropertySet xStyleProp = UnoRuntime.queryInterface(XPropertySet.class, oMyStyle);
- short exclude = PropertyAttribute.MAYBEVOID + PropertyAttribute.READONLY;
+ short exclude = PropertyAttribute.READONLY;
String[] names = utils.getFilteredPropertyNames(xStyleProp, (short)0, exclude);
tEnv.addObjRelation("PropertyNames", names);
diff --git a/qadevOOo/tests/java/mod/_sw/PageStyle.java b/qadevOOo/tests/java/mod/_sw/PageStyle.java
index 9d41a28..2955e03 100644
--- a/qadevOOo/tests/java/mod/_sw/PageStyle.java
+++ b/qadevOOo/tests/java/mod/_sw/PageStyle.java
@@ -176,7 +176,7 @@ public class PageStyle extends TestCase {
tEnv.addObjRelation("FollowStyle", "Envelope");
XPropertySet xStyleProp = UnoRuntime.queryInterface(XPropertySet.class, oMyStyle);
- short exclude = PropertyAttribute.MAYBEVOID + PropertyAttribute.READONLY;
+ short exclude = PropertyAttribute.READONLY;
String[] names = utils.getFilteredPropertyNames(xStyleProp, (short)0, exclude);
tEnv.addObjRelation("PropertyNames", names);
diff --git a/qadevOOo/tests/java/mod/_sw/ParagraphStyle.java b/qadevOOo/tests/java/mod/_sw/ParagraphStyle.java
index d86d5bc..0c9110f 100644
--- a/qadevOOo/tests/java/mod/_sw/ParagraphStyle.java
+++ b/qadevOOo/tests/java/mod/_sw/ParagraphStyle.java
@@ -167,7 +167,7 @@ public class ParagraphStyle extends TestCase {
tEnv.addObjRelation("PoolStyle", oStyle);
XPropertySet xStyleProp = UnoRuntime.queryInterface(XPropertySet.class, oMyStyle);
- short exclude = PropertyAttribute.MAYBEVOID + PropertyAttribute.READONLY;
+ short exclude = PropertyAttribute.READONLY;
String[] names = utils.getFilteredPropertyNames(xStyleProp, (short)0, exclude);
tEnv.addObjRelation("PropertyNames", names);
diff --git a/sw/qa/unoapi/knownissues.xcl b/sw/qa/unoapi/knownissues.xcl
index e3f122d..fef6d56 100644
--- a/sw/qa/unoapi/knownissues.xcl
+++ b/sw/qa/unoapi/knownissues.xcl
@@ -51,10 +51,6 @@ sw.PageStyle::com::sun::star::style::XStyle
### i85584 ###
sw.CharacterStyle::com::sun::star::style::CharacterPropertiesAsian
-### i25473 ###
-sw.ConditionalParagraphStyle::com::sun::star::beans::XMultiPropertyStates
-sw.ParagraphStyle::com::sun::star::beans::XMultiPropertyStates
-
### i34456 ###
sw.SwXTextDocument::com::sun::star::view::XPrintJobBroadcaster
commit af80ccd5b6206cfce63cf3f98781f09ed6d79f7f
Author: Michael Stahl <mstahl at redhat.com>
Date: Tue Dec 4 00:39:43 2012 +0100
SwXStyle::getPropertySetInfo: split world's stupidest static
... variable into 2.
Change-Id: Ib0e2cdeb4ee6124b4ead532a168bb472dfdc6f7a
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index 6153eeb..e6f5abf 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -1522,13 +1522,16 @@ static uno::Reference< beans::XPropertySetInfo > lcl_getPropertySetInfo( SfxStyl
break;
case SFX_STYLE_FAMILY_PARA:
{
+ static uno::Reference< beans::XPropertySetInfo > xCondParaRef;
static uno::Reference< beans::XPropertySetInfo > xParaRef;
if(!xParaRef.is())
{
- sal_uInt16 nMapId = bIsConditional ? PROPERTY_MAP_CONDITIONAL_PARA_STYLE : PROPERTY_MAP_PARA_STYLE;
- xParaRef = aSwMapProvider.GetPropertySet(nMapId)->getPropertySetInfo();
+ xCondParaRef = aSwMapProvider.GetPropertySet(
+ PROPERTY_MAP_CONDITIONAL_PARA_STYLE)->getPropertySetInfo();
+ xParaRef = aSwMapProvider.GetPropertySet(
+ PROPERTY_MAP_PARA_STYLE)->getPropertySetInfo();
}
- xRet = xParaRef;
+ xRet = bIsConditional ? xCondParaRef : xParaRef;
}
break;
case SFX_STYLE_FAMILY_PAGE :
commit 3d9bb8e82548b8cf35771d044c0175f6a7e8ccdb
Author: Michael Stahl <mstahl at redhat.com>
Date: Mon Dec 3 23:18:55 2012 +0100
SwXStyle::getPropertyDefaults: handle non-itemset based properties:
These do not occur in ItemSets and thus cause
fxItemPropertySet::getPropertyValue to throw.
This caused sw_unoapi test to fail in sw.CharacterStyle on the property
"Hidden" that was added in d9ef61fb546af443736057557552e3a95c569c11.
Change-Id: I5b7b5b366120470a0f7d64b9b109b5c84c52b515
diff --git a/svl/source/items/itemprop.cxx b/svl/source/items/itemprop.cxx
index 7dd5bbe..b9a4cc6 100644
--- a/svl/source/items/itemprop.cxx
+++ b/svl/source/items/itemprop.cxx
@@ -203,7 +203,8 @@ void SfxItemPropertySet::getPropertyValue( const SfxItemPropertySimpleEntry& rEn
rItem.QueryValue( rAny, rEntry.nMemberId );
}
else if(0 == (rEntry.nFlags & PropertyAttribute::MAYBEVOID))
- throw RuntimeException();
+ throw RuntimeException(
+ "Property not found in ItemSet but not MAYBEVOID?", 0);
}
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index c8e7fa3..6153eeb 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -2883,6 +2883,12 @@ uno::Sequence< uno::Any > SAL_CALL SwXStyle::getPropertyDefaults( const uno::Seq
if ( !pEntry )
throw beans::UnknownPropertyException ( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + pNames[i], static_cast < cppu::OWeakObject * > ( this ) );
+ if (pEntry->nWID >= RES_UNKNOWNATR_END)
+ {
+ // these cannot be in an item set, especially not the
+ // parent set, so the default value is void
+ continue;
+ }
if( pParentSet )
aSwMapProvider.GetPropertySet(nPropSetId)->getPropertyValue(pNames[i], *pParentSet, pRet[i]);
else if( pEntry->nWID != rSet.GetPool()->GetSlotId(pEntry->nWID) )
More information about the Libreoffice-commits
mailing list