2010-10-14 08:27:31 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-06-21 14:30:25 +01:00
|
|
|
/*
|
|
|
|
* 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 .
|
|
|
|
*/
|
2013-10-23 19:15:52 +02:00
|
|
|
#ifndef INCLUDED_TOOLS_VCOMPAT_HXX
|
|
|
|
#define INCLUDED_TOOLS_VCOMPAT_HXX
|
2007-04-11 19:21:17 +00:00
|
|
|
|
2013-11-09 15:37:43 -06:00
|
|
|
#include <tools/toolsdllapi.h>
|
2007-04-11 19:21:17 +00:00
|
|
|
|
|
|
|
#define COMPAT_FORMAT( char1, char2, char3, char4 ) \
|
2010-07-29 10:56:19 +08:00
|
|
|
((sal_uInt32)((((sal_uInt32)(char)(char1)))| \
|
|
|
|
(((sal_uInt32)(char)(char2))<<8UL)| \
|
|
|
|
(((sal_uInt32)(char)(char3))<<16UL)| \
|
|
|
|
((sal_uInt32)(char)(char4))<<24UL))
|
2007-04-11 19:21:17 +00:00
|
|
|
|
|
|
|
class SvStream;
|
2015-01-07 09:28:42 +02:00
|
|
|
enum class StreamMode;
|
2007-04-11 19:21:17 +00:00
|
|
|
|
|
|
|
class TOOLS_DLLPUBLIC VersionCompat
|
|
|
|
{
|
|
|
|
SvStream* mpRWStm;
|
2012-08-13 23:42:18 +02:00
|
|
|
sal_uInt32 mnCompatPos;
|
|
|
|
sal_uInt32 mnTotalSize;
|
2015-01-07 09:28:42 +02:00
|
|
|
StreamMode mnStmMode;
|
2012-08-13 23:42:18 +02:00
|
|
|
sal_uInt16 mnVersion;
|
2007-04-11 19:21:17 +00:00
|
|
|
|
|
|
|
VersionCompat() {}
|
|
|
|
VersionCompat( const VersionCompat& ) {}
|
|
|
|
VersionCompat& operator=( const VersionCompat& ) { return *this; }
|
2013-06-29 23:57:38 -05:00
|
|
|
bool operator==( const VersionCompat& ) { return false; }
|
2007-04-11 19:21:17 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
|
2015-01-07 09:28:42 +02:00
|
|
|
VersionCompat( SvStream& rStm, StreamMode nStreamMode, sal_uInt16 nVersion = 1 );
|
2007-04-11 19:21:17 +00:00
|
|
|
~VersionCompat();
|
|
|
|
|
2012-08-13 23:42:18 +02:00
|
|
|
sal_uInt16 GetVersion() const { return mnVersion; }
|
2007-04-11 19:21:17 +00:00
|
|
|
};
|
|
|
|
|
2012-08-13 23:14:08 +02:00
|
|
|
#endif
|
2010-10-14 08:27:31 +02:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|