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 .
29 #include <com/sun/star/bridge/oleautomation/Decimal.hpp>
33 // Implementation only for windows
37 friend void releaseDecimalPtr( SbxDecimal
*& rpDecimal
);
46 SbxDecimal( const SbxDecimal
& rDec
);
47 explicit SbxDecimal( const css::bridge::oleautomation::Decimal
& rAutomationDec
);
52 void fillAutomationDecimal( css::bridge::oleautomation::Decimal
& rAutomationDec
);
54 void setChar( sal_Unicode val
);
55 void setByte( sal_uInt8 val
);
56 void setShort( sal_Int16 val
);
57 void setLong( sal_Int32 val
);
58 void setUShort( sal_uInt16 val
);
59 void setULong( sal_uInt32 val
);
60 bool setSingle( float val
);
61 bool setDouble( double val
);
62 void setInt( int val
);
63 void setUInt( unsigned int val
);
64 bool setString( OUString
* pOUString
);
65 void setDecimal( SbxDecimal
const * pDecimal
)
69 maDec
= pDecimal
->maDec
;
75 bool getChar( sal_Unicode
& rVal
);
76 bool getShort( sal_Int16
& rVal
);
77 bool getLong( sal_Int32
& rVal
);
78 bool getUShort( sal_uInt16
& rVal
);
79 bool getULong( sal_uInt32
& rVal
);
80 bool getSingle( float& rVal
);
81 bool getDouble( double& rVal
);
82 void getString( OUString
& rString
);
84 bool operator -= ( const SbxDecimal
&r
);
85 bool operator += ( const SbxDecimal
&r
);
86 bool operator /= ( const SbxDecimal
&r
);
87 bool operator *= ( const SbxDecimal
&r
);
92 // must match the return values of the Microsoft VarDecCmp Automation function
93 enum class CmpResult
{ LT
, EQ
, GT
};
94 friend CmpResult
compare( const SbxDecimal
&rLeft
, const SbxDecimal
&rRight
);
97 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */