sc/Library_sc.mk | 1 sc/inc/sc.hrc | 2 sc/source/ui/condformat/condformatdlgentry.cxx | 2 sc/source/ui/formdlg/privsplt.cxx | 319 ------------------------- sc/source/ui/inc/condformatdlg.hrc | 1 sc/source/ui/inc/dwfunctr.hxx | 1 sc/source/ui/inc/privsplt.hxx | 67 ----- sc/source/ui/src/condformatdlg.src | 4 sc/source/ui/src/scstring.src | 5 9 files changed, 7 insertions(+), 395 deletions(-)
New commits: commit 7a0072474b08f045e5560db7335a4c03d104e40c Author: Caolán McNamara <[email protected]> Date: Mon Oct 24 13:35:10 2016 +0100 move STR_CONDITION resource around Change-Id: I154ba5fd03974a7c8426fdf71a2253bbbe59ad8c diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc index 0966da0..8cfc7f3 100644 --- a/sc/inc/sc.hrc +++ b/sc/inc/sc.hrc @@ -902,7 +902,7 @@ #define SCSTR_FORMULA_AUTOCORRECTION (STR_START + 214) #define SCSTR_RENAMEOBJECT (STR_START + 215) -//free slot +#define SCSTR_CONDITION (STR_START + 216) #define SCSTR_WARN_ME_IN_FUTURE_CHECK (STR_START + 217) // header of search result dialog diff --git a/sc/source/ui/condformat/condformatdlgentry.cxx b/sc/source/ui/condformat/condformatdlgentry.cxx index 68e25c8..32ba4ed 100644 --- a/sc/source/ui/condformat/condformatdlgentry.cxx +++ b/sc/source/ui/condformat/condformatdlgentry.cxx @@ -42,7 +42,7 @@ ScCondFrmtEntry::ScCondFrmtEntry(vcl::Window* pParent, ScDocument* pDoc, const S maFtCondNr( VclPtr<FixedText>::Create( this, ScResId( FT_COND_NR ) ) ), maFtCondition( VclPtr<FixedText>::Create( this, ScResId( FT_CONDITION ) ) ), mnIndex(0), - maStrCondition(ScResId( STR_CONDITION ).toString()), + maStrCondition(ScResId(SCSTR_CONDITION).toString()), maLbType( VclPtr<ListBox>::Create( this, ScResId( LB_TYPE ) ) ), mpDoc(pDoc), maPos(rPos) diff --git a/sc/source/ui/inc/condformatdlg.hrc b/sc/source/ui/inc/condformatdlg.hrc index af801f5..a35e9d6 100644 --- a/sc/source/ui/inc/condformatdlg.hrc +++ b/sc/source/ui/inc/condformatdlg.hrc @@ -27,7 +27,6 @@ #define WD_PREVIEW 26 #define BTN_OPTIONS 30 -#define STR_CONDITION 31 #define FT_RANGE 32 #define ED_RANGE 33 diff --git a/sc/source/ui/src/condformatdlg.src b/sc/source/ui/src/condformatdlg.src index cf6ae3e..ded2aa6 100644 --- a/sc/source/ui/src/condformatdlg.src +++ b/sc/source/ui/src/condformatdlg.src @@ -21,10 +21,6 @@ Control RID_COND_ENTRY Pos = MAP_APPFONT( 2, 2 ); Size = MAP_APPFONT( 50, 10 ); }; - String STR_CONDITION - { - Text [ en-US ] = "Condition "; - }; FixedText FT_CONDITION { diff --git a/sc/source/ui/src/scstring.src b/sc/source/ui/src/scstring.src index fab1ebd..70dc432 100644 --- a/sc/source/ui/src/scstring.src +++ b/sc/source/ui/src/scstring.src @@ -949,4 +949,9 @@ String SCSTR_UNDO_CELL_ANCHOR Text [ en-US ] = "Cell Anchor" ; }; +String SCSTR_CONDITION +{ + Text [ en-US ] = "Condition "; +}; + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ commit 420e215a975a4cb12b03d3487e98345782953b46 Author: Caolán McNamara <[email protected]> Date: Mon Oct 24 13:08:37 2016 +0100 drop now unused ScPrivatSplit Change-Id: I7e7eb4e1d5a4d9f7e419570844f2e06ae4cf999a diff --git a/sc/Library_sc.mk b/sc/Library_sc.mk index 27326ae..0aa859e 100644 --- a/sc/Library_sc.mk +++ b/sc/Library_sc.mk @@ -466,7 +466,6 @@ $(eval $(call gb_Library_add_exception_objects,sc,\ sc/source/ui/formdlg/dwfunctr \ sc/source/ui/formdlg/formdata \ sc/source/ui/formdlg/formula \ - sc/source/ui/formdlg/privsplt \ sc/source/ui/miscdlgs/acredlin \ sc/source/ui/miscdlgs/anyrefdg \ sc/source/ui/miscdlgs/autofmt \ diff --git a/sc/source/ui/formdlg/privsplt.cxx b/sc/source/ui/formdlg/privsplt.cxx deleted file mode 100644 index a59a32d..0000000 --- a/sc/source/ui/formdlg/privsplt.cxx +++ /dev/null @@ -1,319 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include "privsplt.hxx" -#include <vcl/settings.hxx> - -/************************************************************************* -#* Member: ScPrivatSplit -#*------------------------------------------------------------------------ -#* -#* Klasse: MD_Test -#* -#* Funktion: Konstruktor der Klasse ScPrivatSplit -#* -#* Input: --- -#* -#* Output: --- -#* -#************************************************************************/ - -ScPrivatSplit::ScPrivatSplit(vcl::Window* pParent, const ResId& rResId) - : Control(pParent, rResId) - , nDeltaY(0) -{ - Point aPos=GetPosPixel(); - nOldX=(short)aPos.X(); - nOldY=(short)aPos.Y(); - nNewX=(short)aPos.X(); - nNewY=(short)aPos.Y(); - aXMovingRange.Min()=nNewX; - aXMovingRange.Max()=nNewX; - aYMovingRange.Min()=nNewY; - aYMovingRange.Max()=nNewY; - - aWinPointer=GetPointer(); - - aWinPointer=Pointer(PointerStyle::VSplit); - SetPointer(aWinPointer); -} - -/************************************************************************* -#* Member: MouseButtonDown -#*------------------------------------------------------------------------ -#* -#* Klasse: ScPrivatSplit -#* -#* Funktion: Reagiert auf einen einzelnen Mouse-Event. Nach Aufruf -#* werden alle Mauseingaben an dieses Control weitergeleitet. -#* -#* Input: --- -#* -#* Output: --- -#* -#************************************************************************/ - -void ScPrivatSplit::MouseButtonDown( const MouseEvent& rMEvt ) -{ - Point aPos=LogicToPixel(rMEvt.GetPosPixel()); - - nOldX=(short)aPos.X(); - nOldY=(short)aPos.Y(); - - CaptureMouse(); -} - -/************************************************************************* -#* Member: MouseButtonUp -#*------------------------------------------------------------------------ -#* -#* Klasse: ScPrivatSplit -#* -#* Funktion: Ende einer Benutzeraktion mit der Maus. Es werden -#* die aktuelle Maus- Koordinaten ermittelt und fuer -#* die Verschiebung des Fensters verwendet. -#* -#* Input: --- -#* -#* Output: --- -#* -#************************************************************************/ - -void ScPrivatSplit::MouseButtonUp( const MouseEvent& rMEvt ) -{ - ReleaseMouse(); - - Point aPos=LogicToPixel(rMEvt.GetPosPixel()); - Point a2Pos=GetPosPixel(); - Point a3Pos=a2Pos; - - nNewY=(short)aPos.Y(); - nDeltaY=nNewY-nOldY; - a2Pos.Y()+=nDeltaY; - if(a2Pos.Y()<aYMovingRange.Min()) - { - nDeltaY=(short)(aYMovingRange.Min()-a3Pos.Y()); - a2Pos.Y()=aYMovingRange.Min(); - } - else if(a2Pos.Y()>aYMovingRange.Max()) - { - nDeltaY=(short)(aYMovingRange.Max()-a3Pos.Y()); - a2Pos.Y()=aYMovingRange.Max(); - } - - SetPosPixel(a2Pos); - Invalidate(); - Update(); - CtrModified(); -} - -/************************************************************************* -#* Member: MouseMove -#*------------------------------------------------------------------------ -#* -#* Klasse: ScPrivatSplit -#* -#* Funktion: Reagiert kontinuierlich auf Mausbewegungen. Es werden -#* die aktuelle Maus- Koordinaten ermittelt und fuer -#* die Verschiebung des Fensters verwendet. -#* -#* Input: --- -#* -#* Output: --- -#* -#************************************************************************/ - -void ScPrivatSplit::MouseMove( const MouseEvent& rMEvt ) -{ - Point aPos=LogicToPixel(rMEvt.GetPosPixel()); - Point a2Pos=GetPosPixel(); - Point a3Pos=a2Pos; - if(rMEvt.IsLeft()) - { - nNewY=(short)aPos.Y(); - nDeltaY=nNewY-nOldY; - a2Pos.Y()+=nDeltaY; - if(a2Pos.Y()<aYMovingRange.Min()) - { - nDeltaY=(short)(aYMovingRange.Min()-a3Pos.Y()); - a2Pos.Y()=aYMovingRange.Min(); - } - else if(a2Pos.Y()>aYMovingRange.Max()) - { - nDeltaY=(short)(aYMovingRange.Max()-a3Pos.Y()); - a2Pos.Y()=aYMovingRange.Max(); - } - - SetPosPixel(a2Pos); - - CtrModified(); - Invalidate(); - Update(); - } -} - -/************************************************************************* -#* Member: SetYRange -#*------------------------------------------------------------------------ -#* -#* Klasse: ScPrivatSplit -#* -#* Funktion: Setzt den Range fuer die Y- Verschiebung -#* -#* Input: neuer Bereich -#* -#* Output: --- -#* -#************************************************************************/ -void ScPrivatSplit::SetYRange(Range cRgeY) -{ - aYMovingRange=cRgeY; -} - -/************************************************************************* -#* Member: GetDeltaY -#*------------------------------------------------------------------------ -#* -#* Klasse: ScPrivatSplit -#* -#* Funktion: Liefert die relative y-Verschiebung zurueck -#* -#* Input: --- -#* -#* Output: --- -#* -#************************************************************************/ -short ScPrivatSplit::GetDeltaY() -{ - return nDeltaY; -} - -/************************************************************************* -#* Member: CtrModified -#*------------------------------------------------------------------------ -#* -#* Klasse: ScPrivatSplit -#* -#* Funktion: Teilt einem installierten Handler mit, dass -#* eine Veraenderung eingetreten ist. -#* -#* Input: --- -#* -#* Output: --- -#* -#************************************************************************/ -void ScPrivatSplit::CtrModified() -{ - aCtrModifiedLink.Call( *this ); -} - -void ScPrivatSplit::MoveSplitTo(Point aPos) -{ - Point a2Pos=GetPosPixel(); - nOldX=(short)a2Pos.X(); - nOldY=(short)a2Pos.Y(); - Point a3Pos=a2Pos; - - nNewY=(short)aPos.Y(); - nDeltaY=nNewY-nOldY; - a2Pos.Y()+=nDeltaY; - if(a2Pos.Y()<aYMovingRange.Min()) - { - nDeltaY=(short)(aYMovingRange.Min()-a3Pos.Y()); - a2Pos.Y()=aYMovingRange.Min(); - } - else if(a2Pos.Y()>aYMovingRange.Max()) - { - nDeltaY=(short)(aYMovingRange.Max()-a3Pos.Y()); - a2Pos.Y()=aYMovingRange.Max(); - } - - SetPosPixel(a2Pos); - Invalidate(); - Update(); - CtrModified(); -} - -void ScPrivatSplit::ImplInitSettings( bool bFont, bool bForeground, bool bBackground ) -{ - const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); - - if ( bFont ) - { - vcl::Font aFont = rStyleSettings.GetAppFont(); - if ( IsControlFont() ) - aFont.Merge( GetControlFont() ); - SetFont( aFont ); - } - - if ( bFont || bForeground ) - { - Color aTextColor = rStyleSettings.GetButtonTextColor(); - if ( IsControlForeground() ) - aTextColor = GetControlForeground(); - SetTextColor( aTextColor ); - } - - if ( bBackground ) - { - SetBackground( rStyleSettings.GetFaceColor()); - } - if ( IsBackground() ) - { - SetFillColor( GetBackground().GetColor() ); - SetBackground(); - } - Invalidate(); -} - -void ScPrivatSplit::StateChanged( StateChangedType nType ) -{ - if ( (nType == StateChangedType::Zoom) || - (nType == StateChangedType::ControlFont) ) - { - ImplInitSettings( true, false, false ); - Invalidate(); - } - if ( nType == StateChangedType::ControlForeground ) - { - ImplInitSettings( false, true, false ); - Invalidate(); - } - else if ( nType == StateChangedType::ControlBackground ) - { - ImplInitSettings( false, false, true ); - Invalidate(); - } - - Control::StateChanged( nType ); -} - -void ScPrivatSplit::DataChanged( const DataChangedEvent& rDCEvt ) -{ - if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && - (rDCEvt.GetFlags() & AllSettingsFlags::STYLE) ) - { - ImplInitSettings( true, true, true ); - Invalidate(); - } - else - Window::DataChanged( rDCEvt ); -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/inc/dwfunctr.hxx b/sc/source/ui/inc/dwfunctr.hxx index f9dcd86..f91a4b2 100644 --- a/sc/source/ui/inc/dwfunctr.hxx +++ b/sc/source/ui/inc/dwfunctr.hxx @@ -29,7 +29,6 @@ #include <svx/sidebar/PanelLayout.hxx> #include "anyrefdg.hxx" #include "global.hxx" -#include "privsplt.hxx" #include "funcdesc.hxx" class ScFunctionWin : public PanelLayout diff --git a/sc/source/ui/inc/privsplt.hxx b/sc/source/ui/inc/privsplt.hxx deleted file mode 100644 index 0b7211c..0000000 --- a/sc/source/ui/inc/privsplt.hxx +++ /dev/null @@ -1,67 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef INCLUDED_SC_SOURCE_UI_INC_PRIVSPLT_HXX -#define INCLUDED_SC_SOURCE_UI_INC_PRIVSPLT_HXX - -#include <vcl/ctrl.hxx> - -class ScPrivatSplit : public Control -{ -private: - - Link<ScPrivatSplit&,void> aCtrModifiedLink; - Pointer aWinPointer; - short nOldX; - short nOldY; - short nNewX; - short nNewY; - Range aXMovingRange; - Range aYMovingRange; - short nDeltaY; - - using Control::ImplInitSettings; - void ImplInitSettings( bool bFont, bool bForeground, bool bBackground ); - -protected: - virtual void MouseMove( const MouseEvent& rMEvt ) override; - virtual void MouseButtonDown( const MouseEvent& rMEvt ) override; - virtual void MouseButtonUp( const MouseEvent& rMEvt) override; - -public: - - ScPrivatSplit(vcl::Window* pWindow, const ResId& rResId); - - short GetDeltaY(); - - void CtrModified(); - - void SetYRange(Range cRgeY); - - void MoveSplitTo(Point aPos); - - virtual void StateChanged( StateChangedType nType ) override; - virtual void DataChanged( const DataChangedEvent& rDCEvt ) override; - - void SetCtrModifiedHdl( const Link<ScPrivatSplit&,void>& rLink ) { aCtrModifiedLink = rLink; } -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
_______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
