[Libreoffice-commits] .: 2 commits - solenv/gbuild writerfilter/source
Lubos Lunak
llunak at kemper.freedesktop.org
Sat Apr 28 02:25:02 PDT 2012
solenv/gbuild/gbuild.mk | 7 +++--
writerfilter/source/dmapper/NumberingManager.cxx | 32 ++++++++++++-----------
writerfilter/source/dmapper/NumberingManager.hxx | 3 --
3 files changed, 23 insertions(+), 19 deletions(-)
New commits:
commit 3fad0575328c010fe011fb0abebd181fccb91866
Author: LuboÅ¡ LuÅák <l.lunak at suse.cz>
Date: Sat Apr 28 11:21:50 2012 +0200
more reliable override for enabling symbols
diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk
index f8413f6..6b1d184 100644
--- a/solenv/gbuild/gbuild.mk
+++ b/solenv/gbuild/gbuild.mk
@@ -106,12 +106,15 @@ endif
endif
ifneq ($(gb_DEBUGLEVEL),0)
+gb_SYMBOL := $(true)
+endif
+
# if symbols are triggered by something else than --enable-symbols,
# make sure they are actually enabled
-ifneq ($(gb_SYMBOL),$(true))
+ifeq ($(gb_SYMBOL),$(true))
+ifeq ($(ENABLE_SYMBOLS_FOR),)
ENABLE_SYMBOLS_FOR = all
endif
-gb_SYMBOL := $(true)
endif
ifneq ($(nodep),)
commit 7ef5e1cebab76b55dacca3f8eea10884a6a90d74
Author: LuboÅ¡ LuÅák <l.lunak at suse.cz>
Date: Thu Apr 26 12:10:33 2012 +0200
don't overwrite numbering properties with paragraph properties (bnc#751028)
Part of bnc#751028, that is. The origin of this function is unclear,
without good repo history, and it's a question if it is still needed
after my previous fixes for bnc#751028 that fixed applying some of numbering
properties. Keeping it there just in case, but prevent it from overwriting
w:ind that's been read from the .docx file.
diff --git a/writerfilter/source/dmapper/NumberingManager.cxx b/writerfilter/source/dmapper/NumberingManager.cxx
index 0b8000a..3119db4 100644
--- a/writerfilter/source/dmapper/NumberingManager.cxx
+++ b/writerfilter/source/dmapper/NumberingManager.cxx
@@ -189,11 +189,7 @@ uno::Sequence< beans::PropertyValue > ListLevel::GetProperties( )
{
uno::Sequence< beans::PropertyValue > aLevelProps = GetLevelProperties( );
if ( m_pParaStyle.get( ) )
- {
- // Merge with the paragraph properties
- uno::Sequence< beans::PropertyValue > aParaProps = GetParaProperties( );
- lcl_mergeProperties( aParaProps, aLevelProps );
- }
+ AddParaProperties( &aLevelProps );
return aLevelProps;
}
@@ -330,35 +326,43 @@ uno::Sequence< beans::PropertyValue > ListLevel::GetLevelProperties( )
return aRet;
}
-uno::Sequence< beans::PropertyValue > ListLevel::GetParaProperties( )
+// Add the properties only if they do not already exist in the sequence.
+void ListLevel::AddParaProperties( uno::Sequence< beans::PropertyValue >* props )
{
+ uno::Sequence< beans::PropertyValue >& aProps = *props;
PropertyNameSupplier& aPropNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier();
+ OUString sFirstLineIndent = aPropNameSupplier.GetName(
+ PROP_FIRST_LINE_INDENT );
+ OUString sIndentAt = aPropNameSupplier.GetName(
+ PROP_INDENT_AT );
+
+ bool hasFirstLineIndent = lcl_findProperty( aProps, sFirstLineIndent );
+ bool hasIndentAt = lcl_findProperty( aProps, sIndentAt );
+
+ if( hasFirstLineIndent && hasIndentAt )
+ return; // has them all, nothing to add
+
uno::Sequence< beans::PropertyValue > aParaProps = m_pParaStyle->pProperties->GetPropertyValues( );
- uno::Sequence< beans::PropertyValue > aProps;
// ParaFirstLineIndent -> FirstLineIndent
// ParaLeftMargin -> IndentAt
OUString sParaIndent = aPropNameSupplier.GetName(
PROP_PARA_FIRST_LINE_INDENT );
- OUString sFirstLineIndent = aPropNameSupplier.GetName(
- PROP_FIRST_LINE_INDENT );
OUString sParaLeftMargin = aPropNameSupplier.GetName(
PROP_PARA_LEFT_MARGIN );
- OUString sIndentAt = aPropNameSupplier.GetName(
- PROP_INDENT_AT );
sal_Int32 nLen = aParaProps.getLength( );
for ( sal_Int32 i = 0; i < nLen; i++ )
{
- if ( aParaProps[i].Name.equals( sParaIndent ) )
+ if ( !hasFirstLineIndent && aParaProps[i].Name.equals( sParaIndent ) )
{
aProps.realloc( aProps.getLength() + 1 );
aProps[aProps.getLength( ) - 1] = aParaProps[i];
aProps[aProps.getLength( ) - 1].Name = sFirstLineIndent;
}
- else if ( aParaProps[i].Name.equals( sParaLeftMargin ) )
+ else if ( !hasIndentAt && aParaProps[i].Name.equals( sParaLeftMargin ) )
{
aProps.realloc( aProps.getLength() + 1 );
aProps[aProps.getLength( ) - 1] = aParaProps[i];
@@ -366,8 +370,6 @@ uno::Sequence< beans::PropertyValue > ListLevel::GetParaProperties( )
}
}
-
- return aProps;
}
//--------------------------------------- AbstractListDef implementation
diff --git a/writerfilter/source/dmapper/NumberingManager.hxx b/writerfilter/source/dmapper/NumberingManager.hxx
index d696439..54f7bb7 100644
--- a/writerfilter/source/dmapper/NumberingManager.hxx
+++ b/writerfilter/source/dmapper/NumberingManager.hxx
@@ -85,8 +85,7 @@ private:
com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >
GetLevelProperties( );
- com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >
- GetParaProperties( );
+ void AddParaProperties( com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >* props );
};
class AbstractListDef
More information about the Libreoffice-commits
mailing list