LibreOffice Module tools (master) 1
|
Note: this class is a true marvel of engineering: because the author could not decide whether it's better to have a closed or half-open interval, they just implemented both in the same class! More...
Namespaces | |
namespace | detail |
Classes | |
class | Duration |
Duration in days and time. More... | |
class | GenericTypeSerializer |
class | Guid |
class | JsonWriter |
class | Line |
class | Polygon |
class | PolyPolygon |
class | Rectangle |
class | ScopedJsonWriterArray |
Auto-closes the node. More... | |
class | ScopedJsonWriterNode |
Auto-closes the node. More... | |
class | ScopedJsonWriterStruct |
Auto-closes the node. More... | |
class | SvRef |
T must be a class that extends SvRefBase. | |
class | Time |
class | WeakBase |
derive your implementation classes from this class if you want them to support weak references More... | |
struct | WeakConnection |
private connection helper, do not use directly More... | |
class | WeakReference |
template implementation to hold a weak reference to an instance of type reference_type More... | |
class | XmlWalker |
XmlWalker main purpose is to make it easier for walking the parsed XML DOM tree. More... | |
struct | XmlWalkerImpl |
class | XmlWriter |
XmlWriter writes a XML to a SvStream. More... | |
struct | XmlWriterImpl |
Typedefs | |
typedef long | Long |
typedef unsigned long | ULong |
Functions | |
Time | operator+ (const tools::Time &rTime1, const tools::Time &rTime2) |
Time | operator- (const tools::Time &rTime1, const tools::Time &rTime2) |
bool | IsMappedWebDAVPath (const OUString &rURL, OUString *pRealURL) |
static void | ImplAdaptiveSubdivide (std::vector< Point > &rPoints, const double old_d2, int recursionDepth, const double d2, const double P1x, const double P1y, const double P2x, const double P2y, const double P3x, const double P3y, const double P4x, const double P4y) |
Recursively subdivide cubic bezier curve via deCasteljau. More... | |
SvStream & | ReadPolygon (SvStream &rIStream, tools::Polygon &rPoly) |
SvStream & | WritePolygon (SvStream &rOStream, const tools::Polygon &rPoly) |
static void | impCorrectContinuity (basegfx::B2DPolygon &roPolygon, sal_uInt32 nIndex, PolyFlags nCFlag) |
SvStream & | ReadPolyPolygon (SvStream &rIStream, tools::PolyPolygon &rPolyPoly) |
SvStream & | WritePolyPolygon (SvStream &rOStream, const tools::PolyPolygon &rPolyPoly) |
void | extendApplicationEnvironment () |
static char | getEscapementChar (char ch) |
static bool | writeEscapedSequence (sal_uInt32 ch, char *&pos) |
bool | isEmptyFileUrl (const OUString &rUrl) |
Is rUrl a file:// URL with no contents? More... | |
Rectangle | operator+ (const Rectangle &rRect, const Point &rPt) |
Rectangle | operator- (const Rectangle &rRect, const Point &rPt) |
template<typename charT , typename traits > | |
std::basic_ostream< charT, traits > & | operator<< (std::basic_ostream< charT, traits > &stream, const tools::Rectangle &rectangle) |
template<typename charT , typename traits > | |
std::basic_ostream< charT, traits > & | operator<< (std::basic_ostream< charT, traits > &rStream, tools::Guid const &rGuid) |
template<typename charT , typename traits > | |
std::basic_ostream< charT, traits > & | operator<< (std::basic_ostream< charT, traits > &stream, const Polygon &poly) |
template<typename charT , typename traits > | |
std::basic_ostream< charT, traits > & | operator<< (std::basic_ostream< charT, traits > &stream, const PolyPolygon &poly) |
template<typename T , typename... Args> | |
SvRef< T > | make_ref (Args &&... args) |
This implements similar functionality to std::make_shared. More... | |
Variables | |
constexpr int | DEFAULT_BUFFER_SIZE = 2048 |
These buffers are short-lived, so rather waste some space and avoid the cost of repeated calls into the allocator. More... | |
constexpr sal_uInt16 | COL_NAME_USER = 0x8000 |
constexpr sal_Int32 | RECT_EMPTY_VALUE_RIGHT_BOTTOM = -32767 |
Note: this class is a true marvel of engineering: because the author could not decide whether it's better to have a closed or half-open interval, they just implemented both in the same class!
see weakbase.h for documentation
the template classes in this header are helper to implement weak references to implementation objects that are not refcounted.
@WARNING: This class can serve both as wall clock time and time duration, and the mixing of these concepts leads to problems such as there being 25 hours or 10 minus 20 seconds being (non-negative) 10 seconds.
This implements similar functionality to boost::intrusive_ptr.
We have an unfortunate problem in that, on Windows (both 32 and 64-bit), long is always 32-bit.
Simple JSON encoder designed specifically for LibreOfficeKit purposes.
If you have the misfortune of having to use this class, don't immediately despair but first take note that the uppercase GetWidth() / GetHeight() etc. methods interpret the interval as closed. To use the half open versions, use GetOpenWidth() / GetOpenHeight().
If you want to work with Size, you must use the closed interval functions! And don't add GetOpenSize() / setSize; this will probably just introduce bugs, especially when used in combination with list-initialization.
(Eventually you might notice, that the same engineer was also working on Qt at some point; see documentation on QRect::bottom / QRect::right ;-).
(1) Minimal allocations/re-allocations/copying (2) Small/simple JSON documents (3) ascii property names
But on Linux (64-bit) long is 64-bit. Which leads to nasty situations where things that work on Linux, failed on Windows. So....., (1) introduce a typedef that replaces (almost) all previous usage (2) on 64-bit Windows, this typedef is forced to 64-bit (32-bit platforms, including 32-bit Windows, are left alone) (3) fix fallout from (2)
As a consequence of the above, it would be best, over the long term, to regard usage of tools::Long in the codebase as meaning "we're not sure what the ideal size of the datatype is", and where possible, replace it with a better datatype like sal_Int32/sal_Int64/etc.
NOTE: If you change this, make sure HAVE_FEATURE_JUMBO_SHEETS matches this, as it requires at least 64bit tools::Long.
THIS IS NOT THREADSAFE
Use this only to have 'safe' pointers to implementation objects that you don't own but that you reference with a pointer.
Example:
class ImplClass : public tools::WeakBase< ImplClass > { ~ImplClass() { clearWeek(); } // not needed but safer, see method description ... };
class UserClass { tools::WeakReference< ImplClass > mxWeakRef;
UserClass( ImplClass* pObject ) : mxWeakRef( pObject ) {}
DoSomething() { if( mxWeakRef.is() ) mxWeakRef->DoSomethingMore(); } };
typedef long tools::Long |
typedef unsigned long tools::ULong |
TOOLS_DLLPUBLIC void tools::extendApplicationEnvironment | ( | ) |
Definition at line 39 of file extendapplicationenvironment.cxx.
References env, and SAL_CONFIGFILE.
|
static |
Definition at line 117 of file json_writer.cxx.
References ch.
Referenced by writeEscapedSequence().
|
static |
Definition at line 1712 of file poly.cxx.
References aDirection, basegfx::B2DPolygon::count(), basegfx::B2DPolygon::getB2DPoint(), basegfx::B2DVector::getLength(), basegfx::B2DPolygon::getNextControlPoint(), basegfx::B2DPolygon::getPrevControlPoint(), basegfx::B2DPolygon::isNextControlPointUsed(), basegfx::B2DPolygon::isPrevControlPointUsed(), nIndex, basegfx::B2DPolygon::setNextControlPoint(), basegfx::B2DPolygon::setPrevControlPoint(), Smooth, and Symmetric.
Referenced by tools::Polygon::getB2DPolygon().
|
static |
Recursively subdivide cubic bezier curve via deCasteljau.
rPoints | Output vector, where the subdivided polylines are written to. |
d | Squared difference of curve to a straight line |
P* | Exactly four points, interpreted as support and control points of a cubic bezier curve. Must be in device coordinates, since stop criterion is based on the following assumption: the device has a finite resolution, it is thus sufficient to stop subdivision if the curve does not deviate more than one pixel from a straight line. |
Definition at line 1122 of file poly.cxx.
References FRound(), ImplAdaptiveSubdivide(), and SAL_MAX_UINT16.
Referenced by tools::Polygon::AdaptiveSubdivide(), and ImplAdaptiveSubdivide().
TOOLS_DLLPUBLIC bool tools::isEmptyFileUrl | ( | const OUString & | rUrl | ) |
Is rUrl a file:// URL with no contents?
Definition at line 1300 of file stream.cxx.
References comphelper::isFileUrl(), SvFileStream::IsOpen(), READ, and SvStream::remainingSize().
TOOLS_DLLPUBLIC bool tools::IsMappedWebDAVPath | ( | const OUString & | rURL, |
OUString * | pRealURL | ||
) |
Definition at line 44 of file fileutil.cxx.
SvRef< T > tools::make_ref | ( | Args &&... | args | ) |
Time tools::operator+ | ( | const tools::Time & | rTime1, |
const tools::Time & | rTime2 | ||
) |
Time tools::operator- | ( | const tools::Time & | rTime1, |
const tools::Time & | rTime2 | ||
) |
|
inline |
|
inline |
Definition at line 187 of file poly.hxx.
References SAL_WARN_UNUSED.
|
inline |
|
inline |
SvStream & tools::ReadPolygon | ( | SvStream & | rIStream, |
tools::Polygon & | rPoly | ||
) |
SvStream & tools::ReadPolyPolygon | ( | SvStream & | rIStream, |
tools::PolyPolygon & | rPolyPoly | ||
) |
|
static |
Definition at line 136 of file json_writer.cxx.
References ch, getEscapementChar(), and pos.
Referenced by tools::JsonWriter::put(), and tools::JsonWriter::writeEscapedOUString().
SvStream & tools::WritePolygon | ( | SvStream & | rOStream, |
const tools::Polygon & | rPoly | ||
) |
SvStream & tools::WritePolyPolygon | ( | SvStream & | rOStream, |
const tools::PolyPolygon & | rPolyPoly | ||
) |
|
constexpr |
Definition at line 27 of file GenericTypeSerializer.cxx.
Referenced by tools::GenericTypeSerializer::readColor(), and tools::GenericTypeSerializer::writeColor().
|
constexpr |
These buffers are short-lived, so rather waste some space and avoid the cost of repeated calls into the allocator.
Definition at line 19 of file json_writer.cxx.
|
constexpr |
Definition at line 29 of file GenericTypeSerializer.cxx.
Referenced by tools::GenericTypeSerializer::readRectangle(), and tools::GenericTypeSerializer::writeRectangle().