1*38d50f7bSAndrew Rist /************************************************************** 2*38d50f7bSAndrew Rist * 3*38d50f7bSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*38d50f7bSAndrew Rist * or more contributor license agreements. See the NOTICE file 5*38d50f7bSAndrew Rist * distributed with this work for additional information 6*38d50f7bSAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*38d50f7bSAndrew Rist * to you under the Apache License, Version 2.0 (the 8*38d50f7bSAndrew Rist * "License"); you may not use this file except in compliance 9*38d50f7bSAndrew Rist * with the License. You may obtain a copy of the License at 10*38d50f7bSAndrew Rist * 11*38d50f7bSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12cdf0e10cSrcweir * 13*38d50f7bSAndrew Rist * Unless required by applicable law or agreed to in writing, 14*38d50f7bSAndrew Rist * software distributed under the License is distributed on an 15*38d50f7bSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*38d50f7bSAndrew Rist * KIND, either express or implied. See the License for the 17*38d50f7bSAndrew Rist * specific language governing permissions and limitations 18*38d50f7bSAndrew Rist * under the License. 19*38d50f7bSAndrew Rist * 20*38d50f7bSAndrew Rist *************************************************************/ 21*38d50f7bSAndrew Rist 22*38d50f7bSAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #ifndef SC_AUTOFORM_HXX 25cdf0e10cSrcweir #define SC_AUTOFORM_HXX 26cdf0e10cSrcweir 27cdf0e10cSrcweir /************************************************************************* 28cdf0e10cSrcweir !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 29cdf0e10cSrcweir 30cdf0e10cSrcweir JP 20.07.95: 31cdf0e10cSrcweir 32cdf0e10cSrcweir Die akt. Struktur der Autoformatierung darf nicht mehr veraendert werden. 33cdf0e10cSrcweir Diese wird durch unterschiedlichen Code vom StartWriter und vom StarCalc 34cdf0e10cSrcweir eingelesen/geschrieben. 35cdf0e10cSrcweir Sollte sich doch mal eine Aenderung nicht vermeiden lassen, dann auf 36cdf0e10cSrcweir jedenfall in beiden Applikationen aendern. 37cdf0e10cSrcweir 38cdf0e10cSrcweir The structure of table auto formatting should not changed. It is used 39cdf0e10cSrcweir by different code of Writer and Calc. If a change is necessary, the 40cdf0e10cSrcweir source code of both applications must be changed! 41cdf0e10cSrcweir 42cdf0e10cSrcweir !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 43cdf0e10cSrcweir **************************************************************************/ 44cdf0e10cSrcweir 45cdf0e10cSrcweir #include "scitems.hxx" 46cdf0e10cSrcweir #include <editeng/adjitem.hxx> 47cdf0e10cSrcweir #include <svx/algitem.hxx> 48cdf0e10cSrcweir #include <editeng/boxitem.hxx> 49cdf0e10cSrcweir #include <editeng/brshitem.hxx> 50cdf0e10cSrcweir #include <editeng/cntritem.hxx> 51cdf0e10cSrcweir #include <editeng/colritem.hxx> 52cdf0e10cSrcweir #include <editeng/crsditem.hxx> 53cdf0e10cSrcweir #include <editeng/fhgtitem.hxx> 54cdf0e10cSrcweir #include <editeng/fontitem.hxx> 55cdf0e10cSrcweir #include <editeng/postitem.hxx> 56cdf0e10cSrcweir #include <editeng/shdditem.hxx> 57cdf0e10cSrcweir #include <editeng/udlnitem.hxx> 58cdf0e10cSrcweir #include <editeng/wghtitem.hxx> 59cdf0e10cSrcweir #include <svx/rotmodit.hxx> 60cdf0e10cSrcweir #include <svl/intitem.hxx> 61cdf0e10cSrcweir #include <editeng/bolnitem.hxx> 62cdf0e10cSrcweir #include "scdllapi.h" 63cdf0e10cSrcweir #include "collect.hxx" 64cdf0e10cSrcweir #include "global.hxx" 65cdf0e10cSrcweir #include "zforauto.hxx" 66cdf0e10cSrcweir 67cdf0e10cSrcweir 68cdf0e10cSrcweir struct ScAfVersions; 69cdf0e10cSrcweir 70cdf0e10cSrcweir 71cdf0e10cSrcweir /// Contains all items for one cell of a table autoformat. 72cdf0e10cSrcweir class ScAutoFormatDataField 73cdf0e10cSrcweir { 74cdf0e10cSrcweir private: 75cdf0e10cSrcweir SvxFontItem aFont; 76cdf0e10cSrcweir SvxFontHeightItem aHeight; 77cdf0e10cSrcweir SvxWeightItem aWeight; 78cdf0e10cSrcweir SvxPostureItem aPosture; 79cdf0e10cSrcweir 80cdf0e10cSrcweir SvxFontItem aCJKFont; 81cdf0e10cSrcweir SvxFontHeightItem aCJKHeight; 82cdf0e10cSrcweir SvxWeightItem aCJKWeight; 83cdf0e10cSrcweir SvxPostureItem aCJKPosture; 84cdf0e10cSrcweir 85cdf0e10cSrcweir SvxFontItem aCTLFont; 86cdf0e10cSrcweir SvxFontHeightItem aCTLHeight; 87cdf0e10cSrcweir SvxWeightItem aCTLWeight; 88cdf0e10cSrcweir SvxPostureItem aCTLPosture; 89cdf0e10cSrcweir 90cdf0e10cSrcweir SvxUnderlineItem aUnderline; 91cdf0e10cSrcweir SvxOverlineItem aOverline; 92cdf0e10cSrcweir SvxCrossedOutItem aCrossedOut; 93cdf0e10cSrcweir SvxContourItem aContour; 94cdf0e10cSrcweir SvxShadowedItem aShadowed; 95cdf0e10cSrcweir SvxColorItem aColor; 96cdf0e10cSrcweir SvxBoxItem aBox; 97cdf0e10cSrcweir SvxLineItem aTLBR; 98cdf0e10cSrcweir SvxLineItem aBLTR; 99cdf0e10cSrcweir SvxBrushItem aBackground; 100cdf0e10cSrcweir 101cdf0e10cSrcweir // Writer specific 102cdf0e10cSrcweir SvxAdjustItem aAdjust; 103cdf0e10cSrcweir 104cdf0e10cSrcweir // Calc specific 105cdf0e10cSrcweir SvxHorJustifyItem aHorJustify; 106cdf0e10cSrcweir SvxVerJustifyItem aVerJustify; 107cdf0e10cSrcweir SfxBoolItem aStacked; 108cdf0e10cSrcweir SvxMarginItem aMargin; 109cdf0e10cSrcweir SfxBoolItem aLinebreak; 110cdf0e10cSrcweir // from SO5, 504k on, rotated text 111cdf0e10cSrcweir SfxInt32Item aRotateAngle; 112cdf0e10cSrcweir SvxRotateModeItem aRotateMode; 113cdf0e10cSrcweir 114cdf0e10cSrcweir // number format 115cdf0e10cSrcweir ScNumFormatAbbrev aNumFormat; 116cdf0e10cSrcweir 117cdf0e10cSrcweir public: 118cdf0e10cSrcweir ScAutoFormatDataField(); 119cdf0e10cSrcweir ScAutoFormatDataField( const ScAutoFormatDataField& rCopy ); 120cdf0e10cSrcweir ~ScAutoFormatDataField(); 121cdf0e10cSrcweir GetNumFormat() const122cdf0e10cSrcweir const ScNumFormatAbbrev& GetNumFormat() const { return aNumFormat; } GetFont() const123cdf0e10cSrcweir const SvxFontItem& GetFont() const { return aFont; } GetHeight() const124cdf0e10cSrcweir const SvxFontHeightItem& GetHeight() const { return aHeight; } GetWeight() const125cdf0e10cSrcweir const SvxWeightItem& GetWeight() const { return aWeight; } GetPosture() const126cdf0e10cSrcweir const SvxPostureItem& GetPosture() const { return aPosture; } GetCJKFont() const127cdf0e10cSrcweir const SvxFontItem& GetCJKFont() const { return aCJKFont; } GetCJKHeight() const128cdf0e10cSrcweir const SvxFontHeightItem& GetCJKHeight() const { return aCJKHeight; } GetCJKWeight() const129cdf0e10cSrcweir const SvxWeightItem& GetCJKWeight() const { return aCJKWeight; } GetCJKPosture() const130cdf0e10cSrcweir const SvxPostureItem& GetCJKPosture() const { return aCJKPosture; } GetCTLFont() const131cdf0e10cSrcweir const SvxFontItem& GetCTLFont() const { return aCTLFont; } GetCTLHeight() const132cdf0e10cSrcweir const SvxFontHeightItem& GetCTLHeight() const { return aCTLHeight; } GetCTLWeight() const133cdf0e10cSrcweir const SvxWeightItem& GetCTLWeight() const { return aCTLWeight; } GetCTLPosture() const134cdf0e10cSrcweir const SvxPostureItem& GetCTLPosture() const { return aCTLPosture; } GetUnderline() const135cdf0e10cSrcweir const SvxUnderlineItem& GetUnderline() const { return aUnderline; } GetOverline() const136cdf0e10cSrcweir const SvxOverlineItem& GetOverline() const { return aOverline; } GetCrossedOut() const137cdf0e10cSrcweir const SvxCrossedOutItem& GetCrossedOut() const { return aCrossedOut; } GetContour() const138cdf0e10cSrcweir const SvxContourItem& GetContour() const { return aContour; } GetShadowed() const139cdf0e10cSrcweir const SvxShadowedItem& GetShadowed() const { return aShadowed; } GetColor() const140cdf0e10cSrcweir const SvxColorItem& GetColor() const { return aColor; } GetHorJustify() const141cdf0e10cSrcweir const SvxHorJustifyItem& GetHorJustify() const { return aHorJustify; } GetVerJustify() const142cdf0e10cSrcweir const SvxVerJustifyItem& GetVerJustify() const { return aVerJustify; } GetStacked() const143cdf0e10cSrcweir const SfxBoolItem& GetStacked() const { return aStacked; } GetLinebreak() const144cdf0e10cSrcweir const SfxBoolItem& GetLinebreak() const { return aLinebreak; } GetMargin() const145cdf0e10cSrcweir const SvxMarginItem& GetMargin() const { return aMargin; } GetBox() const146cdf0e10cSrcweir const SvxBoxItem& GetBox() const { return aBox; } GetTLBR() const147cdf0e10cSrcweir const SvxLineItem& GetTLBR() const { return aTLBR; } GetBLTR() const148cdf0e10cSrcweir const SvxLineItem& GetBLTR() const { return aBLTR; } GetBackground() const149cdf0e10cSrcweir const SvxBrushItem& GetBackground() const { return aBackground; } GetAdjust() const150cdf0e10cSrcweir const SvxAdjustItem& GetAdjust() const { return aAdjust; } GetRotateAngle() const151cdf0e10cSrcweir const SfxInt32Item& GetRotateAngle() const { return aRotateAngle; } GetRotateMode() const152cdf0e10cSrcweir const SvxRotateModeItem& GetRotateMode() const { return aRotateMode; } 153cdf0e10cSrcweir SetNumFormat(const ScNumFormatAbbrev & rNumFormat)154cdf0e10cSrcweir void SetNumFormat( const ScNumFormatAbbrev& rNumFormat ) { aNumFormat = rNumFormat; } SetFont(const SvxFontItem & rFont)155cdf0e10cSrcweir void SetFont( const SvxFontItem& rFont ) { aFont = rFont; } SetHeight(const SvxFontHeightItem & rHeight)156cdf0e10cSrcweir void SetHeight( const SvxFontHeightItem& rHeight ) { aHeight = rHeight; } SetWeight(const SvxWeightItem & rWeight)157cdf0e10cSrcweir void SetWeight( const SvxWeightItem& rWeight ) { aWeight = rWeight; } SetPosture(const SvxPostureItem & rPosture)158cdf0e10cSrcweir void SetPosture( const SvxPostureItem& rPosture ) { aPosture = rPosture; } SetCJKFont(const SvxFontItem & rCJKFont)159cdf0e10cSrcweir void SetCJKFont( const SvxFontItem& rCJKFont ) { aCJKFont = rCJKFont; } SetCJKHeight(const SvxFontHeightItem & rCJKHeight)160cdf0e10cSrcweir void SetCJKHeight( const SvxFontHeightItem& rCJKHeight ) { aCJKHeight = rCJKHeight; } SetCJKWeight(const SvxWeightItem & rCJKWeight)161cdf0e10cSrcweir void SetCJKWeight( const SvxWeightItem& rCJKWeight ) { aCJKWeight = rCJKWeight; } SetCJKPosture(const SvxPostureItem & rCJKPosture)162cdf0e10cSrcweir void SetCJKPosture( const SvxPostureItem& rCJKPosture ) { aCJKPosture = rCJKPosture; } SetCTLFont(const SvxFontItem & rCTLFont)163cdf0e10cSrcweir void SetCTLFont( const SvxFontItem& rCTLFont ) { aCTLFont = rCTLFont; } SetCTLHeight(const SvxFontHeightItem & rCTLHeight)164cdf0e10cSrcweir void SetCTLHeight( const SvxFontHeightItem& rCTLHeight ) { aCTLHeight = rCTLHeight; } SetCTLWeight(const SvxWeightItem & rCTLWeight)165cdf0e10cSrcweir void SetCTLWeight( const SvxWeightItem& rCTLWeight ) { aCTLWeight = rCTLWeight; } SetCTLPosture(const SvxPostureItem & rCTLPosture)166cdf0e10cSrcweir void SetCTLPosture( const SvxPostureItem& rCTLPosture ) { aCTLPosture = rCTLPosture; } SetUnderline(const SvxUnderlineItem & rUnderline)167cdf0e10cSrcweir void SetUnderline( const SvxUnderlineItem& rUnderline ) { aUnderline = rUnderline; } SetOverline(const SvxOverlineItem & rOverline)168cdf0e10cSrcweir void SetOverline( const SvxOverlineItem& rOverline ) { aOverline = rOverline; } SetCrossedOut(const SvxCrossedOutItem & rCrossedOut)169cdf0e10cSrcweir void SetCrossedOut( const SvxCrossedOutItem& rCrossedOut ) { aCrossedOut = rCrossedOut; } SetContour(const SvxContourItem & rContour)170cdf0e10cSrcweir void SetContour( const SvxContourItem& rContour ) { aContour = rContour; } SetShadowed(const SvxShadowedItem & rShadowed)171cdf0e10cSrcweir void SetShadowed( const SvxShadowedItem& rShadowed ) { aShadowed = rShadowed; } SetColor(const SvxColorItem & rColor)172cdf0e10cSrcweir void SetColor( const SvxColorItem& rColor ) { aColor = rColor; } SetHorJustify(const SvxHorJustifyItem & rHorJustify)173cdf0e10cSrcweir void SetHorJustify( const SvxHorJustifyItem& rHorJustify ) { aHorJustify = rHorJustify; } SetVerJustify(const SvxVerJustifyItem & rVerJustify)174cdf0e10cSrcweir void SetVerJustify( const SvxVerJustifyItem& rVerJustify ) { aVerJustify = rVerJustify; } SetStacked(const SfxBoolItem & rStacked)175cdf0e10cSrcweir void SetStacked( const SfxBoolItem& rStacked ) { aStacked.SetValue( rStacked.GetValue() ); } SetLinebreak(const SfxBoolItem & rLinebreak)176cdf0e10cSrcweir void SetLinebreak( const SfxBoolItem& rLinebreak ) { aLinebreak.SetValue( rLinebreak.GetValue() ); } SetMargin(const SvxMarginItem & rMargin)177cdf0e10cSrcweir void SetMargin( const SvxMarginItem& rMargin ) { aMargin = rMargin; } SetBox(const SvxBoxItem & rBox)178cdf0e10cSrcweir void SetBox( const SvxBoxItem& rBox ) { aBox = rBox; } SetTLBR(const SvxLineItem & rTLBR)179cdf0e10cSrcweir void SetTLBR( const SvxLineItem& rTLBR ) { aTLBR = rTLBR; } SetBLTR(const SvxLineItem & rBLTR)180cdf0e10cSrcweir void SetBLTR( const SvxLineItem& rBLTR ) { aBLTR = rBLTR; } SetBackground(const SvxBrushItem & rBackground)181cdf0e10cSrcweir void SetBackground( const SvxBrushItem& rBackground ) { aBackground = rBackground; } 182cdf0e10cSrcweir void SetAdjust( const SvxAdjustItem& rAdjust ); SetRotateAngle(const SfxInt32Item & rRotateAngle)183cdf0e10cSrcweir void SetRotateAngle( const SfxInt32Item& rRotateAngle ) { aRotateAngle.SetValue( rRotateAngle.GetValue() ); } SetRotateMode(const SvxRotateModeItem & rRotateMode)184cdf0e10cSrcweir void SetRotateMode( const SvxRotateModeItem& rRotateMode ) { aRotateMode.SetValue( rRotateMode.GetValue() ); } 185cdf0e10cSrcweir 186cdf0e10cSrcweir sal_Bool Load( SvStream& rStream, const ScAfVersions& rVersions, sal_uInt16 nVer ); 187cdf0e10cSrcweir sal_Bool Save( SvStream& rStream ); 188cdf0e10cSrcweir 189cdf0e10cSrcweir #ifdef READ_OLDVERS 190cdf0e10cSrcweir sal_Bool LoadOld( SvStream& rStream, const ScAfVersions& rVersions ); 191cdf0e10cSrcweir #endif 192cdf0e10cSrcweir }; 193cdf0e10cSrcweir 194cdf0e10cSrcweir 195cdf0e10cSrcweir class SC_DLLPUBLIC ScAutoFormatData : public ScDataObject 196cdf0e10cSrcweir { 197cdf0e10cSrcweir private: 198cdf0e10cSrcweir String aName; 199cdf0e10cSrcweir sal_uInt16 nStrResId; 200cdf0e10cSrcweir // common flags of Calc and Writer 201cdf0e10cSrcweir sal_Bool bIncludeFont : 1; 202cdf0e10cSrcweir sal_Bool bIncludeJustify : 1; 203cdf0e10cSrcweir sal_Bool bIncludeFrame : 1; 204cdf0e10cSrcweir sal_Bool bIncludeBackground : 1; 205cdf0e10cSrcweir 206cdf0e10cSrcweir // Calc specific flags 207cdf0e10cSrcweir sal_Bool bIncludeValueFormat : 1; 208cdf0e10cSrcweir sal_Bool bIncludeWidthHeight : 1; 209cdf0e10cSrcweir 210cdf0e10cSrcweir ScAutoFormatDataField** ppDataField; 211cdf0e10cSrcweir 212cdf0e10cSrcweir SC_DLLPRIVATE ScAutoFormatDataField& GetField( sal_uInt16 nIndex ); 213cdf0e10cSrcweir SC_DLLPRIVATE const ScAutoFormatDataField& GetField( sal_uInt16 nIndex ) const; 214cdf0e10cSrcweir 215cdf0e10cSrcweir public: 216cdf0e10cSrcweir ScAutoFormatData(); 217cdf0e10cSrcweir ScAutoFormatData( const ScAutoFormatData& rData ); 218cdf0e10cSrcweir virtual ~ScAutoFormatData(); 219cdf0e10cSrcweir Clone() const220cdf0e10cSrcweir virtual ScDataObject* Clone() const { return new ScAutoFormatData( *this ); } 221cdf0e10cSrcweir SetName(const String & rName)222cdf0e10cSrcweir void SetName( const String& rName ) { aName = rName; nStrResId = USHRT_MAX; } GetName(String & rName) const223cdf0e10cSrcweir void GetName( String& rName ) const { rName = aName; } 224cdf0e10cSrcweir GetIncludeValueFormat() const225cdf0e10cSrcweir sal_Bool GetIncludeValueFormat() const { return bIncludeValueFormat; } GetIncludeFont() const226cdf0e10cSrcweir sal_Bool GetIncludeFont() const { return bIncludeFont; } GetIncludeJustify() const227cdf0e10cSrcweir sal_Bool GetIncludeJustify() const { return bIncludeJustify; } GetIncludeFrame() const228cdf0e10cSrcweir sal_Bool GetIncludeFrame() const { return bIncludeFrame; } GetIncludeBackground() const229cdf0e10cSrcweir sal_Bool GetIncludeBackground() const { return bIncludeBackground; } GetIncludeWidthHeight() const230cdf0e10cSrcweir sal_Bool GetIncludeWidthHeight() const { return bIncludeWidthHeight; } 231cdf0e10cSrcweir SetIncludeValueFormat(sal_Bool bValueFormat)232cdf0e10cSrcweir void SetIncludeValueFormat( sal_Bool bValueFormat ) { bIncludeValueFormat = bValueFormat; } SetIncludeFont(sal_Bool bFont)233cdf0e10cSrcweir void SetIncludeFont( sal_Bool bFont ) { bIncludeFont = bFont; } SetIncludeJustify(sal_Bool bJustify)234cdf0e10cSrcweir void SetIncludeJustify( sal_Bool bJustify ) { bIncludeJustify = bJustify; } SetIncludeFrame(sal_Bool bFrame)235cdf0e10cSrcweir void SetIncludeFrame( sal_Bool bFrame ) { bIncludeFrame = bFrame; } SetIncludeBackground(sal_Bool bBackground)236cdf0e10cSrcweir void SetIncludeBackground( sal_Bool bBackground ) { bIncludeBackground = bBackground; } SetIncludeWidthHeight(sal_Bool bWidthHeight)237cdf0e10cSrcweir void SetIncludeWidthHeight( sal_Bool bWidthHeight ) { bIncludeWidthHeight = bWidthHeight; } 238cdf0e10cSrcweir 239cdf0e10cSrcweir const SfxPoolItem* GetItem( sal_uInt16 nIndex, sal_uInt16 nWhich ) const; 240cdf0e10cSrcweir void PutItem( sal_uInt16 nIndex, const SfxPoolItem& rItem ); 241cdf0e10cSrcweir void CopyItem( sal_uInt16 nToIndex, sal_uInt16 nFromIndex, sal_uInt16 nWhich ); 242cdf0e10cSrcweir 243cdf0e10cSrcweir const ScNumFormatAbbrev& GetNumFormat( sal_uInt16 nIndex ) const; 244cdf0e10cSrcweir 245cdf0e10cSrcweir sal_Bool IsEqualData( sal_uInt16 nIndex1, sal_uInt16 nIndex2 ) const; 246cdf0e10cSrcweir 247cdf0e10cSrcweir void FillToItemSet( sal_uInt16 nIndex, SfxItemSet& rItemSet, ScDocument& rDoc ) const; 248cdf0e10cSrcweir void GetFromItemSet( sal_uInt16 nIndex, const SfxItemSet& rItemSet, const ScNumFormatAbbrev& rNumFormat ); 249cdf0e10cSrcweir 250cdf0e10cSrcweir sal_Bool Load( SvStream& rStream, const ScAfVersions& rVersions ); 251cdf0e10cSrcweir sal_Bool Save( SvStream& rStream ); 252cdf0e10cSrcweir 253cdf0e10cSrcweir #ifdef READ_OLDVERS 254cdf0e10cSrcweir sal_Bool LoadOld( SvStream& rStream, const ScAfVersions& rVersions ); 255cdf0e10cSrcweir #endif 256cdf0e10cSrcweir }; 257cdf0e10cSrcweir 258cdf0e10cSrcweir class SC_DLLPUBLIC ScAutoFormat : public ScSortedCollection 259cdf0e10cSrcweir { 260cdf0e10cSrcweir private: 261cdf0e10cSrcweir sal_Bool bSaveLater; 262cdf0e10cSrcweir 263cdf0e10cSrcweir public: 264cdf0e10cSrcweir ScAutoFormat( sal_uInt16 nLim = 4, sal_uInt16 nDel = 4, sal_Bool bDup = sal_False ); 265cdf0e10cSrcweir ScAutoFormat( const ScAutoFormat& AutoFormat ); 266cdf0e10cSrcweir virtual ~ScAutoFormat(); Clone() const267cdf0e10cSrcweir virtual ScDataObject* Clone() const { return new ScAutoFormat( *this ); } operator [](const sal_uInt16 nIndex) const268cdf0e10cSrcweir ScAutoFormatData* operator[]( const sal_uInt16 nIndex ) const {return (ScAutoFormatData*)At( nIndex );} 269cdf0e10cSrcweir virtual short Compare( ScDataObject* pKey1, ScDataObject* pKey2 ) const; 270cdf0e10cSrcweir sal_Bool Load(); 271cdf0e10cSrcweir sal_Bool Save(); 272cdf0e10cSrcweir sal_uInt16 FindIndexPerName( const String& rName ) const; 273cdf0e10cSrcweir void SetSaveLater( sal_Bool bSet ); IsSaveLater() const274cdf0e10cSrcweir sal_Bool IsSaveLater() const { return bSaveLater; } 275cdf0e10cSrcweir }; 276cdf0e10cSrcweir 277cdf0e10cSrcweir 278cdf0e10cSrcweir #endif 279