loplugin:constantparam

Change-Id: I270e068b3c83e966e741b0a072fecce9d92d53f5
This commit is contained in:
Noel Grandin 2016-03-14 13:41:38 +02:00
parent 89e0663c55
commit b47cb646ff
104 changed files with 267 additions and 333 deletions

View File

@ -191,7 +191,7 @@ public:
void SetMarkerPos( sal_uInt16 nLine, bool bErrorMarker = false ); void SetMarkerPos( sal_uInt16 nLine, bool bErrorMarker = false );
void SetNoMarker (); void SetNoMarker ();
void DoScroll( long nHorzScroll, long nVertScroll ); void DoScroll( long nVertScroll );
long& GetCurYOffset() { return nCurYOffset; } long& GetCurYOffset() { return nCurYOffset; }
BreakPointList& GetBreakPoints() { return aBreakPointList; } BreakPointList& GetBreakPoints() { return aBreakPointList; }
}; };

View File

@ -1075,9 +1075,9 @@ void EditorWindow::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
rModulWindow.GetHScrollBar()->SetThumbPos( pEditView->GetStartDocPos().X() ); rModulWindow.GetHScrollBar()->SetThumbPos( pEditView->GetStartDocPos().X() );
rModulWindow.GetEditVScrollBar().SetThumbPos( pEditView->GetStartDocPos().Y() ); rModulWindow.GetEditVScrollBar().SetThumbPos( pEditView->GetStartDocPos().Y() );
rModulWindow.GetBreakPointWindow().DoScroll rModulWindow.GetBreakPointWindow().DoScroll
( 0, rModulWindow.GetBreakPointWindow().GetCurYOffset() - pEditView->GetStartDocPos().Y() ); ( rModulWindow.GetBreakPointWindow().GetCurYOffset() - pEditView->GetStartDocPos().Y() );
rModulWindow.GetLineNumberWindow().DoScroll rModulWindow.GetLineNumberWindow().DoScroll
( 0, rModulWindow.GetLineNumberWindow().GetCurYOffset() - pEditView->GetStartDocPos().Y() ); ( rModulWindow.GetLineNumberWindow().GetCurYOffset() - pEditView->GetStartDocPos().Y() );
} }
else if( rTextHint.GetId() == TEXT_HINT_TEXTHEIGHTCHANGED ) else if( rTextHint.GetId() == TEXT_HINT_TEXTHEIGHTCHANGED )
{ {
@ -1416,10 +1416,10 @@ void BreakPointWindow::ShowMarker(vcl::RenderContext& rRenderContext)
rRenderContext.DrawImage(aPos, aMarker); rRenderContext.DrawImage(aPos, aMarker);
} }
void BreakPointWindow::DoScroll( long nHorzScroll, long nVertScroll ) void BreakPointWindow::DoScroll( long nVertScroll )
{ {
nCurYOffset -= nVertScroll; nCurYOffset -= nVertScroll;
Window::Scroll( nHorzScroll, nVertScroll ); Window::Scroll( 0, nVertScroll );
} }
void BreakPointWindow::SetMarkerPos( sal_uInt16 nLine, bool bError ) void BreakPointWindow::SetMarkerPos( sal_uInt16 nLine, bool bError )
@ -2040,8 +2040,8 @@ IMPL_LINK_TYPED(ComplexEditorWindow, ScrollHdl, ScrollBar *, pCurScrollBar, void
DBG_ASSERT( pCurScrollBar == aEWVScrollBar.get(), "Wer scrollt hier ?" ); DBG_ASSERT( pCurScrollBar == aEWVScrollBar.get(), "Wer scrollt hier ?" );
long nDiff = aEdtWindow->GetEditView()->GetStartDocPos().Y() - pCurScrollBar->GetThumbPos(); long nDiff = aEdtWindow->GetEditView()->GetStartDocPos().Y() - pCurScrollBar->GetThumbPos();
aEdtWindow->GetEditView()->Scroll( 0, nDiff ); aEdtWindow->GetEditView()->Scroll( 0, nDiff );
aBrkWindow->DoScroll( 0, nDiff ); aBrkWindow->DoScroll( nDiff );
aLineNumberWindow->DoScroll(0, nDiff); aLineNumberWindow->DoScroll( nDiff );
aEdtWindow->GetEditView()->ShowCursor(false); aEdtWindow->GetEditView()->ShowCursor(false);
pCurScrollBar->SetThumbPos( aEdtWindow->GetEditView()->GetStartDocPos().Y() ); pCurScrollBar->SetThumbPos( aEdtWindow->GetEditView()->GetStartDocPos().Y() );
} }

View File

@ -80,7 +80,7 @@ DialogWindow::DialogWindow(DialogWindowLayout* pParent, ScriptDocument const& rD
: Reference<frame::XModel>(), xDialogModel)) : Reference<frame::XModel>(), xDialogModel))
,pUndoMgr(new SfxUndoManager) ,pUndoMgr(new SfxUndoManager)
{ {
InitSettings( true ); InitSettings();
pEditor->GetModel().SetNotifyUndoActionHdl( pEditor->GetModel().SetNotifyUndoActionHdl(
LINK(this, DialogWindow, NotifyUndoActionHdl) LINK(this, DialogWindow, NotifyUndoActionHdl)
@ -1325,14 +1325,14 @@ void DialogWindow::DataChanged( const DataChangedEvent& rDCEvt )
{ {
if( (rDCEvt.GetType()==DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & AllSettingsFlags::STYLE) ) if( (rDCEvt.GetType()==DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & AllSettingsFlags::STYLE) )
{ {
InitSettings( true ); InitSettings();
Invalidate(); Invalidate();
} }
else else
BaseWindow::DataChanged( rDCEvt ); BaseWindow::DataChanged( rDCEvt );
} }
void DialogWindow::InitSettings(bool bBackground) void DialogWindow::InitSettings()
{ {
// FIXME RenderContext // FIXME RenderContext
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
@ -1343,8 +1343,7 @@ void DialogWindow::InitSettings(bool bBackground)
SetTextColor( rStyleSettings.GetFieldTextColor() ); SetTextColor( rStyleSettings.GetFieldTextColor() );
SetTextFillColor(); SetTextFillColor();
if( bBackground ) SetBackground( rStyleSettings.GetFieldColor() );
SetBackground( rStyleSettings.GetFieldColor() );
} }
css::uno::Reference< css::accessibility::XAccessible > DialogWindow::CreateAccessible() css::uno::Reference< css::accessibility::XAccessible > DialogWindow::CreateAccessible()

View File

@ -99,10 +99,10 @@ void LineNumberWindow::DataChanged(DataChangedEvent const & rDCEvt)
} }
} }
void LineNumberWindow::DoScroll(long nHorzScroll, long nVertScroll) void LineNumberWindow::DoScroll(long nVertScroll)
{ {
m_nCurYOffset -= nVertScroll; m_nCurYOffset -= nVertScroll;
Window::Scroll(nHorzScroll, nVertScroll); Window::Scroll(0, nVertScroll);
} }

View File

@ -33,7 +33,7 @@ public:
virtual ~LineNumberWindow(); virtual ~LineNumberWindow();
virtual void dispose() override; virtual void dispose() override;
void DoScroll( long nHorzScroll, long nVertScroll ); void DoScroll( long nVertScroll );
bool SyncYOffset(); bool SyncYOffset();
long& GetCurYOffset() { return m_nCurYOffset;} long& GetCurYOffset() { return m_nCurYOffset;}

View File

@ -633,7 +633,7 @@ IMPL_LINK_TYPED( LibPage, ButtonHdl, Button *, pButton, void )
if (SfxDispatcher* pDispatcher = GetDispatcher()) if (SfxDispatcher* pDispatcher = GetDispatcher())
pDispatcher->Execute( SID_BASICIDE_LIBSELECTED, pDispatcher->Execute( SID_BASICIDE_LIBSELECTED,
SfxCallMode::ASYNCHRON, &aDocItem, &aLibNameItem, 0 ); SfxCallMode::ASYNCHRON, &aDocItem, &aLibNameItem, 0 );
EndTabDialog( 1 ); EndTabDialog();
return; return;
} }
else if (pButton == m_pNewLibButton) else if (pButton == m_pNewLibButton)
@ -1369,11 +1369,11 @@ void LibPage::DeleteCurrent()
} }
} }
void LibPage::EndTabDialog( sal_uInt16 nRet ) void LibPage::EndTabDialog()
{ {
DBG_ASSERT( pTabDlg, "TabDlg nicht gesetzt!" ); DBG_ASSERT( pTabDlg, "TabDlg nicht gesetzt!" );
if ( pTabDlg ) if ( pTabDlg )
pTabDlg->EndDialog( nRet ); pTabDlg->EndDialog( 1 );
} }
void LibPage::FillListBox() void LibPage::FillListBox()

View File

@ -739,7 +739,7 @@ IMPL_LINK_TYPED( ObjectPage, ButtonHdl, Button *, pButton, void )
pDispatcher->Execute( SID_BASICIDE_LIBSELECTED, SfxCallMode::ASYNCHRON, &aDocItem, &aLibNameItem, 0 ); pDispatcher->Execute( SID_BASICIDE_LIBSELECTED, SfxCallMode::ASYNCHRON, &aDocItem, &aLibNameItem, 0 );
} }
} }
EndTabDialog( 1 ); EndTabDialog();
} }
else if (pButton == m_pNewModButton) else if (pButton == m_pNewModButton)
NewModule(); NewModule();
@ -919,11 +919,11 @@ void ObjectPage::DeleteCurrent()
} }
void ObjectPage::EndTabDialog( sal_uInt16 nRet ) void ObjectPage::EndTabDialog()
{ {
DBG_ASSERT( pTabDlg, "TabDlg nicht gesetzt!" ); DBG_ASSERT( pTabDlg, "TabDlg nicht gesetzt!" );
if ( pTabDlg ) if ( pTabDlg )
pTabDlg->EndDialog( nRet ); pTabDlg->EndDialog( 1 );
} }
LibDialog::LibDialog( vcl::Window* pParent ) LibDialog::LibDialog( vcl::Window* pParent )

View File

@ -197,7 +197,7 @@ protected:
void DeleteCurrent(); void DeleteCurrent();
void NewModule(); void NewModule();
void NewDialog(); void NewDialog();
void EndTabDialog( sal_uInt16 nRet ); void EndTabDialog();
VclPtr<TabDialog> pTabDlg; VclPtr<TabDialog> pTabDlg;
@ -242,7 +242,7 @@ protected:
void Export(); void Export();
void ExportAsPackage( const OUString& aLibName ); void ExportAsPackage( const OUString& aLibName );
void ExportAsBasic( const OUString& aLibName ); void ExportAsBasic( const OUString& aLibName );
void EndTabDialog( sal_uInt16 nRet ); void EndTabDialog();
void FillListBox(); void FillListBox();
void InsertListBoxEntry( const ScriptDocument& rDocument, LibraryLocation eLocation ); void InsertListBoxEntry( const ScriptDocument& rDocument, LibraryLocation eLocation );
void SetCurLib(); void SetCurLib();

View File

@ -77,7 +77,7 @@ protected:
virtual void DoInit() override; virtual void DoInit() override;
virtual void DoScroll( ScrollBar* pCurScrollBar ) override; virtual void DoScroll( ScrollBar* pCurScrollBar ) override;
virtual void DataChanged( const DataChangedEvent& rDCEvt ) override; virtual void DataChanged( const DataChangedEvent& rDCEvt ) override;
void InitSettings(bool bBackground); void InitSettings();
public: public:
DialogWindow (DialogWindowLayout* pParent, ScriptDocument const& rDocument, const OUString& aLibName, const OUString& aName, css::uno::Reference<css::container::XNameContainer> const& xDialogModel); DialogWindow (DialogWindowLayout* pParent, ScriptDocument const& rDocument, const OUString& aLibName, const OUString& aName, css::uno::Reference<css::container::XNameContainer> const& xDialogModel);

View File

@ -21,8 +21,8 @@
The process goes something like this: The process goes something like this:
$ make check $ make check
$ make FORCE_COMPILE_ALL=1 COMPILER_PLUGIN_TOOL='unuseddefaultparams' check $ make FORCE_COMPILE_ALL=1 COMPILER_PLUGIN_TOOL='constantparam' check
$ ./compilerplugins/clang/unuseddefaultparams.py unuseddefaultparams.log $ ./compilerplugins/clang/constantparam.py constantparam.log
*/ */
namespace { namespace {
@ -56,6 +56,13 @@ public:
virtual void run() override virtual void run() override
{ {
// there is a crash here that I can't seem to workaround
// clang-3.8: /home/noel/clang/src/tools/clang/lib/AST/Type.cpp:1878: bool clang::Type::isConstantSizeType() const: Assertion `!isDependentType() && "This doesn't make sense for dependent types"' failed.
FileID mainFileID = compiler.getSourceManager().getMainFileID();
if (strstr(compiler.getSourceManager().getFileEntryForID(mainFileID)->getDir()->getName(), "oox/source/dump") != 0) {
return;
}
TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); TraverseDecl(compiler.getASTContext().getTranslationUnitDecl());
// dump all our output in one write call - this is to try and limit IO "crosstalk" between multiple processes // dump all our output in one write call - this is to try and limit IO "crosstalk" between multiple processes

View File

@ -146,7 +146,7 @@ SvxHpLinkDlg::SvxHpLinkDlg (vcl::Window* pParent, SfxBindings* pBindings)
SetCurPageId(RID_SVXPAGE_HYPERLINK_INTERNET); SetCurPageId(RID_SVXPAGE_HYPERLINK_INTERNET);
// Init Dialog // Init Dialog
Start (false); Start();
pBindings->Update( SID_READONLY_MODE ); pBindings->Update( SID_READONLY_MODE );

View File

@ -657,17 +657,12 @@ short IconChoiceDialog::Execute()
} }
void IconChoiceDialog::Start( bool bShow ) void IconChoiceDialog::Start()
{ {
m_pCancelBtn->SetClickHdl( LINK( this, IconChoiceDialog, CancelHdl ) ); m_pCancelBtn->SetClickHdl( LINK( this, IconChoiceDialog, CancelHdl ) );
bModal = false; bModal = false;
Start_Impl(); Start_Impl();
if ( bShow )
Window::Show();
} }

View File

@ -192,7 +192,7 @@ public:
CancelButton& GetCancelButton() { return *m_pCancelBtn; } CancelButton& GetCancelButton() { return *m_pCancelBtn; }
short Execute() override; short Execute() override;
void Start( bool bShow = true ); void Start();
bool QueryClose(); bool QueryClose();
void SetCtrlStyle(); void SetCtrlStyle();

View File

@ -221,7 +221,7 @@ ODBExport::ODBExport(const Reference< XComponentContext >& _rxContext, OUString
m_xColumnExportHelper = new OSpecialHandleXMLExportPropertyMapper(GetColumnStylesPropertySetMapper()); m_xColumnExportHelper = new OSpecialHandleXMLExportPropertyMapper(GetColumnStylesPropertySetMapper());
m_xCellExportHelper = new OSpecialHandleXMLExportPropertyMapper(GetCellStylesPropertySetMapper()); m_xCellExportHelper = new OSpecialHandleXMLExportPropertyMapper(GetCellStylesPropertySetMapper());
m_xRowExportHelper = new OSpecialHandleXMLExportPropertyMapper(OXMLHelper::GetRowStylesPropertySetMapper( true)); m_xRowExportHelper = new OSpecialHandleXMLExportPropertyMapper(OXMLHelper::GetRowStylesPropertySetMapper());
GetAutoStylePool()->AddFamily( GetAutoStylePool()->AddFamily(
XML_STYLE_FAMILY_TABLE_TABLE, XML_STYLE_FAMILY_TABLE_TABLE,

View File

@ -136,7 +136,7 @@ rtl::Reference < XMLPropertySetMapper > OXMLHelper::GetCellStylesPropertySetMapp
return new XMLPropertySetMapper(s_aCellStylesProperties, xFac, bForExport); return new XMLPropertySetMapper(s_aCellStylesProperties, xFac, bForExport);
} }
rtl::Reference < XMLPropertySetMapper > OXMLHelper::GetRowStylesPropertySetMapper( bool bForExport ) rtl::Reference < XMLPropertySetMapper > OXMLHelper::GetRowStylesPropertySetMapper()
{ {
#define MAP_CONST_ROW( name, prefix, token, type, context ) { name, sizeof(name)-1, prefix, token, type|XML_TYPE_PROP_TABLE_ROW, context, SvtSaveOptions::ODFVER_010, false } #define MAP_CONST_ROW( name, prefix, token, type, context ) { name, sizeof(name)-1, prefix, token, type|XML_TYPE_PROP_TABLE_ROW, context, SvtSaveOptions::ODFVER_010, false }
static const XMLPropertyMapEntry s_aStylesProperties[] = static const XMLPropertyMapEntry s_aStylesProperties[] =
@ -145,7 +145,7 @@ rtl::Reference < XMLPropertySetMapper > OXMLHelper::GetRowStylesPropertySetMappe
MAP_END() MAP_END()
}; };
rtl::Reference < XMLPropertyHandlerFactory> xFac = new OPropertyHandlerFactory(); rtl::Reference < XMLPropertyHandlerFactory> xFac = new OPropertyHandlerFactory();
return new XMLPropertySetMapper(s_aStylesProperties, xFac, bForExport); return new XMLPropertySetMapper(s_aStylesProperties, xFac, true/*bForExport*/);
} }
} }

View File

@ -52,7 +52,7 @@ namespace dbaxml
static rtl::Reference < XMLPropertySetMapper > GetTableStylesPropertySetMapper( bool bForExport ); static rtl::Reference < XMLPropertySetMapper > GetTableStylesPropertySetMapper( bool bForExport );
static rtl::Reference < XMLPropertySetMapper > GetColumnStylesPropertySetMapper( bool bForExport ); static rtl::Reference < XMLPropertySetMapper > GetColumnStylesPropertySetMapper( bool bForExport );
static rtl::Reference < XMLPropertySetMapper > GetCellStylesPropertySetMapper( bool bForExport ); static rtl::Reference < XMLPropertySetMapper > GetCellStylesPropertySetMapper( bool bForExport );
static rtl::Reference < XMLPropertySetMapper > GetRowStylesPropertySetMapper( bool bForExport ); static rtl::Reference < XMLPropertySetMapper > GetRowStylesPropertySetMapper();
}; };
} // dbaxml } // dbaxml
#endif // INCLUDED_DBACCESS_SOURCE_FILTER_XML_XMLHELPER_HXX #endif // INCLUDED_DBACCESS_SOURCE_FILTER_XML_XMLHELPER_HXX

View File

@ -128,7 +128,7 @@ namespace
class OTablePreviewWindow : public vcl::Window class OTablePreviewWindow : public vcl::Window
{ {
DECL_LINK_TYPED(OnDisableInput, void*, void); DECL_LINK_TYPED(OnDisableInput, void*, void);
void ImplInitSettings( bool bBackground ); void ImplInitSettings();
protected: protected:
virtual void DataChanged(const DataChangedEvent& rDCEvt) override; virtual void DataChanged(const DataChangedEvent& rDCEvt) override;
public: public:
@ -137,7 +137,7 @@ namespace
}; };
OTablePreviewWindow::OTablePreviewWindow(vcl::Window* pParent, WinBits nStyle) : Window( pParent, nStyle) OTablePreviewWindow::OTablePreviewWindow(vcl::Window* pParent, WinBits nStyle) : Window( pParent, nStyle)
{ {
ImplInitSettings( true ); ImplInitSettings();
} }
bool OTablePreviewWindow::Notify( NotifyEvent& rNEvt ) bool OTablePreviewWindow::Notify( NotifyEvent& rNEvt )
{ {
@ -157,11 +157,11 @@ namespace
if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) &&
(rDCEvt.GetFlags() & AllSettingsFlags::STYLE) ) (rDCEvt.GetFlags() & AllSettingsFlags::STYLE) )
{ {
ImplInitSettings( true ); ImplInitSettings();
Invalidate(); Invalidate();
} }
} }
void OTablePreviewWindow::ImplInitSettings( bool bBackground ) void OTablePreviewWindow::ImplInitSettings()
{ {
//FIXME RenderContext //FIXME RenderContext
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
@ -173,8 +173,7 @@ namespace
SetTextColor( rStyleSettings.GetFieldTextColor() ); SetTextColor( rStyleSettings.GetFieldTextColor() );
SetTextFillColor(); SetTextFillColor();
if( bBackground ) SetBackground( rStyleSettings.GetFieldColor() );
SetBackground( rStyleSettings.GetFieldColor() );
} }
} }
@ -1245,7 +1244,7 @@ void OAppDetailPageHelper::ImplInitSettings()
OPreviewWindow::OPreviewWindow(vcl::Window* _pParent) OPreviewWindow::OPreviewWindow(vcl::Window* _pParent)
: Window(_pParent) : Window(_pParent)
{ {
ImplInitSettings( true ); ImplInitSettings();
} }
bool OPreviewWindow::ImplGetGraphicCenterRect( const Graphic& rGraphic, Rectangle& rResultRect ) const bool OPreviewWindow::ImplGetGraphicCenterRect( const Graphic& rGraphic, Rectangle& rResultRect ) const
@ -1304,12 +1303,12 @@ void OPreviewWindow::DataChanged( const DataChangedEvent& rDCEvt )
if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) &&
(rDCEvt.GetFlags() & AllSettingsFlags::STYLE) ) (rDCEvt.GetFlags() & AllSettingsFlags::STYLE) )
{ {
ImplInitSettings( true ); ImplInitSettings();
Invalidate(); Invalidate();
} }
} }
void OPreviewWindow::ImplInitSettings( bool bBackground ) void OPreviewWindow::ImplInitSettings()
{ {
// FIXME RenderContext // FIXME RenderContext
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
@ -1321,8 +1320,7 @@ void OPreviewWindow::ImplInitSettings( bool bBackground )
SetTextColor( rStyleSettings.GetFieldTextColor() ); SetTextColor( rStyleSettings.GetFieldTextColor() );
SetTextFillColor(); SetTextFillColor();
if( bBackground ) SetBackground( rStyleSettings.GetFieldColor() );
SetBackground( rStyleSettings.GetFieldColor() );
} }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@ -62,7 +62,7 @@ namespace dbaui
<TRUE/> when successful <TRUE/> when successful
*/ */
bool ImplGetGraphicCenterRect( const Graphic& rGraphic, Rectangle& rResultRect ) const; bool ImplGetGraphicCenterRect( const Graphic& rGraphic, Rectangle& rResultRect ) const;
void ImplInitSettings( bool bBackground ); void ImplInitSettings();
protected: protected:
virtual void DataChanged(const DataChangedEvent& rDCEvt) override; virtual void DataChanged(const DataChangedEvent& rDCEvt) override;
public: public:

View File

@ -360,7 +360,7 @@ OTasksWindow::OTasksWindow(vcl::Window* _pParent,OApplicationDetailView* _pDetai
m_aCreation->SetDefaultCollapsedEntryBmp( aFolderImage ); m_aCreation->SetDefaultCollapsedEntryBmp( aFolderImage );
m_aCreation->SetDefaultExpandedEntryBmp( aFolderImage ); m_aCreation->SetDefaultExpandedEntryBmp( aFolderImage );
ImplInitSettings(true); ImplInitSettings();
} }
OTasksWindow::~OTasksWindow() OTasksWindow::~OTasksWindow()
@ -386,12 +386,12 @@ void OTasksWindow::DataChanged( const DataChangedEvent& rDCEvt )
if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) &&
(rDCEvt.GetFlags() & AllSettingsFlags::STYLE) ) (rDCEvt.GetFlags() & AllSettingsFlags::STYLE) )
{ {
ImplInitSettings( true ); ImplInitSettings();
Invalidate(); Invalidate();
} }
} }
void OTasksWindow::ImplInitSettings( bool bBackground ) void OTasksWindow::ImplInitSettings()
{ {
// FIXME RenderContext // FIXME RenderContext
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
@ -407,13 +407,10 @@ void OTasksWindow::ImplInitSettings( bool bBackground )
m_aDescription->SetTextColor( rStyleSettings.GetFieldTextColor() ); m_aDescription->SetTextColor( rStyleSettings.GetFieldTextColor() );
m_aDescription->SetTextFillColor(); m_aDescription->SetTextFillColor();
if( bBackground ) SetBackground( rStyleSettings.GetFieldColor() );
{ m_aHelpText->SetBackground( rStyleSettings.GetFieldColor() );
SetBackground( rStyleSettings.GetFieldColor() ); m_aDescription->SetBackground( rStyleSettings.GetFieldColor() );
m_aHelpText->SetBackground( rStyleSettings.GetFieldColor() ); m_aFL->SetBackground( rStyleSettings.GetFieldColor() );
m_aDescription->SetBackground( rStyleSettings.GetFieldColor() );
m_aFL->SetBackground( rStyleSettings.GetFieldColor() );
}
aFont = m_aDescription->GetControlFont(); aFont = m_aDescription->GetControlFont();
aFont.SetWeight(WEIGHT_BOLD); aFont.SetWeight(WEIGHT_BOLD);
@ -533,7 +530,7 @@ OApplicationDetailView::OApplicationDetailView(OAppBorderWindow& _rParent,Previe
,m_rBorderWin(_rParent) ,m_rBorderWin(_rParent)
{ {
SetUniqueId(UID_APP_DETAIL_VIEW); SetUniqueId(UID_APP_DETAIL_VIEW);
ImplInitSettings( true ); ImplInitSettings();
m_pControlHelper = VclPtr<OAppDetailPageHelper>::Create(m_aContainer.get(),m_rBorderWin,_ePreviewMode); m_pControlHelper = VclPtr<OAppDetailPageHelper>::Create(m_aContainer.get(),m_rBorderWin,_ePreviewMode);
m_pControlHelper->Show(); m_pControlHelper->Show();
@ -575,7 +572,7 @@ void OApplicationDetailView::dispose()
OSplitterView::dispose(); OSplitterView::dispose();
} }
void OApplicationDetailView::ImplInitSettings( bool bBackground ) void OApplicationDetailView::ImplInitSettings()
{ {
// FIXME RenderContext // FIXME RenderContext
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
@ -587,8 +584,7 @@ void OApplicationDetailView::ImplInitSettings( bool bBackground )
SetTextColor( rStyleSettings.GetFieldTextColor() ); SetTextColor( rStyleSettings.GetFieldTextColor() );
SetTextFillColor(); SetTextFillColor();
if( bBackground ) SetBackground( rStyleSettings.GetFieldColor() );
SetBackground( rStyleSettings.GetFieldColor() );
m_aHorzSplitter->SetBackground( rStyleSettings.GetDialogColor() ); m_aHorzSplitter->SetBackground( rStyleSettings.GetDialogColor() );
m_aHorzSplitter->SetFillColor( rStyleSettings.GetDialogColor() ); m_aHorzSplitter->SetFillColor( rStyleSettings.GetDialogColor() );
@ -605,7 +601,7 @@ void OApplicationDetailView::DataChanged( const DataChangedEvent& rDCEvt )
((rDCEvt.GetType() == DataChangedEventType::SETTINGS) && ((rDCEvt.GetType() == DataChangedEventType::SETTINGS) &&
(rDCEvt.GetFlags() & AllSettingsFlags::STYLE)) ) (rDCEvt.GetFlags() & AllSettingsFlags::STYLE)) )
{ {
ImplInitSettings( true ); ImplInitSettings();
Invalidate(); Invalidate();
} }
} }

View File

@ -118,7 +118,7 @@ namespace dbaui
VclPtr<OApplicationDetailView> m_pDetailView; VclPtr<OApplicationDetailView> m_pDetailView;
DECL_LINK_TYPED( OnEntrySelectHdl, SvTreeListBox*, void ); DECL_LINK_TYPED( OnEntrySelectHdl, SvTreeListBox*, void );
void ImplInitSettings( bool bBackground ); void ImplInitSettings();
protected: protected:
virtual void DataChanged(const DataChangedEvent& rDCEvt) override; virtual void DataChanged(const DataChangedEvent& rDCEvt) override;
public: public:
@ -153,7 +153,7 @@ namespace dbaui
::std::vector< TaskPaneData > m_aTaskPaneData; ::std::vector< TaskPaneData > m_aTaskPaneData;
MnemonicGenerator m_aExternalMnemonics; MnemonicGenerator m_aExternalMnemonics;
void ImplInitSettings( bool bBackground ); void ImplInitSettings();
protected: protected:
virtual void DataChanged(const DataChangedEvent& rDCEvt) override; virtual void DataChanged(const DataChangedEvent& rDCEvt) override;

View File

@ -42,8 +42,7 @@ OApplicationSwapWindow::OApplicationSwapWindow( vcl::Window* _pParent, OAppBorde
,m_eLastType(E_NONE) ,m_eLastType(E_NONE)
,m_rBorderWin( _rBorderWindow ) ,m_rBorderWin( _rBorderWindow )
{ {
ImplInitSettings();
ImplInitSettings( true );
m_aIconControl->SetClickHdl(LINK(this, OApplicationSwapWindow, OnContainerSelectHdl)); m_aIconControl->SetClickHdl(LINK(this, OApplicationSwapWindow, OnContainerSelectHdl));
m_aIconControl->setControlActionListener( &m_rBorderWin.getView()->getAppController() ); m_aIconControl->setControlActionListener( &m_rBorderWin.getView()->getAppController() );
@ -75,7 +74,7 @@ void OApplicationSwapWindow::Resize()
m_aIconControl->ArrangeIcons(); m_aIconControl->ArrangeIcons();
} }
void OApplicationSwapWindow::ImplInitSettings( bool bBackground ) void OApplicationSwapWindow::ImplInitSettings()
{ {
// FIXME RenderContext // FIXME RenderContext
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
@ -87,8 +86,7 @@ void OApplicationSwapWindow::ImplInitSettings( bool bBackground )
SetTextColor( rStyleSettings.GetFieldTextColor() ); SetTextColor( rStyleSettings.GetFieldTextColor() );
SetTextFillColor(); SetTextFillColor();
if( bBackground ) SetBackground( rStyleSettings.GetFieldColor() );
SetBackground( rStyleSettings.GetFieldColor() );
} }
void OApplicationSwapWindow::DataChanged( const DataChangedEvent& rDCEvt ) void OApplicationSwapWindow::DataChanged( const DataChangedEvent& rDCEvt )
@ -100,7 +98,7 @@ void OApplicationSwapWindow::DataChanged( const DataChangedEvent& rDCEvt )
((rDCEvt.GetType() == DataChangedEventType::SETTINGS) && ((rDCEvt.GetType() == DataChangedEventType::SETTINGS) &&
(rDCEvt.GetFlags() & AllSettingsFlags::STYLE)) ) (rDCEvt.GetFlags() & AllSettingsFlags::STYLE)) )
{ {
ImplInitSettings( true ); ImplInitSettings();
Invalidate(); Invalidate();
} }
} }

View File

@ -35,7 +35,7 @@ namespace dbaui
ElementType m_eLastType; ElementType m_eLastType;
OAppBorderWindow& m_rBorderWin; OAppBorderWindow& m_rBorderWin;
void ImplInitSettings( bool bBackground ); void ImplInitSettings();
DECL_LINK_TYPED( OnContainerSelectHdl, SvtIconChoiceCtrl*, void ); DECL_LINK_TYPED( OnContainerSelectHdl, SvtIconChoiceCtrl*, void );
DECL_LINK_TYPED( ChangeToLastSelected, void*, void ); DECL_LINK_TYPED( ChangeToLastSelected, void*, void );

View File

@ -37,7 +37,7 @@ OTitleWindow::OTitleWindow(vcl::Window* _pParent,sal_uInt16 _nTitleId,WinBits _n
setTitle(_nTitleId); setTitle(_nTitleId);
SetBorderStyle(WindowBorderStyle::MONO); SetBorderStyle(WindowBorderStyle::MONO);
ImplInitSettings( true ); ImplInitSettings();
const StyleSettings& rStyle = Application::GetSettings().GetStyleSettings(); const StyleSettings& rStyle = Application::GetSettings().GetStyleSettings();
vcl::Window* pWindows[] = { m_aSpace1.get(), m_aSpace2.get(), m_aTitle.get() }; vcl::Window* pWindows[] = { m_aSpace1.get(), m_aSpace2.get(), m_aTitle.get() };
@ -134,12 +134,12 @@ void OTitleWindow::DataChanged( const DataChangedEvent& rDCEvt )
((rDCEvt.GetType() == DataChangedEventType::SETTINGS) && ((rDCEvt.GetType() == DataChangedEventType::SETTINGS) &&
(rDCEvt.GetFlags() & AllSettingsFlags::STYLE)) ) (rDCEvt.GetFlags() & AllSettingsFlags::STYLE)) )
{ {
ImplInitSettings( true ); ImplInitSettings();
Invalidate(); Invalidate();
} }
} }
void OTitleWindow::ImplInitSettings( bool bBackground ) void OTitleWindow::ImplInitSettings()
{ {
// FIXME RenderContext // FIXME RenderContext
AllSettings aAllSettings = GetSettings(); AllSettings aAllSettings = GetSettings();
@ -157,8 +157,7 @@ void OTitleWindow::ImplInitSettings( bool bBackground )
SetTextColor( rStyleSettings.GetFieldTextColor() ); SetTextColor( rStyleSettings.GetFieldTextColor() );
SetTextFillColor(); SetTextFillColor();
if( bBackground ) SetBackground( rStyleSettings.GetFieldColor() );
SetBackground( rStyleSettings.GetFieldColor() );
} }
void OTitleWindow::ApplySettings(vcl::RenderContext& rRenderContext) void OTitleWindow::ApplySettings(vcl::RenderContext& rRenderContext)

View File

@ -30,7 +30,7 @@ namespace dbaui
VclPtr<FixedText> m_aTitle; VclPtr<FixedText> m_aTitle;
VclPtr<vcl::Window> m_pChild; VclPtr<vcl::Window> m_pChild;
bool m_bShift; bool m_bShift;
void ImplInitSettings( bool bBackground ); void ImplInitSettings();
protected: protected:
virtual void DataChanged(const DataChangedEvent& rDCEvt) override; virtual void DataChanged(const DataChangedEvent& rDCEvt) override;
public: public:

View File

@ -576,7 +576,7 @@ void SbaTableQueryBrowser::initializePreviewMode()
{ {
getBrowserView()->getVclControl()->AlwaysEnableInput( false ); getBrowserView()->getVclControl()->AlwaysEnableInput( false );
getBrowserView()->getVclControl()->EnableInput( false ); getBrowserView()->getVclControl()->EnableInput( false );
getBrowserView()->getVclControl()->ForceHideScrollbars( true ); getBrowserView()->getVclControl()->ForceHideScrollbars();
} }
Reference< XPropertySet > xDataSourceSet(getRowSet(), UNO_QUERY); Reference< XPropertySet > xDataSourceSet(getRowSet(), UNO_QUERY);
if ( xDataSourceSet.is() ) if ( xDataSourceSet.is() )

View File

@ -34,7 +34,7 @@ OSplitterView::OSplitterView(vcl::Window* _pParent,bool _bVertical) : Window(_pP
,m_pRight(nullptr) ,m_pRight(nullptr)
,m_bVertical(_bVertical) ,m_bVertical(_bVertical)
{ {
ImplInitSettings( true ); ImplInitSettings();
} }
OSplitterView::~OSplitterView() OSplitterView::~OSplitterView()
@ -64,7 +64,7 @@ IMPL_LINK_NOARG_TYPED( OSplitterView, SplitHdl, Splitter*, void )
Resize(); Resize();
} }
void OSplitterView::ImplInitSettings( bool bBackground ) void OSplitterView::ImplInitSettings()
{ {
// FIXME RenderContext // FIXME RenderContext
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
@ -80,13 +80,10 @@ void OSplitterView::ImplInitSettings( bool bBackground )
aTextColor = GetControlForeground(); aTextColor = GetControlForeground();
SetTextColor( aTextColor ); SetTextColor( aTextColor );
if ( bBackground ) if( IsControlBackground() )
{ SetBackground( GetControlBackground() );
if( IsControlBackground() ) else
SetBackground( GetControlBackground() ); SetBackground( rStyleSettings.GetFaceColor() );
else
SetBackground( rStyleSettings.GetFaceColor() );
}
} }
void OSplitterView::DataChanged( const DataChangedEvent& rDCEvt ) void OSplitterView::DataChanged( const DataChangedEvent& rDCEvt )
@ -96,7 +93,7 @@ void OSplitterView::DataChanged( const DataChangedEvent& rDCEvt )
if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) &&
(rDCEvt.GetFlags() & AllSettingsFlags::STYLE) ) (rDCEvt.GetFlags() & AllSettingsFlags::STYLE) )
{ {
ImplInitSettings( true ); ImplInitSettings();
Invalidate(); Invalidate();
} }
} }

View File

@ -36,7 +36,7 @@ namespace dbaui
VclPtr<OTableFieldDescWin> m_pFieldDescWin; VclPtr<OTableFieldDescWin> m_pFieldDescWin;
VclPtr<OTableEditorCtrl> m_pEditorCtrl; VclPtr<OTableEditorCtrl> m_pEditorCtrl;
void ImplInitSettings( bool bBackground ); void ImplInitSettings();
DECL_LINK_TYPED( SplitHdl, Splitter*, void ); DECL_LINK_TYPED( SplitHdl, Splitter*, void );
protected: protected:
virtual void DataChanged(const DataChangedEvent& rDCEvt) override; virtual void DataChanged(const DataChangedEvent& rDCEvt) override;

View File

@ -32,7 +32,7 @@ namespace dbaui
VclPtr<vcl::Window> m_pRight; VclPtr<vcl::Window> m_pRight;
bool m_bVertical; bool m_bVertical;
void ImplInitSettings( bool bBackground ); void ImplInitSettings();
DECL_LINK_TYPED( SplitHdl, Splitter*, void ); DECL_LINK_TYPED( SplitHdl, Splitter*, void );
protected: protected:
virtual void DataChanged(const DataChangedEvent& rDCEvt) override; virtual void DataChanged(const DataChangedEvent& rDCEvt) override;

View File

@ -45,7 +45,7 @@ OTableBorderWindow::OTableBorderWindow(vcl::Window* pParent) : Window(pParent,WB
,m_aHorzSplitter( VclPtr<Splitter>::Create(this) ) ,m_aHorzSplitter( VclPtr<Splitter>::Create(this) )
{ {
ImplInitSettings( true ); ImplInitSettings();
// Children erzeugen // Children erzeugen
m_pEditorCtrl = VclPtr<OTableEditorCtrl>::Create( this); m_pEditorCtrl = VclPtr<OTableEditorCtrl>::Create( this);
m_pFieldDescWin = VclPtr<OTableFieldDescWin>::Create( this ); m_pFieldDescWin = VclPtr<OTableFieldDescWin>::Create( this );
@ -114,7 +114,7 @@ IMPL_LINK_TYPED( OTableBorderWindow, SplitHdl, Splitter*, pSplit, void )
} }
} }
void OTableBorderWindow::ImplInitSettings( bool bBackground ) void OTableBorderWindow::ImplInitSettings()
{ {
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
@ -130,13 +130,10 @@ void OTableBorderWindow::ImplInitSettings( bool bBackground )
aTextColor = GetControlForeground(); aTextColor = GetControlForeground();
SetTextColor( aTextColor ); SetTextColor( aTextColor );
if ( bBackground ) if( IsControlBackground() )
{ SetBackground( GetControlBackground() );
if( IsControlBackground() ) else
SetBackground( GetControlBackground() ); SetBackground( rStyleSettings.GetFaceColor() );
else
SetBackground( rStyleSettings.GetFaceColor() );
}
} }
void OTableBorderWindow::DataChanged( const DataChangedEvent& rDCEvt ) void OTableBorderWindow::DataChanged( const DataChangedEvent& rDCEvt )
@ -146,7 +143,7 @@ void OTableBorderWindow::DataChanged( const DataChangedEvent& rDCEvt )
if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) &&
(rDCEvt.GetFlags() & AllSettingsFlags::STYLE) ) (rDCEvt.GetFlags() & AllSettingsFlags::STYLE) )
{ {
ImplInitSettings( true ); ImplInitSettings();
Invalidate(); Invalidate();
} }
} }

View File

@ -2281,11 +2281,9 @@ bool EditEngine::UpdateFieldsOnly()
return pImpEditEngine->UpdateFields(); return pImpEditEngine->UpdateFields();
} }
void EditEngine::RemoveFields( bool bKeepFieldText, std::function<bool ( const SvxFieldData* )> isFieldData ) void EditEngine::RemoveFields( std::function<bool ( const SvxFieldData* )> isFieldData )
{ {
pImpEditEngine->UpdateFields();
if ( bKeepFieldText )
pImpEditEngine->UpdateFields();
sal_Int32 nParas = pImpEditEngine->GetEditDoc().Count(); sal_Int32 nParas = pImpEditEngine->GetEditDoc().Count();
for ( sal_Int32 nPara = 0; nPara < nParas; nPara++ ) for ( sal_Int32 nPara = 0; nPara < nParas; nPara++ )

View File

@ -155,7 +155,7 @@ bool Outliner::UpdateFields()
void Outliner::RemoveFields( std::function<bool ( const SvxFieldData* )> isFieldData ) void Outliner::RemoveFields( std::function<bool ( const SvxFieldData* )> isFieldData )
{ {
pEditEngine->RemoveFields( true/*bKeepFieldText*/, isFieldData ); pEditEngine->RemoveFields( isFieldData );
} }
void Outliner::SetWordDelimiters( const OUString& rDelimiters ) void Outliner::SetWordDelimiters( const OUString& rDelimiters )

View File

@ -214,18 +214,17 @@ namespace dbp
return true; return true;
} }
Reference< XNameAccess > OLCPage::getTables(bool _bNeedIt) Reference< XNameAccess > OLCPage::getTables()
{ {
Reference< XConnection > xConn = getFormConnection(); Reference< XConnection > xConn = getFormConnection();
DBG_ASSERT(!_bNeedIt || xConn.is(), "OLCPage::getTables: should have an active connection when reaching this page!"); DBG_ASSERT(xConn.is(), "OLCPage::getTables: should have an active connection when reaching this page!");
(void)_bNeedIt;
Reference< XTablesSupplier > xSuppTables(xConn, UNO_QUERY); Reference< XTablesSupplier > xSuppTables(xConn, UNO_QUERY);
Reference< XNameAccess > xTables; Reference< XNameAccess > xTables;
if (xSuppTables.is()) if (xSuppTables.is())
xTables = xSuppTables->getTables(); xTables = xSuppTables->getTables();
DBG_ASSERT(!_bNeedIt || xTables.is() || !xConn.is(), "OLCPage::getTables: got no tables from the connection!"); DBG_ASSERT(xTables.is() || !xConn.is(), "OLCPage::getTables: got no tables from the connection!");
return xTables; return xTables;
} }
@ -233,7 +232,7 @@ namespace dbp
Sequence< OUString > OLCPage::getTableFields() Sequence< OUString > OLCPage::getTableFields()
{ {
Reference< XNameAccess > xTables = getTables(true); Reference< XNameAccess > xTables = getTables();
Sequence< OUString > aColumnNames; Sequence< OUString > aColumnNames;
if (xTables.is()) if (xTables.is())
{ {
@ -320,7 +319,7 @@ namespace dbp
m_pSelectTable->Clear(); m_pSelectTable->Clear();
try try
{ {
Reference< XNameAccess > xTables = getTables(true); Reference< XNameAccess > xTables = getTables();
Sequence< OUString > aTableNames; Sequence< OUString > aTableNames;
if (xTables.is()) if (xTables.is())
aTableNames = xTables->getElementNames(); aTableNames = xTables->getElementNames();

View File

@ -89,7 +89,7 @@ namespace dbp
bool isListBox() { return static_cast<OListComboWizard*>(getDialog())->isListBox(); } bool isListBox() { return static_cast<OListComboWizard*>(getDialog())->isListBox(); }
protected: protected:
css::uno::Reference< css::container::XNameAccess > getTables(bool _bNeedIt); css::uno::Reference< css::container::XNameAccess > getTables();
css::uno::Sequence< OUString > getTableFields(); css::uno::Sequence< OUString > getTableFields();
}; };

View File

@ -144,7 +144,7 @@ StatusBarManager::StatusBarManager(
m_xStatusbarControllerFactory = frame::theStatusbarControllerFactory::get( m_xStatusbarControllerFactory = frame::theStatusbarControllerFactory::get(
::comphelper::getProcessComponentContext()); ::comphelper::getProcessComponentContext());
m_pStatusBar->AdjustItemWidthsForHiDPI(true); m_pStatusBar->AdjustItemWidthsForHiDPI();
m_pStatusBar->SetClickHdl( LINK( this, StatusBarManager, Click ) ); m_pStatusBar->SetClickHdl( LINK( this, StatusBarManager, Click ) );
m_pStatusBar->SetDoubleClickHdl( LINK( this, StatusBarManager, DoubleClick ) ); m_pStatusBar->SetDoubleClickHdl( LINK( this, StatusBarManager, DoubleClick ) );
} }

View File

@ -452,9 +452,9 @@ public:
bool HasConvertibleTextPortion( LanguageType nLang ); bool HasConvertibleTextPortion( LanguageType nLang );
virtual bool ConvertNextDocument(); virtual bool ConvertNextDocument();
bool UpdateFields(); bool UpdateFields();
bool UpdateFieldsOnly(); bool UpdateFieldsOnly();
void RemoveFields( bool bKeepFieldText, std::function<bool ( const SvxFieldData* )> isFieldData = [] (const SvxFieldData* ){return true;} ); void RemoveFields( std::function<bool ( const SvxFieldData* )> isFieldData = [] (const SvxFieldData* ){return true;} );
sal_uInt16 GetFieldCount( sal_Int32 nPara ) const; sal_uInt16 GetFieldCount( sal_Int32 nPara ) const;
EFieldInfo GetFieldInfo( sal_Int32 nPara, sal_uInt16 nField ) const; EFieldInfo GetFieldInfo( sal_Int32 nPara, sal_uInt16 nField ) const;

View File

@ -155,7 +155,7 @@ public:
SAL_DLLPRIVATE bool DoClose_Impl(); SAL_DLLPRIVATE bool DoClose_Impl();
SAL_DLLPRIVATE void SetFrameInterface_Impl( const css::uno::Reference< css::frame::XFrame >& rFrame ); SAL_DLLPRIVATE void SetFrameInterface_Impl( const css::uno::Reference< css::frame::XFrame >& rFrame );
SAL_DLLPRIVATE void ReleasingComponent_Impl( bool bSet ); SAL_DLLPRIVATE void ReleasingComponent_Impl();
SAL_DLLPRIVATE void GetViewData_Impl(); SAL_DLLPRIVATE void GetViewData_Impl();
SAL_DLLPRIVATE void SetFrameType_Impl( sal_uInt32 ); SAL_DLLPRIVATE void SetFrameType_Impl( sal_uInt32 );
SAL_DLLPRIVATE bool PrepareClose_Impl( bool bUI ); SAL_DLLPRIVATE bool PrepareClose_Impl( bool bUI );

View File

@ -605,7 +605,7 @@ protected:
virtual void PreparePaint(vcl::RenderContext& rRenderContext, SvTreeListEntry& rEntry); virtual void PreparePaint(vcl::RenderContext& rRenderContext, SvTreeListEntry& rEntry);
virtual void DataChanged( const DataChangedEvent& rDCEvt ) override; virtual void DataChanged( const DataChangedEvent& rDCEvt ) override;
void InitSettings(bool bBackground); void InitSettings();
virtual void ApplySettings(vcl::RenderContext& rRenderContext) override; virtual void ApplySettings(vcl::RenderContext& rRenderContext) override;

View File

@ -327,10 +327,8 @@ public:
// mirroring -------------------------------------------------------------- // mirroring --------------------------------------------------------------
/** Mirrors the entire array horizontally. /** Mirrors the entire array horizontally. */
@param bSwapDiag void MirrorSelfX();
true = Swap top-left to bottom-right and bottom-left to top-right frame borders. */
void MirrorSelfX( bool bSwapDiag );
// drawing ---------------------------------------------------------------- // drawing ----------------------------------------------------------------

View File

@ -492,7 +492,7 @@ public:
bar <b>always</b> implies a horizontal scroll bar bar <b>always</b> implies a horizontal scroll bar
@seealso EnableNavigationBar @seealso EnableNavigationBar
*/ */
void ForceHideScrollbars( bool _bForce ); void ForceHideScrollbars();
css::uno::Reference< css::uno::XComponentContext > css::uno::Reference< css::uno::XComponentContext >
getContext() const { return m_xContext; } getContext() const { return m_xContext; }

View File

@ -343,7 +343,7 @@ public:
bool IsConvertToPolyObjPossible() const { ForcePossibilities(); return bCanConvToPoly; } bool IsConvertToPolyObjPossible() const { ForcePossibilities(); return bCanConvToPoly; }
bool IsConvertToContourPossible() const { ForcePossibilities(); return bCanConvToContour; } bool IsConvertToContourPossible() const { ForcePossibilities(); return bCanConvToContour; }
void ConvertMarkedToPathObj(bool bLineToArea); void ConvertMarkedToPathObj(bool bLineToArea);
void ConvertMarkedToPolyObj(bool bLineToArea); void ConvertMarkedToPolyObj();
// Align all marked objects vertically. Normally the SnapRect of an object is used. // Align all marked objects vertically. Normally the SnapRect of an object is used.
void AlignMarkedObjects(SdrHorAlign eHor, SdrVertAlign eVert); void AlignMarkedObjects(SdrHorAlign eHor, SdrVertAlign eVert);

View File

@ -281,11 +281,11 @@ protected:
* This method removes the propertyset containing the Additional Core * This method removes the propertyset containing the Additional Core
* Properties of the content. * Properties of the content.
* *
* @param bRecursive is a flag indicating whether propertysets for * Propertysets for children described by rOldKey are removed too.
* children described by rOldKey shall be removed too. *
* @return True, if the operation succeeded - False, otherwise. * @return True, if the operation succeeded - False, otherwise.
*/ */
bool removeAdditionalPropertySet( bool bRecursive ); bool removeAdditionalPropertySet();
public: public:
/** /**

View File

@ -57,7 +57,7 @@ public:
SAL_DLLPRIVATE void ImplDraw(); SAL_DLLPRIVATE void ImplDraw();
DECL_DLLPRIVATE_LINK_TYPED( ImplTimerHdl, Timer*, void ); DECL_DLLPRIVATE_LINK_TYPED( ImplTimerHdl, Timer*, void );
SAL_DLLPRIVATE void ImplShow(); SAL_DLLPRIVATE void ImplShow();
SAL_DLLPRIVATE void ImplHide( bool bStopTimer ); SAL_DLLPRIVATE void ImplHide();
SAL_DLLPRIVATE void ImplResume( bool bRestore = false ); SAL_DLLPRIVATE void ImplResume( bool bRestore = false );
SAL_DLLPRIVATE bool ImplSuspend(); SAL_DLLPRIVATE bool ImplSuspend();
SAL_DLLPRIVATE void ImplNew(); SAL_DLLPRIVATE void ImplNew();

View File

@ -105,7 +105,7 @@ public:
virtual ~StatusBar(); virtual ~StatusBar();
virtual void dispose() override; virtual void dispose() override;
void AdjustItemWidthsForHiDPI(bool bAdjustHiDPI); void AdjustItemWidthsForHiDPI();
virtual void MouseButtonDown( const MouseEvent& rMEvt ) override; virtual void MouseButtonDown( const MouseEvent& rMEvt ) override;
virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) override; virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) override;

View File

@ -143,11 +143,11 @@ namespace rptui
sal_Int32 GetTotalWidth() const; sal_Int32 GetTotalWidth() const;
/** calculate the max width of the markers /** calculate the max width of the markers
* The end marker will not be used for calculation.
* *
* @param _bWithEnd if <TRUE/> the end marker will be used for calculation as well otherwise not.
* \return the max width * \return the max width
*/ */
sal_Int32 getMaxMarkerWidth(bool _bWithEnd) const; sal_Int32 getMaxMarkerWidth() const;
void ScrollChildren(const Point& _aThumbPos); void ScrollChildren(const Point& _aThumbPos);

View File

@ -142,12 +142,10 @@ void OReportWindow::showRuler(bool _bShow)
m_aViewsWindow->showRuler(_bShow); m_aViewsWindow->showRuler(_bShow);
} }
sal_Int32 OReportWindow::getMaxMarkerWidth(bool _bWithEnd) const sal_Int32 OReportWindow::getMaxMarkerWidth() const
{ {
Fraction aStartWidth(long(REPORT_STARTMARKER_WIDTH)); Fraction aStartWidth(long(REPORT_STARTMARKER_WIDTH));
aStartWidth *= m_aViewsWindow->GetMapMode().GetScaleX(); aStartWidth *= m_aViewsWindow->GetMapMode().GetScaleX();
if ( _bWithEnd )
aStartWidth += Fraction(long(REPORT_ENDMARKER_WIDTH));
return sal_Int32((long)aStartWidth); return sal_Int32((long)aStartWidth);
} }

View File

@ -272,7 +272,7 @@ void OScrollWindowHelper::unmarkAllObjects(OSectionView* _pSectionView)
sal_Int32 OScrollWindowHelper::getMaxMarkerWidth() const sal_Int32 OScrollWindowHelper::getMaxMarkerWidth() const
{ {
return m_aReportWindow->getMaxMarkerWidth(false/*_bWithEnd*/); return m_aReportWindow->getMaxMarkerWidth();
} }
void OScrollWindowHelper::showRuler(bool _bShow) void OScrollWindowHelper::showRuler(bool _bShow)

View File

@ -167,11 +167,11 @@ public:
osl::MutexGuard g(m_aMutex); osl::MutexGuard g(m_aMutex);
return m_nFlag; return m_nFlag;
} }
void addValue(T n) void incValue()
{ {
//only one thread operate on the flag. //only one thread operate on the flag.
osl::MutexGuard g(m_aMutex); osl::MutexGuard g(m_aMutex);
m_nFlag += n; m_nFlag++;
} }
void acquire() {m_aMutex.acquire();} void acquire() {m_aMutex.acquire();}
void release() {m_aMutex.release();} void release() {m_aMutex.release();}
@ -239,7 +239,7 @@ protected:
{ {
while(schedule()) while(schedule())
{ {
m_aFlag.addValue(1); m_aFlag.incValue();
ThreadHelper::thread_sleep_tenth_sec(1); ThreadHelper::thread_sleep_tenth_sec(1);
} }
} }
@ -298,7 +298,7 @@ protected:
/// if the thread should terminate, schedule return false /// if the thread should terminate, schedule return false
while (m_aFlag.getValue() < 20 && schedule()) while (m_aFlag.getValue() < 20 && schedule())
{ {
m_aFlag.addValue(1); m_aFlag.incValue();
ThreadHelper::thread_sleep_tenth_sec(1); ThreadHelper::thread_sleep_tenth_sec(1);
if (m_nWaitSec != 0) if (m_nWaitSec != 0)
@ -346,7 +346,7 @@ protected:
{ {
while (m_aFlag.getValue() < 10) while (m_aFlag.getValue() < 10)
{ {
m_aFlag.addValue(1); m_aFlag.incValue();
ThreadHelper::thread_sleep_tenth_sec(1); ThreadHelper::thread_sleep_tenth_sec(1);
} }
} }
@ -391,7 +391,7 @@ protected:
//if the thread should terminate, schedule return false //if the thread should terminate, schedule return false
while (schedule()) while (schedule())
{ {
m_aFlag.addValue(1); m_aFlag.incValue();
} }
} }
void SAL_CALL onTerminated() override void SAL_CALL onTerminated() override

View File

@ -1089,7 +1089,7 @@ public:
} }
} }
// change URL field to text (not possible otherwise, thus pType=0) // change URL field to text (not possible otherwise, thus pType=0)
mpEngine->RemoveFields(true); mpEngine->RemoveFields();
bool bSpellErrors = mpEngine->HasOnlineSpellErrors(); bool bSpellErrors = mpEngine->HasOnlineSpellErrors();
bool bNeedObject = bSpellErrors || nParCount>1; // keep errors/paragraphs bool bNeedObject = bSpellErrors || nParCount>1; // keep errors/paragraphs

View File

@ -1110,12 +1110,9 @@ void ScDocument::FillInfo(
} }
} }
/* Mirror the entire frame array. /* Mirror the entire frame array. */
1st param = Mirror the vertical double line styles as well.
2nd param = Do not swap diagonal lines.
*/
if( bLayoutRTL ) if( bLayoutRTL )
rArray.MirrorSelfX( false ); rArray.MirrorSelfX();
} }
ScTableInfo::ScTableInfo() ScTableInfo::ScTableInfo()

View File

@ -467,7 +467,7 @@ protected:
size_t appendWhiteSpaceTokens( const WhiteSpaceVec* pSpaces ); size_t appendWhiteSpaceTokens( const WhiteSpaceVec* pSpaces );
size_t insertWhiteSpaceTokens( const WhiteSpaceVec* pSpaces, size_t nIndexFromEnd ); size_t insertWhiteSpaceTokens( const WhiteSpaceVec* pSpaces, size_t nIndexFromEnd );
size_t getOperandSize( size_t nOpCountFromEnd, size_t nOpIndex ) const; size_t getOperandSize( size_t nOpIndex ) const;
void pushOperandSize( size_t nSize ); void pushOperandSize( size_t nSize );
size_t popOperandSize(); size_t popOperandSize();
@ -727,11 +727,11 @@ size_t FormulaParserImpl::insertWhiteSpaceTokens( const WhiteSpaceVec* pSpaces,
return pSpaces ? pSpaces->size() : 0; return pSpaces ? pSpaces->size() : 0;
} }
size_t FormulaParserImpl::getOperandSize( size_t nOpCountFromEnd, size_t nOpIndex ) const size_t FormulaParserImpl::getOperandSize( size_t nOpIndex ) const
{ {
OSL_ENSURE( (nOpIndex < nOpCountFromEnd) && (nOpCountFromEnd <= maOperandSizeStack.size()), OSL_ENSURE( (nOpIndex < 1) && (1 <= maOperandSizeStack.size()),
"FormulaParserImpl::getOperandSize - invalid parameters" ); "FormulaParserImpl::getOperandSize - invalid parameters" );
return maOperandSizeStack[ maOperandSizeStack.size() - nOpCountFromEnd + nOpIndex ]; return maOperandSizeStack[ maOperandSizeStack.size() - 1 + nOpIndex ];
} }
void FormulaParserImpl::pushOperandSize( size_t nSize ) void FormulaParserImpl::pushOperandSize( size_t nSize )
@ -749,8 +749,7 @@ size_t FormulaParserImpl::popOperandSize()
ApiToken& FormulaParserImpl::getOperandToken( size_t nOpIndex, size_t nTokenIndex ) ApiToken& FormulaParserImpl::getOperandToken( size_t nOpIndex, size_t nTokenIndex )
{ {
SAL_WARN_IF( SAL_WARN_IF( getOperandSize( nOpIndex ) <= nTokenIndex, "sc.filter",
getOperandSize( 1, nOpIndex ) <= nTokenIndex, "sc.filter",
"FormulaParserImpl::getOperandToken - invalid parameters" ); "FormulaParserImpl::getOperandToken - invalid parameters" );
SizeTypeVector::const_iterator aIndexIt = maTokenIndexes.end(); SizeTypeVector::const_iterator aIndexIt = maTokenIndexes.end();
for( SizeTypeVector::const_iterator aEnd = maOperandSizeStack.end(), aIt = aEnd - 1 + nOpIndex; aIt != aEnd; ++aIt ) for( SizeTypeVector::const_iterator aEnd = maOperandSizeStack.end(), aIt = aEnd - 1 + nOpIndex; aIt != aEnd; ++aIt )

View File

@ -282,7 +282,7 @@ private:
void SetListMode ( NavListMode eMode, bool bSetSize = true ); void SetListMode ( NavListMode eMode, bool bSetSize = true );
void ShowList ( bool bShow, bool bSetSize ); void ShowList ( bool bShow, bool bSetSize );
void ShowScenarios ( bool bShow, bool bSetSize ); void ShowScenarios ( bool bSetSize );
void SetDropMode(sal_uInt16 nNew); void SetDropMode(sal_uInt16 nNew);
sal_uInt16 GetDropMode() const { return nDropMode; } sal_uInt16 GetDropMode() const { return nDropMode; }

View File

@ -97,7 +97,7 @@ public:
void EnterDataAtCursor( const OUString& rString ); //! Not used? void EnterDataAtCursor( const OUString& rString ); //! Not used?
SC_DLLPUBLIC void CutToClip( bool bIncludeObjects = false ); SC_DLLPUBLIC void CutToClip();
SC_DLLPUBLIC bool CopyToClip( ScDocument* pClipDoc = nullptr, bool bCut = false, bool bApi = false, SC_DLLPUBLIC bool CopyToClip( ScDocument* pClipDoc = nullptr, bool bCut = false, bool bApi = false,
bool bIncludeObjects = false, bool bStopEdit = true ); bool bIncludeObjects = false, bool bStopEdit = true );
SC_DLLPUBLIC bool CopyToClip( ScDocument* pClipDoc, const ScRangeList& rRange, bool bCut = false, SC_DLLPUBLIC bool CopyToClip( ScDocument* pClipDoc, const ScRangeList& rRange, bool bCut = false,

View File

@ -1088,7 +1088,7 @@ void ScNavigatorDlg::SetListMode( NavListMode eMode, bool bSetSize )
break; break;
case NAV_LMODE_SCENARIOS: case NAV_LMODE_SCENARIOS:
ShowScenarios( true, bSetSize ); ShowScenarios( bSetSize );
break; break;
} }
@ -1151,36 +1151,22 @@ void ScNavigatorDlg::ShowList( bool bShow, bool bSetSize )
} }
} }
void ScNavigatorDlg::ShowScenarios( bool bShow, bool bSetSize ) void ScNavigatorDlg::ShowScenarios( bool bSetSize )
{ {
FloatingWindow* pFloat = pContextWin!=nullptr ? pContextWin->GetFloatingWindow() : nullptr; FloatingWindow* pFloat = pContextWin!=nullptr ? pContextWin->GetFloatingWindow() : nullptr;
Size aSize = GetParent()->GetOutputSizePixel(); Size aSize = GetParent()->GetOutputSizePixel();
if ( bShow ) Size aMinSize = aInitSize;
{ aMinSize.Height() += nInitListHeight;
Size aMinSize = aInitSize; if ( pFloat )
aMinSize.Height() += nInitListHeight; pFloat->SetMinOutputSizePixel( aMinSize );
if ( pFloat ) aSize.Height() = nListModeHeight;
pFloat->SetMinOutputSizePixel( aMinSize );
aSize.Height() = nListModeHeight;
rBindings.Invalidate( SID_SELECT_SCENARIO ); rBindings.Invalidate( SID_SELECT_SCENARIO );
rBindings.Update( SID_SELECT_SCENARIO ); rBindings.Update( SID_SELECT_SCENARIO );
aWndScenarios->Show(); aWndScenarios->Show();
aLbDocuments->Show(); aLbDocuments->Show();
}
else
{
if ( pFloat )
{
pFloat->SetMinOutputSizePixel( aInitSize );
nListModeHeight = aSize.Height();
}
aSize.Height() = aInitSize.Height();
aWndScenarios->Hide();
aLbDocuments->Hide();
}
aLbEntries->Hide(); aLbEntries->Hide();
if ( pFloat ) if ( pFloat )

View File

@ -816,7 +816,7 @@ void ScUndoCut::Redo()
void ScUndoCut::Repeat(SfxRepeatTarget& rTarget) void ScUndoCut::Repeat(SfxRepeatTarget& rTarget)
{ {
if (dynamic_cast<const ScTabViewTarget*>( &rTarget) != nullptr) if (dynamic_cast<const ScTabViewTarget*>( &rTarget) != nullptr)
static_cast<ScTabViewTarget&>(rTarget).GetViewShell()->CutToClip( true ); static_cast<ScTabViewTarget&>(rTarget).GetViewShell()->CutToClip();
} }
bool ScUndoCut::CanRepeat(SfxRepeatTarget& rTarget) const bool ScUndoCut::CanRepeat(SfxRepeatTarget& rTarget) const

View File

@ -177,7 +177,7 @@ implnCut( const uno::Reference< frame::XModel>& xModel )
ScTabViewShell* pViewShell = getBestViewShell( xModel ); ScTabViewShell* pViewShell = getBestViewShell( xModel );
if ( pViewShell ) if ( pViewShell )
{ {
pViewShell->CutToClip( true ); pViewShell->CutToClip();
// mark the copied transfer object so it is used in ScVbaRange::Insert // mark the copied transfer object so it is used in ScVbaRange::Insert
ScTransferObj* pClipObj = ScTransferObj::GetOwnClipboard( nullptr ); ScTransferObj* pClipObj = ScTransferObj::GetOwnClipboard( nullptr );

View File

@ -1272,7 +1272,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
case SID_CUT: // for graphs in DrawShell case SID_CUT: // for graphs in DrawShell
{ {
WaitObject aWait( GetViewData()->GetDialogParent() ); WaitObject aWait( GetViewData()->GetDialogParent() );
pTabViewShell->CutToClip( true ); pTabViewShell->CutToClip();
rReq.Done(); rReq.Done();
GetViewData()->SetPasteMode( (ScPasteFlags)(SC_PASTE_MODE | SC_PASTE_BORDER)); GetViewData()->SetPasteMode( (ScPasteFlags)(SC_PASTE_MODE | SC_PASTE_BORDER));
pTabViewShell->ShowCursor(); pTabViewShell->ShowCursor();

View File

@ -77,7 +77,7 @@ using namespace com::sun::star;
// C U T // C U T
void ScViewFunc::CutToClip( bool bIncludeObjects ) void ScViewFunc::CutToClip()
{ {
UpdateInputLine(); UpdateInputLine();
@ -106,7 +106,7 @@ void ScViewFunc::CutToClip( bool bIncludeObjects )
MarkDataChanged(); MarkDataChanged();
} }
CopyToClip( nullptr, true, false, bIncludeObjects ); // copy to clipboard CopyToClip( nullptr, true, false, true/*bIncludeObjects*/ ); // copy to clipboard
ScAddress aOldEnd( aRange.aEnd ); // combined cells in this range? ScAddress aOldEnd( aRange.aEnd ); // combined cells in this range?
pDoc->ExtendMerge( aRange, true ); pDoc->ExtendMerge( aRange, true );
@ -129,8 +129,7 @@ void ScViewFunc::CutToClip( bool bIncludeObjects )
rMark.MarkToMulti(); rMark.MarkToMulti();
pDoc->DeleteSelection( InsertDeleteFlags::ALL, rMark ); pDoc->DeleteSelection( InsertDeleteFlags::ALL, rMark );
if ( bIncludeObjects ) pDoc->DeleteObjectsInSelection( rMark );
pDoc->DeleteObjectsInSelection( rMark );
rMark.MarkToSimple(); rMark.MarkToSimple();
if ( !AdjustRowHeight( aRange.aStart.Row(), aRange.aEnd.Row() ) ) if ( !AdjustRowHeight( aRange.aStart.Row(), aRange.aEnd.Row() ) )

View File

@ -375,8 +375,7 @@ void BitmapCache::Recycle (const BitmapCache& rCache)
} }
} }
::std::unique_ptr<BitmapCache::CacheIndex> BitmapCache::GetCacheIndex ( ::std::unique_ptr<BitmapCache::CacheIndex> BitmapCache::GetCacheIndex() const
bool bIncludeNoPreview) const
{ {
::osl::MutexGuard aGuard (maMutex); ::osl::MutexGuard aGuard (maMutex);
@ -391,7 +390,7 @@ void BitmapCache::Recycle (const BitmapCache& rCache)
if ( iEntry->second.IsPrecious()) if ( iEntry->second.IsPrecious())
continue; continue;
if ( ! bIncludeNoPreview && ! iEntry->second.HasPreview()) if ( ! iEntry->second.HasPreview())
continue; continue;
aSortedContainer.push_back(SortableBitmapContainer::value_type( aSortedContainer.push_back(SortableBitmapContainer::value_type(

View File

@ -151,13 +151,9 @@ public:
part of) the cache. The entries of the index are sorted according part of) the cache. The entries of the index are sorted according
to last access times with the least recently access time first. to last access times with the least recently access time first.
Entries with the precious flag set are omitted. Entries with the precious flag set are omitted.
@param bIncludeNoPreview Entries with that have no preview bitmaps are omitted.
When this flag is <TRUE/> entries with that have no preview
bitmaps are included in the index. When the flag is <FALSE/> these entries
are omitted.
*/ */
::std::unique_ptr<CacheIndex> GetCacheIndex ( ::std::unique_ptr<CacheIndex> GetCacheIndex () const;
bool bIncludeNoPreview) const;
/** Compress the specified preview bitmap with the given bitmap /** Compress the specified preview bitmap with the given bitmap
compressor. A reference to the compressor is stored for later compressor. A reference to the compressor is stored for later

View File

@ -172,7 +172,7 @@ void CacheCompactionByCompression::Run()
SAL_INFO("sd.sls", OSL_THIS_FUNC << ": bitmap cache uses to much space: " << mrCache.GetSize() << " > " << mnMaximalCacheSize); SAL_INFO("sd.sls", OSL_THIS_FUNC << ": bitmap cache uses to much space: " << mrCache.GetSize() << " > " << mnMaximalCacheSize);
::std::unique_ptr< ::sd::slidesorter::cache::BitmapCache::CacheIndex> pIndex ( ::std::unique_ptr< ::sd::slidesorter::cache::BitmapCache::CacheIndex> pIndex (
mrCache.GetCacheIndex(false)); mrCache.GetCacheIndex());
::sd::slidesorter::cache::BitmapCache::CacheIndex::iterator iIndex; ::sd::slidesorter::cache::BitmapCache::CacheIndex::iterator iIndex;
for (iIndex=pIndex->begin(); iIndex!=pIndex->end(); ++iIndex) for (iIndex=pIndex->begin(); iIndex!=pIndex->end(); ++iIndex)
{ {

View File

@ -853,9 +853,9 @@ void SfxFrame::GrabFocusOnComponent_Impl()
pFocusWindow->GrabFocus(); pFocusWindow->GrabFocus();
} }
void SfxFrame::ReleasingComponent_Impl( bool bSet ) void SfxFrame::ReleasingComponent_Impl()
{ {
pImp->bReleasingComponent = bSet; pImp->bReleasingComponent = true;
} }
bool SfxFrame::IsInPlace() const bool SfxFrame::IsInPlace() const

View File

@ -1044,7 +1044,7 @@ void SfxViewFrame::ReleaseObjectShell_Impl()
{ {
DBG_ASSERT( xObjSh.Is(), "no SfxObjectShell to release!" ); DBG_ASSERT( xObjSh.Is(), "no SfxObjectShell to release!" );
GetFrame().ReleasingComponent_Impl( true ); GetFrame().ReleasingComponent_Impl();
if ( GetWindow().HasChildPathFocus( true ) ) if ( GetWindow().HasChildPathFocus( true ) )
{ {
DBG_ASSERT( !GetActiveChildFrame_Impl(), "Wrong active child frame!" ); DBG_ASSERT( !GetActiveChildFrame_Impl(), "Wrong active child frame!" );

View File

@ -400,7 +400,7 @@ public:
void InitSelection(); void InitSelection();
void ResetCursor(); void ResetCursor();
inline void EndEditing( bool _bCancel ); inline void EndEditing();
void onTimeout(); void onTimeout();
@ -419,10 +419,10 @@ inline void SvtFileView_Impl::EnableDelete( bool bEnable )
mbReplaceNames = false; mbReplaceNames = false;
} }
inline void SvtFileView_Impl::EndEditing( bool _bCancel ) inline void SvtFileView_Impl::EndEditing()
{ {
if ( mpCurView->IsEditingActive() ) if ( mpCurView->IsEditingActive() )
mpCurView->EndEditing(_bCancel); mpCurView->EndEditing();
} }
// functions ------------------------------------------------------------- // functions -------------------------------------------------------------
@ -1259,7 +1259,7 @@ void SvtFileView::EnableDelete( bool bEnable )
void SvtFileView::EndInplaceEditing() void SvtFileView::EndInplaceEditing()
{ {
return mpImp->EndEditing( false/*_bCancel*/ ); return mpImp->EndEditing();
} }
IMPL_LINK_TYPED( SvtFileView, HeaderSelect_Impl, HeaderBar*, pBar, void ) IMPL_LINK_TYPED( SvtFileView, HeaderSelect_Impl, HeaderBar*, pBar, void )

View File

@ -82,7 +82,7 @@ public:
virtual void KeyInput( const KeyEvent& rKEvt ) override; virtual void KeyInput( const KeyEvent& rKEvt ) override;
virtual bool PreNotify( NotifyEvent& rNEvt ) override; virtual bool PreNotify( NotifyEvent& rNEvt ) override;
bool EditingCanceled() const { return bCanceled; } bool EditingCanceled() const { return bCanceled; }
void StopEditing( bool bCancel = false ); void StopEditing();
bool IsGrabFocus() const { return bGrabFocus; } bool IsGrabFocus() const { return bGrabFocus; }
}; };
@ -3003,7 +3003,7 @@ IMPL_LINK_NOARG_TYPED(SvxIconChoiceCtrl_Impl, TextEditEndedHdl, LinkParamNone*,
void SvxIconChoiceCtrl_Impl::StopEntryEditing() void SvxIconChoiceCtrl_Impl::StopEntryEditing()
{ {
if( pEdit ) if( pEdit )
pEdit->StopEditing( true/*bCancel*/ ); pEdit->StopEditing();
} }
SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::GetFirstSelectedEntry() const SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::GetFirstSelectedEntry() const
@ -3179,11 +3179,11 @@ bool IcnViewEdit_Impl::PreNotify( NotifyEvent& rNEvt )
return false; return false;
} }
void IcnViewEdit_Impl::StopEditing( bool bCancel ) void IcnViewEdit_Impl::StopEditing()
{ {
if ( !bAlreadyInCallback ) if ( !bAlreadyInCallback )
{ {
bCanceled = bCancel; bCanceled = true;
CallCallBackHdl_Impl(); CallCallBackHdl_Impl();
} }
} }

View File

@ -1416,7 +1416,7 @@ void SvTreeListBox::InitTreeView()
SetSpaceBetweenEntries( 0 ); SetSpaceBetweenEntries( 0 );
SetLineColor(); SetLineColor();
InitSettings( true ); InitSettings();
ImplInitStyle(); ImplInitStyle();
SetTabs(); SetTabs();
} }
@ -3715,7 +3715,7 @@ void SvTreeListBox::DataChanged( const DataChangedEvent& rDCEvt )
{ {
nEntryHeight = 0; // _together_ with true of 1. par (bFont) of InitSettings() a zero-height nEntryHeight = 0; // _together_ with true of 1. par (bFont) of InitSettings() a zero-height
// forces complete recalc of heights! // forces complete recalc of heights!
InitSettings( true ); InitSettings();
Invalidate(); Invalidate();
} }
else else
@ -3751,7 +3751,7 @@ void SvTreeListBox::ApplySettings(vcl::RenderContext& rRenderContext)
pCheckButtonData->SetDefaultImages(this); pCheckButtonData->SetDefaultImages(this);
} }
void SvTreeListBox::InitSettings(bool bBackground) void SvTreeListBox::InitSettings()
{ {
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
vcl::Font aFont; vcl::Font aFont;
@ -3763,8 +3763,7 @@ void SvTreeListBox::InitSettings(bool bBackground)
SetTextColor(rStyleSettings.GetFieldTextColor()); SetTextColor(rStyleSettings.GetFieldTextColor());
SetTextFillColor(); SetTextFillColor();
if (bBackground) SetBackground(rStyleSettings.GetFieldColor());
SetBackground(rStyleSettings.GetFieldColor());
// always try to re-create default-SvLBoxButtonData // always try to re-create default-SvLBoxButtonData
if( pCheckButtonData && pCheckButtonData->HasDefaultImages() ) if( pCheckButtonData && pCheckButtonData->HasDefaultImages() )

View File

@ -47,7 +47,7 @@ struct Cell
inline bool IsMerged() const { return mbMergeOrig || mbOverlapX || mbOverlapY; } inline bool IsMerged() const { return mbMergeOrig || mbOverlapX || mbOverlapY; }
void MirrorSelfX( bool bMirrorStyles, bool bSwapDiag ); void MirrorSelfX( bool bSwapDiag );
}; };
typedef std::vector< long > LongVec; typedef std::vector< long > LongVec;
@ -64,23 +64,17 @@ Cell::Cell() :
{ {
} }
void Cell::MirrorSelfX( bool bMirrorStyles, bool bSwapDiag ) void Cell::MirrorSelfX( bool bSwapDiag )
{ {
std::swap( maLeft, maRight ); std::swap( maLeft, maRight );
std::swap( mnAddLeft, mnAddRight ); std::swap( mnAddLeft, mnAddRight );
if( bMirrorStyles ) maLeft.MirrorSelf();
{ maRight.MirrorSelf();
maLeft.MirrorSelf();
maRight.MirrorSelf();
}
if( bSwapDiag ) if( bSwapDiag )
{ {
std::swap( maTLBR, maBLTR ); std::swap( maTLBR, maBLTR );
if( bMirrorStyles ) maTLBR.MirrorSelf();
{ maBLTR.MirrorSelf();
maTLBR.MirrorSelf();
maBLTR.MirrorSelf();
}
} }
} }
@ -857,7 +851,7 @@ void Array::SetUseDiagDoubleClipping( bool bSet )
} }
// mirroring // mirroring
void Array::MirrorSelfX( bool bSwapDiag ) void Array::MirrorSelfX()
{ {
CellVec aNewCells; CellVec aNewCells;
aNewCells.reserve( GetCellCount() ); aNewCells.reserve( GetCellCount() );
@ -868,7 +862,7 @@ void Array::MirrorSelfX( bool bSwapDiag )
for( nCol = 0; nCol < mxImpl->mnWidth; ++nCol ) for( nCol = 0; nCol < mxImpl->mnWidth; ++nCol )
{ {
aNewCells.push_back( CELL( mxImpl->GetMirrorCol( nCol ), nRow ) ); aNewCells.push_back( CELL( mxImpl->GetMirrorCol( nCol ), nRow ) );
aNewCells.back().MirrorSelfX( true, bSwapDiag ); aNewCells.back().MirrorSelfX( false/*bSwapDiag*/ );
} }
} }
for( nRow = 0; nRow < mxImpl->mnHeight; ++nRow ) for( nRow = 0; nRow < mxImpl->mnHeight; ++nRow )

View File

@ -66,7 +66,7 @@ void E3dView::ConvertMarkedToPolyObj()
if (!pNewObj) if (!pNewObj)
{ {
SdrView::ConvertMarkedToPolyObj(false/*bLineToArea*/); SdrView::ConvertMarkedToPolyObj();
} }
} }

View File

@ -1375,12 +1375,12 @@ sal_uInt16 DbGridControl::SetOptions(sal_uInt16 nOpt)
return m_nOptions; return m_nOptions;
} }
void DbGridControl::ForceHideScrollbars( bool _bForce ) void DbGridControl::ForceHideScrollbars()
{ {
if ( m_bHideScrollbars == _bForce ) if ( m_bHideScrollbars )
return; return;
m_bHideScrollbars = _bForce; m_bHideScrollbars = true;
if ( adjustModeForScrollbars( m_nMode, m_bNavigationBar, m_bHideScrollbars ) ) if ( adjustModeForScrollbars( m_nMode, m_bNavigationBar, m_bHideScrollbars ) )
SetMode( m_nMode ); SetMode( m_nMode );

View File

@ -1998,9 +1998,9 @@ void SdrEditView::ConvertMarkedToPathObj(bool bLineToArea)
ImpConvertTo(true, bLineToArea); ImpConvertTo(true, bLineToArea);
} }
void SdrEditView::ConvertMarkedToPolyObj(bool bLineToArea) void SdrEditView::ConvertMarkedToPolyObj()
{ {
ImpConvertTo(false, bLineToArea); ImpConvertTo(false, false/*bLineToArea*/);
} }

View File

@ -176,7 +176,7 @@ void SdrUndoGroup::SdrRepeat(SdrView& rView)
case SDRREPFUNC_OBJ_COMBINE_ONEPOLY : rView.CombineMarkedObjects(); break; case SDRREPFUNC_OBJ_COMBINE_ONEPOLY : rView.CombineMarkedObjects(); break;
case SDRREPFUNC_OBJ_DISMANTLE_POLYS : rView.DismantleMarkedObjects(); break; case SDRREPFUNC_OBJ_DISMANTLE_POLYS : rView.DismantleMarkedObjects(); break;
case SDRREPFUNC_OBJ_DISMANTLE_LINES : rView.DismantleMarkedObjects(true); break; case SDRREPFUNC_OBJ_DISMANTLE_LINES : rView.DismantleMarkedObjects(true); break;
case SDRREPFUNC_OBJ_CONVERTTOPOLY : rView.ConvertMarkedToPolyObj(false); break; case SDRREPFUNC_OBJ_CONVERTTOPOLY : rView.ConvertMarkedToPolyObj(); break;
case SDRREPFUNC_OBJ_CONVERTTOPATH : rView.ConvertMarkedToPathObj(false); break; case SDRREPFUNC_OBJ_CONVERTTOPATH : rView.ConvertMarkedToPathObj(false); break;
case SDRREPFUNC_OBJ_GROUP : rView.GroupMarked(); break; case SDRREPFUNC_OBJ_GROUP : rView.GroupMarked(); break;
case SDRREPFUNC_OBJ_UNGROUP : rView.UnGroupMarked(); break; case SDRREPFUNC_OBJ_UNGROUP : rView.UnGroupMarked(); break;

View File

@ -203,8 +203,7 @@ public:
// Invalidate state of whole tree. If an action is open, this call // Invalidate state of whole tree. If an action is open, this call
// is processed when the last action ends. // is processed when the last action ends.
void InvalidateStates( AccessibleStates _nStates, void InvalidateEditableStates( const SwFrame* _pFrame );
const SwFrame* _pFrame = nullptr );
void InvalidateRelationSet( const SwFrame* pMaster, const SwFrame* pFollow ); void InvalidateRelationSet( const SwFrame* pMaster, const SwFrame* pFollow );

View File

@ -153,7 +153,7 @@ class SwAuthorityField : public SwField
public: public:
/// For internal use only, in general continue using ExpandField() instead. /// For internal use only, in general continue using ExpandField() instead.
OUString ConditionalExpand(ToxAuthorityField eField) const; OUString ConditionalExpandAuthIdentifier() const;
//To handle Citation //To handle Citation
SW_DLLPUBLIC OUString ExpandCitation(ToxAuthorityField eField) const; SW_DLLPUBLIC OUString ExpandCitation(ToxAuthorityField eField) const;

View File

@ -450,7 +450,7 @@ public:
*/ */
bool HasShellFocus() const { return m_bHasFocus; } bool HasShellFocus() const { return m_bHasFocus; }
void ShellLoseFocus(); void ShellLoseFocus();
void ShellGetFocus( bool bUpdate = true ); void ShellGetFocus();
// Methods for displaying or hiding the visible text cursor. // Methods for displaying or hiding the visible text cursor.
void ShowCursor(); void ShowCursor();

View File

@ -380,7 +380,7 @@ public:
bool GetFlyFrameAttr( SfxItemSet &rSet ) const; bool GetFlyFrameAttr( SfxItemSet &rSet ) const;
bool SetFlyFrameAttr( SfxItemSet &rSet ); bool SetFlyFrameAttr( SfxItemSet &rSet );
static SfxItemSet makeItemSetFromFormatAnchor(SfxItemPool& rPool, const SwFormatAnchor &rAnchor); static SfxItemSet makeItemSetFromFormatAnchor(SfxItemPool& rPool, const SwFormatAnchor &rAnchor);
bool ResetFlyFrameAttr( sal_uInt16 nWhich, const SfxItemSet* pSet = nullptr ); bool ResetFlyFrameAttr( const SfxItemSet* pSet );
const SwFrameFormat *NewFlyFrame( const SfxItemSet &rSet, bool bAnchValid = false, const SwFrameFormat *NewFlyFrame( const SfxItemSet &rSet, bool bAnchValid = false,
SwFrameFormat *pParent = nullptr ); SwFrameFormat *pParent = nullptr );
void SetFlyPos( const Point &rAbsPos); void SetFlyPos( const Point &rAbsPos);

View File

@ -259,7 +259,7 @@ public:
// hide the Del-Redlines via Copy and Delete. // hide the Del-Redlines via Copy and Delete.
// Otherwise at Move the attribution would be handled incorrectly. // Otherwise at Move the attribution would be handled incorrectly.
// All other callers must always give 0. // All other callers must always give 0.
void CallDisplayFunc(sal_uInt16 nLoop, size_t nMyPos); void CallDisplayFunc(size_t nMyPos);
void Show(sal_uInt16 nLoop , size_t nMyPos); void Show(sal_uInt16 nLoop , size_t nMyPos);
void Hide(sal_uInt16 nLoop , size_t nMyPos); void Hide(sal_uInt16 nLoop , size_t nMyPos);
void ShowOriginal(sal_uInt16 nLoop, size_t nMyPos); void ShowOriginal(sal_uInt16 nLoop, size_t nMyPos);

View File

@ -526,8 +526,7 @@ struct SwReaderWriterEntry
namespace SwReaderWriter namespace SwReaderWriter
{ {
/// Return reader based on ReaderWriterEnum. SW_DLLPUBLIC Reader* GetRtfReader();
SW_DLLPUBLIC Reader* GetReader( ReaderWriterEnum eReader );
/// Return reader based on the name. /// Return reader based on the name.
Reader* GetReader( const OUString& rFltName ); Reader* GetReader( const OUString& rFltName );

View File

@ -167,12 +167,12 @@ public:
/** /**
* Like parseExport(), but for given mail merge document. * Like parseExport(), but for given mail merge document.
*/ */
xmlDocPtr parseMailMergeExport(int number, const OUString& rStreamName = OUString("word/document.xml")) xmlDocPtr parseMailMergeExport(const OUString& rStreamName)
{ {
if (mnCurOutputType != text::MailMergeType::FILE) if (mnCurOutputType != text::MailMergeType::FILE)
return nullptr; return nullptr;
OUString name = mailMergeOutputPrefix + OUString::number( number ) + ".odt"; OUString name = mailMergeOutputPrefix + OUString::number( 0 ) + ".odt";
return parseExportInternal( mailMergeOutputURL + "/" + name, rStreamName ); return parseExportInternal( mailMergeOutputURL + "/" + name, rStreamName );
} }
@ -315,7 +315,7 @@ DECLARE_FILE_MAILMERGE_TEST(testMissingDefaultLineColor, "missing-default-line-c
// And the default value is black (wasn't copied properly by mailmerge). // And the default value is black (wasn't copied properly by mailmerge).
CPPUNIT_ASSERT_EQUAL( COL_BLACK, lineColor ); CPPUNIT_ASSERT_EQUAL( COL_BLACK, lineColor );
// And check that the resulting file has the proper default. // And check that the resulting file has the proper default.
xmlDocPtr pXmlDoc = parseMailMergeExport( 0, "styles.xml" ); xmlDocPtr pXmlDoc = parseMailMergeExport( "styles.xml" );
CPPUNIT_ASSERT_EQUAL( OUString( "graphic" ), getXPath(pXmlDoc, "/office:document-styles/office:styles/style:default-style[1]", "family")); CPPUNIT_ASSERT_EQUAL( OUString( "graphic" ), getXPath(pXmlDoc, "/office:document-styles/office:styles/style:default-style[1]", "family"));
CPPUNIT_ASSERT_EQUAL( OUString( "#000000" ), getXPath(pXmlDoc, "/office:document-styles/office:styles/style:default-style[1]/style:graphic-properties", "stroke-color")); CPPUNIT_ASSERT_EQUAL( OUString( "#000000" ), getXPath(pXmlDoc, "/office:document-styles/office:styles/style:default-style[1]/style:graphic-properties", "stroke-color"));
} }

View File

@ -610,7 +610,7 @@ void SwUiWriterTest::testImportRTF()
OString aData = "{\\rtf1 Hello world!\\par}"; OString aData = "{\\rtf1 Hello world!\\par}";
SvMemoryStream aStream(const_cast<sal_Char*>(aData.getStr()), aData.getLength(), StreamMode::READ); SvMemoryStream aStream(const_cast<sal_Char*>(aData.getStr()), aData.getLength(), StreamMode::READ);
SwReader aReader(aStream, OUString(), OUString(), *pWrtShell->GetCursor()); SwReader aReader(aStream, OUString(), OUString(), *pWrtShell->GetCursor());
Reader* pRTFReader = SwReaderWriter::GetReader(READER_WRITER_RTF); Reader* pRTFReader = SwReaderWriter::GetRtfReader();
CPPUNIT_ASSERT(pRTFReader != nullptr); CPPUNIT_ASSERT(pRTFReader != nullptr);
CPPUNIT_ASSERT_EQUAL(sal_uLong(0), aReader.Read(*pRTFReader)); CPPUNIT_ASSERT_EQUAL(sal_uLong(0), aReader.Read(*pRTFReader));

View File

@ -2834,8 +2834,7 @@ void SwAccessibleMap::SetCursorContext(
mxCursorContext = xAcc; mxCursorContext = xAcc;
} }
void SwAccessibleMap::InvalidateStates( AccessibleStates _nStates, void SwAccessibleMap::InvalidateEditableStates( const SwFrame* _pFrame )
const SwFrame* _pFrame )
{ {
// Start with the frame or the first upper that is accessible // Start with the frame or the first upper that is accessible
SwAccessibleChild aFrameOrObj( _pFrame ); SwAccessibleChild aFrameOrObj( _pFrame );
@ -2852,13 +2851,13 @@ void SwAccessibleMap::InvalidateStates( AccessibleStates _nStates,
SwAccessibleEvent_Impl aEvent( SwAccessibleEvent_Impl::CARET_OR_STATES, SwAccessibleEvent_Impl aEvent( SwAccessibleEvent_Impl::CARET_OR_STATES,
pAccImpl, pAccImpl,
SwAccessibleChild(pAccImpl->GetFrame()), SwAccessibleChild(pAccImpl->GetFrame()),
_nStates ); AccessibleStates::EDITABLE );
AppendEvent( aEvent ); AppendEvent( aEvent );
} }
else else
{ {
FireEvents(); FireEvents();
pAccImpl->InvalidateStates( _nStates ); pAccImpl->InvalidateStates( AccessibleStates::EDITABLE );
} }
} }

View File

@ -2183,14 +2183,12 @@ void SwCursorShell::ShellLoseFocus()
m_bHasFocus = false; m_bHasFocus = false;
} }
void SwCursorShell::ShellGetFocus( bool bUpdate ) void SwCursorShell::ShellGetFocus()
{ {
m_bHasFocus = true; m_bHasFocus = true;
if( !m_bBasicHideCursor && VisArea().Width() ) if( !m_bBasicHideCursor && VisArea().Width() )
{ {
UpdateCursor( static_cast<sal_uInt16>( bUpdate ? UpdateCursor( static_cast<sal_uInt16>( SwCursorShell::CHKRANGE ) );
SwCursorShell::CHKRANGE|SwCursorShell::SCROLLWIN
: SwCursorShell::CHKRANGE ) );
ShowCursors( m_bSVCursorVis ); ShowCursors( m_bSVCursorVis );
} }
} }

View File

@ -297,7 +297,7 @@ bool SwRedlineTable::Insert( SwRangeRedline* p )
{ {
std::pair<vector_type::const_iterator, bool> rv = maVector.insert( p ); std::pair<vector_type::const_iterator, bool> rv = maVector.insert( p );
size_t nP = rv.first - begin(); size_t nP = rv.first - begin();
p->CallDisplayFunc(0, nP); p->CallDisplayFunc(nP);
return rv.second; return rv.second;
} }
return InsertWithValidRanges( p ); return InsertWithValidRanges( p );
@ -309,7 +309,7 @@ bool SwRedlineTable::Insert( SwRangeRedline* p, sal_uInt16& rP )
{ {
std::pair<vector_type::const_iterator, bool> rv = maVector.insert( p ); std::pair<vector_type::const_iterator, bool> rv = maVector.insert( p );
rP = rv.first - begin(); rP = rv.first - begin();
p->CallDisplayFunc(0, rP); p->CallDisplayFunc(rP);
return rv.second; return rv.second;
} }
return InsertWithValidRanges( p, &rP ); return InsertWithValidRanges( p, &rP );
@ -406,7 +406,7 @@ bool SwRedlineTable::InsertWithValidRanges( SwRangeRedline* p, sal_uInt16* pInsP
pNew->HasValidRange() && pNew->HasValidRange() &&
Insert( pNew, nInsPos ) ) Insert( pNew, nInsPos ) )
{ {
pNew->CallDisplayFunc(0, nInsPos); pNew->CallDisplayFunc(nInsPos);
bAnyIns = true; bAnyIns = true;
pNew = nullptr; pNew = nullptr;
if( pInsPos && *pInsPos < nInsPos ) if( pInsPos && *pInsPos < nInsPos )
@ -913,18 +913,18 @@ bool SwRangeRedline::HasValidRange() const
return false; return false;
} }
void SwRangeRedline::CallDisplayFunc(sal_uInt16 nLoop, size_t nMyPos) void SwRangeRedline::CallDisplayFunc(size_t nMyPos)
{ {
switch( nsRedlineMode_t::REDLINE_SHOW_MASK & GetDoc()->getIDocumentRedlineAccess().GetRedlineMode() ) switch( nsRedlineMode_t::REDLINE_SHOW_MASK & GetDoc()->getIDocumentRedlineAccess().GetRedlineMode() )
{ {
case nsRedlineMode_t::REDLINE_SHOW_INSERT | nsRedlineMode_t::REDLINE_SHOW_DELETE: case nsRedlineMode_t::REDLINE_SHOW_INSERT | nsRedlineMode_t::REDLINE_SHOW_DELETE:
Show(nLoop, nMyPos); Show(0, nMyPos);
break; break;
case nsRedlineMode_t::REDLINE_SHOW_INSERT: case nsRedlineMode_t::REDLINE_SHOW_INSERT:
Hide(nLoop, nMyPos); Hide(0, nMyPos);
break; break;
case nsRedlineMode_t::REDLINE_SHOW_DELETE: case nsRedlineMode_t::REDLINE_SHOW_DELETE:
ShowOriginal(nLoop, nMyPos); ShowOriginal(0, nMyPos);
break; break;
} }
} }

View File

@ -1246,7 +1246,7 @@ static void lcl_UpdateLinksInSect( SwBaseLink& rUpdLnk, SwSectionNode& rSectNd )
break; break;
case SotClipboardFormatId::RTF: case SotClipboardFormatId::RTF:
pRead = SwReaderWriter::GetReader( READER_WRITER_RTF ); pRead = SwReaderWriter::GetRtfReader();
break; break;
case SotClipboardFormatId::SIMPLE_FILE: case SotClipboardFormatId::SIMPLE_FILE:

View File

@ -515,14 +515,14 @@ SwAuthorityField::~SwAuthorityField()
OUString SwAuthorityField::Expand() const OUString SwAuthorityField::Expand() const
{ {
return ConditionalExpand(AUTH_FIELD_IDENTIFIER); return ConditionalExpandAuthIdentifier();
} }
OUString SwAuthorityField::ConditionalExpand(ToxAuthorityField eField) const OUString SwAuthorityField::ConditionalExpandAuthIdentifier() const
{ {
SwAuthorityFieldType* pAuthType = static_cast<SwAuthorityFieldType*>(GetTyp()); SwAuthorityFieldType* pAuthType = static_cast<SwAuthorityFieldType*>(GetTyp());
OUString sRet; OUString sRet;
if(pAuthType->GetPrefix() && eField != AUTH_FIELD_TITLE) if(pAuthType->GetPrefix())
sRet = OUString(pAuthType->GetPrefix()); sRet = OUString(pAuthType->GetPrefix());
if( pAuthType->IsSequence() ) if( pAuthType->IsSequence() )
@ -539,7 +539,7 @@ OUString SwAuthorityField::ConditionalExpand(ToxAuthorityField eField) const
if(pEntry) if(pEntry)
sRet += pEntry->GetAuthorField(AUTH_FIELD_IDENTIFIER); sRet += pEntry->GetAuthorField(AUTH_FIELD_IDENTIFIER);
} }
if(pAuthType->GetSuffix() && eField != AUTH_FIELD_TITLE) if(pAuthType->GetSuffix())
sRet += OUString(pAuthType->GetSuffix()); sRet += OUString(pAuthType->GetSuffix());
return sRet; return sRet;
} }

View File

@ -408,7 +408,7 @@ OUString SwField::ExpandField(bool const bCached) const
if (GetTypeId() == TYP_AUTHORITY) if (GetTypeId() == TYP_AUTHORITY)
{ {
const SwAuthorityField* pAuthorityField = static_cast<const SwAuthorityField*>(this); const SwAuthorityField* pAuthorityField = static_cast<const SwAuthorityField*>(this);
m_Cache = pAuthorityField->ConditionalExpand(AUTH_FIELD_IDENTIFIER); m_Cache = pAuthorityField->ConditionalExpandAuthIdentifier();
} }
else else
m_Cache = Expand(); m_Cache = Expand();

View File

@ -1112,41 +1112,35 @@ bool SwFEShell::SetDrawingAttr( SfxItemSet& rSet )
return bRet; return bRet;
} }
// Reset requested attributes or the ones contained in the set. // Reset attributes contained in the set.
bool SwFEShell::ResetFlyFrameAttr( sal_uInt16 nWhich, const SfxItemSet* pSet ) bool SwFEShell::ResetFlyFrameAttr( const SfxItemSet* pSet )
{ {
bool bRet = false; bool bRet = false;
if( RES_ANCHOR != nWhich && RES_CHAIN != nWhich && RES_CNTNT != nWhich ) SET_CURR_SHELL( this );
SwFlyFrame *pFly = GetSelectedOrCurrFlyFrame();
OSL_ENSURE( pFly, "SetFlyFrameAttr, no Fly selected." );
if( pFly )
{ {
SET_CURR_SHELL( this ); StartAllAction();
SwFlyFrame *pFly = GetSelectedOrCurrFlyFrame(); SfxItemIter aIter( *pSet );
OSL_ENSURE( pFly, "SetFlyFrameAttr, no Fly selected." ); const SfxPoolItem* pItem = aIter.FirstItem();
if( pFly ) while( pItem )
{ {
StartAllAction(); if( !IsInvalidItem( pItem ) )
if( pSet )
{ {
SfxItemIter aIter( *pSet ); sal_uInt16 nWhich = pItem->Which();
const SfxPoolItem* pItem = aIter.FirstItem(); if( RES_ANCHOR != nWhich && RES_CHAIN != nWhich && RES_CNTNT != nWhich )
while( pItem ) pFly->GetFormat()->ResetFormatAttr( nWhich );
{
if( !IsInvalidItem( pItem ) &&
RES_ANCHOR != ( nWhich = pItem->Which() ) &&
RES_CHAIN != nWhich && RES_CNTNT != nWhich )
pFly->GetFormat()->ResetFormatAttr( nWhich );
pItem = aIter.NextItem();
}
} }
else pItem = aIter.NextItem();
pFly->GetFormat()->ResetFormatAttr( nWhich );
bRet = true;
EndAllActionAndCall();
GetDoc()->getIDocumentState().SetModified();
} }
bRet = true;
EndAllActionAndCall();
GetDoc()->getIDocumentState().SetModified();
} }
return bRet; return bRet;
} }

View File

@ -278,7 +278,7 @@ FrameTypeFlags SwFEShell::GetFrameType( const Point *pPt, bool bStopAtFly ) cons
void SwFEShell::ShellGetFocus() void SwFEShell::ShellGetFocus()
{ {
::SetShell( this ); ::SetShell( this );
SwCursorShell::ShellGetFocus( false/*bUpdate*/ ); SwCursorShell::ShellGetFocus();
if ( HasDrawView() ) if ( HasDrawView() )
{ {

View File

@ -202,15 +202,13 @@ class SW_DLLPUBLIC SwFrame: public SwClient, public SfxBroadcaster
'All footnotes' is no longer treated. Instead each footnote is treated 'All footnotes' is no longer treated. Instead each footnote is treated
as an own environment. as an own environment.
@param _bInSameFootnote The found previous content frame has to be in the same footnote frame. This is only
input parameter - boolean indicating, that the found previous content
frame has to be in the same footnote frame. This parameter is only
relevant for flow frames in footnotes. relevant for flow frames in footnotes.
@return SwContentFrame* @return SwContentFrame*
pointer to the found previous content frame. It's NULL, if none exists. pointer to the found previous content frame. It's NULL, if none exists.
*/ */
SwContentFrame* _FindPrevCnt( const bool _bInSameFootnote = false ); SwContentFrame* _FindPrevCnt();
void _UpdateAttrFrame( const SfxPoolItem*, const SfxPoolItem*, sal_uInt8 & ); void _UpdateAttrFrame( const SfxPoolItem*, const SfxPoolItem*, sal_uInt8 & );
SwFrame* _GetIndNext(); SwFrame* _GetIndNext();

View File

@ -171,7 +171,7 @@ SwContentFrame* SwFrame::FindPrevCnt( )
if ( GetPrev() && GetPrev()->IsContentFrame() ) if ( GetPrev() && GetPrev()->IsContentFrame() )
return static_cast<SwContentFrame*>(GetPrev()); return static_cast<SwContentFrame*>(GetPrev());
else else
return _FindPrevCnt( true ); return _FindPrevCnt();
} }
const SwContentFrame* SwFrame::FindPrevCnt() const const SwContentFrame* SwFrame::FindPrevCnt() const
@ -179,7 +179,7 @@ const SwContentFrame* SwFrame::FindPrevCnt() const
if ( GetPrev() && GetPrev()->IsContentFrame() ) if ( GetPrev() && GetPrev()->IsContentFrame() )
return static_cast<const SwContentFrame*>(GetPrev()); return static_cast<const SwContentFrame*>(GetPrev());
else else
return const_cast<SwFrame*>(this)->_FindPrevCnt( true ); return const_cast<SwFrame*>(this)->_FindPrevCnt();
} }
SwContentFrame *SwFrame::FindNextCnt( const bool _bInSameFootnote ) SwContentFrame *SwFrame::FindNextCnt( const bool _bInSameFootnote )
@ -943,7 +943,7 @@ SwContentFrame *SwFrame::_FindNextCnt( const bool _bInSameFootnote )
OD 2005-11-30 #i27138# OD 2005-11-30 #i27138#
*/ */
SwContentFrame* SwFrame::_FindPrevCnt( const bool _bInSameFootnote ) SwContentFrame* SwFrame::_FindPrevCnt()
{ {
if ( !IsFlowFrame() ) if ( !IsFlowFrame() )
{ {
@ -1012,7 +1012,7 @@ SwContentFrame* SwFrame::_FindPrevCnt( const bool _bInSameFootnote )
{ {
const bool bInDocBody = pCurrContentFrame->IsInDocBody(); const bool bInDocBody = pCurrContentFrame->IsInDocBody();
const bool bInFootnote = pCurrContentFrame->IsInFootnote(); const bool bInFootnote = pCurrContentFrame->IsInFootnote();
if ( bInDocBody || ( bInFootnote && !_bInSameFootnote ) ) if ( bInDocBody )
{ {
// handling for environments 'footnotes' and 'document body frames': // handling for environments 'footnotes' and 'document body frames':
// Assure that found previous frame is also in one of these // Assure that found previous frame is also in one of these
@ -1027,7 +1027,7 @@ SwContentFrame* SwFrame::_FindPrevCnt( const bool _bInSameFootnote )
pPrevContentFrame = pPrevContentFrame->GetPrevContentFrame(); pPrevContentFrame = pPrevContentFrame->GetPrevContentFrame();
} }
} }
else if ( bInFootnote && _bInSameFootnote ) else if ( bInFootnote )
{ {
// handling for environments 'each footnote': // handling for environments 'each footnote':
// Assure that found next content frame belongs to the same footnotes // Assure that found next content frame belongs to the same footnotes

View File

@ -2238,7 +2238,7 @@ SwLayIdle::SwLayIdle( SwRootFrame *pRt, SwViewShellImp *pI ) :
// CursorShell and it doesn't paint the selection. // CursorShell and it doesn't paint the selection.
pCursorShell->ShellLoseFocus(); pCursorShell->ShellLoseFocus();
pCursorShell->UnlockPaint( true ); pCursorShell->UnlockPaint( true );
pCursorShell->ShellGetFocus( false ); pCursorShell->ShellGetFocus();
} }
else else
rSh.UnlockPaint( true ); rSh.UnlockPaint( true );

View File

@ -351,12 +351,12 @@ void SwViewShellImp::InvalidateAccessibleEditableState( bool bAllShells,
for(SwViewShell& rTmp : GetShell()->GetRingContainer()) for(SwViewShell& rTmp : GetShell()->GetRingContainer())
{ {
if( rTmp.Imp()->IsAccessible() ) if( rTmp.Imp()->IsAccessible() )
rTmp.Imp()->GetAccessibleMap().InvalidateStates( AccessibleStates::EDITABLE, pFrame ); rTmp.Imp()->GetAccessibleMap().InvalidateEditableStates( pFrame );
} }
} }
else if( IsAccessible() ) else if( IsAccessible() )
{ {
GetAccessibleMap().InvalidateStates( AccessibleStates::EDITABLE, pFrame ); GetAccessibleMap().InvalidateEditableStates( pFrame );
} }
} }

View File

@ -159,9 +159,9 @@ oslGenericFunction Filters::GetMswordLibSymbol( const char *pSymbol )
namespace SwReaderWriter { namespace SwReaderWriter {
Reader* GetReader( ReaderWriterEnum eReader ) Reader* GetRtfReader()
{ {
return aReaderWriter[eReader].GetReader(); return aReaderWriter[READER_WRITER_RTF].GetReader();
} }
void GetWriter( const OUString& rFltName, const OUString& rBaseURL, WriterRef& xRet ) void GetWriter( const OUString& rFltName, const OUString& rBaseURL, WriterRef& xRet )

View File

@ -1666,7 +1666,7 @@ bool SwTransferable::_PasteFileContent( TransferableDataHelper& rData,
{ {
pStream = &xStrm; pStream = &xStrm;
if( SotClipboardFormatId::RTF == nFormat ) if( SotClipboardFormatId::RTF == nFormat )
pRead = SwReaderWriter::GetReader( READER_WRITER_RTF ); pRead = SwReaderWriter::GetRtfReader();
else if( !pRead ) else if( !pRead )
{ {
pRead = ReadHTML; pRead = ReadHTML;

View File

@ -439,7 +439,7 @@ void SwDrawTextShell::ExecDraw(SfxRequest &rReq)
case FN_FORMAT_RESET: // delete hard text attributes case FN_FORMAT_RESET: // delete hard text attributes
{ {
pOLV->RemoveAttribsKeepLanguages( true ); pOLV->RemoveAttribsKeepLanguages( true );
pOLV->GetEditView().GetEditEngine()->RemoveFields(true); pOLV->GetEditView().GetEditEngine()->RemoveFields();
rReq.Done(); rReq.Done();
} }
break; break;

View File

@ -1580,7 +1580,7 @@ void SwWrtShell::AutoUpdateFrame( SwFrameFormat* pFormat, const SfxItemSet& rSty
{ {
StartAction(); StartAction();
ResetFlyFrameAttr( 0, &rStyleSet ); ResetFlyFrameAttr( &rStyleSet );
pFormat->SetFormatAttr( rStyleSet ); pFormat->SetFormatAttr( rStyleSet );
EndAction(); EndAction();

View File

@ -486,7 +486,7 @@ uno::Any SAL_CALL HierarchyContent::execute(
} }
// Remove own and all children's Additional Core Properties. // Remove own and all children's Additional Core Properties.
removeAdditionalPropertySet( true ); removeAdditionalPropertySet();
} }
else if ( aCommand.Name == "transfer" && isFolder() && !isReadOnly() ) else if ( aCommand.Name == "transfer" && isFolder() && !isReadOnly() )
{ {
@ -1826,7 +1826,7 @@ void HierarchyContent::transfer(
} }
// Remove own and all children's Additional Core Properties. // Remove own and all children's Additional Core Properties.
xSource->removeAdditionalPropertySet( true ); xSource->removeAdditionalPropertySet();
} }
} }

View File

@ -578,7 +578,7 @@ uno::Any SAL_CALL Content::execute(
} }
// Remove own and all children's Additional Core Properties. // Remove own and all children's Additional Core Properties.
removeAdditionalPropertySet( true ); removeAdditionalPropertySet();
} }
else if ( aCommand.Name == "transfer" ) else if ( aCommand.Name == "transfer" )
{ {
@ -2061,7 +2061,7 @@ void Content::transfer(
} }
// Remove own and all children's Additional Core Properties. // Remove own and all children's Additional Core Properties.
xSource->removeAdditionalPropertySet( true ); xSource->removeAdditionalPropertySet();
} }
} }

View File

@ -550,7 +550,7 @@ uno::Any SAL_CALL Content::execute(
} }
// Remove own and all children's Additional Core Properties. // Remove own and all children's Additional Core Properties.
removeAdditionalPropertySet( true ); removeAdditionalPropertySet();
} }
else if ( aCommand.Name == "transfer" ) else if ( aCommand.Name == "transfer" )
{ {
@ -2202,7 +2202,7 @@ void Content::transfer(
} }
// Remove own and all children's Additional Core Properties. // Remove own and all children's Additional Core Properties.
if ( !xSource->removeAdditionalPropertySet( true ) ) if ( !xSource->removeAdditionalPropertySet() )
{ {
uno::Any aProps uno::Any aProps
= uno::makeAny( = uno::makeAny(

View File

@ -546,7 +546,7 @@ uno::Any SAL_CALL Content::execute(
destroy( bDeletePhysical ); destroy( bDeletePhysical );
// Remove own and all children's Additional Core Properties. // Remove own and all children's Additional Core Properties.
removeAdditionalPropertySet( true ); removeAdditionalPropertySet();
} }
else if ( aCommand.Name == "transfer" && isFolder( Environment ) ) else if ( aCommand.Name == "transfer" && isFolder( Environment ) )
{ {

View File

@ -673,10 +673,10 @@ bool ContentImplHelper::copyAdditionalPropertySet(
rSourceKey, rTargetKey, bRecursive ); rSourceKey, rTargetKey, bRecursive );
} }
bool ContentImplHelper::removeAdditionalPropertySet( bool bRecursive ) bool ContentImplHelper::removeAdditionalPropertySet()
{ {
return m_xProvider->removeAdditionalPropertySet( return m_xProvider->removeAdditionalPropertySet(
m_xIdentifier->getContentIdentifier(), bRecursive ); m_xIdentifier->getContentIdentifier(), true/*bRecursive*/ );
} }
void ContentImplHelper::notifyPropertiesChange( void ContentImplHelper::notifyPropertiesChange(

View File

@ -227,10 +227,9 @@ void vcl::Cursor::ImplShow()
ImplDoShow( true/*bDrawDirect*/, false ); ImplDoShow( true/*bDrawDirect*/, false );
} }
void vcl::Cursor::ImplHide( bool i_bStopTimer ) void vcl::Cursor::ImplHide()
{ {
assert( i_bStopTimer ); ImplDoHide( false );
ImplDoHide( !i_bStopTimer );
} }
void vcl::Cursor::ImplResume( bool bRestore ) void vcl::Cursor::ImplResume( bool bRestore )
@ -325,7 +324,7 @@ void vcl::Cursor::Hide()
if ( mbVisible ) if ( mbVisible )
{ {
mbVisible = false; mbVisible = false;
ImplHide( true ); ImplHide();
} }
} }

Some files were not shown because too many files have changed in this diff Show More