Kaydet (Commit) 774bc97f authored tarafından Fridrich Štrba's avatar Fridrich Štrba

libwps.diff: WPS Import filter - create a libwps module

üst b50171ba
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
#
# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
......
*** misc/libwps-0.1.1/src/lib/WPSListener.h Thu Nov 29 20:58:57 2007
--- misc/build/libwps-0.1.1/src/lib/WPSListener.h Sun Dec 2 20:54:35 2007
***************
*** 39,45 ****
virtual ~WPSListener();
bool isUndoOn() { return m_isUndoOn; }
! void setUndoOn(bool isUndoOn) { m_isUndoOn = isUndoOn; }
std::list<WPSPageSpan> &m_pageList;
--- 39,45 ----
virtual ~WPSListener();
bool isUndoOn() { return m_isUndoOn; }
! void setUndoOn(bool undoOn) { m_isUndoOn = undoOn; }
std::list<WPSPageSpan> &m_pageList;
*** misc/libwps-0.1.1/src/lib/WPSContentListener.cpp Thu Nov 29 20:58:57 2007
--- misc/build/libwps-0.1.1/src/lib/WPSContentListener.cpp Sun Dec 2 21:09:11 2007
***************
*** 36,62 ****
#define LIBWPS_MAX std::max
#endif
- namespace {
-
- WPXString doubleToString(const double value)
- {
- WPXString tempString;
- tempString.sprintf("%.4f", value);
- std::string decimalPoint(localeconv()->decimal_point);
- if ((decimalPoint.size() == 0) || (decimalPoint == "."))
- return tempString;
- std::string stringValue(tempString.cstr());
- if (!stringValue.empty())
- {
- std::string::size_type pos;
- while ((pos = stringValue.find(decimalPoint)) != std::string::npos)
- stringValue.replace(pos,decimalPoint.size(),".");
- }
- return WPXString(stringValue.c_str());
- }
-
- } // namespace
-
_WPSContentParsingState::_WPSContentParsingState() :
m_textAttributeBits(0),
m_fontSize(12.0f/*WP6_DEFAULT_FONT_SIZE*/), // FIXME ME!!!!!!!!!!!!!!!!!!! HELP WP6_DEFAULT_FONT_SIZE
--- 36,41 ----
***************
*** 578,585 ****
_closePageSpan();
}
- const float WPS_DEFAULT_SUPER_SUB_SCRIPT = 58.0f;
-
void WPSContentListener::_openSpan()
{
if (!m_ps->m_isParagraphOpened && !m_ps->m_isListElementOpened)
--- 557,562 ----
***************
*** 622,639 ****
}
WPXPropertyList propList;
! if (attributeBits & WPS_SUPERSCRIPT_BIT) {
! WPXString sSuperScript("super ");
! sSuperScript.append(doubleToString(WPS_DEFAULT_SUPER_SUB_SCRIPT));
! sSuperScript.append("%");
! propList.insert("style:text-position", sSuperScript);
! }
! else if (attributeBits & WPS_SUBSCRIPT_BIT) {
! WPXString sSubScript("sub ");
! sSubScript.append(doubleToString(WPS_DEFAULT_SUPER_SUB_SCRIPT));
! sSubScript.append("%");
! propList.insert("style:text-position", sSubScript);
! }
if (attributeBits & WPS_ITALICS_BIT)
propList.insert("fo:font-style", "italic");
if (attributeBits & WPS_BOLD_BIT)
--- 599,608 ----
}
WPXPropertyList propList;
! if (m_ps->m_textAttributeBits & WPS_SUPERSCRIPT_BIT)
! propList.insert("style:text-position", "super 58%");
! else if (m_ps->m_textAttributeBits & WPS_SUBSCRIPT_BIT)
! propList.insert("style:text-position", "sub 58%");
if (attributeBits & WPS_ITALICS_BIT)
propList.insert("fo:font-style", "italic");
if (attributeBits & WPS_BOLD_BIT)
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License version 3
# only, as published by the Free Software Foundation.
#
# OpenOffice.org is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License version 3 for more details
# (a copy is included in the LICENSE file that accompanied this code).
#
# You should have received a copy of the GNU Lesser General Public License
# version 3 along with OpenOffice.org. If not, see
# <http://www.openoffice.org/license.html>
# for a copy of the LGPLv3 License.
#
#*************************************************************************
PRJ=.
PRJNAME=wps
TARGET=wps
# --- Settings -----------------------------------------------------
.INCLUDE : settings.mk
# --- Files --------------------------------------------------------
.IF "$(SYSTEM_LIBWPS)" == "YES"
@all:
@echo "Using system libwps..."
.ENDIF
# libwps depends on the libwpd framework
.IF "$(SYSTEM_LIBWPD)" == "YES"
INCPRE+=$(LIBWPD_CFLAGS)
.ELSE
INCPRE+=$(SOLARVER)$/$(UPD)$/$(INPATH)$/inc$/libwpd
.ENDIF
TARFILE_NAME=libwps-0.1.2
TARFILE_MD5=799fc3b835a79adce8c88a3fee0150c1
BUILD_ACTION=dmake $(MFLAGS) $(CALLMACROS)
BUILD_DIR=src/lib
# --- Targets ------------------------------------------------------
.INCLUDE : set_ext.mk
.INCLUDE : target.mk
.INCLUDE : tg_ext.mk
lwps libwps : LIBWPD:libwpd soltools NULL
lwps libwps usr1 - all lwps_mkout NULL
lwps libwps nmake - all lwps_libwps NULL
mkdir: %_DEST%\inc%_EXT%\libwps
..\%__SRC%\misc\build\libwps*\src\lib\libwps.h %_DEST%\inc%_EXT%\libwps\
..\%__SRC%\misc\build\libwps*\src\lib\WPSStream.h %_DEST%\inc%_EXT%\libwps\
..\%__SRC%\misc\build\libwps*\src\lib\WPSDocument.h %_DEST%\inc%_EXT%\libwps\
..\%__SRC%\lib\*.a %_DEST%\lib%_EXT%\*.a
..\%__SRC%\slb\*.lib %_DEST%\lib%_EXT%\*.lib
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment