[Libreoffice-commits] core.git: 2 commits - cui/source include/sfx2 sc/source sd/source sfx2/source sw/source
Zolnai Tamás
zolnaitamas2000 at gmail.com
Mon Mar 16 22:57:34 PDT 2015
cui/source/dialogs/iconcdlg.cxx | 8 +++-----
cui/source/inc/iconcdlg.hxx | 2 +-
include/sfx2/styledlg.hxx | 2 +-
include/sfx2/tabdlg.hxx | 4 ++--
sc/source/ui/inc/styledlg.hxx | 2 +-
sc/source/ui/styleui/styledlg.cxx | 3 +--
sd/source/ui/dlg/tabtempl.cxx | 4 +---
sd/source/ui/inc/tabtempl.hxx | 2 +-
sfx2/source/dialog/styledlg.cxx | 5 ++---
sfx2/source/dialog/tabdlg.cxx | 19 +++++++++----------
sw/source/filter/ww8/ww8par.cxx | 1 -
sw/source/filter/ww8/ww8par.hxx | 1 -
sw/source/filter/ww8/ww8par2.cxx | 2 +-
sw/source/filter/ww8/ww8par6.cxx | 12 ------------
sw/source/ui/fmtui/tmpdlg.cxx | 3 +--
sw/source/uibase/inc/tmpdlg.hxx | 2 +-
16 files changed, 25 insertions(+), 47 deletions(-)
New commits:
commit d4652b5e2f1c7a2c207888fade7a41245b7ae9fb
Author: Zolnai Tamás <zolnaitamas2000 at gmail.com>
Date: Sun Mar 15 11:05:19 2015 +0100
WW8: bShdTxtCol is always false
Change-Id: I745dabe00567a5d0d076741bfa38c0b5e07713b6
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 5441d713..3f2df5e 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -4201,7 +4201,6 @@ SwWW8ImplReader::SwWW8ImplReader(sal_uInt8 nVersionPara, SvStorage* pStorage,
, nInTable(0)
, bWasTabRowEnd(false)
, bWasTabCellEnd(false)
- , bShdTxtCol(false)
, bAnl(false)
, bHdFtFtnEdn(false)
, bFtnEdn(false)
diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx
index 76e5e3e..7d537f0 100644
--- a/sw/source/filter/ww8/ww8par.hxx
+++ b/sw/source/filter/ww8/ww8par.hxx
@@ -1314,7 +1314,6 @@ private:
bool bWasTabRowEnd; // Tabelle : Row End Mark
bool bWasTabCellEnd; // table: Cell End Mark
- bool bShdTxtCol; // Textfarbe indirekt gesetzt ( Hintergrund sw )
bool bAnl; // Nummerierung in Bearbeitung
// Anl heisst Autonumber level
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index 376de19..66a6648 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -3818,7 +3818,7 @@ void WW8RStyle::PostStyle(SwWW8StyInf &rSI, bool bOldNoImp)
{
// Reset attribute flags, because there are no style-ends.
- pIo->bHasBorder = pIo->bShdTxtCol = pIo->bSpec = pIo->bObj = pIo->bSymbol = false;
+ pIo->bHasBorder = pIo->bSpec = pIo->bObj = pIo->bSymbol = false;
pIo->nCharFmt = -1;
// If Style basiert auf Nichts oder Basis ignoriert
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index e70b771..791ebb6 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -4608,12 +4608,6 @@ void SwWW8ImplReader::Read_Shade( sal_uInt16, const sal_uInt8* pData, short nLen
{
// Ende des Attributes
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_BACKGROUND );
- if (bShdTxtCol)
- {
- // Zeichenfarbe auch
- pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_CHRATR_COLOR );
- bShdTxtCol = false;
- }
}
else
{
@@ -4631,12 +4625,6 @@ void SwWW8ImplReader::Read_ParaBackColor(sal_uInt16, const sal_uInt8* pData, sho
{
// Ende des Attributes
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_BACKGROUND );
- if (bShdTxtCol)
- {
- // Zeichenfarbe auch
- pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_CHRATR_COLOR );
- bShdTxtCol = false;
- }
}
else
{
commit f7424ed710e54bb2437a28380b03ed7c26290edc
Author: Zolnai Tamás <zolnaitamas2000 at gmail.com>
Date: Sun Mar 15 13:29:53 2015 +0100
SfxTabDialog: avoid changing const input parameter
* SfxTabDialog constructor has a const pointer parameter
pointing to the input set and also the corresponding member
is a const pointer which indicated that set is not changed by
the dialog, but this is not true, const is casted away and
the input set is changed.
* So use a copy of the input set instead, pointed by
a non-const member, so we can spare some const cast and
misunderstandings.
* GetRefreshedSet not behaves as a getter method, but changes
the input set instead, so redeclare it accordingly.
Change-Id: Ic63f9ae68c50e65d4498b20f597547c1c075b94e
diff --git a/cui/source/dialogs/iconcdlg.cxx b/cui/source/dialogs/iconcdlg.cxx
index 45e8dcb..982ed6c 100644
--- a/cui/source/dialogs/iconcdlg.cxx
+++ b/cui/source/dialogs/iconcdlg.cxx
@@ -547,8 +547,7 @@ bool IconChoiceDialog::DeActivatePageImpl ()
if ( nRet & IconChoicePage::REFRESH_SET )
{
- pSet = GetRefreshedSet();
- DBG_ASSERT( pSet, "GetRefreshedSet() liefert NULL" );
+ RefreshInputSet();
// flag all pages to be newly initialized
for ( size_t i = 0, nCount = maPageList.size(); i < nCount; ++i )
{
@@ -723,10 +722,9 @@ void IconChoiceDialog::Start_Impl()
ActivatePageImpl();
}
-const SfxItemSet* IconChoiceDialog::GetRefreshedSet()
+void IconChoiceDialog::RefreshInputSet()
{
- SAL_WARN( "cui.dialogs", "GetRefreshedSet not implemented" );
- return 0;
+ SAL_WARN( "cui.dialogs", "RefreshInputSet not implemented" );
}
/**********************************************************************
diff --git a/cui/source/inc/iconcdlg.hxx b/cui/source/inc/iconcdlg.hxx
index 29317d3..0c89da1 100644
--- a/cui/source/inc/iconcdlg.hxx
+++ b/cui/source/inc/iconcdlg.hxx
@@ -170,7 +170,7 @@ protected :
inline SfxItemSet* GetInputSetImpl() { return (SfxItemSet*)pSet; }
inline IconChoicePage* GetTabPage( sal_uInt16 nPageId )
{ return ( GetPageData (nPageId)->pPage?GetPageData (nPageId)->pPage:NULL); }
- const SfxItemSet* GetRefreshedSet();
+ void RefreshInputSet();
void ActivatePageImpl ();
bool DeActivatePageImpl ();
diff --git a/include/sfx2/styledlg.hxx b/include/sfx2/styledlg.hxx
index f3b0448..9e9bef9 100644
--- a/include/sfx2/styledlg.hxx
+++ b/include/sfx2/styledlg.hxx
@@ -34,7 +34,7 @@ private:
DECL_DLLPRIVATE_LINK( CancelHdl, Button * );
sal_uInt16 m_nOrganizerId;
protected:
- virtual const SfxItemSet* GetRefreshedSet() SAL_OVERRIDE;
+ virtual void RefreshInputSet() SAL_OVERRIDE;
public:
SfxStyleDialog(vcl::Window* pParent, const OUString& rID,
diff --git a/include/sfx2/tabdlg.hxx b/include/sfx2/tabdlg.hxx
index 252d728..2465321 100644
--- a/include/sfx2/tabdlg.hxx
+++ b/include/sfx2/tabdlg.hxx
@@ -81,7 +81,7 @@ friend class SfxTabDialogController;
bool m_bOwnsResetBtn;
bool m_bOwnsBaseFmtBtn;
- const SfxItemSet* pSet;
+ SfxItemSet* pSet;
SfxItemSet* pOutSet;
TabDlg_Impl* pImpl;
sal_uInt16* pRanges;
@@ -103,7 +103,7 @@ protected:
// Is deleted in Sfx!
virtual SfxItemSet* CreateInputItemSet( sal_uInt16 nId );
// Is not deleted in Sfx!
- virtual const SfxItemSet* GetRefreshedSet();
+ virtual void RefreshInputSet();
virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
VclButtonBox* m_pActionArea;
diff --git a/sc/source/ui/inc/styledlg.hxx b/sc/source/ui/inc/styledlg.hxx
index 04a70a1..b91572c 100644
--- a/sc/source/ui/inc/styledlg.hxx
+++ b/sc/source/ui/inc/styledlg.hxx
@@ -33,7 +33,7 @@ public:
protected:
virtual void PageCreated( sal_uInt16 nPageId, SfxTabPage& rTabPage ) SAL_OVERRIDE;
- virtual const SfxItemSet* GetRefreshedSet() SAL_OVERRIDE;
+ virtual void RefreshInputSet() SAL_OVERRIDE;
private:
sal_uInt16 nDlgRsc;
diff --git a/sc/source/ui/styleui/styledlg.cxx b/sc/source/ui/styleui/styledlg.cxx
index 1c1dc17..fc72ca4 100644
--- a/sc/source/ui/styleui/styledlg.cxx
+++ b/sc/source/ui/styleui/styledlg.cxx
@@ -173,12 +173,11 @@ void ScStyleDlg::PageCreated( sal_uInt16 nPageId, SfxTabPage& rTabPage )
}
}
-const SfxItemSet* ScStyleDlg::GetRefreshedSet()
+void ScStyleDlg::RefreshInputSet()
{
SfxItemSet* pItemSet = GetInputSetImpl();
pItemSet->ClearItem();
pItemSet->SetParent( GetStyleSheet().GetItemSet().GetParent() );
- return pItemSet;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/dlg/tabtempl.cxx b/sd/source/ui/dlg/tabtempl.cxx
index 2c875ef..a213c38 100644
--- a/sd/source/ui/dlg/tabtempl.cxx
+++ b/sd/source/ui/dlg/tabtempl.cxx
@@ -172,7 +172,7 @@ void SdTabTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
}
}
-const SfxItemSet* SdTabTemplateDlg::GetRefreshedSet()
+void SdTabTemplateDlg::RefreshInputSet()
{
SfxItemSet* pRet = GetInputSetImpl();
@@ -183,8 +183,6 @@ const SfxItemSet* SdTabTemplateDlg::GetRefreshedSet()
}
else
pRet = new SfxItemSet( GetStyleSheet().GetItemSet() );
-
- return pRet;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/inc/tabtempl.hxx b/sd/source/ui/inc/tabtempl.hxx
index ed57b58..636ae6b 100644
--- a/sd/source/ui/inc/tabtempl.hxx
+++ b/sd/source/ui/inc/tabtempl.hxx
@@ -66,7 +66,7 @@ private:
sal_uInt16 m_nAsianTypoId;
virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) SAL_OVERRIDE;
- virtual const SfxItemSet* GetRefreshedSet() SAL_OVERRIDE;
+ virtual void RefreshInputSet() SAL_OVERRIDE;
public:
SdTabTemplateDlg(vcl::Window* pParent,
diff --git a/sfx2/source/dialog/styledlg.cxx b/sfx2/source/dialog/styledlg.cxx
index 99e9408..dc0d5f0 100644
--- a/sfx2/source/dialog/styledlg.cxx
+++ b/sfx2/source/dialog/styledlg.cxx
@@ -81,12 +81,11 @@ SfxStyleDialog::~SfxStyleDialog()
{
pExampleSet = 0;
pStyle = 0;
- delete GetInputSetImpl();
}
-const SfxItemSet* SfxStyleDialog::GetRefreshedSet()
+void SfxStyleDialog::RefreshInputSet()
/* [Description]
@@ -95,7 +94,7 @@ const SfxItemSet* SfxStyleDialog::GetRefreshedSet()
*/
{
- return GetInputSetImpl();
+ SfxTabDialog::RefreshInputSet();
}
diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx
index 2d5f88d..cdb6a1b 100644
--- a/sfx2/source/dialog/tabdlg.cxx
+++ b/sfx2/source/dialog/tabdlg.cxx
@@ -318,7 +318,7 @@ SfxTabDialog::SfxTabDialog
)
: TabDialog(pParent, rID, rUIXMLDescription)
, pFrame(pViewFrame)
- , pSet(pItemSet)
+ , pSet(pItemSet ? new SfxItemSet(*pItemSet) : 0)
, pOutSet(0)
, pRanges(0)
, nAppPageId(USHRT_MAX)
@@ -347,7 +347,7 @@ SfxTabDialog::SfxTabDialog
)
: TabDialog(pParent, rID, rUIXMLDescription)
, pFrame(0)
- , pSet(pItemSet)
+ , pSet(pItemSet ? new SfxItemSet(*pItemSet) : 0)
, pOutSet(0)
, pRanges(0)
, nAppPageId(USHRT_MAX)
@@ -397,6 +397,7 @@ SfxTabDialog::~SfxTabDialog()
}
delete pImpl;
+ delete pSet;
delete pOutSet;
delete pExampleSet;
delete [] pRanges;
@@ -735,7 +736,7 @@ SfxItemSet* SfxTabDialog::GetInputSetImpl()
*/
{
- return (SfxItemSet*)pSet;
+ return pSet;
}
@@ -856,7 +857,7 @@ SfxItemSet* SfxTabDialog::CreateInputItemSet( sal_uInt16 )
-const SfxItemSet* SfxTabDialog::GetRefreshedSet()
+void SfxTabDialog::RefreshInputSet()
/* [Description]
@@ -866,8 +867,7 @@ const SfxItemSet* SfxTabDialog::GetRefreshedSet()
*/
{
- SAL_INFO ( "sfx.dialog", "GetRefreshedSet not implemented" );
- return 0;
+ SAL_INFO ( "sfx.dialog", "RefreshInputSet not implemented" );
}
@@ -1240,8 +1240,7 @@ IMPL_LINK( SfxTabDialog, DeactivatePageHdl, TabControl *, pTabCtrl )
if ( nRet & SfxTabPage::REFRESH_SET )
{
- pSet = GetRefreshedSet();
- DBG_ASSERT( pSet, "GetRefreshedSet() returns NULL" );
+ RefreshInputSet();
// Flag all Pages as to be initialized as new
for ( SfxTabDlgData_Impl::const_iterator it = pImpl->aData.begin(); it != pImpl->aData.end(); ++it )
@@ -1353,8 +1352,8 @@ void SfxTabDialog::SetInputSet( const SfxItemSet* pInSet )
{
bool bSet = ( pSet != NULL );
-
- pSet = pInSet;
+ delete pSet;
+ pSet = pInSet ? new SfxItemSet(*pInSet) : 0;
if ( !bSet && !pExampleSet && !pOutSet )
{
diff --git a/sw/source/ui/fmtui/tmpdlg.cxx b/sw/source/ui/fmtui/tmpdlg.cxx
index 4ac9c0f..0fef7a5 100644
--- a/sw/source/ui/fmtui/tmpdlg.cxx
+++ b/sw/source/ui/fmtui/tmpdlg.cxx
@@ -363,12 +363,11 @@ short SwTemplateDlg::Ok()
return nRet;
}
-const SfxItemSet* SwTemplateDlg::GetRefreshedSet()
+void SwTemplateDlg::RefreshInputSet()
{
SfxItemSet* pInSet = GetInputSetImpl();
pInSet->ClearItem();
pInSet->SetParent( &GetStyleSheet().GetItemSet() );
- return pInSet;
}
void SwTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
diff --git a/sw/source/uibase/inc/tmpdlg.hxx b/sw/source/uibase/inc/tmpdlg.hxx
index 75cab42..c92bde4 100644
--- a/sw/source/uibase/inc/tmpdlg.hxx
+++ b/sw/source/uibase/inc/tmpdlg.hxx
@@ -78,7 +78,7 @@ public:
SwWrtShell* pActShell = 0,
bool bNew = false );
- const SfxItemSet* GetRefreshedSet() SAL_OVERRIDE;
+ virtual void RefreshInputSet() SAL_OVERRIDE;
virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) SAL_OVERRIDE;
virtual short Ok() SAL_OVERRIDE;
More information about the Libreoffice-commits
mailing list