mirror of
https://github.com/QtExcel/QXlsx.git
synced 2025-01-16 04:42:53 +08:00
issue #75
This commit is contained in:
parent
ad9378537a
commit
b204c0e811
@ -1,27 +1,5 @@
|
||||
/****************************************************************************
|
||||
** Copyright (c) 2013-2014 Debao Zhang <hello@debao.me>
|
||||
** All right reserved.
|
||||
**
|
||||
** Permission is hereby granted, free of charge, to any person obtaining
|
||||
** a copy of this software and associated documentation files (the
|
||||
** "Software"), to deal in the Software without restriction, including
|
||||
** without limitation the rights to use, copy, modify, merge, publish,
|
||||
** distribute, sublicense, and/or sell copies of the Software, and to
|
||||
** permit persons to whom the Software is furnished to do so, subject to
|
||||
** the following conditions:
|
||||
**
|
||||
** The above copyright notice and this permission notice shall be
|
||||
** included in all copies or substantial portions of the Software.
|
||||
**
|
||||
** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
** NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
** LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
** OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
** WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
**
|
||||
****************************************************************************/
|
||||
// xlsxformat.h
|
||||
|
||||
#ifndef QXLSX_FORMAT_H
|
||||
#define QXLSX_FORMAT_H
|
||||
|
||||
@ -173,7 +151,7 @@ public:
|
||||
VerticalAlignment verticalAlignment() const;
|
||||
void setVerticalAlignment(VerticalAlignment align);
|
||||
bool textWrap() const;
|
||||
void setTextWarp(bool textWrap);
|
||||
void setTextWrap(bool textWrap);
|
||||
int rotation() const;
|
||||
void setRotation(int rotation);
|
||||
int indent() const;
|
||||
|
@ -596,7 +596,7 @@ bool Format::textWrap() const
|
||||
/*!
|
||||
* Enable the text wrap if \a wrap is true.
|
||||
*/
|
||||
void Format::setTextWarp(bool wrap)
|
||||
void Format::setTextWrap(bool wrap)
|
||||
{
|
||||
if (wrap && hasProperty(FormatPrivate::P_Alignment_ShinkToFit))
|
||||
clearProperty(FormatPrivate::P_Alignment_ShinkToFit);
|
||||
|
@ -1,15 +1,4 @@
|
||||
//--------------------------------------------------------------------
|
||||
//
|
||||
// QXlsx
|
||||
// MIT License
|
||||
// https://github.com/j2doll/QXlsx
|
||||
//
|
||||
// QtXlsx
|
||||
// https://github.com/dbzhang800/QtXlsxWriter
|
||||
// http://qtxlsx.debao.me/
|
||||
// MIT License
|
||||
|
||||
|
||||
// xlsxstyles.cpp
|
||||
|
||||
#include "xlsxstyles_p.h"
|
||||
#include "xlsxformat_p.h"
|
||||
@ -1225,7 +1214,7 @@ bool Styles::readCellXfs(QXmlStreamReader &reader)
|
||||
}
|
||||
|
||||
if (alignAttrs.hasAttribute(QLatin1String("wrapText")))
|
||||
format.setTextWarp(true);
|
||||
format.setTextWrap(true);
|
||||
|
||||
if (alignAttrs.hasAttribute(QLatin1String("shrinkToFit")))
|
||||
format.setShrinkToFit(true);
|
||||
|
Loading…
x
Reference in New Issue
Block a user