21 #include <osl/diagnose.h>
22 #include <osl/thread.h>
32 #include <stlpool.hxx>
33 #include <stlsheet.hxx>
34 #include <compiler.hxx>
43 #ifdef __SIMPLE_FUNC // for <=VC 1.5
46 rStrm.Read( &fRet, 10 );
47 return static_cast< double >( fRet );
51 #else // detailed for all others
67 long double lfFactor = 256.0;
72 lfDouble =
static_cast< long double >( pDouble10[ 7 ] );
74 lfDouble +=
static_cast< long double >( pDouble10[ 6 ] );
76 lfDouble +=
static_cast< long double >( pDouble10[ 5 ] );
78 lfDouble +=
static_cast< long double >( pDouble10[ 4 ] );
80 lfDouble +=
static_cast< long double >( pDouble10[ 3 ] );
82 lfDouble +=
static_cast< long double >( pDouble10[ 2 ] );
84 lfDouble +=
static_cast< long double >( pDouble10[ 1 ] );
86 lfDouble +=
static_cast< long double >( pDouble10[ 0 ] );
93 nExp = pDouble10[ 9 ] & 0x7F;
95 nExp += pDouble10[ 8 ];
98 lfDouble *= pow( 2.0, static_cast< double >( nExp ) );
102 if( pDouble10[ 9 ] & 0x80 )
103 lfDouble *=
static_cast< long double >( -1.0 );
105 return static_cast< double >( lfDouble );
113 return osl_getThreadTextEncoding();
118 const char pHex[] =
"0123456789ABCDEF";
119 OUString
aStr = OUStringChar( pHex[ nValue >> 12 ] )
120 + OUStringChar( pHex[ (nValue >> 8) & 0x000F ] )
121 + OUStringChar( pHex[ (nValue >> 4) & 0x000F ] )
122 + OUStringChar( pHex[ nValue & 0x000F ] );
128 sal_Int32 nTemp = ((
static_cast< sal_Int32
>( nBack ) - nFore) * nTrans) / 0x80 + nFore;
129 return static_cast< sal_uInt8 >( nTemp );
147 OUString
sName = rName.replace(
u'.',
149 sal_Int32 nLen = sName.getLength();
151 sName = sName.replaceAt( 0, 1,
"_" );
154 sName = sName.replaceAt(
nPos, 1,
"_" );
164 xSubStrg = xStrg->
OpenSotStorage( rStrgName, StreamMode::STD_READ );
172 xSubStrg = xStrg->
OpenSotStorage( rStrgName, StreamMode::STD_WRITE );
180 xStrm = xStrg->
OpenSotStream( rStrmName, StreamMode::STD_READ );
186 OSL_ENSURE( !xStrg.
is() || !xStrg->
IsContained( rStrmName ),
"ScfTools::OpenStorageStreamWrite - stream exists already" );
189 xStrm = xStrg->
OpenSotStream( rStrmName, StreamMode::STD_WRITE | StreamMode::TRUNC );
197 return rItemSet.
GetItemState( nWhichId, bDeep ) == SfxItemState::SET;
202 OSL_ENSURE( pnWhichIds,
"ScfTools::CheckItems - no which id list" );
203 for(
const sal_uInt16* pnWhichId = pnWhichIds; *pnWhichId != 0; ++pnWhichId )
204 if(
CheckItem( rItemSet, *pnWhichId, bDeep ) )
219 PutItem( rItemSet, rItem, rItem.
Which(), bSkipPoolDef );
229 OUString aNewName( rStyleName );
234 if( !pOldStyleSheet )
235 pOldStyleSheet = pStyleSheet;
236 aNewName = rStyleName +
" " + OUString::number( ++nIndex );
240 if( pOldStyleSheet && bForceName )
242 pOldStyleSheet->
SetName( aNewName );
243 aNewName = rStyleName;
247 return static_cast< ScStyleSheet&
>( rPool.
Make( aNewName, eFamily, SfxStyleSearchBits::UserDefined ) );
254 return lclMakeStyleSheet( rPool, rStyleName, SfxStyleFamily::Para, bForceName );
259 return lclMakeStyleSheet( rPool, rStyleName, SfxStyleFamily::Page, bForceName );
267 rnBytesLeft -= aRet.getLength();
282 static const OUString saHTMLDoc(
"HTML_all" );
288 static const OUString saHTMLTables(
"HTML_tables" );
294 static const OUString saHTMLIndexPrefix(
"HTML_" );
295 return saHTMLIndexPrefix;
301 static const OUString saHTMLNamePrefix(
"HTML__" );
302 return saHTMLNamePrefix;
308 OUString::number( static_cast< sal_Int32 >( nIndex ) );
341 return !rName.isEmpty();
Collection of orcus filter wrappers.
virtual bool SetName(const OUString &rNewName, bool bReindexNow=true)
bool IsStream(const OUString &rEleName) const
bool IsContained(const OUString &rEleName) const
SotStorage * OpenSotStorage(const OUString &rEleName, StreamMode=StreamMode::STD_READWRITE, bool transacted=true)
sal_uInt8 GetBlue() const
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
tools::SvRef< SotStorageStream > OpenSotStream(const OUString &rEleName, StreamMode=StreamMode::STD_READWRITE)
static bool IsCharFlagAllConventions(OUString const &rStr, sal_Int32 nPos, ScCharFlags nFlags)
If the character is allowed as tested by nFlags (SC_COMPILER_C_...
const SfxPoolItem & GetDefaultItem(sal_uInt16 nWhich) const
std::unique_ptr< SfxPoolItem > CloneSetWhich(sal_uInt16 nNewWhich) const
SfxItemPool * GetPool() const
std::size_t ReadBytes(void *pData, std::size_t nSize)
sal_uInt8 GetGreen() const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
std::deque< AttacherIndex_Impl > aIndex
virtual SfxStyleSheetBase & Make(const OUString &, SfxStyleFamily eFam, SfxStyleSearchBits nMask=SfxStyleSearchBits::All) override
double getLength(const B2DPolygon &rCandidate)
static bool isAsciiNumeric(const OUString &rStr)
virtual SfxStyleSheetBase * Find(const OUString &, SfxStyleFamily eFam, SfxStyleSearchBits n=SfxStyleSearchBits::All)
static SC_DLLPUBLIC void AddQuotes(OUString &rString, sal_Unicode cQuote, bool bEscapeEmbedded=true)
Inserts the character cQuote at beginning and end of rString.