This allows to have two cell anchored types: * Only cell anchored (moves with the cell when sorting etc) * Cell anchored, also resizes with the cell Beforehand, all cell anchored images would resize with the cell, which was often not what users expected. The new default (when inserting images) is now that inserted images are only anchored to the cell, but don't resize with the cell. This makes use of the ODF elements table:end-cell-address, table:end-x, table:end-y. When images should resize with the cell, the end address is written (it has always been written earlier, so documents would still import correctly). If not, they are omitted. Also implements xlsx import & export Change-Id: I5f96242f88943ed77a0fd12b7f39b444e1380df7 Reviewed-on: https://gerrit.libreoffice.org/49490 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
75 lines
2.0 KiB
C++
75 lines
2.0 KiB
C++
/* -*- 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 .
|
|
*/
|
|
|
|
#include <userdat.hxx>
|
|
#include <drwlayer.hxx>
|
|
#include <rechead.hxx>
|
|
|
|
|
|
ScDrawObjData::ScDrawObjData() :
|
|
SdrObjUserData( SdrInventor::ScOrSwDraw, SC_UD_OBJDATA ),
|
|
maStart( ScAddress::INITIALIZE_INVALID ),
|
|
maEnd( ScAddress::INITIALIZE_INVALID ),
|
|
meType( DrawingObject ),
|
|
mbResizeWithCell( false )
|
|
{
|
|
}
|
|
|
|
ScDrawObjData* ScDrawObjData::Clone( SdrObject* ) const
|
|
{
|
|
return new ScDrawObjData( *this );
|
|
}
|
|
|
|
ScIMapInfo::ScIMapInfo( const ImageMap& rImageMap ) :
|
|
SdrObjUserData( SdrInventor::ScOrSwDraw, SC_UD_IMAPDATA ),
|
|
aImageMap( rImageMap )
|
|
{
|
|
}
|
|
|
|
ScIMapInfo::ScIMapInfo( const ScIMapInfo& rIMapInfo ) :
|
|
SdrObjUserData( rIMapInfo ),
|
|
aImageMap( rIMapInfo.aImageMap )
|
|
{
|
|
}
|
|
|
|
ScIMapInfo::~ScIMapInfo()
|
|
{
|
|
}
|
|
|
|
SdrObjUserData* ScIMapInfo::Clone( SdrObject* ) const
|
|
{
|
|
return new ScIMapInfo( *this );
|
|
}
|
|
|
|
ScMacroInfo::ScMacroInfo() :
|
|
SdrObjUserData( SdrInventor::ScOrSwDraw, SC_UD_MACRODATA )
|
|
{
|
|
}
|
|
|
|
ScMacroInfo::~ScMacroInfo()
|
|
{
|
|
}
|
|
|
|
SdrObjUserData* ScMacroInfo::Clone( SdrObject* /*pObj*/ ) const
|
|
{
|
|
return new ScMacroInfo( *this );
|
|
}
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|