You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by or...@apache.org on 2012/08/20 13:46:47 UTC
svn commit: r1374979 [17/29] - in /incubator/ooo/branches/writer001: ./
ext_libraries/apr-util/ ext_libraries/apr-util/prj/ ext_libraries/apr/
ext_libraries/coinmp/ ext_libraries/hunspell/ ext_libraries/serf/
ext_libraries/serf/prj/ ext_sources/ extras...
Modified: incubator/ooo/branches/writer001/main/filter/inc/filter/msfilter/svdfppt.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/filter/inc/filter/msfilter/svdfppt.hxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/filter/inc/filter/msfilter/svdfppt.hxx (original)
+++ incubator/ooo/branches/writer001/main/filter/inc/filter/msfilter/svdfppt.hxx Mon Aug 20 11:46:19 2012
@@ -580,7 +580,8 @@ protected:
sal_uInt32 GetNotesPageId(sal_uInt16 nPageNum ) const;
SdrOutliner* GetDrawOutliner( SdrTextObj* pSdrText ) const;
void SeekOle( SfxObjectShell* pShell, sal_uInt32 nFilterOptions );
-
+ void ApplyTextAnchorAttributes( PPTTextObj& rTextObj, SfxItemSet& rSet ) const;
+ sal_Bool IsVerticalText() const;
public:
SdrPowerPointImport( PowerPointImportParam&, const String& rBaseURL );
virtual ~SdrPowerPointImport();
@@ -764,6 +765,7 @@ struct PPTParaSheet
void Read( SdrPowerPointImport& rMan, SvStream& rIn, sal_Bool bMasterStyle,
sal_uInt32 nLevel, sal_Bool bFirst );
+ void UpdateBulletRelSize( sal_uInt32 nLevel, sal_uInt16 nFontHeight );
};
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -1093,7 +1095,7 @@ struct ImplPPTTextObj
ImplPPTTextObj( PptSlidePersistEntry& rPersistEntry ) : mrPersistEntry ( rPersistEntry ) {};
};
-class PPTTextObj
+class MSFILTER_DLLPUBLIC PPTTextObj
{
ImplPPTTextObj* mpImplTextObj;
void ImplClear();
Modified: incubator/ooo/branches/writer001/main/filter/prj/d.lst
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/filter/prj/d.lst?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/filter/prj/d.lst (original)
+++ incubator/ooo/branches/writer001/main/filter/prj/d.lst Mon Aug 20 11:46:19 2012
@@ -19,11 +19,13 @@ mkdir: %_DEST%\bin%_EXT%\xslt\export\spr
mkdir: %_DEST%\bin%_EXT%\xslt\export\wiki
mkdir: %_DEST%\bin%_EXT%\xslt\export\wordml
mkdir: %_DEST%\bin%_EXT%\xslt\export\uof
+mkdir: %_DEST%\bin%_EXT%\xslt\export\uof2
mkdir: %_DEST%\bin%_EXT%\xslt\export\xhtml
mkdir: %_DEST%\bin%_EXT%\xslt\import
mkdir: %_DEST%\bin%_EXT%\xslt\import\common
mkdir: %_DEST%\bin%_EXT%\xslt\import\spreadsheetml
mkdir: %_DEST%\bin%_EXT%\xslt\import\uof
+mkdir: %_DEST%\bin%_EXT%\xslt\import\uof2
mkdir: %_DEST%\bin%_EXT%\xslt\import\wordml
mkdir: %_DEST%\xml%_EXT%\registry
mkdir: %_DEST%\xml%_EXT%\registry\spool
@@ -38,12 +40,14 @@ mkdir: %_DEST%\bin%_EXT%\pdfimport
..\source\xslt\export\wiki\*.ott %_DEST%\bin%_EXT%\xslt\export\wiki\*.ott
..\source\xslt\export\wordml\*.xsl %_DEST%\bin%_EXT%\xslt\export\wordml\*.xsl
..\source\xslt\export\uof\*.xsl %_DEST%\bin%_EXT%\xslt\export\uof\*.xsl
+..\source\xslt\export\uof2\*.xsl %_DEST%\bin%_EXT%\xslt\export\uof2\*.xsl
..\source\xslt\export\xhtml\*.xsl %_DEST%\bin%_EXT%\xslt\export\xhtml\*.xsl
..\source\xslt\odf2xhtml\export\xhtml\*.xsl %_DEST%\bin%_EXT%\xslt\export\xhtml\*.xsl
..\source\xslt\import\common\*.xsl %_DEST%\bin%_EXT%\xslt\import\common\*.xsl
..\source\xslt\import\spreadsheetml\*.xsl %_DEST%\bin%_EXT%\xslt\import\spreadsheetml\*.xsl
..\source\xslt\import\wordml\*.xsl %_DEST%\bin%_EXT%\xslt\import\wordml\*.xsl
..\source\xslt\import\uof\*.xsl %_DEST%\bin%_EXT%\xslt\import\uof\*.xsl
+..\source\xslt\import\uof2\*.xsl %_DEST%\bin%_EXT%\xslt\import\uof2\*.xsl
..\%__SRC%\bin\*.xsl %_DEST%\bin%_EXT%\*.xsl
..\%__SRC%\bin\*.stw %_DEST%\bin%_EXT%\*.stw
..\%__SRC%\bin\pdf2xml.* %_DEST%\bin%_EXT%\pdf2xml.*
Modified: incubator/ooo/branches/writer001/main/filter/source/config/fragments/fcfg_calc.mk
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/filter/source/config/fragments/fcfg_calc.mk?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/filter/source/config/fragments/fcfg_calc.mk (original)
+++ incubator/ooo/branches/writer001/main/filter/source/config/fragments/fcfg_calc.mk Mon Aug 20 11:46:19 2012
@@ -43,6 +43,7 @@ T4_CALC = \
pdf_Portable_Document_Format \
calc_dBase\
calc8\
+ calc_NSO_UOF2 \
calc8_template \
calc_MS_Excel_2003_XML \
MS_Excel_2007_XML \
@@ -73,6 +74,7 @@ F4_CALC = \
calc_pdf_Export \
dBase \
calc8 \
+ NSO_Calc_UOF2 \
calc8_template \
MS_Excel_2003_XML \
calc_MS_Excel_2007_XML \
@@ -92,6 +94,7 @@ F4_UI_CALC = \
calc_HTML_WebQuery_ui \
calc_StarOffice_XML_Calc_Template_ui \
calc8_ui \
+ NSO_Calc_UOF2_ui \
calc8_template_ui \
MS_Excel_2003_XML_ui \
calc_MS_Excel_2007_XML_ui \
Modified: incubator/ooo/branches/writer001/main/filter/source/config/fragments/fcfg_impress.mk
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/filter/source/config/fragments/fcfg_impress.mk?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/filter/source/config/fragments/fcfg_impress.mk (original)
+++ incubator/ooo/branches/writer001/main/filter/source/config/fragments/fcfg_impress.mk Mon Aug 20 11:46:19 2012
@@ -31,6 +31,7 @@ T4_IMPRESS = \
pdf_Portable_Document_Format \
pwp_PlaceWare\
impress8\
+ impress_NSO_UOF2 \
impress8_template\
draw8\
MS_PowerPoint_2007_XML\
@@ -47,6 +48,7 @@ F4_IMPRESS = \
impress_pdf_Export \
placeware_Export\
impress8\
+ NSO_Impress_UOF2 \
impress8_template\
impress8_draw\
impress_MS_PowerPoint_2007_XML\
@@ -60,6 +62,7 @@ F4_UI_IMPRESS = \
StarOffice_XML__Impress__ui \
impress_StarOffice_XML_Impress_Template_ui \
impress8_ui \
+ NSO_Impress_UOF2_ui \
impress8_template_ui \
impress8_draw_ui \
impress_MS_PowerPoint_2007_XML_ui \
Modified: incubator/ooo/branches/writer001/main/filter/source/config/fragments/fcfg_writer.mk
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/filter/source/config/fragments/fcfg_writer.mk?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/filter/source/config/fragments/fcfg_writer.mk (original)
+++ incubator/ooo/branches/writer001/main/filter/source/config/fragments/fcfg_writer.mk Mon Aug 20 11:46:19 2012
@@ -45,6 +45,7 @@ T4_WRITER = \
pdf_Portable_Document_Format\
writer8_template\
writer8 \
+ writer_NSO_UOF2 \
writer_MS_Word_2003_XML \
writer_MS_Word_2007_XML \
writer_MS_Word_2007_XML_Template
@@ -77,6 +78,7 @@ F4_WRITER = \
writer_StarOffice_XML_Writer_Template \
writer_pdf_Export\
writer8\
+ NSO_Writer_UOF2 \
writer8_template \
MS_Word_2003_XML \
MS_Word_2007_XML \
@@ -98,6 +100,7 @@ F4_UI_WRITER = \
Text__encoded__ui \
writer_StarOffice_XML_Writer_Template_ui \
writer8_ui \
+ NSO_Writer_UOF2_ui \
writer8_template_ui \
MS_Word_2003_XML_ui \
MS_Word_2007_XML_ui \
Modified: incubator/ooo/branches/writer001/main/filter/source/config/tools/merge/pyAltFCFGMerge
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/filter/source/config/tools/merge/pyAltFCFGMerge?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/filter/source/config/tools/merge/pyAltFCFGMerge (original)
+++ incubator/ooo/branches/writer001/main/filter/source/config/tools/merge/pyAltFCFGMerge Mon Aug 20 11:46:19 2012
@@ -1,4 +1,4 @@
-#!/bin/env python
+#!/usr/bin/env python
#_____________________________________________
# Caolan McNamara caolanm@redhat.com
# converted from original java written by Andreas Schluens so we can continue
@@ -9,7 +9,7 @@
# there is a java which is available for use by all
#_____________________________________________
-import sys, string, os.path
+import sys, string, os.path
CFGFILE = os.environ["SOLARVER"] + "/" + os.environ["INPATH"] + "/inc/l10ntools/FCFGMerge.cfg"
@@ -44,14 +44,14 @@ PROP_ITEMS = "items"
#---begin java.util.Properties copy---#
"""
-An incomplete clean room implementation of
+An incomplete clean room implementation of
java.util.Properties written in Python.
Copyright (C) 2002,2004 - Ollie Rutherfurd <ol...@rutherfurd.net>
Based on:
- http://java.sun.com/j2se/1.3/docs/api/java/util/Properties.html
+ http://java.sun.com/j2se/1.3/docs/api/java/util/Properties.html
Missing:
@@ -89,198 +89,199 @@ __all__ = ['Properties']
def dec2hex(n):
- h = hex(n)[2:].upper()
- return '\\u' + '0' * (4 - len(h)) + h
+ h = hex(n)[2:].upper()
+ return '\\u' + '0' * (4 - len(h)) + h
def escapestr(s):
- buff = []
- # QUESTION: escape leading or trailing spaces?
- for c in s:
- if c == '\\':
- buff.append('\\\\')
- elif c == '\t':
- buff.append('\\t')
- elif c == '\n':
- buff.append('\\n')
- elif c == '\r':
- buff.append('\\r')
- elif c == ' ':
- buff.append('\\ ')
- elif c == "'":
- buff.append("\\'")
- elif c == '"':
- buff.append('\\"')
- elif c == '#':
- buff.append('\\#')
- elif c == '!':
- buff.append('\\!')
- elif c == '=':
- buff.append('\\=')
- elif 32 <= ord(c) <= 126:
- buff.append(c)
- else:
- buff.append(dec2hex(c))
+ buff = []
+ # QUESTION: escape leading or trailing spaces?
+ for c in s:
+ if c == '\\':
+ buff.append('\\\\')
+ elif c == '\t':
+ buff.append('\\t')
+ elif c == '\n':
+ buff.append('\\n')
+ elif c == '\r':
+ buff.append('\\r')
+ elif c == ' ':
+ buff.append('\\ ')
+ elif c == "'":
+ buff.append("\\'")
+ elif c == '"':
+ buff.append('\\"')
+ elif c == '#':
+ buff.append('\\#')
+ elif c == '!':
+ buff.append('\\!')
+ elif c == '=':
+ buff.append('\\=')
+ elif 32 <= ord(c) <= 126:
+ buff.append(c)
+ else:
+ buff.append(dec2hex(c))
- return ''.join(buff)
+ return ''.join(buff)
# TODO: add support for \uXXXX?
def unescapestr(line):
- buff = []
- escape = 0
- for i in range(len(line)):
- c = line[i]
- if c == '\\':
- if escape:
- escape = 0
- buff.append('\\')
- continue
- else:
- # this is to deal with '\'
- # acting as a line continuation
- # character
- if i == len(line) - 1:
- buff.append('\\')
- break
- else:
- escape = 1
- continue
- elif c == 'n':
- if escape:
- escape = 0
- buff.append('\n')
- continue
- elif c == 'r':
- if escape:
- escape = 0
- buff.append('\r')
- continue
- elif c == 't':
- if escape:
- escape = 0
- buff.append('\t')
- continue
-
- buff.append(c)
-
- # make sure escape doesn't stay one
- # all expected escape sequences either break
- # or continue, so this should be safe
- if escape:
- escape = 0
+ buff = []
+ escape = 0
+ for i in range(len(line)):
+ c = line[i]
+ if c == '\\':
+ if escape:
+ escape = 0
+ buff.append('\\')
+ continue
+ else:
+ # this is to deal with '\'
+ # acting as a line continuation
+ # character
+ if i == len(line) - 1:
+ buff.append('\\')
+ break
+ else:
+ escape = 1
+ continue
+ elif c == 'n':
+ if escape:
+ escape = 0
+ buff.append('\n')
+ continue
+ elif c == 'r':
+ if escape:
+ escape = 0
+ buff.append('\r')
+ continue
+ elif c == 't':
+ if escape:
+ escape = 0
+ buff.append('\t')
+ continue
- return ''.join(buff)
+ buff.append(c)
+
+ # make sure escape doesn't stay one
+ # all expected escape sequences either break
+ # or continue, so this should be safe
+ if escape:
+ escape = 0
+
+ return ''.join(buff)
class Properties(dict):
- def __init__(self, defaults={}):
- dict.__init__(self)
- for n,v in defaults.items():
- self[n] = v
-
- def __getittem__(self,key):
- try:
- return dict.__getittem__(self,key)
- except KeyError:
- return None
-
- def read(self,filename):
- """
- Reads properties from a file (java Property class
- reads from an input stream -- see load()).
- """
- f = None
- try:
- f = open(filename)
- self.load(f)
- finally:
- if f:
- f.close()
-
- def load(self, buff):
- """
- Reads properties from a stream (StringIO, file, etc...)
- """
- props = readprops(buff)
- for n,v in props.iteritems():
- self[n] = v
+ def __init__(self, defaults={}):
+ dict.__init__(self)
+ for n,v in defaults.items():
+ self[n] = v
+
+ def __getittem__(self,key):
+ try:
+ return dict.__getittem__(self,key)
+ except KeyError:
+ return None
+
+ def read(self,filename):
+ """
+ Reads properties from a file (java Property class
+ reads from an input stream -- see load()).
+ """
+ f = None
+ try:
+ f = open(filename)
+ self.load(f)
+ finally:
+ if f:
+ f.close()
+
+ def load(self, buff):
+ """
+ Reads properties from a stream (StringIO, file, etc...)
+ """
+ props = readprops(buff)
+ #for n,v in props.iteritems():
+ for n in props.keys():
+ self[n] = props[n]
def readprops(buff):
- name,value = None,''
- props = {}
- continued = 0
-
- while 1:
- line = buff.readline()
- if not line:
- break
- line = line.strip()
-
- # empty line
- if not line:
- continue
-
- # comment
- if line[0] in ('#','!'):
- continue
-
- # find name
- i,escaped = 0,0
- while i < len(line):
- c = line[i]
-
- if c == '\\':
- if escaped:
- escaped = 0
- else:
- escaped = 1
- i += 1
- continue
-
- elif c in (' ', '\t', ':', '=') and not escaped:
- name = unescapestr(line[:i])
- break
-
- # make sure escaped doesn't stay on
- if escaped:
- escaped = 0
-
- i += 1
-
- # no dlimiter was found, name is entire line, there is no value
- if name == None:
- name = unescapestr(line.lstrip())
-
- # skip delimiter
- while line[i:i+1] in ('\t', ' ', ':', '='):
- i += 1
-
- value = unescapestr(line[i:].strip())
- while value[-1:] == '\\':
- value = value[:-1] # remove \
- line = buff.readline()
- if not line:
- break
- value += unescapestr(line.strip())
+ name,value = None,''
+ props = {}
+ continued = 0
+
+ while 1:
+ line = buff.readline()
+ if not line:
+ break
+ line = line.strip()
+
+ # empty line
+ if not line:
+ continue
+
+ # comment
+ if line[0] in ('#','!'):
+ continue
+
+ # find name
+ i,escaped = 0,0
+ while i < len(line):
+ c = line[i]
+
+ if c == '\\':
+ if escaped:
+ escaped = 0
+ else:
+ escaped = 1
+ i += 1
+ continue
+
+ elif c in (' ', '\t', ':', '=') and not escaped:
+ name = unescapestr(line[:i])
+ break
+
+ # make sure escaped doesn't stay on
+ if escaped:
+ escaped = 0
+
+ i += 1
+
+ # no dlimiter was found, name is entire line, there is no value
+ if name == None:
+ name = unescapestr(line.lstrip())
+
+ # skip delimiter
+ while line[i:i+1] in ('\t', ' ', ':', '='):
+ i += 1
+
+ value = unescapestr(line[i:].strip())
+ while value[-1:] == '\\':
+ value = value[:-1] # remove \
+ line = buff.readline()
+ if not line:
+ break
+ value += unescapestr(line.strip())
- #print 'value:',value ##
- props[name] = value
+ #print 'value:',value ##
+ props[name] = value
- return props
+ return props
#---end java.util.Properties copy---#
# Its a simple command line tool, which can merge different XML fragments
# together. Such fragments must exist as files on disk, will be moved into
# one file together on disk.
-#
+#
# @author Andreas Schluens
-#
+#
def run(sCmdLine):
printCopyright()
@@ -299,21 +300,21 @@ def run(sCmdLine):
#prints out a copyright message on stdout.
def printCopyright():
- print "FCFGMerge"
- print "Copyright: 2003 by Red Hat, Inc., based on FCFGMerge.java` by Sun"
- print "All Rights Reserved."
+ print("FCFGMerge")
+ print("Copyright: 2003 by Red Hat, Inc., based on FCFGMerge.java` by Sun")
+ print("All Rights Reserved.")
#prints out a help message on stdout.
def printHelp():
- print "____________________________________________________________"
- print "usage: FCFGMerge cfg=<file name>"
- print "parameters:"
- print "\tcfg=<file name>"
- print "\t\tmust point to a system file, which contains"
- print "\t\tall neccessary configuration data for the merge process."
- print "\tFurther cou can specify every parameter allowed in the"
- print "\tconfig file as command line parameter too, to overwrite"
- print "\tthe value from the file."
+ print("____________________________________________________________")
+ print("usage: FCFGMerge cfg=<file name>")
+ print("parameters:")
+ print("\tcfg=<file name>")
+ print("\t\tmust point to a system file, which contains")
+ print("\t\tall neccessary configuration data for the merge process.")
+ print("\tFurther cou can specify every parameter allowed in the")
+ print("\tconfig file as command line parameter too, to overwrite")
+ print("\tthe value from the file.")
def StringTokenizer(mstring, separators, isSepIncluded=0):
#Return a list of tokens given a base string and a string of
@@ -337,11 +338,11 @@ def StringTokenizer(mstring, separators,
# and merge it together with might existing config
# files. That provides the possibility to overwrite
# config values via command line parameter.
-#
+#
# @author Andreas Schluens
class ConfigHelper:
def __init__(self, sPropFile, lCommandLineArgs):
- self.m_bEmpty = 1
+ self.m_bEmpty = 1
# first load prop file, so its values can be overwritten
# by command line args later
# Do it only, if a valid file name was given.
@@ -354,9 +355,10 @@ class ConfigHelper:
count = 0
if lCommandLineArgs != None:
count = len(lCommandLineArgs)
+ print("Count is {c}".format(c=count))
self.m_bEmpty = (count < 1)
- print lCommandLineArgs, "and len is", count
+ #print( lCommandLineArgs, "and len is", count )
for arg in range(count):
# is it a named-value argument?
# Note: We ignores double "=" signs! => search from left to right
@@ -370,40 +372,39 @@ class ConfigHelper:
# is it a boolean argument?
# Note: Because "--" and "-" will be interpreted as the same
# we search from right to left!
- pos = string.rfind(lCommandLineArgs[arg], '-')
+ pos = lCommandLineArgs[arg].rfind('-')
if pos == -1:
pos = lCommandLineArgs[arg].rfind('/')
if pos != -1:
sArg = lCommandLineArgs[arg][pos+1:]
self.props[sArg] = 1
continue
-
- raise Exception("Invalid command line detected. The argument \""+\
- lCommandLineArgs[arg]+"\" use an unsupported format.")
+
+ raise Exception("Invalid command line detected. The argument \""+lCommandLineArgs[arg]+"\" use an unsupported format.")
# for item in self.props:
# print item, '->', self.props[item]
def isHelp(self):
return (
- (self.props.has_key("help")) or
- (self.props.has_key("?") ) or
- (self.props.has_key("h") )
+ ("help" in self.props) or
+ ("?" in self.props ) or
+ ("h" in self.props )
)
def getValue(self, sProp):
- if not self.props.has_key(sProp):
+ if not sProp in self.props:
raise Exception("The requested config value \""+sProp+"\" "\
"does not exists!");
return self.props[sProp];
def getValueWithDefault(self, sProp, default):
- if not self.props.has_key(sProp):
- return default;
+ if not sProp in self.props:
+ return default;
return self.props[sProp];
def getStringList(self, sProp, sDelimiter, bTrim, bDecode):
- if not self.props.has_key(sProp):
+ if not sProp in self.props:
raise Exception("The requested config value \""+sProp+"\" does "\
"not exists!");
sValue = self.props[sProp]
@@ -412,7 +413,8 @@ class ConfigHelper:
lTokens = StringTokenizer(sValue, sDelimiter)
for sToken in lTokens:
if bTrim:
- sToken = string.strip(sToken)
+ sToken = sToken.strip()
+
# remove ""
if ((bDecode) and (sToken.find("\"") == 0) and \
(sToken.rfind("\"") == len(sToken)-1)):
@@ -449,9 +451,9 @@ def generateFooter():
return "</oor:component-data>\n"
# can merge different xml fragments together.
-#
+#
# @author Caolan McNamara converted from the original java by Andreas Schluens
-#
+#
class Merger:
def __init__(self, aCfg):
self.m_aCfg = aCfg
@@ -472,6 +474,7 @@ class Merger:
aFcfg = ConfigHelper(self.m_aCfg.getValue(PROP_FCFG), None)
self.m_lFilters = aFcfg.getStringList(PROP_ITEMS, sDelimiter, bTrim, bDecode)
except:
+ print( "Filters are empty" )
self.m_lFilters = []
try:
@@ -489,8 +492,8 @@ class Merger:
def merge(self):
sPackage = self.m_aCfg.getValue(PROP_PKG)
- print "create package \""+sPackage+"\" ..."
- print "generate package header ... "
+ print("create package \""+sPackage+"\" ...")
+ print("generate package header ... ")
sBuffer = generateHeader(\
self.m_aCfg.getValue(PROP_XMLVERSION ),\
@@ -511,58 +514,60 @@ class Merger:
try:
if i == 0: #types
- print "generate set for types ... "
+ print("generate set for types ... ")
sSetName = self.m_aCfg.getValue(PROP_SETNAME_TYPES)
sSubDir = self.m_aCfg.getValue(PROP_SUBDIR_TYPES )
lFragments = self.m_lTypes
elif i == 1: # filters
- print "generate set for filter ... "
+ print("generate set for filter ... ")
sSetName = self.m_aCfg.getValue(PROP_SETNAME_FILTERS)
sSubDir = self.m_aCfg.getValue(PROP_SUBDIR_FILTERS )
lFragments = self.m_lFilters
elif i == 2: # loaders
- print "generate set for frame loader ... "
+ print("generate set for frame loader ... ")
sSetName = self.m_aCfg.getValue(PROP_SETNAME_LOADERS)
sSubDir = self.m_aCfg.getValue(PROP_SUBDIR_LOADERS )
lFragments = self.m_lLoaders
elif i == 3: # handlers
- print "generate set for content handler ... "
+ print("generate set for content handler ... ")
sSetName = self.m_aCfg.getValue(PROP_SETNAME_HANDLERS)
sSubDir = self.m_aCfg.getValue(PROP_SUBDIR_HANDLERS )
lFragments = self.m_lHandlers
except:
continue
+ print("Length of Fragments: {f} Set Name {setname} Subdir {subdir}".
+ format(f=len(lFragments),setname=sSetName,subdir=sSubDir))
+ #sys.stdin.readline()
nItemCount = nItemCount + len(lFragments)
sBuffer = sBuffer + self.getFragments(\
os.path.join(self.m_aFragmentsDir, sSubDir), \
sSetName, lFragments, 1)
- print "generate package footer ... "
+ print("generate package footer ... ")
sBuffer = sBuffer + generateFooter()
# Attention!
- # If the package seem to be empty, it make no sense to generate a
- # corresponding xml file. We should suppress writing of this file on
- # disk completly ...
+ # If the package seems to be empty, it make no sense to generate a
+ # corresponding xml file. We should suppress writing of this file on
+ # disk completely ...
if nItemCount < 1:
- print "Package is empty and will not result into a xml file on "\
- "disk!? Please check configuration file."
+ print("Package is empty and will not result into an xml file on disk!? Please check configuration file.")
return
- print "package contains "+str(nItemCount)+" items"
+ print("package contains "+str(nItemCount)+" items")
- aPackage = open(sPackage, 'w')
- print "write temp package \""+sPackage
+ aPackage = open(sPackage, mode="w")
+ print("write temp package {pkg}".format(pkg=sPackage))
aPackage.write(sBuffer)
def getFragments(self, aDir, sSetName, lFragments, nPrettyTabs):
- sBuffer = ''
+ sBuffer = ''
sExtXcu = self.m_aCfg.getValue(PROP_EXTENSION_XCU);
if len(lFragments) < 1:
return sBuffer
-
+
for tabs in range(nPrettyTabs):
sBuffer = sBuffer + "\t"
sBuffer = sBuffer + "<node oor:name=\""+sSetName+"\">\n"
@@ -576,9 +581,9 @@ class Merger:
# handle simple files only and check for existence!
raise Exception("fragment \""+sFragPath+"\" does not exists.")
- print "merge fragment \""+sFragPath+"\" ..."
+ print("merge fragment \""+sFragPath+"\" ...")
sBuffer = sBuffer + aFragmentFile.read()
-
+
sBuffer = sBuffer + "\n"
nPrettyTabs = nPrettyTabs - 1
@@ -588,4 +593,3 @@ class Merger:
return sBuffer
run(sys.argv)
-
Modified: incubator/ooo/branches/writer001/main/filter/source/graphicfilter/icgm/chart.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/filter/source/graphicfilter/icgm/chart.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/filter/source/graphicfilter/icgm/chart.cxx (original)
+++ incubator/ooo/branches/writer001/main/filter/source/graphicfilter/icgm/chart.cxx Mon Aug 20 11:46:19 2012
@@ -67,8 +67,8 @@ void CGMChart::DeleteTextEntry( TextEntr
pTAttr = pTAttr->pNextAttribute;
delete pTempTAttr;
}
- delete pTextEntry;
maTextEntryList.Remove( pTextEntry );
+ delete pTextEntry;
}
};
Modified: incubator/ooo/branches/writer001/main/filter/source/msfilter/escherex.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/filter/source/msfilter/escherex.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/filter/source/msfilter/escherex.cxx (original)
+++ incubator/ooo/branches/writer001/main/filter/source/msfilter/escherex.cxx Mon Aug 20 11:46:19 2012
@@ -24,6 +24,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_filter.hxx"
#include "eschesdo.hxx"
+#include <svx/xflftrit.hxx>
#include <filter/msfilter/escherex.hxx>
#include <svx/unoapi.hxx>
#include <svx/svdobj.hxx>
@@ -77,6 +78,7 @@
#include <com/sun/star/drawing/ProjectionMode.hpp>
#include <com/sun/star/text/XSimpleText.hpp>
#include <com/sun/star/drawing/ShadeMode.hpp>
+#include <com/sun/star/drawing/TextFitToSizeType.hpp>
#include <vcl/hatch.hxx>
#include <com/sun/star/awt/XGraphics.hpp>
#include <com/sun/star/awt/FontSlant.hpp>
@@ -437,21 +439,159 @@ void EscherPropertyContainer::CreateGrad
}
void EscherPropertyContainer::CreateGradientProperties(
- const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & rXPropSet )
+ const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & rXPropSet , sal_Bool bTransparentGradient)
{
- ::com::sun::star::uno::Any aAny;
- ::com::sun::star::awt::Gradient aGradient;
- if ( EscherPropertyValueHelper::GetPropertyValue(
- aAny, rXPropSet, String( RTL_CONSTASCII_USTRINGPARAM( "FillGradient" ) ), sal_False ) )
- {
- aGradient = *static_cast< const ::com::sun::star::awt::Gradient* >( aAny.getValue() );
- }
- CreateGradientProperties( aGradient );
-};
+ ::com::sun::star::uno::Any aAny;
+ ::com::sun::star::awt::Gradient* pGradient = NULL;
+
+ sal_uInt32 nFillType = ESCHER_FillShadeScale;
+ sal_Int32 nAngle = 0;
+ sal_uInt32 nFillFocus = 0;
+ sal_uInt32 nFillLR = 0;
+ sal_uInt32 nFillTB = 0;
+ sal_uInt32 nFirstColor = 0;//like the control var nChgColors in import logic
+ bool bWriteFillTo = false;
+
+ //Transparency gradient: Means the third setting in transparency page is set
+ if (bTransparentGradient && EscherPropertyValueHelper::GetPropertyValue(
+ aAny, rXPropSet, String( RTL_CONSTASCII_USTRINGPARAM( "FillTransparenceGradient" ) ), sal_False ) )
+ {
+ pGradient = (::com::sun::star::awt::Gradient*)aAny.getValue();
+
+ ::com::sun::star::uno::Any aAnyTemp;
+ const rtl::OUString aPropName( String( RTL_CONSTASCII_USTRINGPARAM( "FillStyle" ) ) );
+ if ( EscherPropertyValueHelper::GetPropertyValue(
+ aAnyTemp, rXPropSet, aPropName, sal_False ) )
+ {
+ ::com::sun::star::drawing::FillStyle eFS;
+ if ( ! ( aAnyTemp >>= eFS ) )
+ eFS = ::com::sun::star::drawing::FillStyle_SOLID;
+ //solid and transparency
+ if ( eFS == ::com::sun::star::drawing::FillStyle_SOLID)
+ {
+ if ( EscherPropertyValueHelper::GetPropertyValue(
+ aAnyTemp, rXPropSet, String( RTL_CONSTASCII_USTRINGPARAM( "FillColor" ) ), sal_False ) )
+ {
+ pGradient->StartColor = ImplGetColor( *((sal_uInt32*)aAnyTemp.getValue()), sal_False );
+ pGradient->EndColor = ImplGetColor( *((sal_uInt32*)aAnyTemp.getValue()), sal_False );
+ }
+ }
+ //gradient and transparency.
+ else if( eFS == ::com::sun::star::drawing::FillStyle_GRADIENT )
+ {
+ if ( EscherPropertyValueHelper::GetPropertyValue(
+ aAny, rXPropSet, String( RTL_CONSTASCII_USTRINGPARAM( "FillGradient" ) ), sal_False ) )
+ pGradient = (::com::sun::star::awt::Gradient*)aAny.getValue();
+ }
+ }
+
+ }
+ //Not transparency gradient
+ else if ( EscherPropertyValueHelper::GetPropertyValue(
+ aAny, rXPropSet, String( RTL_CONSTASCII_USTRINGPARAM( "FillGradient" ) ), sal_False ) )
+ {
+ pGradient = (::com::sun::star::awt::Gradient*)aAny.getValue();
+ }
+
+ if ( pGradient )
+ {
+ switch ( pGradient->Style )
+ {
+ case ::com::sun::star::awt::GradientStyle_LINEAR :
+ case ::com::sun::star::awt::GradientStyle_AXIAL :
+ {
+ nFillType = ESCHER_FillShadeScale;
+ nAngle = pGradient->Angle;
+ while ( nAngle > 0 ) nAngle -= 3600;
+ while ( nAngle <= -3600 ) nAngle += 3600;
+ //Value of the real number = Integral + (Fractional / 65536.0)
+ nAngle = ( nAngle * 0x10000) / 10;
+
+ nFillFocus = (pGradient->Style == ::com::sun::star::awt::GradientStyle_LINEAR) ?
+ ( pGradient->XOffset + pGradient->YOffset )/2 : -50;
+ if( !nFillFocus )
+ nFirstColor=nFirstColor ^ 1;
+ if ( !nAngle )
+ nFirstColor=nFirstColor ^ 1;
+ }
+ break;
+ case ::com::sun::star::awt::GradientStyle_RADIAL :
+ case ::com::sun::star::awt::GradientStyle_ELLIPTICAL :
+ case ::com::sun::star::awt::GradientStyle_SQUARE :
+ case ::com::sun::star::awt::GradientStyle_RECT :
+ {
+ //according to the import logic and rect type fill** value
+ nFillLR = (pGradient->XOffset * 0x10000) / 100;
+ nFillTB = (pGradient->YOffset * 0x10000) / 100;
+ if ( ((nFillLR > 0) && (nFillLR < 0x10000)) || ((nFillTB > 0) && (nFillTB < 0x10000)) )
+ nFillType = ESCHER_FillShadeShape;
+ else
+ nFillType = ESCHER_FillShadeCenter;
+ nFirstColor = 1;
+ bWriteFillTo = true;
+ }
+ break;
+ default: break;
+ }
+ }
+
+ AddOpt( ESCHER_Prop_fillType, nFillType );
+ AddOpt( ESCHER_Prop_fillAngle, nAngle );
+ AddOpt( ESCHER_Prop_fillColor, GetGradientColor( pGradient, nFirstColor ) );
+ AddOpt( ESCHER_Prop_fillBackColor, GetGradientColor( pGradient, nFirstColor ^ 1 ) );
+ AddOpt( ESCHER_Prop_fillFocus, nFillFocus );
+ if ( bWriteFillTo )
+ {
+ //according to rect type fillTo** value
+ if(nFillLR)
+ {
+ AddOpt( ESCHER_Prop_fillToLeft, nFillLR );
+ AddOpt( ESCHER_Prop_fillToRight, nFillLR );
+ }
+ if(nFillTB)
+ {
+ AddOpt( ESCHER_Prop_fillToTop, nFillTB );
+ AddOpt( ESCHER_Prop_fillToBottom, nFillTB );
+ }
+ }
+
+ //Transparency gradient
+ if (bTransparentGradient && EscherPropertyValueHelper::GetPropertyValue(
+ aAny, rXPropSet, String( RTL_CONSTASCII_USTRINGPARAM( "FillTransparenceGradient" ) ), sal_False ) )
+ {
+ pGradient = (::com::sun::star::awt::Gradient*)aAny.getValue();
+ if ( pGradient )
+ {
+ sal_uInt32 nBlue = GetGradientColor( pGradient, nFirstColor ) >> 16;
+ AddOpt( ESCHER_Prop_fillOpacity,( ( 100 - ( nBlue * 100 / 255 ) ) << 16 ) / 100 );
+ nBlue = GetGradientColor( pGradient, nFirstColor ^ 1 ) >>16 ;
+ AddOpt( ESCHER_Prop_fillBackOpacity,( ( 100 - ( nBlue * 100 / 255 ) ) << 16 )/ 100 );
+ }
+ }
+}
+
+void EscherPropertyContainer::CreateFillProperties(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & rXPropSet,
+ sal_Bool bEdge , const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & rXShape )
+{
+ if ( rXShape.is() )
+ {
+ SdrObject* pObj = GetSdrObjectFromXShape( rXShape );
+ if ( pObj )
+ {
+ SfxItemSet aAttr( pObj->GetMergedItemSet() );
+ //tranparency with gradient. Means the third setting in transparency page is set
+ sal_Bool bTransparentGradient = ( aAttr.GetItemState( XATTR_FILLFLOATTRANSPARENCE ) == SFX_ITEM_SET ) &&
+ ( (const XFillFloatTransparenceItem&) aAttr.Get( XATTR_FILLFLOATTRANSPARENCE ) ).IsEnabled();
+ CreateFillProperties( rXPropSet, bEdge, bTransparentGradient );
+ }
+ }
+}
void EscherPropertyContainer::CreateFillProperties(
- const uno::Reference< beans::XPropertySet > & rXPropSet,
- sal_Bool bEdge )
+ const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & rXPropSet,
+ sal_Bool bEdge , sal_Bool bTransparentGradient)
+
{
::com::sun::star::uno::Any aAny;
AddOpt( ESCHER_Prop_WrapText, ESCHER_WrapNone );
@@ -470,7 +610,7 @@ void EscherPropertyContainer::CreateFill
{
case ::com::sun::star::drawing::FillStyle_GRADIENT :
{
- CreateGradientProperties( rXPropSet );
+ CreateGradientProperties( rXPropSet , bTransparentGradient );
AddOpt( ESCHER_Prop_fNoFillHitTest, 0x140014 );
}
break;
@@ -490,20 +630,25 @@ void EscherPropertyContainer::CreateFill
case ::com::sun::star::drawing::FillStyle_SOLID :
default:
{
- ::com::sun::star::beans::PropertyState ePropState = EscherPropertyValueHelper::GetPropertyState(
- rXPropSet, aPropName );
- if ( ePropState == ::com::sun::star::beans::PropertyState_DIRECT_VALUE )
- AddOpt( ESCHER_Prop_fillType, ESCHER_FillSolid );
-
- if ( EscherPropertyValueHelper::GetPropertyValue(
- aAny, rXPropSet, String( RTL_CONSTASCII_USTRINGPARAM( "FillColor" ) ), sal_False ) )
+ if ( bTransparentGradient )
+ CreateGradientProperties( rXPropSet , bTransparentGradient );
+ else
{
- sal_uInt32 nFillColor = ImplGetColor( *((sal_uInt32*)aAny.getValue()) );
- nFillBackColor = nFillColor ^ 0xffffff;
- AddOpt( ESCHER_Prop_fillColor, nFillColor );
+ ::com::sun::star::beans::PropertyState ePropState = EscherPropertyValueHelper::GetPropertyState(
+ rXPropSet, aPropName );
+ if ( ePropState == ::com::sun::star::beans::PropertyState_DIRECT_VALUE )
+ AddOpt( ESCHER_Prop_fillType, ESCHER_FillSolid );
+
+ if ( EscherPropertyValueHelper::GetPropertyValue(
+ aAny, rXPropSet, String( RTL_CONSTASCII_USTRINGPARAM( "FillColor" ) ), sal_False ) )
+ {
+ sal_uInt32 nFillColor = ImplGetColor( *((sal_uInt32*)aAny.getValue()) );
+ nFillBackColor = nFillColor ^ 0xffffff;
+ AddOpt( ESCHER_Prop_fillColor, nFillColor );
+ }
+ AddOpt( ESCHER_Prop_fNoFillHitTest, 0x100010 );
+ AddOpt( ESCHER_Prop_fillBackColor, nFillBackColor );
}
- AddOpt( ESCHER_Prop_fNoFillHitTest, 0x100010 );
- AddOpt( ESCHER_Prop_fillBackColor, nFillBackColor );
break;
}
case ::com::sun::star::drawing::FillStyle_NONE :
@@ -753,6 +898,7 @@ sal_Bool EscherPropertyContainer::GetLin
sal_Int16 nWhich = bLineStart ? XATTR_LINESTART : XATTR_LINEEND;
SvxUnogetApiNameForItem( nWhich, aArrowStartName, aApiName );
+ sal_Bool bIsMapped = sal_True;
if ( aApiName.getLength() )
{
@@ -787,8 +933,11 @@ sal_Bool EscherPropertyContainer::GetLin
reLineEnd = ESCHER_LineArrowDiamondEnd;
else if ( aApiName.equalsAscii( "Arrow" ) )
reLineEnd = ESCHER_LineArrowEnd;
+ else
+ bIsMapped = sal_False;
+
}
- else if ( aArrowStartName.GetTokenCount( ' ' ) == 2 )
+ if ( !bIsMapped && aArrowStartName.GetTokenCount( ' ' ) == 2 )
{
sal_Bool b = sal_True;
String aArrowName( aArrowStartName.GetToken( 0, ' ' ) );
@@ -1481,21 +1630,46 @@ sal_Bool EscherPropertyContainer::Create
pGraphicAttr->SetMirrorFlags( BMP_MIRROR_HORZ );
if ( bIsGraphicMtf )
AddOpt( ESCHER_Prop_Rotation, ( ( ((sal_Int32)nAngle << 16 ) / 10 ) + 0x8000 ) &~ 0xffff );
- else
- {
- pGraphicAttr->SetRotation( nAngle );
- if ( nAngle && pShapeBoundRect ) // up to xp ppoint does not rotate bitmaps !
- {
- Polygon aPoly( *pShapeBoundRect );
- aPoly.Rotate( pShapeBoundRect->TopLeft(), nAngle );
- *pShapeBoundRect = aPoly.GetBoundRect();
- bSuppressRotation = sal_True;
- }
- }
}
if ( eBitmapMode == ::com::sun::star::drawing::BitmapMode_REPEAT )
- AddOpt( ESCHER_Prop_fillType, ESCHER_FillTexture );
+ {
+ sal_Int32 nSizeX = 0,nSizeY = 0,nOffsetX = 0,nOffsetY = 0,nPosOffsetX = 0,nPosOffsetY = 0;
+ if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet,
+ String( RTL_CONSTASCII_USTRINGPARAM( "FillBitmapSizeX" ) ), sal_True ) )
+ {
+ aAny >>= nSizeX;
+ }
+ if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet,
+ String( RTL_CONSTASCII_USTRINGPARAM( "FillBitmapSizeY" ) ), sal_True ) )
+ {
+ aAny >>= nSizeY;
+ }
+ if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet,
+ String( RTL_CONSTASCII_USTRINGPARAM( "FillBitmapOffsetX" ) ), sal_True ) )
+ {
+ aAny >>= nOffsetX;
+ }
+ if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet,
+ String( RTL_CONSTASCII_USTRINGPARAM( "FillBitmapOffsetY" ) ), sal_True ) )
+ {
+ aAny >>= nOffsetY;
+ }
+ if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet,
+ String( RTL_CONSTASCII_USTRINGPARAM( "FillBitmapPositionOffsetX" ) ), sal_True ) )
+ {
+ aAny >>= nPosOffsetX;
+ }
+ if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet,
+ String( RTL_CONSTASCII_USTRINGPARAM( "FillBitmapPositionOffsetY" ) ), sal_True ) )
+ {
+ aAny >>= nPosOffsetY;
+ }
+ if(nSizeX == -100 && nSizeY == -100 && nOffsetX == 0 && nOffsetY == 0 && nPosOffsetX == 0 && nPosOffsetY == 0)
+ AddOpt( ESCHER_Prop_fillType, ESCHER_FillPicture );
+ else
+ AddOpt( ESCHER_Prop_fillType, ESCHER_FillTexture );
+ }
else
AddOpt( ESCHER_Prop_fillType, ESCHER_FillPicture );
@@ -3113,6 +3287,42 @@ void EscherPropertyContainer::CreateCust
nTextPathFlags &=~0x20;
}
}
+ //export gTextAlign attr
+ if ( EscherPropertyValueHelper::GetPropertyValue( aAny, aXPropSet, String( RTL_CONSTASCII_USTRINGPARAM( "TextHorizontalAdjust" ) ), sal_True ) )
+ {
+ MSO_GeoTextAlign gTextAlign = mso_alignTextCenter;
+ // SdrFitToSizeType eFTS( ((SdrTextFitToSizeTypeItem&)pCustoShape->GetMergedItem( SDRATTR_TEXT_FITTOSIZE )).GetValue() );
+ drawing::TextHorizontalAdjust eHA( drawing::TextHorizontalAdjust_LEFT );
+ aAny >>= eHA;
+ switch( eHA )
+ {
+ case drawing::TextHorizontalAdjust_LEFT :
+ gTextAlign = mso_alignTextLeft;
+ break;
+ case drawing::TextHorizontalAdjust_CENTER:
+ gTextAlign = mso_alignTextCenter;
+ break;
+ case drawing::TextHorizontalAdjust_RIGHT:
+ gTextAlign = mso_alignTextRight;
+ break;
+ case drawing::TextHorizontalAdjust_BLOCK:
+ {
+ SdrFitToSizeType eFTS( ((SdrTextFitToSizeTypeItem&)pCustoShape->GetMergedItem( SDRATTR_TEXT_FITTOSIZE )).GetValue() );
+ if ( eFTS == SDRTEXTFIT_ALLLINES)
+ {
+ gTextAlign = mso_alignTextStretch;
+ }
+ else
+ {
+ gTextAlign = mso_alignTextWordJust;
+ }
+ break;
+ }
+ default:
+ break;
+ }
+ AddOpt(DFF_Prop_gtextAlign,gTextAlign);
+ }
}
if((nTextPathFlags & 0x4000) != 0) //Is Font work
{
Modified: incubator/ooo/branches/writer001/main/filter/source/msfilter/msdffimp.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/filter/source/msfilter/msdffimp.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/filter/source/msfilter/msdffimp.cxx (original)
+++ incubator/ooo/branches/writer001/main/filter/source/msfilter/msdffimp.cxx Mon Aug 20 11:46:19 2012
@@ -218,7 +218,8 @@ void Impl_OlePres::Write( SvStream & rSt
DffPropertyReader::DffPropertyReader( const SvxMSDffManager& rMan ) :
rManager( rMan ),
- pDefaultPropSet( NULL )
+ pDefaultPropSet( NULL ),
+ mbRotateGranientFillWithAngle ( 0 )
{
InitializePropSet( DFF_msofbtOPT );
}
@@ -1350,6 +1351,9 @@ void DffPropertyReader::ApplyFillAttribu
break;
case mso_fillShadeCenter : // Shade from bounding rectangle to end point
{
+ //If it is imported as a bitmap, it will not work well with transparecy especially 100
+ //But the gradient look well comparing with imported as gradient. And rotate with shape
+ //also works better. So here just keep it.
if ( rObjData.aBoundRect.IsEmpty() )// size of object needed to be able
eXFill = XFILL_GRADIENT; // to create a bitmap substitution
else
@@ -1367,13 +1371,21 @@ void DffPropertyReader::ApplyFillAttribu
}
rSet.Put( XFillStyleItem( eXFill ) );
- if (IsProperty(DFF_Prop_fillOpacity))
- {
- double nTrans = GetPropertyValue(DFF_Prop_fillOpacity);
- nTrans = (nTrans * 100) / 65536;
- rSet.Put(XFillTransparenceItem(
- sal_uInt16(100 - ::rtl::math::round(nTrans))));
- }
+ double dTrans = 1.0;
+ double dBackTrans = 1.0;
+ if (IsProperty(DFF_Prop_fillOpacity))
+ {
+ dTrans = GetPropertyValue(DFF_Prop_fillOpacity) / 65536.0;
+ if ( eXFill != XFILL_GRADIENT )
+ {
+ dTrans = dTrans * 100;
+ rSet.Put(XFillTransparenceItem(
+ sal_uInt16(100 - ::rtl::math::round(dTrans))));
+ }
+ }
+
+ if ( IsProperty(DFF_Prop_fillBackOpacity) )
+ dBackTrans = GetPropertyValue(DFF_Prop_fillBackOpacity) / 65536.0;
if ( ( eMSO_FillType == mso_fillShadeCenter ) && ( eXFill == XFILL_BITMAP ) )
{
@@ -1381,63 +1393,7 @@ void DffPropertyReader::ApplyFillAttribu
}
else if ( eXFill == XFILL_GRADIENT )
{
- sal_Int32 nAngle = 3600 - ( ( Fix16ToAngle( GetPropertyValue( DFF_Prop_fillAngle, 0 ) ) + 5 ) / 10 );
-
- // Rotationswinkel in Bereich zwingen
- while ( nAngle >= 3600 )
- nAngle -= 3600;
- while ( nAngle < 0 )
- nAngle += 3600;
-
- sal_Int32 nFocus = GetPropertyValue( DFF_Prop_fillFocus, 0 );
- XGradientStyle eGrad = XGRAD_LINEAR;
- sal_Int32 nChgColors = 0;
-
- if ( nFocus < 0 ) // Bei negativem Focus sind die Farben zu tauschen
- {
- nFocus =- nFocus;
- nChgColors ^= 1;
- }
- if( nFocus > 40 && nFocus < 60 )
- {
- eGrad = XGRAD_AXIAL; // Besser gehts leider nicht
- }
-
- sal_uInt16 nFocusX = (sal_uInt16)nFocus;
- sal_uInt16 nFocusY = (sal_uInt16)nFocus;
-
- switch( eMSO_FillType )
- {
- case mso_fillShadeShape :
- {
- eGrad = XGRAD_RECT;
- nFocusY = nFocusX = 50;
- nChgColors ^= 1;
- }
- break;
- case mso_fillShadeCenter :
- {
- eGrad = XGRAD_RECT;
- nFocusX = ( IsProperty( DFF_Prop_fillToRight ) ) ? 100 : 0;
- nFocusY = ( IsProperty( DFF_Prop_fillToBottom ) ) ? 100 : 0;
- nChgColors ^= 1;
- }
- break;
- default: break;
- }
- Color aCol1( rManager.MSO_CLR_ToColor( GetPropertyValue( DFF_Prop_fillColor, COL_WHITE ), DFF_Prop_fillColor ) );
- Color aCol2( rManager.MSO_CLR_ToColor( GetPropertyValue( DFF_Prop_fillBackColor, COL_WHITE ), DFF_Prop_fillBackColor ) );
-
- if ( nChgColors )
- {
- Color aZwi( aCol1 );
- aCol1 = aCol2;
- aCol2 = aZwi;
- }
- XGradient aGrad( aCol2, aCol1, eGrad, nAngle, nFocusX, nFocusY );
- aGrad.SetStartIntens( 100 );
- aGrad.SetEndIntens( 100 );
- rSet.Put( XFillGradientItem( String(), aGrad ) );
+ ImportGradientColor ( rSet, eMSO_FillType, dTrans , dBackTrans );
}
else if ( eXFill == XFILL_BITMAP )
{
@@ -2362,23 +2318,24 @@ void DffPropertyReader::ApplyCustomShape
{
rIn >> nTmp;
nCommand = EnhancedCustomShapeSegmentCommand::UNKNOWN;
- nCnt = (sal_Int16)( nTmp & 0xfff );
- switch( nTmp >> 12 )
+ nCnt = (sal_Int16)( nTmp & 0x1fff );//Last 13 bits for segment points number
+ switch( nTmp >> 13 )//First 3 bits for command type
{
case 0x0: nCommand = EnhancedCustomShapeSegmentCommand::LINETO; if ( !nCnt ) nCnt = 1; break;
- case 0x1: nCommand = EnhancedCustomShapeSegmentCommand::LINETO; if ( !nCnt ) nCnt = 1; break; // seems to the relative lineto
- case 0x4: nCommand = EnhancedCustomShapeSegmentCommand::MOVETO; if ( !nCnt ) nCnt = 1; break;
- case 0x2: nCommand = EnhancedCustomShapeSegmentCommand::CURVETO; if ( !nCnt ) nCnt = 1; break;
- case 0x3: nCommand = EnhancedCustomShapeSegmentCommand::CURVETO; if ( !nCnt ) nCnt = 1; break; // seems to be the relative curveto
- case 0x8: nCommand = EnhancedCustomShapeSegmentCommand::ENDSUBPATH; nCnt = 0; break;
- case 0x6: nCommand = EnhancedCustomShapeSegmentCommand::CLOSESUBPATH; nCnt = 0; break;
- case 0xa:
- case 0xb:
+ case 0x1: nCommand = EnhancedCustomShapeSegmentCommand::CURVETO; if ( !nCnt ) nCnt = 1; break;
+ case 0x2: nCommand = EnhancedCustomShapeSegmentCommand::MOVETO; if ( !nCnt ) nCnt = 1; break;
+ case 0x3: nCommand = EnhancedCustomShapeSegmentCommand::CLOSESUBPATH; nCnt = 0; break;
+ case 0x4: nCommand = EnhancedCustomShapeSegmentCommand::ENDSUBPATH; nCnt = 0; break;
+ case 0x5:
+ case 0x6:
{
- switch ( ( nTmp >> 8 ) & 0xf )
+ switch ( ( nTmp >> 8 ) & 0x1f )//5 bits next to command type is for path escape type
{
case 0x0:
{
+ //It is msopathEscapeExtension which is transformed into LINETO.
+ //If issue happens, I think this part can be comment so that it will be taken as unknow command.
+ //When export, origin data will be export without any change.
nCommand = EnhancedCustomShapeSegmentCommand::LINETO;
if ( !nCnt )
nCnt = 1;
@@ -2699,7 +2656,7 @@ void DffPropertyReader::ApplyAttributes(
if ( nFontAttributes & 0x08 )
rSet.Put( SvxUnderlineItem( nFontAttributes & 0x08 ? UNDERLINE_SINGLE : UNDERLINE_NONE, EE_CHAR_UNDERLINE ) );
if ( nFontAttributes & 0x40 )
- rSet.Put( SvxShadowedItem( nFontAttributes & 0x40 != 0, EE_CHAR_SHADOW ) );
+ rSet.Put( SvxShadowedItem( (nFontAttributes & 0x40) != 0, EE_CHAR_SHADOW ) );
// if ( nFontAttributes & 0x02 )
// rSet.Put( SvxCaseMapItem( nFontAttributes & 0x02 ? SVX_CASEMAP_KAPITAELCHEN : SVX_CASEMAP_NOT_MAPPED ) );
if ( nFontAttributes & 0x01 )
@@ -2723,15 +2680,13 @@ void DffPropertyReader::ApplyAttributes(
{
sal_Int32 nVal = static_cast< sal_Int32 >( GetPropertyValue( DFF_Prop_shadowOffsetX ) );
rManager.ScaleEmu( nVal );
- if ( nVal )
- rSet.Put( SdrShadowXDistItem( nVal ) );
+ rSet.Put( SdrShadowXDistItem( nVal ) );
}
if ( IsProperty( DFF_Prop_shadowOffsetY ) )
{
sal_Int32 nVal = static_cast< sal_Int32 >( GetPropertyValue( DFF_Prop_shadowOffsetY ) );
rManager.ScaleEmu( nVal );
- if ( nVal )
- rSet.Put( SdrShadowYDistItem( nVal ) );
+ rSet.Put( SdrShadowYDistItem( nVal ) );
}
if ( IsProperty( DFF_Prop_fshadowObscured ) )
{
@@ -2776,7 +2731,7 @@ void DffPropertyReader::ApplyAttributes(
break;
}
}
- if ( ( ( nLineFlags & 0x08 ) == 0 ) && ( ( nFillFlags & 0x10 ) == 0 ) ) // if there is no fillstyle and linestyle
+ if ( ( ( nLineFlags & 0x08 ) == 0 ) && ( ( nFillFlags & 0x10 ) == 0 ) && ( rObjData.eShapeType != mso_sptPictureFrame )) // if there is no fillstyle and linestyle
bHasShadow = sal_False; // we are turning shadow off.
if ( bHasShadow )
@@ -2784,7 +2739,7 @@ void DffPropertyReader::ApplyAttributes(
}
ApplyLineAttributes( rSet, rObjData.eShapeType ); // #i28269#
ApplyFillAttributes( rIn, rSet, rObjData );
- if ( rObjData.eShapeType != mso_sptNil )
+ if ( rObjData.eShapeType != mso_sptNil || IsProperty( DFF_Prop_pVertices ) )
{
ApplyCustomShapeGeometryAttributes( rIn, rSet, rObjData );
ApplyCustomShapeTextAttributes( rSet );
@@ -2890,6 +2845,114 @@ void DffPropertyReader::CheckAndCorrectE
}
}
+
+void DffPropertyReader::ImportGradientColor( SfxItemSet& aSet,MSO_FillType eMSO_FillType, double dTrans , double dBackTrans) const
+{
+ //MS Focus prop will impact the start and end color position. And AOO does not
+ //support this prop. So need some swap for the two color to keep fidelity with AOO and MS shape.
+ //So below var is defined.
+ sal_Int32 nChgColors = 0;
+ sal_Int32 nAngle = GetPropertyValue( DFF_Prop_fillAngle, 0 );
+ sal_Int32 nRotateAngle = 0;
+ if(nAngle >= 0)
+ nChgColors ^= 1;
+
+ //Translate a MS clockwise(+) or count clockwise angle(-) into a AOO count clock wise angle
+ nAngle=3600 - ( ( Fix16ToAngle(nAngle) + 5 ) / 10 );
+ //Make sure this angle belongs to 0~3600
+ while ( nAngle >= 3600 ) nAngle -= 3600;
+ while ( nAngle < 0 ) nAngle += 3600;
+
+ //Rotate angle
+ if ( mbRotateGranientFillWithAngle )
+ {
+ nRotateAngle = GetPropertyValue( DFF_Prop_Rotation, 0 );
+ if(nRotateAngle)//fixed point number
+ nRotateAngle = ( (sal_Int16)( nRotateAngle >> 16) * 100L ) + ( ( ( nRotateAngle & 0x0000ffff) * 100L ) >> 16 );
+ nRotateAngle = ( nRotateAngle + 5 ) / 10 ;//round up
+ //nAngle is a clockwise angle. If nRotateAngle is a clockwise angle, then gradient need be rotated a little less
+ //Or it need be rotated a little more
+ nAngle -= nRotateAngle;
+ }
+ while ( nAngle >= 3600 ) nAngle -= 3600;
+ while ( nAngle < 0 ) nAngle += 3600;
+
+ XGradientStyle eGrad = XGRAD_LINEAR;
+
+ sal_Int32 nFocus = GetPropertyValue( DFF_Prop_fillFocus, 0 );
+ if ( !nFocus )
+ nChgColors ^= 1;
+ else if ( nFocus < 0 )//If it is a negative focus, the color will be swapped
+ {
+ nFocus =- nFocus;
+ nChgColors ^= 1;
+ }
+
+ if( nFocus > 40 && nFocus < 60 )
+ {
+ eGrad = XGRAD_AXIAL;//A axial gradient other than linear
+ nChgColors ^= 1;
+ }
+ //if the type is linear or axial, just save focus to nFocusX and nFocusY for export
+ //Core function does no need them. They serves for rect gradient(CenterXY).
+ sal_uInt16 nFocusX = (sal_uInt16)nFocus;
+ sal_uInt16 nFocusY = (sal_uInt16)nFocus;
+
+ switch( eMSO_FillType )
+ {
+ case mso_fillShadeShape :
+ {
+ eGrad = XGRAD_RECT;
+ nFocusY = nFocusX = 50;
+ nChgColors ^= 1;
+ }
+ break;
+ case mso_fillShadeCenter :
+ {
+ eGrad = XGRAD_RECT;
+ //A MS fillTo prop specifies the relative position of the left boundary
+ //of the center rectangle in a concentric shaded fill. Use 100 or 0 to keep fidelity
+ nFocusX=(GetPropertyValue( DFF_Prop_fillToRight, 0 )==0x10000) ? 100 : 0;
+ nFocusY=(GetPropertyValue( DFF_Prop_fillToBottom,0 )==0x10000) ? 100 : 0;
+ nChgColors ^= 1;
+ }
+ break;
+ default: break;
+ }
+
+ Color aCol1( rManager.MSO_CLR_ToColor( GetPropertyValue( DFF_Prop_fillColor, COL_WHITE ), DFF_Prop_fillColor ) );
+ Color aCol2( rManager.MSO_CLR_ToColor( GetPropertyValue( DFF_Prop_fillBackColor, COL_WHITE ), DFF_Prop_fillBackColor ) );
+ if ( nChgColors )
+ {
+ //Swap start and end color
+ Color aZwi( aCol1 );
+ aCol1 = aCol2;
+ aCol2 = aZwi;
+ //Swap two colors' transparency
+ double dTemp = dTrans;
+ dTrans = dBackTrans;
+ dBackTrans = dTemp;
+ }
+
+ //Construct gradient item
+ XGradient aGrad( aCol2, aCol1, eGrad, nAngle, nFocusX, nFocusY );
+ //Intensity has been merged into color. So here just set is as 100
+ aGrad.SetStartIntens( 100 );
+ aGrad.SetEndIntens( 100 );
+ aSet.Put( XFillGradientItem( String(), aGrad ) );
+ //Construct tranparency item. This item can coodinate with both solid and gradient.
+ if ( dTrans < 1.0 || dBackTrans < 1.0 )
+ {
+ sal_uInt8 nStartCol = (sal_uInt8)( (1 - dTrans )* 255 );
+ sal_uInt8 nEndCol = (sal_uInt8)( ( 1- dBackTrans ) * 255 );
+ aCol1 = Color(nStartCol, nStartCol, nStartCol);
+ aCol2 = Color(nEndCol, nEndCol, nEndCol);
+
+ XGradient aGrad2( aCol2 , aCol1 , eGrad, nAngle, nFocusX, nFocusY );
+ aSet.Put( XFillFloatTransparenceItem( String(), aGrad2 ) );
+ }
+}
+
//---------------------------------------------------------------------------
//- Record Manager ----------------------------------------------------------
//---------------------------------------------------------------------------
@@ -4214,6 +4277,29 @@ SdrObject* SvxMSDffManager::ImportShape(
DffObjData aObjData( rHd, rClientRect, nCalledByGroup );
aObjData.bRotateTextWithShape = ( GetSvxMSDffSettings() & SVXMSDFF_SETTINGS_IMPORT_EXCEL ) == 0;
maShapeRecords.Consume( rSt, sal_False );
+ if( maShapeRecords.SeekToContent( rSt,
+ DFF_msofbtUDefProp,
+ SEEK_FROM_BEGINNING ) )
+ {
+ sal_uInt32 nBytesLeft = maShapeRecords.Current()->nRecLen;
+ sal_uInt32 nUDData;
+ sal_uInt16 nPID;
+ while( 5 < nBytesLeft )
+ {
+ rSt >> nPID;
+ if ( rSt.GetError() != 0 )
+ break;
+ rSt >> nUDData;
+ if ( rSt.GetError() != 0 )
+ break;
+ if ( nPID == 447 ) //
+ {
+ mbRotateGranientFillWithAngle = nUDData & 0x20;
+ break;
+ }
+ nBytesLeft -= 6;
+ }
+ }
aObjData.bShapeType = maShapeRecords.SeekToContent( rSt, DFF_msofbtSp, SEEK_FROM_BEGINNING );
if ( aObjData.bShapeType )
{
@@ -4343,7 +4429,7 @@ SdrObject* SvxMSDffManager::ImportShape(
ApplyAttributes( rSt, aSet, aObjData );
pRet->SetMergedItemSet(aSet);
}
- else if ( aObjData.eShapeType == mso_sptLine )
+ else if ( aObjData.eShapeType == mso_sptLine && !( GetPropertyValue( DFF_Prop_fc3DLightFace ) & 8 ) )
{
basegfx::B2DPolygon aPoly;
aPoly.append(basegfx::B2DPoint(aObjData.aBoundRect.Left(), aObjData.aBoundRect.Top()));
@@ -4396,7 +4482,7 @@ SdrObject* SvxMSDffManager::ImportShape(
aSet.Put( SvxWeightItem( ( GetPropertyValue( DFF_Prop_gtextFStrikethrough, 0 ) & 0x0020 ) != 0 ? WEIGHT_BOLD : WEIGHT_NORMAL, EE_CHAR_WEIGHT ) );
// SJ TODO: Vertical Writing is not correct, instead this should be
- // replaced through "CharacterRotation" by 90°, therefore a new Item has to be
+ // replaced through "CharacterRotation" by 90? therefore a new Item has to be
// supported by svx core, api and xml file format
((SdrObjCustomShape*)pRet)->SetVerticalWriting( ( GetPropertyValue( DFF_Prop_gtextFStrikethrough, 0 ) & 0x2000 ) != 0 );
@@ -4435,6 +4521,10 @@ SdrObject* SvxMSDffManager::ImportShape(
}
if ( GetPropertyValue( DFF_Prop_gtextFStrikethrough, 0 ) & 0x1000 ) // SJ: Font Kerning On ?
aSet.Put( SvxKerningItem( 1, EE_CHAR_KERNING ) );
+
+ // #119496# the resize autoshape to fit text attr of word art in MS PPT is always false
+ aSet.Put( SdrTextAutoGrowHeightItem( sal_False ) );
+ aSet.Put( SdrTextAutoGrowWidthItem( sal_False ) );
}
pRet->SetMergedItemSet( aSet );
@@ -4502,6 +4592,7 @@ SdrObject* SvxMSDffManager::ImportShape(
// before clearing the GeometryItem we have to store the current Coordinates
const uno::Any* pAny = ((SdrCustomShapeGeometryItem&)aGeometryItem).GetPropertyValueByName( sPath, sCoordinates );
Rectangle aPolyBoundRect;
+ Point aStartPt( 0,0 );
if ( pAny && ( *pAny >>= seqCoordinates ) && ( seqCoordinates.getLength() >= 4 ) )
{
sal_Int32 nPtNum, nNumElemVert = seqCoordinates.getLength();
@@ -4518,6 +4609,11 @@ SdrObject* SvxMSDffManager::ImportShape(
aXP[ (sal_uInt16)nPtNum ] = aP;
}
aPolyBoundRect = Rectangle( aXP.GetBoundRect() );
+ if ( nNumElemVert >= 3 )
+ { // arc first command is always wr -- clockwise arc
+ // the parameters are : (left,top),(right,bottom),start(x,y),end(x,y)
+ aStartPt = aXP[2];
+ }
}
else
aPolyBoundRect = Rectangle( -21600, 0, 21600, 43200 ); // defaulting
@@ -4542,6 +4638,18 @@ SdrObject* SvxMSDffManager::ImportShape(
else
{
fNumber = 270.0;
+ //normal situation:if endAngle != 90,there will be a direct_value,but for damaged curve,the endAngle need to recalculate.
+ Point cent = aPolyBoundRect.Center();
+ if ( aStartPt.Y() == cent.Y() )
+ fNumber = ( aStartPt.X() >= cent.X() ) ? 0:180.0;
+ else if ( aStartPt.X() == cent.X() )
+ fNumber = ( aStartPt.Y() >= cent.Y() ) ? 90.0: 270.0;
+ else
+ {
+ fNumber = atan2( double( aStartPt.X() - cent.X() ),double( aStartPt.Y() - cent.Y() ) )+ F_PI; // 0..2PI
+ fNumber /= F_PI180; // 0..360.0
+ }
+ nEndAngle = NormAngle360( - (sal_Int32)fNumber * 100 );
seqAdjustmentValues[ 0 ].Value <<= fNumber;
seqAdjustmentValues[ 0 ].State = com::sun::star::beans::PropertyState_DIRECT_VALUE; // so this value will properly be stored
}
@@ -4713,6 +4821,9 @@ SdrObject* SvxMSDffManager::ImportShape(
RotatePoint(aPoint1, aCenter, ss, cc);
RotatePoint(aPoint2, aCenter, ss, cc);
+
+ // #120437# reset rotation, it is part of the path and shall not be applied again
+ nObjectRotation = 0;
}
// Linie innerhalb des Bereiches zurechtdrehen/spiegeln
@@ -4721,14 +4832,19 @@ SdrObject* SvxMSDffManager::ImportShape(
sal_Int32 n = aPoint1.X();
aPoint1.X() = aPoint2.X();
aPoint2.X() = n;
+
+ // #120437# reset hor filp
+ nSpFlags &= ~SP_FFLIPH;
}
if ( nSpFlags & SP_FFLIPV )
{
sal_Int32 n = aPoint1.Y();
aPoint1.Y() = aPoint2.Y();
aPoint2.Y() = n;
+
+ // #120437# reset ver filp
+ nSpFlags &= ~SP_FFLIPV;
}
- nSpFlags &= ~( SP_FFLIPV | SP_FFLIPH );
pRet->NbcSetPoint(aPoint1, 0L); // Startpunkt
pRet->NbcSetPoint(aPoint2, 1L); // Endpunkt
@@ -4758,6 +4874,11 @@ SdrObject* SvxMSDffManager::ImportShape(
((SdrEdgeObj*)pRet)->SetEdgeTrackPath( aPoly );
pRet->SetMergedItemSet( aSet );
}
+ if ( aObjData.eShapeType == mso_sptLine )
+ {
+ pRet->SetMergedItemSet(aSet);
+ ((SdrObjCustomShape*)pRet)->MergeDefaultAttributes();
+ }
}
}
@@ -4825,6 +4946,7 @@ Rectangle SvxMSDffManager::GetGlobalChil
{
Rectangle aChildAnchor;
rHd.SeekToContent( rSt );
+ sal_Bool bIsClientRectRead = sal_False;
while ( ( rSt.GetError() == 0 ) && ( rSt.Tell() < rHd.GetRecEndFilePos() ) )
{
DffRecordHeader aShapeHd;
@@ -4859,7 +4981,16 @@ Rectangle SvxMSDffManager::GetGlobalChil
Scale( t );
Scale( r );
Scale( b );
- aClientRect = Rectangle( l, t, r, b );
+ if ( bIsClientRectRead )
+ {
+ Rectangle aChild( l, t, r, b );
+ aChildAnchor.Union( aChild );
+ }
+ else
+ {
+ aClientRect = Rectangle( l, t, r, b );
+ bIsClientRectRead = sal_True;
+ }
}
break;
}
Modified: incubator/ooo/branches/writer001/main/filter/source/msfilter/svdfppt.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/filter/source/msfilter/svdfppt.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/filter/source/msfilter/svdfppt.cxx (original)
+++ incubator/ooo/branches/writer001/main/filter/source/msfilter/svdfppt.cxx Mon Aug 20 11:46:19 2012
@@ -37,6 +37,7 @@
#include <com/sun/star/text/XText.hpp>
#include <com/sun/star/geometry/RealPoint2D.hpp>
#include <com/sun/star/util/DateTime.hpp>
+#include <com/sun/star/drawing/BitmapMode.hpp>
#include <unotools/streamwrap.hxx>
#include <filter/msfilter/svdfppt.hxx>
#include <svx/xpoly.hxx>
@@ -1062,6 +1063,12 @@ SdrObject* SdrEscherImport::ProcessObj(
break;
default :
+ {
+ if ( nTextFlags == PPT_TEXTOBJ_FLAGS_PARA_ALIGNMENT_USED_LEFT )
+ eTHA = SDRTEXTHORZADJUST_LEFT;
+ else if ( nTextFlags == PPT_TEXTOBJ_FLAGS_PARA_ALIGNMENT_USED_RIGHT )
+ eTHA = SDRTEXTHORZADJUST_RIGHT;
+ }
break;
}
nMinFrameHeight = rTextRect.GetHeight() - ( nTextTop + nTextBottom );
@@ -4267,6 +4274,18 @@ void PPTParaSheet::Read( SdrPowerPointIm
}
}
+void PPTParaSheet::UpdateBulletRelSize( sal_uInt32 nLevel, sal_uInt16 nFontHeight )
+{
+ if ( maParaLevel[ nLevel ].mnBulletHeight > 0x7fff ) // a negative value is the absolute bullet height
+ {
+ sal_Int16 nBulletRelSize = ( sal_Int16 )maParaLevel[ nLevel ].mnBulletHeight;
+ nBulletRelSize = nFontHeight ? ((-nBulletRelSize) * 100 ) / nFontHeight : 100;
+ if ( nBulletRelSize < 0 ) //bullet size over flow
+ nBulletRelSize = 100;
+ maParaLevel[ nLevel ].mnBulletHeight = nBulletRelSize;
+ }
+}
+
PPTStyleSheet::PPTStyleSheet( const DffRecordHeader& rSlideHd, SvStream& rIn, SdrPowerPointImport& rManager,
const PPTTextCharacterStyleAtomInterpreter& /*rTxCFStyle*/, const PPTTextParagraphStyleAtomInterpreter& rTxPFStyle,
const PPTTextSpecInfo& rTextSpecInfo ) :
@@ -4337,6 +4356,7 @@ PPTStyleSheet::PPTStyleSheet( const DffR
}
}
mpCharSheet[ TSS_TYPE_TEXT_IN_SHAPE ]->Read( rIn, sal_True, nLev, bFirst );
+ mpParaSheet[ TSS_TYPE_TEXT_IN_SHAPE ]->UpdateBulletRelSize( nLev, mpCharSheet[ TSS_TYPE_TEXT_IN_SHAPE ]->maCharLevel[ nLev ].mnFontHeight );
bFirst = sal_False;
nLev++;
}
@@ -4425,6 +4445,7 @@ PPTStyleSheet::PPTStyleSheet( const DffR
}
mpParaSheet[ nInstance ]->Read( rManager, rIn, sal_True, nLev, bFirst );
mpCharSheet[ nInstance ]->Read( rIn, sal_True, nLev, bFirst );
+ mpParaSheet[ nInstance ]->UpdateBulletRelSize( nLev, mpCharSheet[ nInstance ]->maCharLevel[ nLev ].mnFontHeight );
bFirst = sal_False;
nLev++;
}
@@ -4522,6 +4543,7 @@ PPTStyleSheet::PPTStyleSheet( const DffR
}
}
mpCharSheet[ TSS_TYPE_TEXT_IN_SHAPE ]->Read( rIn, sal_True, nLev, bFirst );
+ mpParaSheet[ TSS_TYPE_TEXT_IN_SHAPE ]->UpdateBulletRelSize( nLev, mpCharSheet[ TSS_TYPE_TEXT_IN_SHAPE ]->maCharLevel[ nLev ].mnFontHeight );
bFirst = sal_False;
nLev++;
}
@@ -5119,7 +5141,7 @@ void PPTStyleTextPropReader::ReadParaPro
{
rIn >> aSet.mpArry[ PPT_ParaAttr_BulletHeight ];
if ( ! ( ( nMask & ( 1 << PPT_ParaAttr_BuHardHeight ) )
- && ( nBulFlg && ( 1 << PPT_ParaAttr_BuHardHeight ) ) ) )
+ && ( nBulFlg & ( 1 << PPT_ParaAttr_BuHardHeight ) ) ) )
aSet.mnAttrSet ^= 0x40;
}
if ( nMask & 0x0020 ) // buColor
@@ -5143,9 +5165,15 @@ void PPTStyleTextPropReader::ReadParaPro
if ( nMask & 0x4000 ) // pfSpaceAfter
rIn >> aSet.mpArry[ PPT_ParaAttr_LowerDist ];
if ( nMask & 0x100 ) // pfLeftMargin
- rIn >> nDummy16;
+ {
+ rIn >> aSet.mpArry[ PPT_ParaAttr_TextOfs ];
+ aSet.mnAttrSet |= 1 << PPT_ParaAttr_TextOfs;
+ }
if ( nMask & 0x400 ) // pfIndent
- rIn >> nDummy16;
+ {
+ rIn >> aSet.mpArry[ PPT_ParaAttr_BulletOfs ];
+ aSet.mnAttrSet |= 1 << PPT_ParaAttr_BulletOfs;
+ }
if ( nMask & 0x8000 ) // pfDefaultTabSize
rIn >> nDummy16;
if ( nMask & 0x100000 ) // pfTabStops
@@ -5177,9 +5205,10 @@ void PPTStyleTextPropReader::ReadParaPro
else
nCharCount = nStringLen;
- if ( rRuler.GetTextOfs( aParaPropSet.pParaSet->mnDepth, aSet.mpArry[ PPT_ParaAttr_TextOfs ] ) )
+ //if the textofs attr has been read at above, need not to reset.
+ if ( ( !( aSet.mnAttrSet & 1 << PPT_ParaAttr_TextOfs ) ) && rRuler.GetTextOfs( aParaPropSet.pParaSet->mnDepth, aSet.mpArry[ PPT_ParaAttr_TextOfs ] ) )
aSet.mnAttrSet |= 1 << PPT_ParaAttr_TextOfs;
- if ( rRuler.GetBulletOfs( aParaPropSet.pParaSet->mnDepth, aSet.mpArry[ PPT_ParaAttr_BulletOfs ] ) )
+ if ( ( !( aSet.mnAttrSet & 1 << PPT_ParaAttr_BulletOfs ) ) && rRuler.GetBulletOfs( aParaPropSet.pParaSet->mnDepth, aSet.mpArry[ PPT_ParaAttr_BulletOfs ] ) )
aSet.mnAttrSet |= 1 << PPT_ParaAttr_BulletOfs;
if ( rRuler.GetDefaultTab( aParaPropSet.pParaSet->mnDepth, aSet.mpArry[ PPT_ParaAttr_DefaultTab ] ) )
aSet.mnAttrSet |= 1 << PPT_ParaAttr_DefaultTab;
@@ -7564,6 +7593,16 @@ void ApplyCellAttributes( const SdrObjec
eVA = drawing::TextVerticalAdjust_BOTTOM;
xPropSet->setPropertyValue( sTextVerticalAdjust, Any( eVA ) );
+ //set textHorizontalAdjust and TextWritingMode attr
+ const sal_Int32 eHA(((const SdrTextLeftDistItem&)pObj->GetMergedItem(SDRATTR_TEXT_HORZADJUST)).GetValue());
+ const SvxFrameDirection eDirection = (const SvxFrameDirection)((( const SvxFrameDirectionItem&)pObj->GetMergedItem(EE_PARA_WRITINGDIR)).GetValue());
+ static const rtl::OUString sHorizontalAdjust( RTL_CONSTASCII_USTRINGPARAM( "TextHorizontalAdjust" ) );
+ static const rtl::OUString sWritingMode( RTL_CONSTASCII_USTRINGPARAM("TextWritingMode") );
+ xPropSet->setPropertyValue( sHorizontalAdjust , Any( eHA ) );
+ if ( eDirection == FRMDIR_VERT_TOP_RIGHT )
+ {//vertical writing
+ xPropSet->setPropertyValue( sWritingMode , Any( ::com::sun::star::text::WritingMode_TB_RL ) );
+ }
SfxItemSet aSet( pObj->GetMergedItemSet() );
XFillStyle eFillStyle(((XFillStyleItem&)pObj->GetMergedItem( XATTR_FILLSTYLE )).GetValue());
::com::sun::star::drawing::FillStyle eFS( com::sun::star::drawing::FillStyle_NONE );
@@ -7612,6 +7651,16 @@ void ApplyCellAttributes( const SdrObjec
static const rtl::OUString sFillBitmapURL( String( RTL_CONSTASCII_USTRINGPARAM( "FillBitmapURL" ) ) );
xPropSet->setPropertyValue( sFillBitmapURL, Any( aURL ) );
+
+ static const rtl::OUString sFillBitmapMode( String( RTL_CONSTASCII_USTRINGPARAM( "FillBitmapMode" ) ) );
+ const XFillBmpStretchItem aStretchItem(( const XFillBmpStretchItem&)pObj->GetMergedItem( XATTR_FILLBMP_STRETCH ));
+ const XFillBmpTileItem aTileItem(( const XFillBmpTileItem&)pObj->GetMergedItem( XATTR_FILLBMP_TILE ));
+ if( aTileItem.GetValue() )
+ xPropSet->setPropertyValue( sFillBitmapMode, Any( com::sun::star::drawing::BitmapMode_REPEAT ) );
+ else if( aStretchItem.GetValue() )
+ xPropSet->setPropertyValue( sFillBitmapMode, Any( com::sun::star::drawing::BitmapMode_STRETCH ) );
+ else
+ xPropSet->setPropertyValue( sFillBitmapMode, Any( com::sun::star::drawing::BitmapMode_NO_REPEAT ) );
}
break;
case XFILL_NONE :
@@ -7818,6 +7867,13 @@ SdrObject* SdrPowerPointImport::CreateTa
if ( pPtr->pBObj == pPartObj )
pPtr->pBObj = NULL;
}
+ //In MS, the one_row_one_col table is made up of five shape,the connector is connected to some part of a table.
+ //but in AOO, the connector is connected to the whole group table,so the connector obj is a group table when export by AOO.
+ //should process this situation when import.
+ if ( pPtr->pAObj == pGroup )
+ pPtr->pAObj = pTable;
+ if ( pPtr->pBObj == pGroup )
+ pPtr->pBObj = pTable;
}
}
pTable->uno_unlock();
@@ -7847,4 +7903,140 @@ SdrObject* SdrPowerPointImport::CreateTa
////////////////////////////////////////////////////////////////////////////////////////////////////
+sal_Bool SdrPowerPointImport::IsVerticalText() const
+{
+ sal_Bool bVerticalText = sal_False;
+ if ( IsProperty( DFF_Prop_txflTextFlow ) )
+ {
+ MSO_TextFlow eTextFlow = (MSO_TextFlow)( GetPropertyValue( DFF_Prop_txflTextFlow ) & 0xFFFF );
+ switch( eTextFlow )
+ {
+ case mso_txflTtoBA : // Top to Bottom @-font, above -> below
+ case mso_txflTtoBN : // Top to Bottom non-@, above -> below
+ case mso_txflVertN : // Vertical, non-@, above -> below
+ bVerticalText = !bVerticalText;
+ break;
+ default: break;
+ }
+ }
+
+ return bVerticalText;
+}
+
+void SdrPowerPointImport::ApplyTextAnchorAttributes( PPTTextObj& rTextObj, SfxItemSet& rSet ) const
+{
+ SdrTextVertAdjust eTVA;
+ SdrTextHorzAdjust eTHA;
+
+ sal_uInt32 nTextFlags = rTextObj.GetTextFlags();
+
+ nTextFlags &= PPT_TEXTOBJ_FLAGS_PARA_ALIGNMENT_USED_LEFT | PPT_TEXTOBJ_FLAGS_PARA_ALIGNMENT_USED_RIGHT
+ | PPT_TEXTOBJ_FLAGS_PARA_ALIGNMENT_USED_CENTER | PPT_TEXTOBJ_FLAGS_PARA_ALIGNMENT_USED_BLOCK;
+
+ if ( IsVerticalText() )
+ {
+ eTVA = SDRTEXTVERTADJUST_BLOCK;
+ eTHA = SDRTEXTHORZADJUST_CENTER;
+
+ // Textverankerung lesen
+ MSO_Anchor eTextAnchor = (MSO_Anchor)GetPropertyValue( DFF_Prop_anchorText, mso_anchorTop );
+
+ switch( eTextAnchor )
+ {
+ case mso_anchorTop:
+ case mso_anchorTopCentered:
+ eTHA = SDRTEXTHORZADJUST_RIGHT;
+ break;
+
+ case mso_anchorMiddle :
+ case mso_anchorMiddleCentered:
+ eTHA = SDRTEXTHORZADJUST_CENTER;
+ break;
+
+ case mso_anchorBottom:
+ case mso_anchorBottomCentered:
+ eTHA = SDRTEXTHORZADJUST_LEFT;
+ break;
+ default:
+ break;
+ }
+ // if there is a 100% use of following attributes, the textbox can been aligned also in vertical direction
+ switch ( eTextAnchor )
+ {
+ case mso_anchorTopCentered :
+ case mso_anchorMiddleCentered :
+ case mso_anchorBottomCentered :
+ {
+ // check if it is sensible to use the centered alignment
+ sal_uInt32 nMask = PPT_TEXTOBJ_FLAGS_PARA_ALIGNMENT_USED_LEFT | PPT_TEXTOBJ_FLAGS_PARA_ALIGNMENT_USED_RIGHT;
+ if ( ( nTextFlags & nMask ) != nMask ) // if the textobject has left or also right aligned pararagraphs
+ eTVA = SDRTEXTVERTADJUST_CENTER; // the text has to be displayed using the full width;
+ }
+ break;
+
+ default :
+ {
+ if ( nTextFlags == PPT_TEXTOBJ_FLAGS_PARA_ALIGNMENT_USED_LEFT )
+ eTVA = SDRTEXTVERTADJUST_TOP;
+ else if ( nTextFlags == PPT_TEXTOBJ_FLAGS_PARA_ALIGNMENT_USED_RIGHT )
+ eTVA = SDRTEXTVERTADJUST_BOTTOM;
+ }
+ break;
+ }
+ }
+ else
+ {
+ eTVA = SDRTEXTVERTADJUST_CENTER;
+ eTHA = SDRTEXTHORZADJUST_BLOCK;
+
+ // Textverankerung lesen
+ MSO_Anchor eTextAnchor = (MSO_Anchor)GetPropertyValue( DFF_Prop_anchorText, mso_anchorTop );
+
+ switch( eTextAnchor )
+ {
+ case mso_anchorTop:
+ case mso_anchorTopCentered:
+ eTVA = SDRTEXTVERTADJUST_TOP;
+ break;
+
+ case mso_anchorMiddle :
+ case mso_anchorMiddleCentered:
+ eTVA = SDRTEXTVERTADJUST_CENTER;
+ break;
+
+ case mso_anchorBottom:
+ case mso_anchorBottomCentered:
+ eTVA = SDRTEXTVERTADJUST_BOTTOM;
+ break;
+
+ default:
+ break;
+ }
+ // if there is a 100% usage of following attributes, the textbox can be aligned also in horizontal direction
+ switch ( eTextAnchor )
+ {
+ case mso_anchorTopCentered :
+ case mso_anchorMiddleCentered :
+ case mso_anchorBottomCentered :
+ {
+ // check if it is sensible to use the centered alignment
+ sal_uInt32 nMask = PPT_TEXTOBJ_FLAGS_PARA_ALIGNMENT_USED_LEFT | PPT_TEXTOBJ_FLAGS_PARA_ALIGNMENT_USED_RIGHT;
+ if ( ( nTextFlags & nMask ) != nMask ) // if the textobject has left or also right aligned pararagraphs
+ eTHA = SDRTEXTHORZADJUST_CENTER; // the text has to be displayed using the full width;
+ }
+ break;
+
+ default :
+ {
+ if ( nTextFlags == PPT_TEXTOBJ_FLAGS_PARA_ALIGNMENT_USED_LEFT )
+ eTHA = SDRTEXTHORZADJUST_LEFT;
+ else if ( nTextFlags == PPT_TEXTOBJ_FLAGS_PARA_ALIGNMENT_USED_RIGHT )
+ eTHA = SDRTEXTHORZADJUST_RIGHT;
+ }
+ break;
+ }
+ }
+ rSet.Put( SdrTextVertAdjustItem( eTVA ) );
+ rSet.Put( SdrTextHorzAdjustItem( eTHA ) );
+}
Modified: incubator/ooo/branches/writer001/main/filter/source/svg/svgexport.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/filter/source/svg/svgexport.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/filter/source/svg/svgexport.cxx (original)
+++ incubator/ooo/branches/writer001/main/filter/source/svg/svgexport.cxx Mon Aug 20 11:46:19 2012
@@ -31,7 +31,6 @@
#include "svgfilter.hxx"
#include "impsvgdialog.hxx"
-#include <svtools/FilterConfigItem.hxx>
#include <svx/unopage.hxx>
#include <svx/unoshape.hxx>
#include <svx/svdpage.hxx>
@@ -49,11 +48,41 @@ using ::rtl::OUString;
SVGExport::SVGExport(
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory,
const Reference< XDocumentHandler >& rxHandler,
- const Sequence< PropertyValue >& rFilterData ) :
- SvXMLExport( xServiceFactory, MAP_100TH_MM ),
- mrFilterData( rFilterData )
+ const Sequence< PropertyValue >& rFilterData )
+: SvXMLExport( xServiceFactory, MAP_100TH_MM )
+, mbTinyProfile ( sal_True )
+, mbTSpans ( sal_True )
+, mbEmbedFonts ( sal_False )
+, mbNativeTextDecoration( sal_True )
+, mbOpacity ( sal_True )
+, mbGradient ( sal_True )
{
- SetDocHandler( rxHandler );
+ for ( sal_Int32 i = 0, nCount = rFilterData.getLength(); i < nCount; i++ )
+ {
+ if ( rFilterData[ i ].Name == B2UCONST( SVG_PROP_TINYPROFILE ) )
+ rFilterData[ i ].Value >>= mbTinyProfile;
+ else if ( rFilterData[ i ].Name == B2UCONST( "TSpans" ) )
+ rFilterData[ i ].Value >>= mbTSpans;
+ else if ( rFilterData[ i ].Name == B2UCONST( SVG_PROP_EMBEDFONTS ) )
+ rFilterData[ i ].Value >>= mbEmbedFonts;
+ else if ( rFilterData[ i ].Name == B2UCONST( SVG_PROP_NATIVEDECORATION ) )
+ rFilterData[ i ].Value >>= mbNativeTextDecoration;
+ else if ( rFilterData[ i ].Name == B2UCONST( "GlyphPlacement" ) )
+ rFilterData[ i ].Value >>= maGlyphPlacement;
+ else if ( rFilterData[ i ].Name == B2UCONST( SVG_PROP_OPACITY ) )
+ rFilterData[ i ].Value >>= mbOpacity;
+ else if ( rFilterData[ i ].Name == B2UCONST( SVG_PROP_GRADIENT ) )
+ rFilterData[ i ].Value >>= mbGradient;
+ }
+ if ( mbTinyProfile )
+ mbNativeTextDecoration = sal_False;
+ else
+ {
+ mbTSpans = sal_False;
+ mbOpacity = sal_True;
+ mbGradient = sal_True;
+ }
+ SetDocHandler( rxHandler );
GetDocHandler()->startDocument();
}
@@ -66,80 +95,6 @@ SVGExport::~SVGExport()
// -----------------------------------------------------------------------------
-sal_Bool SVGExport::IsUseTinyProfile() const
-{
- sal_Bool bRet = sal_False;
-
- if( mrFilterData.getLength() > 0 )
- mrFilterData[ 0 ].Value >>= bRet;
-
- return bRet;
-}
-
-// -----------------------------------------------------------------------------
-
-sal_Bool SVGExport::IsEmbedFonts() const
-{
- sal_Bool bRet = sal_False;
-
- if( mrFilterData.getLength() > 1 )
- mrFilterData[ 1 ].Value >>= bRet;
-
- return bRet;
-}
-
-// -----------------------------------------------------------------------------
-
-sal_Bool SVGExport::IsUseNativeTextDecoration() const
-{
- sal_Bool bRet = !IsUseTinyProfile();
-
- if( bRet && ( mrFilterData.getLength() > 2 ) )
- mrFilterData[ 2 ].Value >>= bRet;
-
- return bRet;
-}
-
-// -----------------------------------------------------------------------------
-
-::rtl::OUString SVGExport::GetGlyphPlacement() const
-{
- ::rtl::OUString aRet;
-
- if( mrFilterData.getLength() > 3 )
- mrFilterData[ 3 ].Value >>= aRet;
- else
- aRet = B2UCONST( "abs" );
-
- return aRet;
-}
-
-// -----------------------------------------------------------------------------
-
-sal_Bool SVGExport::IsUseOpacity() const
-{
- sal_Bool bRet = !IsUseTinyProfile();
-
- if( !bRet && ( mrFilterData.getLength() > 4 ) )
- mrFilterData[ 4 ].Value >>= bRet;
-
- return bRet;
-}
-
-// -----------------------------------------------------------------------------
-
-sal_Bool SVGExport::IsUseGradient() const
-{
- sal_Bool bRet = !IsUseTinyProfile();
-
- if( !bRet && ( mrFilterData.getLength() > 5 ) )
- mrFilterData[ 5 ].Value >>= bRet;
-
- return bRet;
-}
-
-// -----------------------------------------------------------------------------
-
void SVGExport::pushClip( const ::basegfx::B2DPolyPolygon& rPolyPoly )
{
maClipList.push_front( ::basegfx::tools::correctOrientations( rPolyPoly ) );
@@ -478,7 +433,7 @@ sal_Bool SVGFilter::implExportDocument(
aAttr += OUString::valueOf( nDocWidth );
aAttr += B2UCONST( " " );
aAttr += OUString::valueOf( nDocHeight );
-
+ mpSVGExport->SetViewBox( Rectangle( Point(), Size( nDocWidth, nDocHeight ) ) );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "viewBox", aAttr );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "preserveAspectRatio", B2UCONST( "xMidYMid" ) );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "fill-rule", B2UCONST( "evenodd" ) );
@@ -1272,7 +1227,13 @@ void SVGExport::writeMtf( const GDIMetaF
aAttr += B2UCONST( " " );
aAttr += rtl::OUString::valueOf( aSize.Height() * 100L );
AddAttribute( XML_NAMESPACE_NONE, "viewBox", aAttr );
+ SetViewBox( Rectangle( Point(), Size( aSize.Width() * 100, aSize.Height() * 100 ) ) );
+
+ // standard line width is based on 1 pixel on a 90 DPI device (0.28222mmm)
+ AddAttribute( XML_NAMESPACE_NONE, "stroke-width", OUString::valueOf( 28.222 ) );
+ AddAttribute( XML_NAMESPACE_NONE, "stroke-linejoin", B2UCONST( "round" ) );
+ AddAttribute( XML_NAMESPACE_NONE, "xml:space", B2UCONST( "preserve" ) );
{
SvXMLElementExport aSVG( *this, XML_NAMESPACE_NONE, "svg", sal_True, sal_True );
Modified: incubator/ooo/branches/writer001/main/filter/source/svg/svgfilter.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/filter/source/svg/svgfilter.hxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/filter/source/svg/svgfilter.hxx (original)
+++ incubator/ooo/branches/writer001/main/filter/source/svg/svgfilter.hxx Mon Aug 20 11:46:19 2012
@@ -79,7 +79,6 @@
#include <svx/svdxcgv.hxx>
#include <svx/svdobj.hxx>
#include <xmloff/xmlexp.hxx>
-
#include "svgfilter.hxx"
#include "svgscript.hxx"
@@ -113,6 +112,17 @@ class SVGExport : public SvXMLExport
{
typedef ::std::list< ::basegfx::B2DPolyPolygon > B2DPolyPolygonList;
+ rtl::OUString maGlyphPlacement;
+
+ sal_Bool mbTinyProfile;
+ sal_Bool mbTSpans;
+ sal_Bool mbEmbedFonts;
+ sal_Bool mbNativeTextDecoration;
+ sal_Bool mbOpacity;
+ sal_Bool mbGradient;
+
+ Rectangle maViewBox;
+
public:
SVGExport( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory,
@@ -121,13 +131,18 @@ public:
virtual ~SVGExport();
- sal_Bool IsUseTinyProfile() const;
- sal_Bool IsEmbedFonts() const;
- sal_Bool IsUseNativeTextDecoration() const;
- ::rtl::OUString GetGlyphPlacement() const;
- sal_Bool IsUseOpacity() const;
- sal_Bool IsUseGradient() const;
+ sal_Bool IsUseTinyProfile() const { return mbTinyProfile; };
+ sal_Bool IsUseTSpans() const { return mbTSpans; };
+ sal_Bool IsEmbedFonts() const { return mbEmbedFonts; };
+ sal_Bool IsUseNativeTextDecoration() const { return mbNativeTextDecoration; };
+ ::rtl::OUString GetGlyphPlacement() const { return maGlyphPlacement; };
+ sal_Bool IsUseOpacity() const { return mbOpacity; };
+ sal_Bool IsUseGradient() const { return mbGradient; };
+ const Rectangle& GetViewBox() const { return maViewBox; };
+ void SetViewBox( const Rectangle& rViewBox ) { maViewBox = rViewBox; };
+ sal_Bool IsVisible( const Rectangle& rRect ) const { return GetViewBox().IsOver( rRect ); };
+
void pushClip( const ::basegfx::B2DPolyPolygon& rPolyPoly );
void popClip();
sal_Bool hasClip() const;
@@ -145,8 +160,7 @@ virtual sal_uInt32 exportDoc( enum ::xm
private:
- const Sequence< PropertyValue >& mrFilterData;
- B2DPolyPolygonList maClipList;
+ B2DPolyPolygonList maClipList;
SVGExport();
};