summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-01-13 09:29:01 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-01-13 23:02:37 +0000
commit62188aac68b30affbe144f8bd06f346f0e749cf9 (patch)
tree48c044f1513ad0ba7aab76591bca860d243fba46 /sw
parent2ab24c8f11d20892532da8601ff76f22e0a05a5b (diff)
grotesque TextControlCombo can now go with widget layout
Change-Id: Iced5ea01d08101173ede4d5676bcbd95084e3ea7
Diffstat (limited to 'sw')
-rw-r--r--sw/Library_sw.mk1
-rw-r--r--sw/source/ui/inc/convert.hxx1
-rw-r--r--sw/source/ui/inc/instable.hxx1
-rw-r--r--sw/source/ui/inc/textcontrolcombo.hxx58
-rw-r--r--sw/source/ui/table/tablepg.hxx1
-rw-r--r--sw/source/ui/utlui/textcontrolcombo.cxx102
6 files changed, 0 insertions, 164 deletions
diff --git a/sw/Library_sw.mk b/sw/Library_sw.mk
index 47e55bef301c..e31e1192f678 100644
--- a/sw/Library_sw.mk
+++ b/sw/Library_sw.mk
@@ -692,7 +692,6 @@ $(eval $(call gb_Library_add_exception_objects,sw,\
sw/source/ui/utlui/numfmtlb \
sw/source/ui/utlui/prcntfld \
sw/source/ui/utlui/shdwcrsr \
- sw/source/ui/utlui/textcontrolcombo \
sw/source/ui/utlui/tmplctrl \
sw/source/ui/utlui/uiitems \
sw/source/ui/utlui/uitool \
diff --git a/sw/source/ui/inc/convert.hxx b/sw/source/ui/inc/convert.hxx
index d52a965f7d4d..aa53428b1967 100644
--- a/sw/source/ui/inc/convert.hxx
+++ b/sw/source/ui/inc/convert.hxx
@@ -23,7 +23,6 @@
#include <vcl/button.hxx>
#include <vcl/edit.hxx>
#include <sfx2/basedlgs.hxx>
-#include <textcontrolcombo.hxx>
class SwTableAutoFmt;
class SwView;
diff --git a/sw/source/ui/inc/instable.hxx b/sw/source/ui/inc/instable.hxx
index fe7283d85bb2..00a3155a074a 100644
--- a/sw/source/ui/inc/instable.hxx
+++ b/sw/source/ui/inc/instable.hxx
@@ -25,7 +25,6 @@
#include <vcl/layout.hxx>
#include <sfx2/basedlgs.hxx>
#include <actctrl.hxx>
-#include <textcontrolcombo.hxx>
class SwWrtShell;
class SwTableAutoFmt;
diff --git a/sw/source/ui/inc/textcontrolcombo.hxx b/sw/source/ui/inc/textcontrolcombo.hxx
deleted file mode 100644
index f608ab50d2f5..000000000000
--- a/sw/source/ui/inc/textcontrolcombo.hxx
+++ /dev/null
@@ -1,58 +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 _TEXTCONTROLCOMBO_HXX
-#define _TEXTCONTROLCOMBO_HXX
-
-#include <vcl/fixed.hxx>
-
-#include <vcl/field.hxx>
-#include "swdllapi.h"
-
-class SW_DLLPUBLIC TextControlCombo : public Window
-{
-protected:
-
- Control& mrCtrl;
- FixedText& mrFTbefore;
- FixedText& mrFTafter;
-
-public:
-
- using Window::Enable;
- using Window::Disable;
-
- TextControlCombo( Window* _pParent, const ResId& _rResId,
- Control& _rCtrl, FixedText& _rFTbefore, FixedText& _rFTafter );
- virtual ~TextControlCombo();
-
- void Arrange( FixedText& _rOrg, sal_Bool bShow = true );
-
- // identical to window functionality
- void Show( sal_Bool bVisible = sal_True, sal_uInt16 nFlags = 0 );
- void Hide( sal_uInt16 nFlags = 0 ) { Show( sal_False, nFlags ); }
-
- void Enable( sal_Bool bEnable = sal_True, sal_Bool bChild = sal_True );
- void Disable( sal_Bool bChild = sal_True ) { Enable( sal_False, bChild ); }
-};
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/table/tablepg.hxx b/sw/source/ui/table/tablepg.hxx
index 3515bce0cbcc..091754d52e04 100644
--- a/sw/source/ui/table/tablepg.hxx
+++ b/sw/source/ui/table/tablepg.hxx
@@ -25,7 +25,6 @@
#include <actctrl.hxx>
#include "prcntfld.hxx"
#include "swtypes.hxx"
-#include "textcontrolcombo.hxx"
class SwWrtShell;
class SwTableRep;
diff --git a/sw/source/ui/utlui/textcontrolcombo.cxx b/sw/source/ui/utlui/textcontrolcombo.cxx
deleted file mode 100644
index 860d0278c4e9..000000000000
--- a/sw/source/ui/utlui/textcontrolcombo.cxx
+++ /dev/null
@@ -1,102 +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 "textcontrolcombo.hxx"
-
-
-TextControlCombo::TextControlCombo( Window* _pParent, const ResId& _rResId,
- Control& _rCtrl, FixedText& _rFTbefore, FixedText& _rFTafter )
- :Window ( _pParent, _rResId )
- ,mrCtrl ( _rCtrl )
- ,mrFTbefore ( _rFTbefore )
- ,mrFTafter ( _rFTafter )
-{
-}
-
-TextControlCombo::~TextControlCombo()
-{
-}
-
-void TextControlCombo::Arrange( FixedText& _rFTcomplete, sal_Bool /*bShow*/ )
-{
- Point aBasePos( GetPosPixel() );
- Size aMetricVals( GetSizePixel() );
-
- long nTextHeight = _rFTcomplete.GetSizePixel().Height();
- long nCtrlHeight = mrCtrl.GetSizePixel().Height();
-
- // calc y positions / center vertical
- long nYFT = aBasePos.Y();
- long nYCtrl = nYFT;
- if( nCtrlHeight > nTextHeight )
- nYFT += aMetricVals.Height();
- else
- nYCtrl += aMetricVals.Height();
-
- // separate text parts
- const String aReplStr( RTL_CONSTASCII_USTRINGPARAM( "%POSITION_OF_CONTROL" ) );
- String aTxtBefore( _rFTcomplete.GetText() );
- String aTxtAfter;
- xub_StrLen nReplPos = aTxtBefore.Search( aReplStr );
- if( nReplPos != STRING_NOTFOUND )
- {
- xub_StrLen nStrStartAfter = nReplPos + aReplStr.Len();
- aTxtAfter = String( aTxtBefore, nStrStartAfter, aTxtBefore.Len() - nStrStartAfter );
- aTxtBefore.Erase( nReplPos );
- }
-
- // arrange and fill Fixed Texts
- long nX = aBasePos.X();
- long nWidth = GetTextWidth( aTxtBefore );
-
- mrFTbefore.SetText( aTxtBefore );
- mrFTbefore.setPosSizePixel( nX, nYFT, nWidth, nTextHeight );
-
- nX += nWidth;
- nX += aMetricVals.Width();
- mrCtrl.SetPosPixel( Point( nX, nYCtrl ) );
-
- nX += mrCtrl.GetSizePixel().Width();
- nX += aMetricVals.Width();
- mrFTafter.SetText( aTxtAfter );
- mrFTafter.setPosSizePixel( nX, nYFT, GetTextWidth( aTxtAfter ), nTextHeight );
-
- _rFTcomplete.Hide();
-
- Show();
-
- Window::Hide();
-}
-
-void TextControlCombo::Show( sal_Bool _bVisible, sal_uInt16 _nFlags )
-{
- mrCtrl.Show( _bVisible, _nFlags );
- mrFTbefore.Show( _bVisible, _nFlags );
- mrFTafter.Show( _bVisible, _nFlags );
-}
-
-void TextControlCombo::Enable( sal_Bool _bEnable, sal_Bool _bChild )
-{
- mrCtrl.Enable( _bEnable, _bChild );
- mrFTbefore.Enable( _bEnable, _bChild );
- mrFTafter.Enable( _bEnable, _bChild );
-}
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */