Files
loongoffice/offapi/com/sun/star/xml/sax/XFastShapeContextHandler.idl
Miklos Vajna 6c4f737ec8 DOCX drawingML shape import: fix position when CustomShapeGeometry is set
DOCX drawingML shapes had wrong position if they had their
CustomShapeGeometry set (e.g. flipped). This wasn't a problem for VML
shapes, as there the shape knows its position, and position was always
set in oox as well, not in writerfilter. However, in case of WPS shapes,
oox created the shape, and previously writerfilter set the position
after-the-fact. This leads to incorrect results if CustomShapeGeometry
is involved. Fix this by passing the position from writerfilter to oox,
and call setPosition() after creation, but before CustomShapeGeometry is
set.

The other problem was that normally writerfilter learns the position of
the shape when relevant token in GraphicImport::lcl_sprm() arrives, but
this happens after OOXMLFastContextHandlerShape::sendShape() needs that
information. Work around this by accessing the PositionHandler directly.

Change-Id: Iced35dc9467ef77c41f1897f124729f686bd045e
2013-11-21 12:37:15 +01:00

54 lines
1.9 KiB
Plaintext

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* 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 .
*/
#ifndef __com_sun_star_xml_sax_XFastShapeContextHandler_idl__
#define __com_sun_star_xml_sax_XFastShapeContextHandler_idl__
#include <com/sun/star/xml/sax/XFastContextHandler.idl>
#include <com/sun/star/drawing/XShape.idl>
#include <com/sun/star/drawing/XDrawPage.idl>
#include <com/sun/star/frame/XModel.idl>
#include <com/sun/star/io/XInputStream.idl>
module com { module sun { module star { module xml { module sax {
/** receives notification of sax document events from a
XFastParser.
@see XFastDocumentHandler
*/
interface XFastShapeContextHandler: com::sun::star::xml::sax::XFastContextHandler
{
[attribute, readonly] com::sun::star::drawing::XShape Shape;
[attribute] com::sun::star::drawing::XDrawPage DrawPage;
[attribute] com::sun::star::frame::XModel Model;
[attribute] com::sun::star::io::XInputStream InputStream;
[attribute] string RelationFragmentPath;
[attribute] long StartToken;
[attribute] com::sun::star::awt::Point Position;
};
}; }; }; }; };
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */