[Libreoffice-commits] core.git: 3 commits - writerfilter/inc writerfilter/source
Miklos Vajna
vmiklos at collabora.co.uk
Wed Apr 2 12:19:37 PDT 2014
writerfilter/inc/WriterFilterDllApi.hxx | 6
writerfilter/inc/resourcemodel/Fraction.hxx | 2
writerfilter/inc/resourcemodel/LoggedResources.hxx | 8
writerfilter/inc/resourcemodel/QNameToString.hxx | 4
writerfilter/inc/resourcemodel/ResourceModelHelper.hxx | 2
writerfilter/inc/resourcemodel/SubSequence.hxx | 247 -----------------
writerfilter/inc/resourcemodel/TagLogger.hxx | 2
writerfilter/inc/resourcemodel/WW8ResourceModel.hxx | 12
writerfilter/inc/resourcemodel/XPathLogger.hxx | 2
writerfilter/inc/resourcemodel/exceptions.hxx | 54 ---
writerfilter/inc/resourcemodel/util.hxx | 4
writerfilter/source/resourcemodel/qnametostrcore.cxx | 4
12 files changed, 20 insertions(+), 327 deletions(-)
New commits:
commit 8b867eae9b5ef2f5ec3b296a69751e00d1d07751
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Wed Apr 2 21:10:16 2014 +0200
writerfilter: unused Exception class
Change-Id: I127ef1183a2c146471668680965fa3d72f6a8f81
diff --git a/writerfilter/inc/resourcemodel/exceptions.hxx b/writerfilter/inc/resourcemodel/exceptions.hxx
deleted file mode 100644
index 6abb34c..0000000
--- a/writerfilter/inc/resourcemodel/exceptions.hxx
+++ /dev/null
@@ -1,54 +0,0 @@
-/* -*- 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 _DOCTOK_EXCEPTIONS_HXX
-#define _DOCTOK_EXCEPTIONS_HXX
-
-#include <string>
-#include <WriterFilterDllApi.hxx>
-
-namespace writerfilter {
-using namespace ::std;
-
-class Exception
-{
- string mText;
-
-public:
- Exception(string text) : mText(text) {}
-
- const string & getText() const { return mText; }
-};
-
-class ExceptionNotFound : public Exception
-{
-public:
- ExceptionNotFound(string text) : Exception(text) {}
-};
-
-class ExceptionOutOfBounds : public Exception
-{
-public:
- ExceptionOutOfBounds(string text) : Exception(text) {}
-};
-}
-
-#endif // _DOCTOK_EXCEPTIONS_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 6320f7a5ee12cfc58f6b0f5d04108fba959cc92e
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Wed Apr 2 21:00:00 2014 +0200
writerfilter: unused SubSequence class
Change-Id: Ib52309202714e67af78ef5a47f519779d849931c
diff --git a/writerfilter/inc/resourcemodel/SubSequence.hxx b/writerfilter/inc/resourcemodel/SubSequence.hxx
deleted file mode 100644
index 6b6b1ed..0000000
--- a/writerfilter/inc/resourcemodel/SubSequence.hxx
+++ /dev/null
@@ -1,247 +0,0 @@
-/* -*- 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 INCLUDED_SUB_SEQUENCE_HXX
-#define INCLUDED_SUB_SEQUENCE_HXX
-
-#include <com/sun/star/uno/Sequence.hxx>
-
-#include <boost/shared_ptr.hpp>
-#include <iostream>
-#include <stdio.h>
-#include <ctype.h>
-#include "exceptions.hxx"
-#include <WriterFilterDllApi.hxx>
-
-namespace writerfilter {
-using namespace ::std;
-
-template <class T>
-class SubSequence;
-
-template <class T>
-class SubSequence
-{
- typedef boost::shared_ptr<com::sun::star::uno::Sequence<T> >
- SequencePointer;
-
- SequencePointer mpSequence;
- sal_uInt32 mnOffset;
- sal_uInt32 mnCount;
-
-public:
- typedef boost::shared_ptr<SubSequence> Pointer_t;
-
- SubSequence() : mpSequence(new ::com::sun::star::uno::Sequence<T>()),
- mnOffset(0), mnCount(0)
- {
- }
-
- SubSequence(SequencePointer pSequence, sal_uInt32 nOffset_,
- sal_uInt32 nCount_)
- : mpSequence(pSequence), mnOffset(nOffset_), mnCount(nCount_)
- {
- }
-
- SubSequence(SequencePointer pSequence)
- : mpSequence(pSequence), mnOffset(0), mnCount(pSequence->getLength())
- {
- }
-
- SubSequence(const SubSequence & rSubSequence, sal_uInt32 nOffset_,
- sal_uInt32 nCount_)
- : mpSequence(rSubSequence.mpSequence),
- mnOffset(rSubSequence.mnOffset + nOffset_),
- mnCount(nCount_)
- {
- }
-
- SubSequence(const T * pStart, sal_uInt32 nCount_)
- : mpSequence(new com::sun::star::uno::Sequence<T>(pStart, nCount_)),
- mnOffset(0), mnCount(nCount_)
- {
- }
-
- SubSequence(sal_Int32 nCount_)
- : mpSequence(new com::sun::star::uno::Sequence<T>(nCount_)), mnOffset(0),
- mnCount(nCount_)
- {
- }
-
- ::com::sun::star::uno::Sequence<T> & getSequence()
- {
- return *mpSequence;
- }
-
- const ::com::sun::star::uno::Sequence<T> & getSequence() const
- {
- return *mpSequence;
- }
-
- void reset() {
- mnOffset = 0;
- mnCount = mpSequence->getLength();
- }
-
- sal_uInt32 getOffset() const { return mnOffset; }
- sal_uInt32 getCount() const { return mnCount; }
-
- const T & operator[] (sal_uInt32 nIndex) const
- {
- if (mnOffset + nIndex >=
- sal::static_int_cast<sal_uInt32>(mpSequence->getLength()))
- throw ExceptionOutOfBounds("SubSequence::operator[]");
-
- return (*mpSequence)[mnOffset + nIndex];
- }
-
- void dump(ostream & o) const
- {
- {
- char sBuffer[256];
-
- snprintf(sBuffer, sizeof(sBuffer),
- "<sequence id='%p' offset='%lx' count='%lx'>",
- mpSequence.get(), mnOffset, mnCount);
- o << sBuffer << endl;
- }
-
- sal_uInt32 n = 0;
- sal_uInt32 nStep = 16;
-
- while (n < getCount())
- {
- char sBuffer[256];
-
- o << "<line>";
-
- snprintf(sBuffer, 255, "%08lx: ", static_cast<unsigned long>(n));
-
- o << sBuffer;
-
- for (sal_uInt32 i = 0; i < nStep; i++)
- {
- if (n + i < getCount())
- {
- snprintf(sBuffer, 255, "%02x ", operator[](n + i));
- o << sBuffer;
- }
- else
- o << " ";
-
- if (i % 8 == 7)
- o << " ";
- }
-
- {
- for (sal_uInt32 i = 0; i < nStep; i++)
- {
- if (n + i < getCount())
- {
- unsigned char c =
- static_cast<unsigned char>(operator[](n + i));
-
- if (c=='&')
- o << "&";
- else if (c=='<')
- o << "<";
- else if (c=='>')
- o << ">";
- else if (c < 128 && isprint(c))
- o << c;
- else
- o << ".";
- }
-
- }
- }
-
- o << "</line>" << endl;
-
- n += nStep;
- }
-
- o << "</sequence>" << endl;
- }
-
- string toString() const
- {
- sal_uInt32 n = 0;
- sal_uInt32 nStep = 16;
-
- string sResult;
-
- while (n < getCount())
- {
- char sBuffer[256];
-
- snprintf(sBuffer, 255, "<line>%08" SAL_PRIxUINT32 ": ", n);
-
- sResult += sBuffer;
-
- for (sal_uInt32 i = 0; i < nStep; i++)
- {
- if (n + i < getCount())
- {
- snprintf(sBuffer, 255, "%02x ", operator[](n + i));
- sResult += sBuffer;
- }
- else
- sResult += " ";
-
- if (i % 8 == 7)
- sResult += " ";
- }
-
- {
- for (sal_uInt32 i = 0; i < nStep; i++)
- {
- if (n + i < getCount())
- {
- unsigned char c =
- static_cast<unsigned char>(operator[](n + i));
-
- if (c=='&')
- sResult += "&";
- else if (c=='<')
- sResult += "<";
- else if (c=='>')
- sResult += ">";
- else if (c < 128 && isprint(c))
- sResult += c;
- else
- sResult += ".";
- }
- }
- }
-
- sResult += "</line>\n";
-
- n += nStep;
- }
-
- return sResult;
- }
-};
-
-}
-
-#endif // INCLUDED_SUB_SEQUENCE_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 62d551cd6525f2f1a39d8478d57a043a881ead5d
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Wed Apr 2 20:57:31 2014 +0200
unused WRITERFILTER_RESOURCEMODEL_DLLPUBLIC
Change-Id: Ia09cd8738e7bfbb942690efb193c0de30e93f69c
diff --git a/writerfilter/inc/WriterFilterDllApi.hxx b/writerfilter/inc/WriterFilterDllApi.hxx
index 6c9425b..62c5e22 100644
--- a/writerfilter/inc/WriterFilterDllApi.hxx
+++ b/writerfilter/inc/WriterFilterDllApi.hxx
@@ -40,12 +40,6 @@
#define WRITERFILTER_RTFTOK_DLLPUBLIC SAL_DLLPUBLIC_IMPORT
#endif
-#if defined(WRITERFILTER_RESOURCEMODEL_DLLIMPLEMENTATION)
-#define WRITERFILTER_RESOURCEMODEL_DLLPUBLIC SAL_DLLPUBLIC_EXPORT
-#else
-#define WRITERFILTER_RESOURCEMODEL_DLLPUBLIC SAL_DLLPUBLIC_IMPORT
-#endif
-
#if defined(WRITERFILTER_WRITERFILTER_DLLIMPLEMENTATION)
#define WRITERFILTER_WRITERFILTER_DLLPUBLIC SAL_DLLPUBLIC_EXPORT
#else
diff --git a/writerfilter/inc/resourcemodel/Fraction.hxx b/writerfilter/inc/resourcemodel/Fraction.hxx
index 0ce5bd3..0693a6a 100644
--- a/writerfilter/inc/resourcemodel/Fraction.hxx
+++ b/writerfilter/inc/resourcemodel/Fraction.hxx
@@ -26,7 +26,7 @@
namespace writerfilter {
namespace resourcemodel {
-class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC Fraction
+class Fraction
{
public:
explicit Fraction(sal_Int32 nNumerator, sal_Int32 nDenominator = 1);
diff --git a/writerfilter/inc/resourcemodel/LoggedResources.hxx b/writerfilter/inc/resourcemodel/LoggedResources.hxx
index aceee49..44da514 100644
--- a/writerfilter/inc/resourcemodel/LoggedResources.hxx
+++ b/writerfilter/inc/resourcemodel/LoggedResources.hxx
@@ -29,7 +29,7 @@ namespace writerfilter
{
#ifdef DEBUG_LOGGING
-class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC LoggedResourcesHelper
+class LoggedResourcesHelper
{
public:
explicit LoggedResourcesHelper(TagLogger::Pointer_t pLogger, const string & sPrefix);
@@ -48,7 +48,7 @@ private:
};
#endif
-class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC LoggedStream : public Stream
+class LoggedStream : public Stream
{
public:
explicit LoggedStream(TagLogger::Pointer_t pLogger, const string & sPrefix);
@@ -92,7 +92,7 @@ protected:
#endif
};
-class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC LoggedProperties : public Properties
+class LoggedProperties : public Properties
{
public:
explicit LoggedProperties(TagLogger::Pointer_t pLogger, const string & sPrefix);
@@ -110,7 +110,7 @@ protected:
#endif
};
-class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC LoggedTable : public Table
+class LoggedTable : public Table
{
public:
explicit LoggedTable(TagLogger::Pointer_t pLogger, const string & sPrefix);
diff --git a/writerfilter/inc/resourcemodel/QNameToString.hxx b/writerfilter/inc/resourcemodel/QNameToString.hxx
index 08da083..12742eb 100644
--- a/writerfilter/inc/resourcemodel/QNameToString.hxx
+++ b/writerfilter/inc/resourcemodel/QNameToString.hxx
@@ -31,7 +31,7 @@ namespace writerfilter
{
using namespace ::std;
-class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC QNameToString
+class QNameToString
{
typedef boost::shared_ptr<QNameToString> Pointer_t;
typedef map < Id, string > Map;
@@ -54,7 +54,7 @@ public:
string operator()(Id qName);
};
-class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC SprmIdToString
+class SprmIdToString
{
typedef boost::shared_ptr<SprmIdToString> Pointer_t;
diff --git a/writerfilter/inc/resourcemodel/ResourceModelHelper.hxx b/writerfilter/inc/resourcemodel/ResourceModelHelper.hxx
index 7e0417e..e15fa38 100644
--- a/writerfilter/inc/resourcemodel/ResourceModelHelper.hxx
+++ b/writerfilter/inc/resourcemodel/ResourceModelHelper.hxx
@@ -24,7 +24,7 @@
namespace writerfilter {
namespace resourcemodel {
-void WRITERFILTER_RESOURCEMODEL_DLLPUBLIC resolveSprmProps(Properties & rHandler, Sprm & rSprm);
+void resolveSprmProps(Properties & rHandler, Sprm & rSprm);
}}
diff --git a/writerfilter/inc/resourcemodel/TagLogger.hxx b/writerfilter/inc/resourcemodel/TagLogger.hxx
index 2b8a5f1..a1e104e 100644
--- a/writerfilter/inc/resourcemodel/TagLogger.hxx
+++ b/writerfilter/inc/resourcemodel/TagLogger.hxx
@@ -41,7 +41,7 @@ namespace writerfilter
~IdToString() {}
};
- class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC TagLogger
+ class TagLogger
{
public:
typedef boost::shared_ptr<TagLogger> Pointer_t;
diff --git a/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx b/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx
index caafc53..7c56e0c 100644
--- a/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx
+++ b/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx
@@ -116,7 +116,7 @@ class Sprm;
/**
Handler for properties.
*/
-class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC Properties
+class Properties
{
public:
/**
@@ -141,7 +141,7 @@ protected:
/**
Handler for tables.
*/
-class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC Table
+class Table
{
public:
typedef boost::shared_ptr<Table> Pointer_t;
@@ -161,7 +161,7 @@ protected:
/**
Handler for binary objects.
*/
-class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC BinaryObj
+class BinaryObj
{
public:
/**
@@ -181,7 +181,7 @@ protected:
/**
Handler for a stream.
*/
-class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC Stream
+class Stream
{
public:
@@ -291,7 +291,7 @@ protected:
makes no sense for a certain value, e.g. the integer value of a
string.
*/
-class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC Value
+class Value
{
public:
/**
@@ -343,7 +343,7 @@ public:
An SPRM.
*/
-class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC Sprm
+class Sprm
{
public:
SAL_WNODEPRECATED_DECLARATIONS_PUSH
diff --git a/writerfilter/inc/resourcemodel/XPathLogger.hxx b/writerfilter/inc/resourcemodel/XPathLogger.hxx
index 9935754..bae6ed7 100644
--- a/writerfilter/inc/resourcemodel/XPathLogger.hxx
+++ b/writerfilter/inc/resourcemodel/XPathLogger.hxx
@@ -34,7 +34,7 @@ using ::std::stack;
using ::std::string;
using ::std::vector;
-class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC XPathLogger
+class XPathLogger
{
typedef boost::unordered_map<string, unsigned int> TokenMap_t;
typedef boost::shared_ptr<TokenMap_t> TokenMapPointer_t;
diff --git a/writerfilter/inc/resourcemodel/exceptions.hxx b/writerfilter/inc/resourcemodel/exceptions.hxx
index 4c2f844..6abb34c 100644
--- a/writerfilter/inc/resourcemodel/exceptions.hxx
+++ b/writerfilter/inc/resourcemodel/exceptions.hxx
@@ -26,7 +26,7 @@
namespace writerfilter {
using namespace ::std;
-class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC Exception
+class Exception
{
string mText;
@@ -36,13 +36,13 @@ public:
const string & getText() const { return mText; }
};
-class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC ExceptionNotFound : public Exception
+class ExceptionNotFound : public Exception
{
public:
ExceptionNotFound(string text) : Exception(text) {}
};
-class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC ExceptionOutOfBounds : public Exception
+class ExceptionOutOfBounds : public Exception
{
public:
ExceptionOutOfBounds(string text) : Exception(text) {}
diff --git a/writerfilter/inc/resourcemodel/util.hxx b/writerfilter/inc/resourcemodel/util.hxx
index ff944cf..38d61c2 100644
--- a/writerfilter/inc/resourcemodel/util.hxx
+++ b/writerfilter/inc/resourcemodel/util.hxx
@@ -29,10 +29,10 @@ namespace writerfilter
using namespace ::std;
using namespace ::com::sun::star;
- string WRITERFILTER_RESOURCEMODEL_DLLPUBLIC xmlify(const string & str);
+ string xmlify(const string & str);
#if OSL_DEBUG_LEVEL > 1
- string WRITERFILTER_RESOURCEMODEL_DLLPUBLIC toString(uno::Reference< text::XTextRange > textRange);
+ string toString(uno::Reference< text::XTextRange > textRange);
#endif
}
#endif // INCLUDED_RESOURCEMODEL_UTIL_HXX
diff --git a/writerfilter/source/resourcemodel/qnametostrcore.cxx b/writerfilter/source/resourcemodel/qnametostrcore.cxx
index 81ba68e..9f5d970 100644
--- a/writerfilter/source/resourcemodel/qnametostrcore.cxx
+++ b/writerfilter/source/resourcemodel/qnametostrcore.cxx
@@ -23,7 +23,7 @@ namespace writerfilter
QNameToString::Pointer_t QNameToString::pInstance;
-QNameToString::Pointer_t WRITERFILTER_RESOURCEMODEL_DLLPUBLIC QNameToString::Instance()
+QNameToString::Pointer_t QNameToString::Instance()
{
if (pInstance.get() == NULL)
pInstance = QNameToString::Pointer_t(new QNameToString());
@@ -31,7 +31,7 @@ QNameToString::Pointer_t WRITERFILTER_RESOURCEMODEL_DLLPUBLIC QNameToString::Ins
return pInstance;
}
-string WRITERFILTER_RESOURCEMODEL_DLLPUBLIC QNameToString::operator()(Id qName)
+string QNameToString::operator()(Id qName)
{
string sResult;
More information about the Libreoffice-commits
mailing list