1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
21 #ifndef __SBX_SBX_DEC_HXX
22 #define __SBX_SBX_DEC_HXX
39 #include <basic/sbx.hxx>
41 #include <com/sun/star/bridge/oleautomation/Decimal.hpp>
45 // Implementation only for windows
49 friend void releaseDecimalPtr( SbxDecimal
*& rpDecimal
);
58 SbxDecimal( const SbxDecimal
& rDec
);
59 SbxDecimal( const com::sun::star::bridge::oleautomation::Decimal
& rAutomationDec
);
66 void fillAutomationDecimal( com::sun::star::bridge::oleautomation::Decimal
& rAutomationDec
);
68 void setChar( sal_Unicode val
);
69 void setByte( sal_uInt8 val
);
70 void setShort( sal_Int16 val
);
71 void setLong( sal_Int32 val
);
72 void setUShort( sal_uInt16 val
);
73 void setULong( sal_uInt32 val
);
74 bool setSingle( float val
);
75 bool setDouble( double val
);
76 void setInt( int val
);
77 void setUInt( unsigned int val
);
78 bool setString( ::rtl::OUString
* pOUString
);
79 void setDecimal( SbxDecimal
* pDecimal
)
83 maDec
= pDecimal
->maDec
;
89 bool getChar( sal_Unicode
& rVal
);
90 bool getShort( sal_Int16
& rVal
);
91 bool getLong( sal_Int32
& rVal
);
92 bool getUShort( sal_uInt16
& rVal
);
93 bool getULong( sal_uInt32
& rVal
);
94 bool getSingle( float& rVal
);
95 bool getDouble( double& rVal
);
96 bool getInt( int& rVal
);
97 bool getUInt( unsigned int& rVal
);
98 bool getString( ::rtl::OUString
& rString
);
100 bool operator -= ( const SbxDecimal
&r
);
101 bool operator += ( const SbxDecimal
&r
);
102 bool operator /= ( const SbxDecimal
&r
);
103 bool operator *= ( const SbxDecimal
&r
);
108 enum CmpResult
{ LT
, EQ
, GT
};
109 friend CmpResult
compare( const SbxDecimal
&rLeft
, const SbxDecimal
&rRight
);
112 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */