[Libreoffice-commits] core.git: Branch 'feature/table-style' - 3 commits - sw/inc sw/source

Alex Ivan alexnivan at yahoo.com
Sun Sep 15 17:22:51 PDT 2013


Rebased ref, commits from common ancestor:
commit b3781d43adbc0c9701af80d393c302c9c2252ba2
Author: Alex Ivan <alexnivan at yahoo.com>
Date:   Thu Sep 12 16:19:51 2013 +0300

    Remove obsolete UpdateTo/FromSet methods
    
    These should have been removed some time ago, since they
    were not used any more. Seems they somehow escaped.
    
    Change-Id: I958de698f96a6c48e4cb41dc5226f96134d2886b

diff --git a/sw/inc/tblafmt.hxx b/sw/inc/tblafmt.hxx
index a4a330a..05de618 100644
--- a/sw/inc/tblafmt.hxx
+++ b/sw/inc/tblafmt.hxx
@@ -127,12 +127,6 @@ public:
     void SetName( const String& rNew ) { m_pTableStyle->SetName( rNew ); nStrResId = USHRT_MAX; }
     const String& GetName() const { return m_pTableStyle->GetName(); }
 
-    enum UpdateFlags { UPDATE_CHAR = 1, UPDATE_BOX = 2, UPDATE_ALL = 3 };
-    void UpdateFromSet( sal_uInt8 nPos, const SfxItemSet& rSet,
-                                UpdateFlags eFlags, SvNumberFormatter* );
-    void UpdateToSet( sal_uInt8 nPos, SfxItemSet& rSet, UpdateFlags eFlags,
-                        SvNumberFormatter* ) const ;
-
     void RestoreTableProperties(SwTable &table) const;
     void StoreTableProperties(const SwTable &table);
 
diff --git a/sw/source/core/doc/tblafmt.cxx b/sw/source/core/doc/tblafmt.cxx
index 426f0e6..2ff9b38 100644
--- a/sw/source/core/doc/tblafmt.cxx
+++ b/sw/source/core/doc/tblafmt.cxx
@@ -584,158 +584,6 @@ SwTableBoxFmt* SwTableAutoFmt::GetBoxFmt( sal_uInt8 nPos ) const
     return m_pTableStyle->GetBoxFmt( nPos );
 }
 
-
-void SwTableAutoFmt::UpdateFromSet( sal_uInt8 nPos,
-                                    const SfxItemSet& rSet,
-                                    UpdateFlags eFlags,
-                                    SvNumberFormatter* pNFmtr)
-{
-    OSL_ENSURE( nPos < 16, "wrong area" );
-
-    SwTableBoxFmt* pFmt = GetBoxFmt( nPos );
-
-    if( UPDATE_CHAR & eFlags )
-    {
-        pFmt->SetFont( (SvxFontItem&)rSet.Get( RES_CHRATR_FONT ) );
-        pFmt->SetHeight( (SvxFontHeightItem&)rSet.Get( RES_CHRATR_FONTSIZE ) );
-        pFmt->SetWeight( (SvxWeightItem&)rSet.Get( RES_CHRATR_WEIGHT ) );
-        pFmt->SetPosture( (SvxPostureItem&)rSet.Get( RES_CHRATR_POSTURE ) );
-        pFmt->SetCJKFont( (SvxFontItem&)rSet.Get( RES_CHRATR_CJK_FONT ) );
-        pFmt->SetCJKHeight( (SvxFontHeightItem&)rSet.Get( RES_CHRATR_CJK_FONTSIZE ) );
-        pFmt->SetCJKWeight( (SvxWeightItem&)rSet.Get( RES_CHRATR_CJK_WEIGHT ) );
-        pFmt->SetCJKPosture( (SvxPostureItem&)rSet.Get( RES_CHRATR_CJK_POSTURE ) );
-        pFmt->SetCTLFont( (SvxFontItem&)rSet.Get( RES_CHRATR_CTL_FONT ) );
-        pFmt->SetCTLHeight( (SvxFontHeightItem&)rSet.Get( RES_CHRATR_CTL_FONTSIZE ) );
-        pFmt->SetCTLWeight( (SvxWeightItem&)rSet.Get( RES_CHRATR_CTL_WEIGHT ) );
-        pFmt->SetCTLPosture( (SvxPostureItem&)rSet.Get( RES_CHRATR_CTL_POSTURE ) );
-        pFmt->SetUnderline( (SvxUnderlineItem&)rSet.Get( RES_CHRATR_UNDERLINE ) );
-        pFmt->SetOverline( (SvxOverlineItem&)rSet.Get( RES_CHRATR_OVERLINE ) );
-        pFmt->SetCrossedOut( (SvxCrossedOutItem&)rSet.Get( RES_CHRATR_CROSSEDOUT ) );
-        pFmt->SetContour( (SvxContourItem&)rSet.Get( RES_CHRATR_CONTOUR ) );
-        pFmt->SetShadowed( (SvxShadowedItem&)rSet.Get( RES_CHRATR_SHADOWED ) );
-        pFmt->SetColor( (SvxColorItem&)rSet.Get( RES_CHRATR_COLOR ) );
-        pFmt->SetAdjust( (SvxAdjustItem&)rSet.Get( RES_PARATR_ADJUST ) );
-    }
-    if( UPDATE_BOX & eFlags )
-    {
-        pFmt->SetBox( (SvxBoxItem&)rSet.Get( RES_BOX ) );
-// FIXME - add attribute IDs for the diagonal line items
-//        pFmt->SetTLBR( (SvxLineItem&)rSet.Get( RES_... ) );
-//        pFmt->SetBLTR( (SvxLineItem&)rSet.Get( RES_... ) );
-        pFmt->SetBackground( (SvxBrushItem&)rSet.Get( RES_BACKGROUND ) );
-        pFmt->SetTextOrientation(static_cast<const SvxFrameDirectionItem&>(rSet.Get(RES_FRAMEDIR)));
-        pFmt->SetVerticalAlignment(static_cast<const SwFmtVertOrient&>(rSet.Get(RES_VERT_ORIENT)));
-
-        const SwTblBoxNumFormat* pNumFmtItem;
-        const SvNumberformat* pNumFormat = 0;
-        if( SFX_ITEM_SET == rSet.GetItemState( RES_BOXATR_FORMAT, sal_True,
-            (const SfxPoolItem**)&pNumFmtItem ) && pNFmtr &&
-            0 != (pNumFormat = pNFmtr->GetEntry( pNumFmtItem->GetValue() )) )
-            pFmt->SetValueFormat( ((SvNumberformat*)pNumFormat)->GetFormatstring(),
-                                    pNumFormat->GetLanguage(),
-                                    ::GetAppLanguage());
-        else
-        {
-            // default
-            pFmt->SetValueFormat( aEmptyStr, LANGUAGE_SYSTEM,
-                                  ::GetAppLanguage() );
-        }
-    }
-
-    // we cannot handle the rest, that's specific to StarCalc
-}
-
-
-void SwTableAutoFmt::UpdateToSet(sal_uInt8 nPos, SfxItemSet& rSet,
-                                 UpdateFlags eFlags, SvNumberFormatter* pNFmtr) const
-{
-    const SwTableBoxFmt& rChg = *GetBoxFmt( nPos );
-
-    if( UPDATE_CHAR & eFlags )
-    {
-        if( IsFont() )
-        {
-            rSet.Put( rChg.GetFont() );
-            rSet.Put( rChg.GetHeight() );
-            rSet.Put( rChg.GetWeight() );
-            rSet.Put( rChg.GetPosture() );
-            // do not insert empty CJK font
-            const SvxFontItem& rCJKFont = rChg.GetCJKFont();
-            if( rCJKFont.GetStyleName().Len() )
-            {
-                rSet.Put( rChg.GetCJKFont() );
-                rSet.Put( rChg.GetCJKHeight() );
-                rSet.Put( rChg.GetCJKWeight() );
-                rSet.Put( rChg.GetCJKPosture() );
-            }
-            else
-            {
-                rSet.Put( rChg.GetHeight(), RES_CHRATR_CJK_FONTSIZE );
-                rSet.Put( rChg.GetWeight(), RES_CHRATR_CJK_WEIGHT );
-                rSet.Put( rChg.GetPosture(), RES_CHRATR_CJK_POSTURE );
-            }
-            // do not insert empty CTL font
-            const SvxFontItem& rCTLFont = rChg.GetCTLFont();
-            if( rCTLFont.GetStyleName().Len() )
-            {
-                rSet.Put( rChg.GetCTLFont() );
-                rSet.Put( rChg.GetCTLHeight() );
-                rSet.Put( rChg.GetCTLWeight() );
-                rSet.Put( rChg.GetCTLPosture() );
-            }
-            else
-            {
-                rSet.Put( rChg.GetHeight(), RES_CHRATR_CTL_FONTSIZE );
-                rSet.Put( rChg.GetWeight(), RES_CHRATR_CTL_WEIGHT );
-                rSet.Put( rChg.GetPosture(), RES_CHRATR_CTL_POSTURE );
-            }
-            rSet.Put( rChg.GetUnderline() );
-            rSet.Put( rChg.GetOverline() );
-            rSet.Put( rChg.GetCrossedOut() );
-            rSet.Put( rChg.GetContour() );
-            rSet.Put( rChg.GetShadowed() );
-            rSet.Put( rChg.GetColor() );
-        }
-        if( IsJustify() )
-            rSet.Put( rChg.GetAdjust() );
-    }
-
-    if( UPDATE_BOX & eFlags )
-    {
-        if( IsFrame() )
-        {
-            rSet.Put( rChg.GetBox() );
-// FIXME - uncomment the lines to put the diagonal line items
-//            rSet.Put( rChg.GetTLBR() );
-//            rSet.Put( rChg.GetBLTR() );
-        }
-        if( IsBackground() )
-            rSet.Put( rChg.GetBackground() );
-
-        rSet.Put(rChg.GetTextOrientation());
-        rSet.Put(rChg.GetVerticalAlignment());
-
-        if( IsValueFormat() && pNFmtr )
-        {
-            String sFmt; LanguageType eLng, eSys;
-            rChg.GetValueFormat( sFmt, eLng, eSys );
-            if( sFmt.Len() )
-            {
-                short nType;
-                bool bNew;
-                xub_StrLen nCheckPos;
-                sal_uInt32 nKey = pNFmtr->GetIndexPuttingAndConverting( sFmt, eLng,
-                        eSys, nType, bNew, nCheckPos);
-                rSet.Put( SwTblBoxNumFormat( nKey ));
-            }
-            else
-                rSet.ClearItem( RES_BOXATR_FORMAT );
-        }
-    }
-
-    // we cannot handle the rest, that's specific to StarCalc
-}
-
 void SwTableAutoFmt::RestoreTableProperties(SwTable &table) const
 {
     SwTableFmt::RestoreTableProperties( m_pTableStyle, table );
commit d78e8d25c190f8a73f5d43e68ba99177e914c313
Author: Alex Ivan <alexnivan at yahoo.com>
Date:   Thu Sep 12 15:58:47 2013 +0300

    Remove boolean members from SwTableAutoFmt
    
    Remove members made obsolete by previous patch.
    As a side-effect, the checkboxes in the AutoFormat dialog
    which selected what properties from the style to apply no longer have
    any effect. Should not be a problem, since the dialog will have to be
    reworked anyway.
    
    Change-Id: Ib5f19808ca90187007f13c1c8c65e003fe6c715f

diff --git a/sw/inc/tblafmt.hxx b/sw/inc/tblafmt.hxx
index d912251..a4a330a 100644
--- a/sw/inc/tblafmt.hxx
+++ b/sw/inc/tblafmt.hxx
@@ -112,16 +112,6 @@ class SW_DLLPUBLIC SwTableAutoFmt
     SwTableFmt* m_pTableStyle;
     sal_uInt16 nStrResId;
 
-    // Common flags of Calc and Writer.
-    sal_Bool bInclFont : 1;
-    sal_Bool bInclJustify : 1;
-    sal_Bool bInclFrame : 1;
-    sal_Bool bInclBackground : 1;
-    sal_Bool bInclValueFormat : 1;
-
-    // Calc specific flags.
-    sal_Bool bInclWidthHeight : 1;
-
 public:
     SwTableAutoFmt( const String& rName, SwTableFmt* pTableStyle );
     SwTableAutoFmt( const SwTableAutoFmt& rNew );
@@ -152,13 +142,6 @@ public:
     sal_Bool IsBackground() const   { return m_pTableStyle->IsBackground(); }
     sal_Bool IsValueFormat() const  { return m_pTableStyle->IsValueFormat(); }
 
-    void SetFont( const sal_Bool bNew )         { bInclFont = bNew; }
-    void SetJustify( const  sal_Bool bNew )     { bInclJustify = bNew; }
-    void SetFrame( const sal_Bool bNew )        { bInclFrame = bNew; }
-    void SetBackground( const sal_Bool bNew )   { bInclBackground = bNew; }
-    void SetValueFormat( const sal_Bool bNew )  { bInclValueFormat = bNew; }
-    void SetWidthHeight( const sal_Bool bNew )  { bInclWidthHeight = bNew; }
-
     static SwTableAutoFmt* Load( SvStream& rStream, const SwAfVersions&, SwDoc* pDoc );
     sal_Bool Save( SvStream& rStream, sal_uInt16 fileVersion ) const;
 };
diff --git a/sw/source/core/doc/tblafmt.cxx b/sw/source/core/doc/tblafmt.cxx
index 5ec240b..426f0e6 100644
--- a/sw/source/core/doc/tblafmt.cxx
+++ b/sw/source/core/doc/tblafmt.cxx
@@ -553,13 +553,6 @@ SwTableAutoFmt::SwTableAutoFmt( const String& rName, SwTableFmt* pTableStyle )
     : m_pTableStyle( pTableStyle )
     , nStrResId( USHRT_MAX )
 {
-    bInclFont = sal_True;
-    bInclJustify = sal_True;
-    bInclFrame = sal_True;
-    bInclBackground = sal_True;
-    bInclValueFormat = sal_True;
-    bInclWidthHeight = sal_True;
-
     m_pTableStyle->SetName( rName );
 }
 
@@ -576,12 +569,6 @@ SwTableAutoFmt& SwTableAutoFmt::operator=( const SwTableAutoFmt& rNew )
 
     m_pTableStyle = rNew.m_pTableStyle;
     nStrResId = rNew.nStrResId;
-    bInclFont = rNew.bInclFont;
-    bInclJustify = rNew.bInclJustify;
-    bInclFrame = rNew.bInclFrame;
-    bInclBackground = rNew.bInclBackground;
-    bInclValueFormat = rNew.bInclValueFormat;
-    bInclWidthHeight = rNew.bInclWidthHeight;
 
     return *this;
 }
@@ -851,12 +838,14 @@ SwTableAutoFmt* SwTableAutoFmt::Load( SvStream& rStream, const SwAfVersions& rVe
 
         pRet->nStrResId = nStrResId;
 
-        rStream >> b; pRet->bInclFont = b;
-        rStream >> b; pRet->bInclJustify = b;
-        rStream >> b; pRet->bInclFrame = b;
-        rStream >> b; pRet->bInclBackground = b;
-        rStream >> b; pRet->bInclValueFormat = b;
-        rStream >> b; pRet->bInclWidthHeight = b;
+        // No longer needed, but still read to not misread other data
+        rStream >> b;
+        rStream >> b;
+        rStream >> b;
+        rStream >> b;
+        rStream >> b;
+        rStream >> b;
+        // <- close
 
         bRet = pStyle->Load( rStream, rVersions, pDoc, nVal );
     }
@@ -871,18 +860,11 @@ SwTableAutoFmt* SwTableAutoFmt::Load( SvStream& rStream, const SwAfVersions& rVe
 sal_Bool SwTableAutoFmt::Save( SvStream& rStream, sal_uInt16 fileVersion ) const
 {
     sal_uInt16 nVal = AUTOFORMAT_DATA_ID;
-    sal_Bool b;
     rStream << nVal;
     // --- from 680/dr25 on: store strings as UTF-8
     write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rStream, GetName(),
         RTL_TEXTENCODING_UTF8 );
     rStream << nStrResId;
-    rStream << ( b = bInclFont );
-    rStream << ( b = bInclJustify );
-    rStream << ( b = bInclFrame );
-    rStream << ( b = bInclBackground );
-    rStream << ( b = bInclValueFormat );
-    rStream << ( b = bInclWidthHeight );
 
     {
         WriterSpecificAutoFormatBlock block(rStream);
diff --git a/sw/source/ui/table/tautofmt.cxx b/sw/source/ui/table/tautofmt.cxx
index dc68eb2..4129748 100644
--- a/sw/source/ui/table/tautofmt.cxx
+++ b/sw/source/ui/table/tautofmt.cxx
@@ -255,18 +255,18 @@ void SwAutoFormatDlg::FillAutoFmtOfIndex( SwTableAutoFmt*& rToFill ) const
 IMPL_LINK( SwAutoFormatDlg, CheckHdl, Button *, pBtn )
 {
     SwTableAutoFmt* pData  = &(*pTableTbl)[nIndex];
-    sal_Bool bCheck = ((CheckBox*)pBtn)->IsChecked(), bDataChgd = sal_True;
+    sal_Bool bDataChgd = sal_True;
 
     if( pBtn == m_pBtnNumFormat )
-        pData->SetValueFormat( bCheck );
+        ;
     else if ( pBtn == m_pBtnBorder )
-        pData->SetFrame( bCheck );
+        ;
     else if ( pBtn == m_pBtnFont )
-        pData->SetFont( bCheck );
+        ;
     else if ( pBtn == m_pBtnPattern )
-        pData->SetBackground( bCheck );
+        ;
     else if ( pBtn == m_pBtnAlignment )
-        pData->SetJustify( bCheck );
+        ;
     else
         bDataChgd = sal_False;
 
@@ -479,12 +479,6 @@ IMPL_LINK_NOARG(SwAutoFormatDlg, SelFmtHdl)
         if ( !pStyle )
             pStyle = pShell->GetDoc()->MakeTblFrmFmt(sNm, NULL);
         SwTableAutoFmt aTmp( sNm, pStyle );
-        aTmp.SetFont( sal_False );
-        aTmp.SetJustify( sal_False );
-        aTmp.SetFrame( sal_False );
-        aTmp.SetBackground( sal_False );
-        aTmp.SetValueFormat( sal_False );
-        aTmp.SetWidthHeight( sal_False );
 
         if( nOldIdx != nIndex )
             m_pWndPreview->NotifyChange( *(SwTableAutoFmt*)0 );
commit 475762597529e621ce8abfe967ab802231cabe83
Author: Alex Ivan <alexnivan at yahoo.com>
Date:   Thu Sep 12 15:32:06 2013 +0300

    Use items in attrset to determine properties stored in table style
    
    Replace the current bool methods of SwTableAutoFmt with methods
    that check whether specific items are in the SwTableFmt's attrset
    or in one of the cells attrset.
    
    Change-Id: I5088cb933ca9e619bfebeb0180f8fd4667bb7744

diff --git a/sw/inc/swtblfmt.hxx b/sw/inc/swtblfmt.hxx
index b4e709d..6aecafc 100644
--- a/sw/inc/swtblfmt.hxx
+++ b/sw/inc/swtblfmt.hxx
@@ -123,6 +123,12 @@ public:
     sal_Bool GetRowSplit() const;
     sal_uInt16 GetRepeatHeading() const;
 
+    sal_Bool IsFont() const;
+    sal_Bool IsJustify() const;
+    sal_Bool IsFrame() const;
+    sal_Bool IsBackground() const;
+    sal_Bool IsValueFormat() const;
+
     static void RestoreTableProperties( SwTableFmt* pSrcFmt, SwTable &rTable );
     static SwTableFmt* StoreTableProperties( const SwTable &rTable );
 
@@ -179,7 +185,7 @@ class SW_DLLPUBLIC SwTableBoxFmt : public SwFrmFmt
 {
     friend class SwDoc;
 
-    String              sNumFmtString;
+    OUString            sNumFmtString;
     LanguageType        eSysLanguage, eNumFmtLanguage;
 
 protected:
@@ -231,6 +237,12 @@ public:
 
     void GetValueFormat( String& rFmt, LanguageType& rLng, LanguageType& rSys ) const;
 
+    sal_Bool IsFont() const;
+    sal_Bool IsJustify() const;
+    sal_Bool IsFrame() const;
+    sal_Bool IsBackground() const;
+    sal_Bool IsValueFormat() const;
+
     sal_Bool Load( SvStream& rStream, const SwAfVersions& rVersions, sal_uInt16 nVer );
     sal_Bool Save( SvStream& rStream, sal_uInt16 fileVersion ) const;
     sal_Bool SaveVersionNo( SvStream& rStream, sal_uInt16 fileVersion ) const;
diff --git a/sw/inc/tblafmt.hxx b/sw/inc/tblafmt.hxx
index af7b0d6..d912251 100644
--- a/sw/inc/tblafmt.hxx
+++ b/sw/inc/tblafmt.hxx
@@ -146,11 +146,11 @@ public:
     void RestoreTableProperties(SwTable &table) const;
     void StoreTableProperties(const SwTable &table);
 
-    sal_Bool IsFont() const         { return bInclFont; }
-    sal_Bool IsJustify() const      { return bInclJustify; }
-    sal_Bool IsFrame() const        { return bInclFrame; }
-    sal_Bool IsBackground() const   { return bInclBackground; }
-    sal_Bool IsValueFormat() const  { return bInclValueFormat; }
+    sal_Bool IsFont() const         { return m_pTableStyle->IsFont(); }
+    sal_Bool IsJustify() const      { return m_pTableStyle->IsJustify(); }
+    sal_Bool IsFrame() const        { return m_pTableStyle->IsFrame(); }
+    sal_Bool IsBackground() const   { return m_pTableStyle->IsBackground(); }
+    sal_Bool IsValueFormat() const  { return m_pTableStyle->IsValueFormat(); }
 
     void SetFont( const sal_Bool bNew )         { bInclFont = bNew; }
     void SetJustify( const  sal_Bool bNew )     { bInclJustify = bNew; }
diff --git a/sw/source/core/doc/swtblfmt.cxx b/sw/source/core/doc/swtblfmt.cxx
index ee5c3f0..bbd8216 100644
--- a/sw/source/core/doc/swtblfmt.cxx
+++ b/sw/source/core/doc/swtblfmt.cxx
@@ -230,6 +230,56 @@ sal_uInt16 SwTableFmt::GetRepeatHeading() const
     return 0;
 }
 
+sal_Bool SwTableFmt::IsFont() const
+{
+    for( sal_uInt8 n = 0; n < 16; ++n )
+    {
+        if( GetBoxFmt( n )->IsFont() )
+            return sal_True;
+    }
+    return sal_False;
+}
+
+sal_Bool SwTableFmt::IsJustify() const
+{
+    for( sal_uInt8 n = 0; n < 16; ++n )
+    {
+        if( GetBoxFmt( n )->IsJustify() )
+            return sal_True;
+    }
+    return sal_False;
+}
+
+sal_Bool SwTableFmt::IsFrame() const
+{
+    for( sal_uInt8 n = 0; n < 16; ++n )
+    {
+        if( GetBoxFmt( n )->IsFrame() )
+            return sal_True;
+    }
+    return sal_False;
+}
+
+sal_Bool SwTableFmt::IsBackground() const
+{
+    for( sal_uInt8 n = 0; n < 16; ++n )
+    {
+        if( GetBoxFmt( n )->IsBackground() )
+            return sal_True;
+    }
+    return sal_False;
+}
+
+sal_Bool SwTableFmt::IsValueFormat() const
+{
+    for( sal_uInt8 n = 0; n < 16; ++n )
+    {
+        if( GetBoxFmt( n )->IsValueFormat() )
+            return sal_True;
+    }
+    return sal_False;
+}
+
 void SwTableFmt::RestoreTableProperties( SwTableFmt* pSrcFmt, SwTable &rTable )
 {
     SwTableFmt *pHardFmt = rTable.GetTableFmt();
@@ -637,4 +687,46 @@ void SwTableBoxFmt::GetValueFormat( String& rFmt, LanguageType& rLng, LanguageTy
     rSys = eSysLanguage;
 }
 
+sal_Bool SwTableBoxFmt::IsFont() const
+{
+    return ( SFX_ITEM_SET == GetItemState( RES_CHRATR_FONT ) )
+        || ( SFX_ITEM_SET == GetItemState( RES_CHRATR_FONTSIZE ) )
+        || ( SFX_ITEM_SET == GetItemState( RES_CHRATR_WEIGHT ) )
+        || ( SFX_ITEM_SET == GetItemState( RES_CHRATR_POSTURE ) )
+        || ( SFX_ITEM_SET == GetItemState( RES_CHRATR_CJK_FONT ) )
+        || ( SFX_ITEM_SET == GetItemState( RES_CHRATR_CJK_FONTSIZE ) )
+        || ( SFX_ITEM_SET == GetItemState( RES_CHRATR_CJK_WEIGHT ) )
+        || ( SFX_ITEM_SET == GetItemState( RES_CHRATR_CJK_POSTURE ) )
+        || ( SFX_ITEM_SET == GetItemState( RES_CHRATR_CTL_FONT ) )
+        || ( SFX_ITEM_SET == GetItemState( RES_CHRATR_CTL_FONTSIZE ) )
+        || ( SFX_ITEM_SET == GetItemState( RES_CHRATR_CTL_WEIGHT ) )
+        || ( SFX_ITEM_SET == GetItemState( RES_CHRATR_CTL_POSTURE ) )
+        || ( SFX_ITEM_SET == GetItemState( RES_CHRATR_UNDERLINE ) )
+        || ( SFX_ITEM_SET == GetItemState( RES_CHRATR_OVERLINE ) )
+        || ( SFX_ITEM_SET == GetItemState( RES_CHRATR_CROSSEDOUT ) )
+        || ( SFX_ITEM_SET == GetItemState( RES_CHRATR_CONTOUR ) )
+        || ( SFX_ITEM_SET == GetItemState( RES_CHRATR_SHADOWED ) )
+        || ( SFX_ITEM_SET == GetItemState( RES_CHRATR_COLOR ) );
+}
+
+sal_Bool SwTableBoxFmt::IsJustify() const
+{
+    return ( SFX_ITEM_SET == GetItemState( RES_PARATR_ADJUST ) );
+}
+
+sal_Bool SwTableBoxFmt::IsFrame() const
+{
+    return ( SFX_ITEM_SET == GetItemState( RES_BOX ) );
+}
+
+sal_Bool SwTableBoxFmt::IsBackground() const
+{
+    return ( SFX_ITEM_SET == GetItemState( RES_BACKGROUND ) );
+}
+
+sal_Bool SwTableBoxFmt::IsValueFormat() const
+{
+    return !sNumFmtString.isEmpty();
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list