[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 3 commits - set_soenv.in solenv/inc stlport/systemstl sw/source
Herbert Dürr
hdu at apache.org
Thu Jan 2 08:08:05 PST 2014
set_soenv.in | 38 +++--
solenv/inc/unx.mk | 8 +
solenv/inc/unxmacc.mk | 263 +++++++++++++++++++++++++++++++++++++++
solenv/inc/unxmacci.mk | 37 +++++
solenv/inc/unxmaccx.mk | 37 +++++
stlport/systemstl/hash_map | 2
stlport/systemstl/hash_set | 2
stlport/systemstl/slist | 2
sw/source/filter/ww8/ww8par.hxx | 67 ++++++++-
sw/source/filter/ww8/ww8par3.cxx | 140 +++++++++++++-------
10 files changed, 521 insertions(+), 75 deletions(-)
New commits:
commit 4e347ce072f2d48ab5e96306632cd6b7b2f145b6
Author: Herbert Dürr <hdu at apache.org>
Date: Thu Jan 2 15:45:55 2014 +0000
#i122301# add Makefiles for XCode>=4 on Mac
diff --git a/set_soenv.in b/set_soenv.in
index 1e797ad..1df1e80 100644
--- a/set_soenv.in
+++ b/set_soenv.in
@@ -753,29 +753,41 @@ elsif ( $platform =~ m/os2/ )
elsif ( $platform =~ m/darwin/ )
{ print "Setting Mac OS X/Darwin specific values... ";
$BIG_SVX = "TRUE";
- $COM = "GCC";
$COMPATH = '@COMPATH@';
- if ($platform =~ m/^i[3456]86/)
+ print "Darwin platform = " . $platform ." ";
+ if( $CC =~ "gcc" )
{
- print "Setting values for Mac OS X/Darwin on x86... ";
+ print "Setting values for MacOSX/Darwin for Xcode<=3";
+ $COM = "GCC";
$outfile = "MacOSXX86Env.Set";
$CPU = "I";
$CPUNAME = "INTEL";
$OUTPATH = "unxmacxi";
}
- elsif ($platform =~ m/^powerpc/)
+ elsif ($platform =~ m/^i[3456]86/)
{
- print "Setting values for Mac OS X/Darwin on PowerPC... ";
- $outfile = "MacOSXPPCEnv.Set";
- $CPU = "P";
- $CPUNAME = "POWERPC";
- $OUTPATH = "unxmacxp";
+ print "Setting values for MacOSX/Darwin on x86_32... ";
+ $COM = "CLANG";
+ $outfile = "MacOSXX32Env.Set";
+ $CPU = "I";
+ $CPUNAME = "INTEL";
+ $OUTPATH = "unxmacci";
}
- if (@GCCVER@ >= 30401) {
- $CVER = "C341";
- } else {
- $CVER = "C300";
+ elsif ($platform =~ m/^x86_64/)
+ {
+ print "Setting values for MacOSX/Darwin on x86_64... ";
+ $COM = "CLANG";
+ $outfile = "MacOSXX64Env.Set";
+ $CPU = "X";
+ $CPUNAME = "X86_64";
+ $OUTPATH = "unxmaccx";
+ }
+ else
+ {
+ print "\nset_soenv: Unknown MacOSX/Darwin platform: $platform\n";
+ exit 1;
}
+ $CVER = "DUMMY_CVER";
$GUI = "UNX";
$GVER = "VCL";
$INPATH = $OUTPATH.$PROEXT;
diff --git a/solenv/inc/unx.mk b/solenv/inc/unx.mk
index b1f19b3..5854591 100644
--- a/solenv/inc/unx.mk
+++ b/solenv/inc/unx.mk
@@ -151,6 +151,14 @@
.INCLUDE : unxmacxi.mk
.ENDIF
+.IF "$(COM)$(OS)$(CPU)" == "CLANGMACOSXI"
+.INCLUDE : unxmacci.mk
+.ENDIF
+
+.IF "$(COM)$(OS)$(CPU)" == "CLANGMACOSXX"
+.INCLUDE : unxmaccx.mk
+.ENDIF
+
.IF "$(COM)$(OS)$(CPU)" == "GCCLINUXM"
.INCLUDE : unxlngmips.mk
.ENDIF
diff --git a/solenv/inc/unxmacc.mk b/solenv/inc/unxmacc.mk
new file mode 100644
index 0000000..8a24466
--- /dev/null
+++ b/solenv/inc/unxmacc.mk
@@ -0,0 +1,263 @@
+#**************************************************************
+#
+# 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
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#**************************************************************
+
+
+
+##########################################################################
+# Platform MAKEFILE for Mac OS X and Darwin on both PowerPC and Intel
+##########################################################################
+
+# PROCESSOR_DEFINES and DLLPOSTFIX are defined in the particular platform file
+
+ASM=
+AFLAGS=
+LINKOUTPUT_FILTER=
+
+# Definitions that we may need on the compile line.
+# -D_PTHREADS and -D_REENTRANT are needed for STLport, and must be specified when
+# compiling STLport sources too, either internally or externally.
+CDEFS+=-DGLIBC=2 -D_PTHREADS -D_REENTRANT -DNO_PTHREAD_PRIORITY $(PROCESSOR_DEFINES) -D_USE_NAMESPACE=1
+
+# MAXOSX_DEPLOYMENT_TARGET : The minimum version required to run the build result
+# (safer/easier than dealing with the MAC_OS_X_VERSION_MAX_ALLOWED macro)
+# http://developer.apple.com/technotes/tn2002/tn2064.html
+# done in setsolar/configure now. left here for documentation
+#MACOSX_DEPLOYMENT_TARGET=10.7
+#.EXPORT: MACOSX_DEPLOYMENT_TARGET
+CDEFS+=-DQUARTZ
+EXTRA_CDEFS*=-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk
+
+# Name of library where static data members are initialized
+# STATICLIBNAME=static$(DLLPOSTFIX)
+# STATICLIB=-l$(STATICLIBNAME)
+
+# enable visibility define in "sal/types.h"
+.IF "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE"
+ CDEFS += -DHAVE_GCC_VISIBILITY_FEATURE
+.ENDIF
+
+# MacOS X specific Java compilation/link flags
+SOLAR_JAVA*=TRUE
+.IF "$(SOLAR_JAVA)"!=""
+ JAVADEF=-DSOLAR_JAVA
+ JAVAFLAGSDEBUG=-g
+ JAVA_RUNTIME=-framework JavaVM
+.ENDIF
+
+# architecture dependent flags for the C and C++ compiler that can be changed by
+# exporting the variable ARCH_FLAGS="..." in the shell, which is used to start build
+ARCH_FLAGS*=
+
+# Specify the compiler to use. NOTE: MacOS X should always specify
+# c++ for C++ compilation as it does certain C++ specific things
+# behind the scenes for us.
+# CC = C++ compiler to use
+# cc = C compiler to use
+# objc = Objective C compiler to use
+# objcpp = Objective C++ compiler to use
+CXX*=clang++
+CC*=clang
+objc*=$(CC)
+objcpp*=$(CXX)
+
+EXTRA_CFLAGS=
+
+CFLAGS=-fsigned-char -fmessage-length=0 -c $(EXTRA_CFLAGS)
+
+.IF "$(DISABLE_DEPRECATION_WARNING)" == "TRUE"
+CFLAGS+=-Wno-deprecated-declarations
+.ENDIF
+# ---------------------------------
+# Compilation flags
+# ---------------------------------
+# Normal C compilation flags
+CFLAGSCC=-pipe -fsigned-char
+
+# Normal Objective C compilation flags
+#OBJCFLAGS=-no-precomp
+OBJCFLAGS=-fobjc-exceptions
+# -x options generally ignored by ccache, tell it that it can cache
+# the result nevertheless
+CCACHE_SKIP:=$(eq,$(USE_CCACHE),YES --ccache-skip $(NULL))
+OBJCXXFLAGS:=$(CCACHE_SKIP) -x $(CCACHE_SKIP) objective-c++ -fobjc-exceptions
+
+# Comp Flags for files that need exceptions enabled (C and C++)
+CFLAGSEXCEPTIONS=-fexceptions
+
+# Comp Flags for files that do not need exceptions enabled (C and C++)
+CFLAGS_NO_EXCEPTIONS=-fno-exceptions
+
+# Normal C++ compilation flags
+CFLAGSCXX=-pipe -fsigned-char
+
+CFLAGSCXX+= -Wno-ctor-dtor-privacy
+
+PICSWITCH:=-fPIC
+# Other flags
+CFLAGSOBJGUIMT=$(PICSWITCH) -fno-common
+CFLAGSOBJCUIMT=$(PICSWITCH) -fno-common
+CFLAGSSLOGUIMT=$(PICSWITCH) -fno-common
+CFLAGSSLOCUIMT=$(PICSWITCH) -fno-common
+CFLAGSPROF=
+
+# Flag for including debugging information in object files
+CFLAGSDEBUG=-g
+CFLAGSDBGUTIL=
+
+# Flag to specify output file to compiler/linker
+CFLAGSOUTOBJ=-o
+
+# Flags to enable precompiled headers
+CFLAGS_CREATE_PCH=-x c++-header -I$(INCPCH) -DPRECOMPILED_HEADERS
+CFLAGS_USE_PCH=-I$(SLO)/pch -DPRECOMPILED_HEADERS -Winvalid-pch
+CFLAGS_USE_EXCEPTIONS_PCH=-I$(SLO)/pch_ex -DPRECOMPILED_HEADERS -Winvalid-pch
+
+# ---------------------------------
+# Optimization flags
+# ---------------------------------
+CFLAGSOPT=-O2 -fno-strict-aliasing
+CFLAGSNOOPT=-O0
+
+# -Wshadow does not work for C with nested uses of pthread_cleanup_push:
+# -Wshadow does not work for C++ as /usr/include/c++/4.0.0/ext/hashtable.h
+# l. 717 contains a declaration of __cur2 shadowing the declaration at l. 705,
+# in template code for which a #pragma gcc system_header would not work:
+CFLAGSWARNCC=-Wall -Wendif-labels
+CFLAGSWARNCXX=$(CFLAGSWARNCC) -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor
+CFLAGSWALLCC=$(CFLAGSWARNCC)
+CFLAGSWALLCXX=$(CFLAGSWARNCXX)
+CFLAGSWERRCC=-Werror
+
+# All modules on this platform compile without warnings.
+# If you need to set MODULES_WITH_WARNINGS here, comment
+# COMPILER_WARN_ERRORS=TRUE here (see settings.mk):
+COMPILER_WARN_ERRORS=TRUE
+
+#special settings from environment
+CDEFS+=$(EXTRA_CDEFS)
+
+# ---------------------------------
+# STL library names
+# ---------------------------------
+
+CDEFS+=-DHAVE_STL_INCLUDE_PATH -I../v1/
+STDLIBCPP=-lc++
+
+# ---------------------------------
+# Link stage flags
+# ---------------------------------
+
+LINK*=$(CXX)
+LINKC*=$(CC)
+
+###LINKFLAGSDEFS*=-Wl,-multiply_defined,suppress
+# assure backwards-compatibility
+###EXTRA_LINKFLAGS*=-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk
+EXTRA_LINKFLAGS*=-L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk
+# Very long install_names are needed so that install_name_tool -change later on
+# does not complain that "larger updated load commands do not fit:"
+LINKFLAGSRUNPATH_URELIB=-install_name '@__________________________________________________URELIB/$(@:f)'
+LINKFLAGSRUNPATH_UREBIN=
+LINKFLAGSRUNPATH_OOO=-install_name '@__________________________________________________OOO/$(@:f)'
+LINKFLAGSRUNPATH_SDK=
+LINKFLAGSRUNPATH_BRAND=
+LINKFLAGSRUNPATH_OXT=
+LINKFLAGSRUNPATH_BOXT=
+LINKFLAGSRUNPATH_NONE=-install_name '@__________________________________________________NONE/$(@:f)'
+LINKFLAGS=$(LINKFLAGSDEFS)
+
+# [ed] 5/14/02 If we're building for aqua, add in the objc runtime library into our link line
+.IF "$(GUIBASE)" == "aqua"
+ LINKFLAGS+=-lobjc
+ # Sometimes we still use files that would be in a GUIBASE="unx" specific directory
+ # because they really aren't GUIBASE specific, so we've got to account for that here.
+ INCGUI+= -I$(PRJ)/unx/inc
+.ENDIF
+
+#special settings form environment
+LINKFLAGS+=$(EXTRA_LINKFLAGS)
+
+# Random link flags dealing with different cases of linking
+
+LINKFLAGSAPPGUI=-bind_at_load
+LINKFLAGSSHLGUI=-dynamiclib -single_module
+LINKFLAGSAPPCUI=-bind_at_load
+LINKFLAGSSHLCUI=-dynamiclib -single_module
+LINKFLAGSTACK=
+LINKFLAGSPROF=
+
+# Flag to add debugging information to final products
+LINKFLAGSDEBUG=-g
+LINKFLAGSOPT=
+
+# ---------------------------------
+# MacOS X shared library specifics
+# ---------------------------------
+
+# Tag to identify an output file as a library
+DLLPRE=lib
+# File extension to identify dynamic shared libraries on MacOS X
+DLLPOST=.dylib
+# Precompiled header file extension
+PCHPOST=.gch
+
+#LINKVERSIONMAPFLAG=-Xlinker -map -Xlinker
+LINKVERSIONMAPFLAG=-Wl,-map -Wl,
+
+SONAME_SWITCH=-Wl,-h
+
+### STDLIBCPP=-stdlib=libc++
+STDLIBCPP=-lc++
+
+STDOBJVCL=$(L)/salmain.o
+STDOBJGUI=
+STDSLOGUI=
+STDOBJCUI=
+STDSLOCUI=
+
+.IF "$(GUIBASE)" == "aqua"
+ STDLIBCUIMT=CPPRUNTIME -lm
+ STDLIBGUIMT=-framework Carbon -framework Cocoa -lpthread CPPRUNTIME -lm
+ STDSHLCUIMT=-lpthread CPPRUNTIME -lm
+ STDSHLGUIMT=-framework Carbon -framework CoreFoundation -framework Cocoa -lpthread CPPRUNTIME -lm
+.ELSE
+ STDLIBCUIMT= CPPRUNTIME -lm
+ STDLIBGUIMT=-lX11 -lpthread CPPRUNTIME -lm
+ STDSHLCUIMT=-lpthread CPPRUNTIME -lm
+ STDSHLGUIMT=-lX11 -lXext -lpthread CPPRUNTIME -lm -framework CoreFoundation
+.ENDIF
+
+LIBMGR=ar
+LIBFLAGS=-r
+
+IMPLIB=
+IMPLIBFLAGS=
+
+MAPSYM=
+MAPSYMFLAGS=
+
+RC=irc
+RCFLAGS=-fo$@ $(RCFILES)
+RCLINK=
+RCLINKFLAGS=
+RCSETVERSION=
+
+OOO_LIBRARY_PATH_VAR = DYLD_LIBRARY_PATH
diff --git a/solenv/inc/unxmacci.mk b/solenv/inc/unxmacci.mk
new file mode 100644
index 0000000..3dd3ef6
--- /dev/null
+++ b/solenv/inc/unxmacci.mk
@@ -0,0 +1,37 @@
+#**************************************************************
+#
+# 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
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#**************************************************************
+
+# Mac OSX specific defines
+
+PROCESSOR_DEFINES=-DX86
+
+DLLPOSTFIX=
+
+# flags to enable build with symbols; required by crashdump feature
+.IF "$(ENABLE_SYMBOLS)"=="SMALL"
+CFLAGSENABLESYMBOLS=-g1
+.ELSE
+CFLAGSENABLESYMBOLS=-g
+.ENDIF
+
+# Include generic Mac OS X makefile
+.INCLUDE : unxmacc.mk
+
diff --git a/solenv/inc/unxmaccx.mk b/solenv/inc/unxmaccx.mk
new file mode 100644
index 0000000..575c720
--- /dev/null
+++ b/solenv/inc/unxmaccx.mk
@@ -0,0 +1,37 @@
+#**************************************************************
+#
+# 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
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#**************************************************************
+
+# Mac OSX specific defines
+
+PROCESSOR_DEFINES=-DX86_64
+
+DLLPOSTFIX=
+
+# flags to enable build with symbols; required by crashdump feature
+.IF "$(ENABLE_SYMBOLS)"=="SMALL"
+CFLAGSENABLESYMBOLS=-g1
+.ELSE
+CFLAGSENABLESYMBOLS=-g
+.ENDIF
+
+# Include generic Mac OS X makefile
+.INCLUDE : unxmacc.mk
+
commit afbfecb781a7113274e5538475137af59a9d29c1
Author: Oliver-Rainer Wittmann <orw at apache.org>
Date: Thu Jan 2 15:07:01 2014 +0000
123944: WW8 import - be tolerant regarding missing list attributes for Styles
diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx
index fce4ee06..93bc4a7 100644
--- a/sw/source/filter/ww8/ww8par.hxx
+++ b/sw/source/filter/ww8/ww8par.hxx
@@ -177,51 +177,92 @@ struct WW8OleMap
}
};
+
+typedef std::map< sal_uInt16, sal_uInt16 > StyleInList;
class SwWW8ImplReader;
struct WW8LSTInfo;
class WW8ListManager
{
public:
WW8ListManager(SvStream& rSt_, SwWW8ImplReader& rReader_);
+
+ ~WW8ListManager();
+
//Min and Max possible List Levels in Word
enum ListLevel {nMinLevel=1, nMaxLevel=9};
+
//the rParaSprms returns back the original word paragraph indent
//sprms which were attached to the original numbering format
- SwNumRule* GetNumRuleForActivation(sal_uInt16 nLFOPosition, const sal_uInt8 nLevel,
- std::vector<sal_uInt8> &rParaSprms, SwTxtNode *pNode=0);
+ SwNumRule* GetNumRuleForActivation(
+ sal_uInt16 nLFOPosition,
+ const sal_uInt8 nLevel,
+ std::vector<sal_uInt8> &rParaSprms,
+ SwTxtNode *pNode=0 );
+
SwNumRule* CreateNextRule(bool bSimple);
- ~WW8ListManager();
+
SwNumRule* GetNumRule(sal_uInt16 i);
- sal_uInt16 GetWW8LSTInfoNum() const{return static_cast< sal_uInt16 >(maLSTInfos.size());}
+
+ sal_uInt16 GetWW8LSTInfoNum() const
+ {
+ return static_cast< sal_uInt16 >(maLSTInfos.size());
+ }
+
+ sal_uInt16 GetPossibleLFOPosition(
+ const sal_uInt16 aStyleID,
+ const sal_uInt8 aGivenLevel );
+
private:
wwSprmParser maSprmParser;
SwWW8ImplReader& rReader;
SwDoc& rDoc;
const WW8Fib& rFib;
SvStream& rSt;
+
std::vector<WW8LSTInfo* > maLSTInfos;
WW8LFOInfos* pLFOInfos;// D. aus PLF LFO, sortiert genau wie im WW8 Stream
sal_uInt16 nUniqueList; // current number for creating unique list names
- sal_uInt8* GrpprlHasSprm(sal_uInt16 nId, sal_uInt8& rSprms, sal_uInt8 nLen);
- WW8LSTInfo* GetLSTByListId( sal_uInt32 nIdLst ) const;
+
+ // Style-ListStyle-relationship
+ // - needed to determine default ListStyle for a certain Style in case the ListStyle information is missing at the Style
+ StyleInList maStyleInList;
+
+ sal_uInt8* GrpprlHasSprm(
+ sal_uInt16 nId,
+ sal_uInt8& rSprms,
+ sal_uInt8 nLen);
+
+ WW8LSTInfo* GetLSTByListId( sal_uInt32 nIdLst ) const;
+
//the rParaSprms returns back the original word paragraph indent
//sprms which are attached to this numbering level
- bool ReadLVL(SwNumFmt& rNumFmt, SfxItemSet*& rpItemSet, sal_uInt16 nLevelStyle,
- bool bSetStartNo, std::deque<bool> &rNotReallyThere, sal_uInt16 nLevel,
+ bool ReadLVL(
+ SwNumFmt& rNumFmt,
+ SfxItemSet*& rpItemSet,
+ sal_uInt16 nLevelStyle,
+ bool bSetStartNo,
+ std::deque<bool> &rNotReallyThere,
+ sal_uInt16 nLevel,
std::vector<sal_uInt8> &rParaSprms);
// Zeichenattribute aus GrpprlChpx
typedef SfxItemSet* WW8aISet[nMaxLevel];
+
// Zeichen Style Pointer
typedef SwCharFmt* WW8aCFmt[nMaxLevel];
- void AdjustLVL(sal_uInt8 nLevel, SwNumRule& rNumRule, WW8aISet& rListItemSet,
- WW8aCFmt& aCharFmt, bool& bNewCharFmtCreated,
- String aPrefix = aEmptyStr);
+ void AdjustLVL(
+ sal_uInt8 nLevel,
+ SwNumRule& rNumRule,
+ WW8aISet& rListItemSet,
+ WW8aCFmt& aCharFmt,
+ bool& bNewCharFmtCreated,
+ String aPrefix = aEmptyStr );
//No copying
- WW8ListManager(const WW8ListManager&);
- WW8ListManager& operator=(const WW8ListManager&);
+ WW8ListManager( const WW8ListManager& );
+ WW8ListManager& operator=( const WW8ListManager& );
+
sal_uInt16 nLastLFOPosition;
};
diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx
index b607f59..8f417a4 100644
--- a/sw/source/filter/ww8/ww8par3.cxx
+++ b/sw/source/filter/ww8/ww8par3.cxx
@@ -1140,10 +1140,18 @@ SwNumRule* WW8ListManager::GetNumRule(sal_uInt16 i)
// oeffentliche Methoden /////////////////////////////////////////////////////
//
-WW8ListManager::WW8ListManager(SvStream& rSt_, SwWW8ImplReader& rReader_)
- : maSprmParser(rReader_.GetFib().GetFIBVersion()), rReader(rReader_),
- rDoc(rReader.GetDoc()), rFib(rReader.GetFib()), rSt(rSt_), pLFOInfos(0),
- nUniqueList(1)
+WW8ListManager::WW8ListManager(
+ SvStream& rSt_,
+ SwWW8ImplReader& rReader_ )
+ : maSprmParser( rReader_.GetFib().GetFIBVersion() )
+ , rReader(rReader_)
+ , rDoc(rReader.GetDoc())
+ , rFib(rReader.GetFib())
+ , rSt(rSt_)
+ , maLSTInfos()
+ , pLFOInfos( NULL )
+ , nUniqueList( 1 )
+ , maStyleInList()
{
// LST und LFO gibts erst ab WW8
if( ( 8 > rFib.nVersion )
@@ -1323,16 +1331,24 @@ WW8ListManager::WW8ListManager(SvStream& rSt_, SwWW8ImplReader& rReader_)
}
// und rein ins Merk-Array mit dem Teil
WW8LFOInfo* pLFOInfo = new WW8LFOInfo(aLFO);
- if (pParentListInfo)
+ if ( pParentListInfo != NULL )
{
//Copy the basic paragraph properties for each level from the
//original list into the list format override levels.
int nMaxSize = pParentListInfo->maParaSprms.size();
pLFOInfo->maParaSprms.resize(nMaxSize);
for (int i = 0; i < nMaxSize; ++i)
+ {
pLFOInfo->maParaSprms[i] = pParentListInfo->maParaSprms[i];
+ }
+
+ const sal_uInt16 nLFOInfoArrayPos = pLFOInfos->Count();
+ for ( sal_uInt8 j = 0 ; j < nMaxLevel; ++j )
+ {
+ maStyleInList[pParentListInfo->aIdSty[j]] = nLFOInfoArrayPos;
+ }
}
- pLFOInfos->Insert(pLFOInfo, pLFOInfos->Count());
+ pLFOInfos->Insert( pLFOInfo, pLFOInfos->Count() );
bOk = true;
}
}
@@ -1536,6 +1552,29 @@ WW8ListManager::~WW8ListManager()
}
}
+sal_uInt16 WW8ListManager::GetPossibleLFOPosition(
+ const sal_uInt16 nStyleID,
+ const sal_uInt8 nGivenListLevel )
+{
+ sal_uInt16 nPossibleLFOPosition = USHRT_MAX;
+
+ StyleInList::iterator aItr = maStyleInList.find( nStyleID );
+ if ( aItr != maStyleInList.end()
+ && aItr->second < pLFOInfos->Count() )
+ {
+ WW8LFOInfo* pLFOInfo = pLFOInfos->GetObject( aItr->second );
+ WW8LSTInfo* pParentListInfo = GetLSTByListId( pLFOInfo->nIdLst );
+ if ( pParentListInfo != NULL
+ && pParentListInfo->aIdSty[nGivenListLevel] == nStyleID )
+ {
+ nPossibleLFOPosition = aItr->second;
+ }
+ }
+
+ return nPossibleLFOPosition;
+}
+
+
bool IsEqualFormatting(const SwNumRule &rOne, const SwNumRule &rTwo)
{
bool bRet =
@@ -1688,10 +1727,12 @@ SwNumRule* WW8ListManager::GetNumRuleForActivation(sal_uInt16 nLFOPosition,
return pRet;
}
+
//----------------------------------------------------------------------------
// SwWW8ImplReader: anhaengen einer Liste an einen Style oder Absatz
//----------------------------------------------------------------------------
-bool SwWW8ImplReader::SetTxtFmtCollAndListLevel(const SwPaM& rRg,
+bool SwWW8ImplReader::SetTxtFmtCollAndListLevel(
+ const SwPaM& rRg,
SwWW8StyInf& rStyleInfo)
{
bool bRes = true;
@@ -1744,7 +1785,6 @@ bool SwWW8ImplReader::SetTxtFmtCollAndListLevel(const SwPaM& rRg,
void UseListIndent(SwWW8StyInf &rStyle, const SwNumFmt &rFmt)
{
- // --> OD 2008-06-03 #i86652#
if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
const long nAbsLSpace = rFmt.GetAbsLSpace();
@@ -1755,22 +1795,16 @@ void UseListIndent(SwWW8StyInf &rStyle, const SwNumFmt &rFmt)
rStyle.pFmt->SetFmtAttr(aLR);
rStyle.bListReleventIndentSet = true;
}
- // <--
}
void SetStyleIndent(SwWW8StyInf &rStyle, const SwNumFmt &rFmt)
{
- // --> OD 2008-06-03 #i86652#
if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
- // <--
{
SvxLRSpaceItem aLR(ItemGet<SvxLRSpaceItem>(*rStyle.pFmt, RES_LR_SPACE));
if (rStyle.bListReleventIndentSet)
{
- // --> OD 2010-05-06 #i103711#
- // --> OD 2010-05-11 #i105414#
SyncIndentWithList( aLR, rFmt, false, false );
- // <--
}
else
{
@@ -1781,7 +1815,9 @@ void SetStyleIndent(SwWW8StyInf &rStyle, const SwNumFmt &rFmt)
}
}
-void SwWW8ImplReader::SetStylesList(sal_uInt16 nStyle, sal_uInt16 nActLFO,
+void SwWW8ImplReader::SetStylesList(
+ sal_uInt16 nStyle,
+ sal_uInt16 nActLFO,
sal_uInt8 nActLevel)
{
SwWW8StyInf &rStyleInf = pCollA[nStyle];
@@ -1818,7 +1854,7 @@ void SwWW8ImplReader::SetStylesList(sal_uInt16 nStyle, sal_uInt16 nActLFO,
}
}
-void SwWW8ImplReader::RegisterNumFmtOnStyle(sal_uInt16 nStyle)
+void SwWW8ImplReader::RegisterNumFmtOnStyle( sal_uInt16 nStyle )
{
SwWW8StyInf &rStyleInf = pCollA[nStyle];
if (rStyleInf.bValid && rStyleInf.pFmt)
@@ -1858,8 +1894,10 @@ void SwWW8ImplReader::RegisterNumFmtOnStyle(sal_uInt16 nStyle)
}
}
-void SwWW8ImplReader::RegisterNumFmtOnTxtNode(sal_uInt16 nActLFO,
- sal_uInt8 nActLevel, bool bSetAttr)
+void SwWW8ImplReader::RegisterNumFmtOnTxtNode(
+ sal_uInt16 nActLFO,
+ sal_uInt8 nActLevel,
+ bool bSetAttr)
{
// beachte: die Methode haengt die NumRule an den Text Node, falls
// bSetAttr (dann muessen natuerlich vorher die Listen gelesen sein)
@@ -1911,23 +1949,14 @@ void SwWW8ImplReader::RegisterNumFmtOnTxtNode(sal_uInt16 nActLFO,
}
}
}
- // --> OD 2005-10-17 #126238#
- // - re-introduce fix for issue #i49037#, which got lost by
- // accident on a re-synchronisation on the master.
-// if (pTxtNd->IsOutline() && pTxtNd->Len() == 0)
-// pTxtNd->SetCounted(false);
- // <--
pTxtNd->SetAttrListLevel(nActLevel);
- // --> OD 2005-11-01 #126924#
// - <IsCounted()> state of text node has to be adjusted accordingly.
if ( /*nActLevel >= 0 &&*/ nActLevel < MAXLEVEL )
{
pTxtNd->SetCountedInList( true );
}
- // <--
- // --> OD 2009-03-04 #i99822#
// Direct application of the list level formatting no longer
// needed for list levels of mode LABEL_ALIGNMENT
bool bApplyListLevelIndentDirectlyAtPara( true );
@@ -1981,7 +2010,6 @@ void SwWW8ImplReader::RegisterNumFmtOnTxtNode(sal_uInt16 nActLFO,
pCtrlStck->SetAttr(*pPaM->GetPoint(), RES_LR_SPACE);
}
}
- // <--
}
}
}
@@ -2028,21 +2056,35 @@ void SwWW8ImplReader::Read_ListLevel(sal_uInt16, const sal_uInt8* pData,
}
if (WW8ListManager::nMaxLevel <= nListLevel )
+ {
+ // handle invalid list level value by reseting it
nListLevel = WW8ListManager::nMaxLevel;
- else if
- (
- (USHRT_MAX > nLFOPosition) &&
- (WW8ListManager::nMaxLevel > nListLevel)
- )
+ }
+ else if ( nLFOPosition < USHRT_MAX
+ && nListLevel < WW8ListManager::nMaxLevel )
{
- RegisterNumFmt(nLFOPosition, nListLevel);
+ RegisterNumFmt( nLFOPosition, nListLevel );
+ // reset kept list attributes
nLFOPosition = USHRT_MAX;
nListLevel = WW8ListManager::nMaxLevel;
}
+ else if ( pLstManager != NULL
+ && pAktColl != NULL )
+ {
+ const sal_uInt16 nPossibleLFOPosition =
+ pLstManager->GetPossibleLFOPosition( nAktColl, nListLevel );
+ if ( nPossibleLFOPosition < USHRT_MAX )
+ {
+ // temporary register Style without reseting kept list attributes
+ RegisterNumFmt( nPossibleLFOPosition, nListLevel );
+ }
+ }
}
}
-void SwWW8ImplReader::Read_LFOPosition(sal_uInt16, const sal_uInt8* pData,
+void SwWW8ImplReader::Read_LFOPosition(
+ sal_uInt16,
+ const sal_uInt8* pData,
short nLen)
{
if (pPlcxMan && pPlcxMan->GetDoingDrawTextBox())
@@ -2080,13 +2122,7 @@ void SwWW8ImplReader::Read_LFOPosition(sal_uInt16, const sal_uInt8* pData,
}
else if (SwTxtNode* pTxtNode = pPaM->GetNode()->GetTxtNode())
{
- // --> OD 2005-10-21 #i54393#
- // - Reset hard set numbering rule at paragraph instead of
- // setting hard no numbering.
-// pTxtNode->SwCntntNode::SetAttr
-// (*GetDfltAttr(RES_PARATR_NUMRULE));
pTxtNode->ResetAttr( RES_PARATR_NUMRULE );
- // <--
pTxtNode->SetCountedInList(false);
/*
@@ -2101,9 +2137,6 @@ void SwWW8ImplReader::Read_LFOPosition(sal_uInt16, const sal_uInt8* pData,
*/
if (pTxtNode->IsOutline())
{
- // OD 2005-10-21 #i54393#
- // It's not needed to call <SetCounted( false )> again - see above.
- // --> OD 2005-10-21 #i54393#
// Assure that the numbering rule, which is retrieved at
// the paragraph is the outline numbering rule, instead of
// incorrectly setting the chosen outline rule.
@@ -2114,7 +2147,6 @@ void SwWW8ImplReader::Read_LFOPosition(sal_uInt16, const sal_uInt8* pData,
pTxtNode->SetAttr(
SwNumRuleItem( rDoc.GetOutlineNumRule()->GetName() ) );
}
- // <--
}
//#94672#
@@ -2134,19 +2166,30 @@ void SwWW8ImplReader::Read_LFOPosition(sal_uInt16, const sal_uInt8* pData,
indentation. Setting this flag will allow us to recover from this
braindeadness
*/
- if (pAktColl && (nLFOPosition == 2047-1))
+ if ( pAktColl
+ && (nLFOPosition == 2047-1) )
+ {
pCollA[nAktColl].bHasBrokenWW6List = true;
+ }
// die Streamdaten sind hier 1 basiert, wir ziehen EINS ab
if (USHRT_MAX > nLFOPosition)
{
if (nLFOPosition != 2047-1) //Normal ww8+ list behaviour
{
- if (WW8ListManager::nMaxLevel == nListLevel)
+ if ( nListLevel == WW8ListManager::nMaxLevel )
+ {
nListLevel = 0;
+ if ( pAktColl != NULL )
+ {
+ // temporary register Style without reseting kept list attributes
+ RegisterNumFmt( nLFOPosition, nListLevel );
+ }
+ }
else if (WW8ListManager::nMaxLevel > nListLevel)
{
RegisterNumFmt(nLFOPosition, nListLevel);
+ // reset kept list attributes
nLFOPosition = USHRT_MAX;
nListLevel = WW8ListManager::nMaxLevel;
}
@@ -2154,8 +2197,7 @@ void SwWW8ImplReader::Read_LFOPosition(sal_uInt16, const sal_uInt8* pData,
else if (pPlcxMan && pPlcxMan->HasParaSprm(0xC63E))
{
/*
- #i8114# Horrific backwards compatible ww7- lists in ww8+
- docs
+ #i8114# Horrific backwards compatible ww7- lists in ww8+ docs
*/
Read_ANLevelNo(13 /*equiv ww7- sprm no*/, &nListLevel, 1);
}
commit 00fc58089b2c5e7788f9f366312e7b56691e5f9a
Author: Herbert Dürr <hdu at apache.org>
Date: Thu Jan 2 14:20:44 2014 +0000
#i123947# fix stlport emulation wrappers when compiling in C++11 mode
When compiling in C++11 mode the system provided TR1 compliant headers are
already required to be available and to be in the std namespace. The wrappers
trying to map the TR1 containers into the std namespace too is problematic
then, so it must be avoided in C++11 mode. Having TR1 compliant headers
available directly also makes the stlport4 emulation simpler.
diff --git a/stlport/systemstl/hash_map b/stlport/systemstl/hash_map
index a14bb68..27ad691 100644
--- a/stlport/systemstl/hash_map
+++ b/stlport/systemstl/hash_map
@@ -25,6 +25,8 @@
#ifdef HAVE_STL_INCLUDE_PATH
// TODO: use computed include file name
#include_next <unordered_map>
+#elif defined(__cplusplus) && (__cplusplus >= 201103L)
+ #include <unordered_map>
#elif defined(_MSC_VER)
#include <../../VC/include/unordered_map>
#define STLP4_EMUBASE_NS ::std::tr1
diff --git a/stlport/systemstl/hash_set b/stlport/systemstl/hash_set
index c97ee05..3bffc11 100644
--- a/stlport/systemstl/hash_set
+++ b/stlport/systemstl/hash_set
@@ -25,6 +25,8 @@
#ifdef HAVE_STL_INCLUDE_PATH
// TODO: use computed include file name
#include_next <unordered_set>
+#elif defined(__cplusplus) && (__cplusplus >= 201103L)
+ #include <unordered_set>
#elif defined(_MSC_VER)
#include <../../VC/include/unordered_set>
#define STLP4_EMUBASE_NS ::std::tr1
diff --git a/stlport/systemstl/slist b/stlport/systemstl/slist
index 10e55ef..a51fc24 100644
--- a/stlport/systemstl/slist
+++ b/stlport/systemstl/slist
@@ -25,6 +25,8 @@
#ifdef HAVE_STL_INCLUDE_PATH
// TODO: use computed include file name
#include_next <forward_list>
+#elif defined(__cplusplus) && (__cplusplus >= 201103L)
+ #include <forward_list>
#elif defined(_MSC_VER)
#include <../../VC/include/list>
#define STLP4_SLIST_WITH_LIST
More information about the Libreoffice-commits
mailing list