solenv/gbuild/gbuild.mk | 40 ++++++++++++++++++----- writerfilter/source/dmapper/NumberingManager.cxx | 27 ++++++++++----- 2 files changed, 50 insertions(+), 17 deletions(-)
New commits: commit 9911ee515dd3d1e077dbf9c1fb4fd5c42a3c49b6 Author: LuboÅ¡ LuÅák <l.lu...@suse.cz> Date: Wed May 2 16:41:42 2012 +0200 make sure manual override on cmdline enables symbols so that e.g. 'make dbglevel=2' works even if --enable-symbols disabled it for the specific target Change-Id: If2fff3ef8e42c3b35545b5d8101ef87380412cc7 diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk index 6b1d184..c7167a6 100644 --- a/solenv/gbuild/gbuild.mk +++ b/solenv/gbuild/gbuild.mk @@ -79,10 +79,19 @@ else gb_PRODUCT := $(false) endif -ifneq ($(strip $(ENABLE_SYMBOLS)$(enable_symbols)),) -gb_SYMBOL := $(true) -else gb_SYMBOL := $(false) +ifneq ($(strip $(ENABLE_SYMBOLS)),) +gb_SYMBOL := $(true) +# make sure symbols are enabled if overriden using the command line +ifeq ($(origin ENABLE_SYMBOLS),command line) +ENABLE_SYMBOLS_FOR = all +endif +endif +ifneq ($(strip $(enable_symbols)),) +gb_SYMBOL := $(true) +ifeq ($(origin enable_symbols),command line) +ENABLE_SYMBOLS_FOR = all +endif endif gb_TIMELOG := 0 @@ -91,17 +100,32 @@ gb_TIMELOG := 1 endif gb_DEBUGLEVEL := 0 -ifneq ($(strip $(DEBUG)$(debug)),) +ifneq ($(strip $(DEBUG)),) +gb_DEBUGLEVEL := 1 +ifeq ($(origin DEBUG),command line) +ENABLE_SYMBOLS_FOR = all +endif +endif +ifneq ($(strip $(debug)),) gb_DEBUGLEVEL := 1 -else ifeq ($(gb_PRODUCT),$(false)) +ifeq ($(origin debug),command line) +ENABLE_SYMBOLS_FOR = all +endif +endif +ifeq ($(gb_PRODUCT),$(false)) gb_DEBUGLEVEL := 1 endif -ifneq ($(strip $(DBGLEVEL)$(dbglevel)),) +ifneq ($(strip $(DBGLEVEL)),) +gb_DEBUGLEVEL := $(strip $(DBGLEVEL)) +ifeq ($(origin DBGLEVEL),command line) +ENABLE_SYMBOLS_FOR = all +endif +endif ifneq ($(strip $(dbglevel)),) gb_DEBUGLEVEL := $(strip $(dbglevel)) -else -gb_DEBUGLEVEL := $(strip $(DBGLEVEL)) +ifeq ($(origin dbglevel),command line) +ENABLE_SYMBOLS_FOR = all endif endif commit d776f9433b6ca51472f4d6099526f71400b7bfda Author: LuboÅ¡ LuÅák <l.lu...@suse.cz> Date: Mon Apr 30 18:38:17 2012 +0200 set as outline numbering only those ones that are for headings (bnc#751028) w:pStyle in a numbering does not necessarily mean it is for outlines, normal styles can specify numbering too Change-Id: I0953d94833760ddf4edbe759a19192c477a57bf3 diff --git a/writerfilter/source/dmapper/NumberingManager.cxx b/writerfilter/source/dmapper/NumberingManager.cxx index 45af950..2f0e784 100644 --- a/writerfilter/source/dmapper/NumberingManager.cxx +++ b/writerfilter/source/dmapper/NumberingManager.cxx @@ -596,15 +596,26 @@ void ListDef::CreateNumberingRules( DomainMapper& rDMapper, StyleSheetEntryPtr pParaStyle = pAbsLevel->GetParaStyle( ); if ( pParaStyle.get( ) ) { - uno::Reference< text::XChapterNumberingSupplier > xOutlines ( - xFactory, uno::UNO_QUERY_THROW ); - uno::Reference< container::XIndexReplace > xOutlineRules = - xOutlines->getChapterNumberingRules( ); + // AFAICT .docx spec does not identify which numberings or paragraph + // styles are actually the ones to be used for outlines (chapter numbering), + // it only kind of says somewhere that they should be named Heading1 to Heading9. + const OUString styleId = pParaStyle->sStyleIdentifierD; + if( styleId.getLength() == RTL_CONSTASCII_LENGTH( "Heading1" ) + && styleId.match( "Heading", 0 ) + && styleId[ RTL_CONSTASCII_LENGTH( "Heading" ) ] >= '1' + && styleId[ RTL_CONSTASCII_LENGTH( "Heading" ) ] <= '9' ) + { + uno::Reference< text::XChapterNumberingSupplier > xOutlines ( + xFactory, uno::UNO_QUERY_THROW ); + uno::Reference< container::XIndexReplace > xOutlineRules = + xOutlines->getChapterNumberingRules( ); - aLvlProps.realloc( aLvlProps.getLength() + 1 ); - aLvlProps[aLvlProps.getLength( ) - 1] = MAKE_PROPVAL( PROP_HEADING_STYLE_NAME, pParaStyle->sConvertedStyleName ); + aLvlProps.realloc( aLvlProps.getLength() + 1 ); + aLvlProps[aLvlProps.getLength( ) - 1] = MAKE_PROPVAL( PROP_HEADING_STYLE_NAME, + pParaStyle->sConvertedStyleName ); - xOutlineRules->replaceByIndex( nLevel, uno::makeAny( aLvlProps ) ); + xOutlineRules->replaceByIndex( nLevel, uno::makeAny( aLvlProps ) ); + } } nLevel++; commit 7d327f66dbf7befa92e5f02c36748ed8b5ba0235 Author: LuboÅ¡ LuÅák <l.lu...@suse.cz> Date: Mon Apr 30 15:57:50 2012 +0200 bin unused macro Change-Id: I796aba0ee431309e44671a6d851c84cd35dae3b6 diff --git a/writerfilter/source/dmapper/NumberingManager.cxx b/writerfilter/source/dmapper/NumberingManager.cxx index 3119db4..45af950 100644 --- a/writerfilter/source/dmapper/NumberingManager.cxx +++ b/writerfilter/source/dmapper/NumberingManager.cxx @@ -29,8 +29,6 @@ using ::rtl::OUStringToOString; #define MAKE_PROPVAL(NameId, Value) \ beans::PropertyValue(aPropNameSupplier.GetName(NameId), 0, uno::makeAny(Value), beans::PropertyState_DIRECT_VALUE ) -#define OUSTR_TO_C( x ) OUStringToOString( x, RTL_TEXTENCODING_UTF8 ).getStr( ) - #define NUMBERING_MAX_LEVELS 10
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits