summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorArmin Le Grand <alg@apache.org>2014-07-14 19:09:11 +0000
committerArmin Le Grand <alg@apache.org>2014-07-14 19:09:11 +0000
commit3c1d4742e649fe9c8aed8c2817fe3e1f3364f298 (patch)
treee0c6e02c89aa9227726c9469da1001b3e29c41df /oox
parentc5c31e2aeaedbdf76e1f38d3c385e34f5ed875ca (diff)
Resync to trunk, windows non-pro buildaoo/aw080
Diffstat (limited to 'oox')
-rw-r--r--oox/inc/oox/core/binarycodec.hxx8
-rw-r--r--oox/inc/oox/drawingml/drawingmltypes.hxx6
-rw-r--r--oox/inc/oox/helper/graphichelper.hxx2
-rw-r--r--oox/inc/oox/helper/propertyset.hxx2
-rw-r--r--oox/inc/oox/ole/axbinaryreader.hxx2
-rw-r--r--oox/inc/oox/vml/vmlinputstream.hxx2
-rw-r--r--oox/inc/oox/xls/biffinputstream.hxx4
-rw-r--r--oox/inc/oox/xls/defnamesbuffer.hxx2
-rw-r--r--oox/inc/oox/xls/richstring.hxx1
-rw-r--r--oox/source/core/filterdetect.cxx2
-rw-r--r--oox/source/drawingml/customshapeproperties.cxx11
-rw-r--r--oox/source/export/preset-definitions-to-shape-types.pl2
-rw-r--r--oox/source/ppt/slidefragmenthandler.cxx31
-rw-r--r--oox/source/token/properties.txt1
-rw-r--r--oox/source/vml/vmlinputstream.cxx4
-rw-r--r--oox/source/xls/formulaparser.cxx2
-rw-r--r--oox/source/xls/richstring.cxx10
-rw-r--r--oox/source/xls/sheetdatabuffer.cxx2
18 files changed, 61 insertions, 33 deletions
diff --git a/oox/inc/oox/core/binarycodec.hxx b/oox/inc/oox/core/binarycodec.hxx
index 25a1f22e6771..e8622ff53a90 100644
--- a/oox/inc/oox/core/binarycodec.hxx
+++ b/oox/inc/oox/core/binarycodec.hxx
@@ -141,7 +141,7 @@ public:
this size.
@return
- True = decoding was successful (no error occured).
+ True = decoding was successful (no error occurred).
*/
bool decode(
sal_uInt8* pnDestData,
@@ -161,7 +161,7 @@ public:
Number of bytes to be skipped (cipher "seeks" forward).
@return
- True = skip was successful (no error occured).
+ True = skip was successful (no error occurred).
*/
bool skip( sal_Int32 nBytes );
@@ -274,7 +274,7 @@ public:
this size.
@return
- True = decoding was successful (no error occured).
+ True = decoding was successful (no error occurred).
*/
bool decode(
sal_uInt8* pnDestData,
@@ -294,7 +294,7 @@ public:
Number of bytes to be skipped (cipher "seeks" forward).
@return
- True = skip was successful (no error occured).
+ True = skip was successful (no error occurred).
*/
bool skip( sal_Int32 nBytes );
diff --git a/oox/inc/oox/drawingml/drawingmltypes.hxx b/oox/inc/oox/drawingml/drawingmltypes.hxx
index 5be4f24ef1ae..48600fb3b899 100644
--- a/oox/inc/oox/drawingml/drawingmltypes.hxx
+++ b/oox/inc/oox/drawingml/drawingmltypes.hxx
@@ -163,7 +163,7 @@ inline sal_Int32 convertEmuToHmm( sal_Int64 nValue )
// ============================================================================
-/** A structure for a point with 64-bit interger components. */
+/** A structure for a point with 64-bit integer components. */
struct EmuPoint
{
sal_Int64 X;
@@ -175,7 +175,7 @@ struct EmuPoint
// ============================================================================
-/** A structure for a size with 64-bit interger components. */
+/** A structure for a size with 64-bit integer components. */
struct EmuSize
{
sal_Int64 Width;
@@ -187,7 +187,7 @@ struct EmuSize
// ============================================================================
-/** A structure for a rectangle with 64-bit interger components. */
+/** A structure for a rectangle with 64-bit integer components. */
struct EmuRectangle : public EmuPoint, public EmuSize
{
inline explicit EmuRectangle() {}
diff --git a/oox/inc/oox/helper/graphichelper.hxx b/oox/inc/oox/helper/graphichelper.hxx
index 0ab80b00545e..4f36fc916b4c 100644
--- a/oox/inc/oox/helper/graphichelper.hxx
+++ b/oox/inc/oox/helper/graphichelper.hxx
@@ -55,7 +55,7 @@ namespace oox {
persistent graphic objects internally and store them in an internal
container to prevent their early destruction. This makes it possible to use
the returned URL of the graphic object in any way (e.g. insert it into a
- property map) without needing to store it immediatly at an object that
+ property map) without needing to store it immediately at an object that
resolves the graphic object from the passed URL and thus prevents it from
being destroyed.
*/
diff --git a/oox/inc/oox/helper/propertyset.hxx b/oox/inc/oox/helper/propertyset.hxx
index d0b3ba3cf8c1..88d2b9ba0508 100644
--- a/oox/inc/oox/helper/propertyset.hxx
+++ b/oox/inc/oox/helper/propertyset.hxx
@@ -95,7 +95,7 @@ public:
{ return getAnyProperty( nPropId ) >>= orValue; }
/** Gets the specified boolean property from the property set.
- @return true = property contains true; false = property contains false or error occured. */
+ @return true = property contains true; false = property contains false or error occurred. */
inline bool getBoolProperty( sal_Int32 nPropId ) const
{ bool bValue = false; return getProperty( bValue, nPropId ) && bValue; }
diff --git a/oox/inc/oox/ole/axbinaryreader.hxx b/oox/inc/oox/ole/axbinaryreader.hxx
index 2b974b15a25d..8f27fb765218 100644
--- a/oox/inc/oox/ole/axbinaryreader.hxx
+++ b/oox/inc/oox/ole/axbinaryreader.hxx
@@ -39,7 +39,7 @@ namespace ole {
seeking operations (tell, seekTo, align) are performed relative to the
position of the wrapped stream at construction time of this wrapper. It is
possible to construct this wrapper with an unseekable input stream without
- loosing any functionality.
+ losing any functionality.
*/
class AxAlignedInputStream : public BinaryInputStream
{
diff --git a/oox/inc/oox/vml/vmlinputstream.hxx b/oox/inc/oox/vml/vmlinputstream.hxx
index 2b78af9aea57..0c9680dbcfe4 100644
--- a/oox/inc/oox/vml/vmlinputstream.hxx
+++ b/oox/inc/oox/vml/vmlinputstream.hxx
@@ -51,7 +51,7 @@ typedef ::cppu::WeakImplHelper1< ::com::sun::star::io::XInputStream > InputStrea
not containing the characters '<' and '>' are stripped from the input
stream.
- 2) Multiple occurences of the same attribute in an element but the last
+ 2) Multiple occurrences of the same attribute in an element but the last
are removed.
3) Line breaks represented by a single <br> element (without matching
diff --git a/oox/inc/oox/xls/biffinputstream.hxx b/oox/inc/oox/xls/biffinputstream.hxx
index 45d30d37b05a..97f389ce5434 100644
--- a/oox/inc/oox/xls/biffinputstream.hxx
+++ b/oox/inc/oox/xls/biffinputstream.hxx
@@ -152,7 +152,7 @@ public:
/** Constructs the BIFF record stream using the passed binary stream.
@param rInStream
- The base input stream. Must be seekable. Will be seeked to its
+ The base input stream. Must be seekable. Will be sought to its
start position.
@param bContLookup Automatic CONTINUE lookup on/off.
@@ -348,7 +348,7 @@ public:
// ------------------------------------------------------------------------
private:
- /** Initializes all members after base stream has been seeked to new record. */
+ /** Initializes all members after base stream has been sought to new record. */
void setupRecord();
/** Restarts the current record from the beginning. */
void restartRecord( bool bInvalidateRecSize );
diff --git a/oox/inc/oox/xls/defnamesbuffer.hxx b/oox/inc/oox/xls/defnamesbuffer.hxx
index 8fdea570498d..fba94cc51ccf 100644
--- a/oox/inc/oox/xls/defnamesbuffer.hxx
+++ b/oox/inc/oox/xls/defnamesbuffer.hxx
@@ -187,7 +187,7 @@ public:
/** Creates all defined names in the document. */
void finalizeImport();
- /** Returns a defined name by zero-based index (order of appearence). */
+ /** Returns a defined name by zero-based index (order of appearance). */
DefinedNameRef getByIndex( sal_Int32 nIndex ) const;
/** Returns a defined name by token index (index in XDefinedNames container). */
DefinedNameRef getByTokenIndex( sal_Int32 nIndex ) const;
diff --git a/oox/inc/oox/xls/richstring.hxx b/oox/inc/oox/xls/richstring.hxx
index 18f177b879a4..afd88f117bfd 100644
--- a/oox/inc/oox/xls/richstring.hxx
+++ b/oox/inc/oox/xls/richstring.hxx
@@ -78,6 +78,7 @@ private:
::rtl::OUString maText; /// Portion text.
FontRef mxFont; /// Embedded portion font, may be empty.
sal_Int32 mnFontId; /// Link to global font list.
+ bool mbConverted; /// Without repeatly convert
};
typedef ::boost::shared_ptr< RichStringPortion > RichStringPortionRef;
diff --git a/oox/source/core/filterdetect.cxx b/oox/source/core/filterdetect.cxx
index 0a2ce1d0283f..0e64d4751cd2 100644
--- a/oox/source/core/filterdetect.cxx
+++ b/oox/source/core/filterdetect.cxx
@@ -627,7 +627,7 @@ OUString SAL_CALL FilterDetect::detect( Sequence< PropertyValue >& rMediaDescSeq
OUString aFilterName;
MediaDescriptor aMediaDesc( rMediaDescSeq );
- /* Check that the user has not choosen to abort detection, e.g. by hitting
+ /* Check that the user has not chosen to abort detection, e.g. by hitting
'Cancel' in the password input dialog. This may happen because this
filter detection is used by different filters. */
bool bAborted = aMediaDesc.getUnpackedValueOrDefault( MediaDescriptor::PROP_ABORTED(), false );
diff --git a/oox/source/drawingml/customshapeproperties.cxx b/oox/source/drawingml/customshapeproperties.cxx
index f1c2d4ad13e0..ca5494b614a9 100644
--- a/oox/source/drawingml/customshapeproperties.cxx
+++ b/oox/source/drawingml/customshapeproperties.cxx
@@ -31,6 +31,7 @@
#include <com/sun/star/graphic/XGraphicTransformer.hpp>
#include <com/sun/star/drawing/XShape.hpp>
#include <com/sun/star/drawing/XEnhancedCustomShapeDefaulter.hpp>
+#include <basegfx/numeric/ftools.hxx>
using rtl::OUString;
using namespace ::oox::core;
@@ -197,7 +198,15 @@ void CustomShapeProperties::pushToPropSet( const ::oox::core::FilterBase& /* rFi
if ( ( nAdjustmentIndex >= 0 ) && ( nAdjustmentIndex < aAdjustmentSeq.getLength() ) )
{
EnhancedCustomShapeAdjustmentValue aAdjustmentVal;
- aAdjustmentVal.Value <<= (*aIter).maFormula.toInt32();
+
+ sal_Int32 nValue((*aIter).maFormula.toInt32());
+
+ // #124703# The ms control point coordinates are relative to the
+ // object center in the range [-50000 .. 50000] while our customshapes
+ // use a range from [0 .. 21600], so adapt the value as needed
+ nValue = basegfx::fround((double(nValue) + 50000.0) * (21600.0 / 100000.0));
+
+ aAdjustmentVal.Value <<= nValue;
aAdjustmentVal.State = PropertyState_DIRECT_VALUE;
aAdjustmentSeq[ nAdjustmentIndex ] = aAdjustmentVal;
}
diff --git a/oox/source/export/preset-definitions-to-shape-types.pl b/oox/source/export/preset-definitions-to-shape-types.pl
index becac00ab7e8..686606bdc578 100644
--- a/oox/source/export/preset-definitions-to-shape-types.pl
+++ b/oox/source/export/preset-definitions-to-shape-types.pl
@@ -284,7 +284,7 @@ $path_h = 1;
201 => 'hostControl', # should not be used
202 => 'textBox'
);
-# An error occured, we have to ignore this shape
+# An error occurred, we have to ignore this shape
sub error( $ )
{
my ( $msg ) = @_;
diff --git a/oox/source/ppt/slidefragmenthandler.cxx b/oox/source/ppt/slidefragmenthandler.cxx
index 0f2ab8d6cb2c..a00ab352aa22 100644
--- a/oox/source/ppt/slidefragmenthandler.cxx
+++ b/oox/source/ppt/slidefragmenthandler.cxx
@@ -77,19 +77,32 @@ Reference< XFastContextHandler > SlideFragmentHandler::createFastChildContext( s
switch( aElementToken )
{
+ case PPT_TOKEN( sld ): // CT_Slide
+ {
+ OptValue< bool > aShowMasterSp = aAttribs.getBool( XML_showMasterSp );
+ if( aShowMasterSp.has() && !aShowMasterSp.get() )
+ {
+ PropertyMap aPropMap;
+ aPropMap[ PROP_IsBackgroundObjectsVisible ] = Any( false );
+
+ Reference< XDrawPage > xSlide( mpSlidePersistPtr->getPage() );
+ PropertySet aSlideProp( xSlide );
+ aSlideProp.setProperties( aPropMap );
+ }
+ }
case PPT_TOKEN( sldMaster ): // CT_SlideMaster
case PPT_TOKEN( handoutMaster ): // CT_HandoutMaster
- case PPT_TOKEN( sld ): // CT_CommonSlideData
{
- AttributeList attribs( xAttribs );
-
- Reference< XDrawPage > xSlide( mpSlidePersistPtr->getPage() );
- PropertyMap aPropMap;
- PropertySet aSlideProp( xSlide );
-
- aPropMap[ PROP_Visible ] = Any( attribs.getBool( XML_show, sal_True ) );
- aSlideProp.setProperties( aPropMap );
+ OptValue< bool > aShow = aAttribs.getBool( XML_show );
+ if( aShow.has() && !aShow.get() )
+ {
+ PropertyMap aPropMap;
+ aPropMap[ PROP_Visible ] = Any( false );
+ Reference< XDrawPage > xSlide( mpSlidePersistPtr->getPage() );
+ PropertySet aSlideProp( xSlide );
+ aSlideProp.setProperties( aPropMap );
+ }
break;
}
case PPT_TOKEN( notes ): // CT_NotesSlide
diff --git a/oox/source/token/properties.txt b/oox/source/token/properties.txt
index 3844a1b387a8..c2b211619792 100644
--- a/oox/source/token/properties.txt
+++ b/oox/source/token/properties.txt
@@ -221,6 +221,7 @@ InputMessage
InputTitle
IsActive
IsAdjustHeightEnabled
+IsBackgroundObjectsVisible
IsCaseSensitive
IsCellBackgroundTransparent
IsChangeReadOnlyEnabled
diff --git a/oox/source/vml/vmlinputstream.cxx b/oox/source/vml/vmlinputstream.cxx
index 2749741579c9..9f5086c1dcb6 100644
--- a/oox/source/vml/vmlinputstream.cxx
+++ b/oox/source/vml/vmlinputstream.cxx
@@ -89,7 +89,7 @@ inline void lclAppendToBuffer( OStringBuffer& rBuffer, const sal_Char* pcBeg, co
void lclProcessAttribs( OStringBuffer& rBuffer, const sal_Char* pcBeg, const sal_Char* pcEnd )
{
/* Map attribute names to char-pointer of all attributes. This map is used
- to find multiple occurences of attributes with the same name. The
+ to find multiple occurrences of attributes with the same name. The
mapped pointers are used as map key in the next map below. */
typedef ::std::map< OString, const sal_Char* > AttributeNameMap;
AttributeNameMap aAttributeNames;
@@ -140,7 +140,7 @@ void lclProcessAttribs( OStringBuffer& rBuffer, const sal_Char* pcBeg, const sal
}
}
- // if no error has occured, build the resulting attribute list
+ // if no error has occurred, build the resulting attribute list
if( bOk )
for( AttributeDataMap::iterator aIt = aAttributes.begin(), aEnd = aAttributes.end(); aIt != aEnd; ++aIt )
rBuffer.append( ' ' ).append( aIt->second );
diff --git a/oox/source/xls/formulaparser.cxx b/oox/source/xls/formulaparser.cxx
index f38344e20069..d8a5ab7c59ae 100644
--- a/oox/source/xls/formulaparser.cxx
+++ b/oox/source/xls/formulaparser.cxx
@@ -367,7 +367,7 @@ const ApiToken* FormulaFinalizer::findParameters( ParameterPosVector& rParams,
void FormulaFinalizer::appendEmptyParameter( const FunctionInfo& rFuncInfo, size_t nParam )
{
- // remeber old size of the token array
+ // remember old size of the token array
size_t nTokenArraySize = maTokens.size();
switch( rFuncInfo.mnBiff12FuncId )
diff --git a/oox/source/xls/richstring.cxx b/oox/source/xls/richstring.cxx
index b2349ab6df72..1fb24f4c4c7b 100644
--- a/oox/source/xls/richstring.cxx
+++ b/oox/source/xls/richstring.cxx
@@ -19,8 +19,6 @@
*
*************************************************************/
-
-
#include "oox/xls/richstring.hxx"
#include <com/sun/star/text/XText.hpp>
@@ -59,7 +57,8 @@ inline bool lclNeedsRichTextFormat( const Font* pFont )
RichStringPortion::RichStringPortion( const WorkbookHelper& rHelper ) :
WorkbookHelper( rHelper ),
- mnFontId( -1 )
+ mnFontId( -1 ),
+ mbConverted( false )
{
}
@@ -89,6 +88,9 @@ void RichStringPortion::finalizeImport()
void RichStringPortion::convert( const Reference< XText >& rxText, const Font* pFont, bool bReplace )
{
+ if ( mbConverted )
+ return;
+
Reference< XTextRange > xRange;
if( bReplace )
xRange.set( rxText, UNO_QUERY );
@@ -113,6 +115,8 @@ void RichStringPortion::convert( const Reference< XText >& rxText, const Font* p
pFont->writeToPropertySet( aPropSet, FONT_PROPTYPE_TEXT );
}
}
+
+ mbConverted = true;
}
// ----------------------------------------------------------------------------
diff --git a/oox/source/xls/sheetdatabuffer.cxx b/oox/source/xls/sheetdatabuffer.cxx
index c15334a39506..1b697349c06b 100644
--- a/oox/source/xls/sheetdatabuffer.cxx
+++ b/oox/source/xls/sheetdatabuffer.cxx
@@ -257,7 +257,7 @@ CellBlock* CellBlockBuffer::getCellBlock( const CellAddress& rCellAddr )
{
/* The colspan vector aIt points to is sorted by columns, as well
as the cell block map. In the folloing, this vector and the
- list of cell blocks can be iterated simultanously. */
+ list of cell blocks can be iterated simultaneously. */
CellBlockMap::iterator aMIt = maCellBlocks.begin();
const ValueRangeVector& rColRanges = aIt->second;
for( ValueRangeVector::const_iterator aVIt = rColRanges.begin(), aVEnd = rColRanges.end(); aVIt != aVEnd; ++aVIt, ++aMIt )