[Libreoffice-commits] .: Branch 'feature/cmclayouttrans' - vcl/source

2012-09-25 Thread Libreoffice Gerrit user
 vcl/source/window/layout.cxx |   12 ++--
 1 file changed, 10 insertions(+), 2 deletions(-)

New commits:
commit 8f30d9a19ad4a49be59b5da1fad0e9d7efcbed24
Author: Caolán McNamara caol...@redhat.com
Date:   Wed Sep 26 00:11:12 2012 +0100

fix getNonLayout[Real]Parent helpers

Change-Id: Idae11802aaeb3d9192cdf7fe8fae61788bbb9b5b

diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index 8666ef5..2fa259b 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -1074,15 +1074,23 @@ Size getLegacyBestSizeForChildren(const Window rWindow)
 
 Window* getNonLayoutParent(Window *pWindow)
 {
-while (pWindow  pWindow-GetType() == WINDOW_CONTAINER)
+while (pWindow)
+{
 pWindow = pWindow-GetParent();
+if (!pWindow || pWindow-GetType() != WINDOW_CONTAINER)
+break;
+}
 return pWindow;
 }
 
 Window* getNonLayoutRealParent(Window *pWindow)
 {
-while (pWindow  pWindow-GetType() == WINDOW_CONTAINER)
+while (pWindow)
+{
 pWindow = pWindow-ImplGetParent();
+if (!pWindow || pWindow-GetType() != WINDOW_CONTAINER)
+break;
+}
 return pWindow;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'feature/cmclayouttrans' - vcl/source

2012-09-19 Thread Libreoffice Gerrit user
 vcl/source/window/builder.cxx |   23 ++-
 1 file changed, 22 insertions(+), 1 deletion(-)

New commits:
commit 324f939c6f2a9222ae5b6d7bf5410868a4841077
Author: Caolán McNamara caol...@redhat.com
Date:   Wed Sep 19 10:14:00 2012 +0100

import inconsistent-state GtkCheckButtons as TriStateBoxs

Change-Id: If7fbe960bf5af31b51a7e454b8131c31b232a79b

diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 2d2405d..631b67e 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -214,6 +214,18 @@ namespace
 return bVertical;
 }
 
+bool extractInconsistent(VclBuilder::stringmap rMap)
+{
+bool bInconsistent = false;
+VclBuilder::stringmap::iterator aFind = 
rMap.find(rtl::OString(RTL_CONSTASCII_STRINGPARAM(inconsistent)));
+if (aFind != rMap.end())
+{
+bInconsistent = toBool(aFind-second);
+rMap.erase(aFind);
+}
+return bInconsistent;
+}
+
 Window * extractStockAndBuildButton(Window *pParent, VclBuilder::stringmap 
rMap)
 {
 WinBits nBits = WB_CENTER|WB_VCENTER|WB_3DLOOK;
@@ -436,7 +448,16 @@ Window *VclBuilder::makeObject(Window *pParent, const 
rtl::OString name, const
 pWindow = new RadioButton(pParent, WB_CENTER|WB_VCENTER|WB_3DLOOK);
 }
 else if (name.equalsL(RTL_CONSTASCII_STRINGPARAM(GtkCheckButton)))
-pWindow = new CheckBox(pParent, WB_CENTER|WB_VCENTER|WB_3DLOOK);
+{
+//maybe always import as TriStateBox and enable/disable tristate
+bool bIsTriState = extractInconsistent(rMap);
+CheckBox *pCheckBox = bIsTriState ?
+new TriStateBox(pParent, WB_CENTER|WB_VCENTER|WB_3DLOOK) :
+new CheckBox(pParent, WB_CENTER|WB_VCENTER|WB_3DLOOK);
+if (bIsTriState)
+pCheckBox-SetState(STATE_DONTKNOW);
+pWindow = pCheckBox;
+}
 else if (name.equalsL(RTL_CONSTASCII_STRINGPARAM(GtkSpinButton)))
 {
 extractAdjustment(id, rMap);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'feature/cmclayouttrans' - vcl/source

2012-09-18 Thread Libreoffice Gerrit user
 vcl/source/window/builder.cxx |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit 6080d42c9d26e560de8b724022b984906b91a2e6
Author: Caolán McNamara caol...@redhat.com
Date:   Tue Sep 18 09:42:28 2012 +0100

map GtkComboBoxText to ComboBox

Change-Id: Ib73ff4ba0fc6c7c977bda8582079fdb0194e12a9

diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 7125ca5..d463f48 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -472,6 +472,12 @@ Window *VclBuilder::makeObject(Window *pParent, const 
rtl::OString name, const
 pListBox-SetDropDownLineCount(16); //arbitrary
 pWindow = pListBox;
 }
+else if (name.equalsL(RTL_CONSTASCII_STRINGPARAM(GtkComboBoxText)))
+{
+extractModel(id, rMap);
+ComboBox* pComboBox = new ComboBox(pParent, 
WB_LEFT|WB_DROPDOWN|WB_VCENTER|WB_3DLOOK);
+pWindow = pComboBox;
+}
 else if (name.equalsL(RTL_CONSTASCII_STRINGPARAM(GtkTreeView)))
 {
 extractModel(id, rMap);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'feature/cmclayouttrans' - vcl/source

2012-09-18 Thread Libreoffice Gerrit user
 vcl/source/control/tabctrl.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9f380c2ddf9f7c75ee01174d6b3249fd1169fc53
Author: Caolán McNamara caol...@redhat.com
Date:   Tue Sep 18 13:32:31 2012 +0100

calculate ideal tab size not current one

Change-Id: Ia57366baafb7bb5ecdd8b7ab3d1f52b6438d165e

diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx
index 63081a4..9e6b66e 100644
--- a/vcl/source/control/tabctrl.cxx
+++ b/vcl/source/control/tabctrl.cxx
@@ -2217,7 +2217,7 @@ Size TabControl::calculateRequisition() const
 TabControl* pThis = const_castTabControl*(this);
 
 sal_uInt16 nPos = it - mpTabCtrlData-maItemList.begin();
-Rectangle aTabRect = pThis-ImplGetTabRect(nPos, aPageSize.Width(), 
aPageSize.Height());
+Rectangle aTabRect = pThis-ImplGetTabRect(nPos, LONG_MAX, LONG_MAX);
 if (aTabRect.Bottom()  nTabLabelsBottom)
 nTabLabelsBottom = aTabRect.Bottom();
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'feature/cmclayouttrans' - vcl/source

2012-09-17 Thread Libreoffice Gerrit user
 vcl/source/window/window2.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit b10eab30e1a6fcff8b6f1dbd3bede24d0c9c96f9
Author: Caolán McNamara caol...@redhat.com
Date:   Mon Sep 17 12:57:19 2012 +0100

implement setting Dialog title property

Change-Id: Ic3088f75c3aec57fa8b60a59f806f8396cdcf09c

diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index 73eff89..88e10bd 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -1958,6 +1958,8 @@ bool Window::set_property(const rtl::OString rKey, const 
rtl::OString rValue)
 {
 if (rKey.equalsL(RTL_CONSTASCII_STRINGPARAM(label)))
 SetText(rtl::OStringToOUString(rValue, RTL_TEXTENCODING_UTF8));
+else if (rKey.equalsL(RTL_CONSTASCII_STRINGPARAM(title)))
+SetText(rtl::OStringToOUString(rValue, RTL_TEXTENCODING_UTF8));
 else if (rKey.equalsL(RTL_CONSTASCII_STRINGPARAM(visible)))
 Show(toBool(rValue));
 else if (rKey.equalsL(RTL_CONSTASCII_STRINGPARAM(sensitive)))
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'feature/cmclayouttrans' - vcl/source

2012-09-10 Thread Libreoffice Gerrit user
 vcl/source/window/builder.cxx |8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 1364daae4a6fe079bf78cc08ee28a870b2faffb2
Author: Caolán McNamara caol...@redhat.com
Date:   Mon Sep 10 14:57:55 2012 +0100

add a route to toggle off spinners from spinboxes

Change-Id: I344b591b9d02e08717db1da89518f1a9654bd7a1

diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index e7ad8a4..55e10ad 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -447,15 +447,19 @@ Window *VclBuilder::makeObject(Window *pParent, const 
rtl::OString name, const
 
 FieldUnit eUnit = detectMetricUnit(sUnit);
 
+WinBits nBits = WB_RIGHT|WB_BORDER|WB_3DLOOK;
+if (!id.endsWith(-nospin))
+nBits |= WB_SPIN;
+
 if (sPattern.isEmpty())
 {
 fprintf(stderr, making numeric field for %s %s\n, name.getStr(), 
sUnit.getStr());
-pWindow = new NumericField(pParent, 
WB_RIGHT|WB_SPIN|WB_BORDER|WB_3DLOOK);
+pWindow = new NumericField(pParent, nBits);
 }
 else
 {
 fprintf(stderr, making metric field for %s %s\n, name.getStr(), 
sUnit.getStr());
-MetricField *pField = new MetricField(pParent, 
WB_RIGHT|WB_SPIN|WB_BORDER|WB_3DLOOK);
+MetricField *pField = new MetricField(pParent, nBits);
 pField-SetUnit(eUnit);
 pWindow = pField;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'feature/cmclayouttrans' - vcl/source

2012-09-10 Thread Libreoffice Gerrit user
 vcl/source/window/printdlg.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 77913325c27f5e3b8b6a3db8cfd52426815549d5
Author: Caolán McNamara caol...@redhat.com
Date:   Mon Sep 10 17:04:13 2012 +0100

hide custom tab page if unused, e.g. macro printing

Change-Id: Ie3cea0d1d0b7140d1456478a92ac0e72bf423ed3

diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index 245e9f9..d097d39 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -1155,6 +1155,9 @@ void PrintDialog::setupOptionalUI()
 maJobPage.mpCopySpacer-Show( sal_False );
 maJobPage.mpReverseOrderBox-Show( sal_False );
 }
+
+if (!mpCustomOptionsUIBuilder)
+mpTabCtrl-RemovePage(mpTabCtrl-GetPageId(1));
 }
 
 void PrintDialog::DataChanged( const DataChangedEvent i_rDCEvt )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'feature/cmclayouttrans' - vcl/source

2012-09-07 Thread Libreoffice Gerrit user
 vcl/source/window/layout.cxx |   13 +
 1 file changed, 5 insertions(+), 8 deletions(-)

New commits:
commit 53a8a323dfb785d35bb3a17d1ec92cda7ed8f10d
Author: Caolán McNamara caol...@redhat.com
Date:   Fri Sep 7 10:42:06 2012 +0100

we need to retain invisible children for the first grid pass

We will drop them frm the final grid, but for the first pass we need to know
about invisible spanning children

Change-Id: If3938a622a5f0609964bb5e72f8428c64cb09f79

diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index db51243..a474074 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -390,9 +390,6 @@ VclGrid::array_type VclGrid::assembleGrid() const
 for (Window* pChild = GetWindow(WINDOW_FIRSTCHILD); pChild;
 pChild = pChild-GetWindow(WINDOW_NEXT))
 {
-if (!pChild-IsVisible())
-continue;
-
 sal_Int32 nLeftAttach = pChild-get_grid_left_attach();
 sal_Int32 nWidth = pChild-get_grid_width();
 sal_Int32 nMaxXPos = nLeftAttach+nWidth-1;
@@ -449,9 +446,6 @@ VclGrid::array_type VclGrid::assembleGrid() const
 }
 }
 
-sal_Int32 nNonEmptyCols = std::count(aNonEmptyCols.begin(), 
aNonEmptyCols.end(), true);
-sal_Int32 nNonEmptyRows = std::count(aNonEmptyRows.begin(), 
aNonEmptyRows.end(), true);
-
 //reduce the spans of elements that span empty rows or columns
 for (sal_Int32 x = 0; x  nMaxX; ++x)
 {
@@ -459,13 +453,16 @@ VclGrid::array_type VclGrid::assembleGrid() const
 {
 ExtendedGridEntry rSpan = A[x][y];
 ExtendedGridEntry rEntry = A[rSpan.x][rSpan.y];
-if (!aNonEmptyCols[x])
+if (aNonEmptyCols[x] == false)
 --rEntry.nSpanWidth;
-if (!aNonEmptyRows[y])
+if (aNonEmptyRows[y] == false)
 --rEntry.nSpanHeight;
 }
 }
 
+sal_Int32 nNonEmptyCols = std::count(aNonEmptyCols.begin(), 
aNonEmptyCols.end(), true);
+sal_Int32 nNonEmptyRows = std::count(aNonEmptyRows.begin(), 
aNonEmptyRows.end(), true);
+
 //make new grid without empty rows and columns
 array_type B(boost::extents[nNonEmptyCols][nNonEmptyRows]);
 for (sal_Int32 x = 0, x2 = 0; x  nMaxX; ++x)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'feature/cmclayouttrans' - vcl/source

2012-09-05 Thread Libreoffice Gerrit user
 vcl/source/window/builder.cxx |   11 +--
 1 file changed, 9 insertions(+), 2 deletions(-)

New commits:
commit 9b1439436bb39042e771c491cc9eaa5d014f8d90
Author: Caolán McNamara caol...@redhat.com
Date:   Wed Sep 5 14:27:59 2012 +0100

want to be able to find tabpages by name

Change-Id: I4e08ded38a4d1d9d193d5d7731c7ac667c70048c

diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 7eb5d44..e7ad8a4 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -365,7 +365,8 @@ Window *VclBuilder::makeObject(Window *pParent, const 
rtl::OString name, const
 //ids and positive numbers for the handleTabChild
 //derived ids
 TabControl *pTabControl = static_castTabControl*(pParent);
-sal_uInt16 nNewPageId = -(pTabControl-GetPageCount()+1);
+sal_uInt16 nNewPageCount = pTabControl-GetPageCount()+1;
+sal_uInt16 nNewPageId = -nNewPageCount;
 pTabControl-InsertPage(nNewPageId, rtl::OUString());
 pTabControl-SetCurPageId(nNewPageId);
 
@@ -373,7 +374,13 @@ Window *VclBuilder::makeObject(Window *pParent, const 
rtl::OString name, const
 {
 TabPage* pPage = new TabPage(pTabControl);
 pPage-Show();
-m_aChildren.push_back(WinAndId(rtl::OString(), pPage));
+
+//Make up a name for it
+rtl::OString sTabPageId = get_by_window(pParent) +
+rtl::OString(-page) +
+rtl::OString::valueOf(static_castsal_Int32(nNewPageCount));
+m_aChildren.push_back(WinAndId(sTabPageId, pPage));
+pPage-SetHelpId(m_sHelpRoot + sTabPageId);
 
 //And give the page one container as a child to make it a layout 
enabled
 //tab page
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'feature/cmclayouttrans' - vcl/source

2012-08-31 Thread Libreoffice Gerrit user
 vcl/source/window/builder.cxx |   15 ++-
 1 file changed, 2 insertions(+), 13 deletions(-)

New commits:
commit 360b532ed5562c9831cb8d43852641c4a0f041c5
Author: Caolán McNamara caol...@redhat.com
Date:   Thu Aug 30 13:03:44 2012 +0100

drop autoshow of all widgets, and honour visibility flag

Change-Id: I752c8be2830441114b747a809eb1a331ac19472a

diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 50e6b94..d85966f 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -126,17 +126,6 @@ VclBuilder::VclBuilder(Window *pParent, rtl::OUString 
sUIDir, rtl::OUString sUIF
 
 //drop maps, etc. now
 delete m_pParserState;
-
-//auto-show (really necessary ?, maybe drop it when complete)
-for (std::vectorWinAndId::iterator aI = m_aChildren.begin(),
- aEnd = m_aChildren.end(); aI != aEnd; ++aI)
-{
-Window *pWindow = aI-m_pWindow;
-if (pWindow)
-{
-pWindow-Show();
-}
-}
 }
 
 VclBuilder::~VclBuilder()
@@ -375,11 +364,13 @@ Window *VclBuilder::makeObject(Window *pParent, const 
rtl::OString name, const
 if (!bIsPlaceHolder)
 {
 TabPage* pPage = new TabPage(pTabControl);
+pPage-Show();
 m_aChildren.push_back(WinAndId(rtl::OString(), pPage));
 
 //And give the page one container as a child to make it a layout 
enabled
 //tab page
 VclBin* pContainer = new VclBin(pPage);
+pContainer-Show();
 m_aChildren.push_back(WinAndId(rtl::OString(), pContainer));
 pParent = pContainer;
 
@@ -789,8 +780,6 @@ void VclBuilder::handleRow(xmlreader::XmlReader reader, 
const rtl::OString rID
 {
 int nLevel = 1;
 
-fprintf(stderr, handleRow for %s\n, rID.getStr());
-
 ListStore::row aRow;
 
 while(1)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'feature/cmclayouttrans' - vcl/source

2012-08-23 Thread Libreoffice Gerrit user
 vcl/source/window/builder.cxx |7 +++
 1 file changed, 7 insertions(+)

New commits:
commit c2c4ce8d78286aa5691de57d9e75cbbe389c3590
Author: Caolán McNamara caol...@redhat.com
Date:   Thu Aug 23 12:29:26 2012 +0100

map GtkSeparator to FixedLine

Change-Id: I89b4663d94af7a57d915ea4386d5354a8d66190c

diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 83ddfc8..ad792b9 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -452,6 +452,13 @@ Window *VclBuilder::makeObject(Window *pParent, const 
rtl::OString name, const
 pWindow = new FixedText(pParent, WB_CENTER|WB_VCENTER|WB_3DLOOK);
 else if (name.equalsL(RTL_CONSTASCII_STRINGPARAM(GtkImage)))
 pWindow = new FixedImage(pParent, WB_CENTER|WB_VCENTER|WB_3DLOOK);
+else if (name.equalsL(RTL_CONSTASCII_STRINGPARAM(GtkSeparator)))
+{
+if (extractOrientation(rMap))
+pWindow = new FixedLine(pParent, WB_VERT);
+else
+pWindow = new FixedLine(pParent, WB_HORZ);
+}
 else if (name.equalsL(RTL_CONSTASCII_STRINGPARAM(GtkEntry)))
 pWindow = new Edit(pParent, WB_LEFT|WB_VCENTER|WB_BORDER|WB_3DLOOK);
 else if (name.equalsL(RTL_CONSTASCII_STRINGPARAM(GtkNotebook)))
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'feature/cmclayouttrans' - vcl/source

2012-08-23 Thread Libreoffice Gerrit user
 vcl/source/window/builder.cxx |   12 
 1 file changed, 12 insertions(+)

New commits:
commit 35c4c62c178f1ed2d08267c0845b7c05a2590f35
Author: Caolán McNamara caol...@redhat.com
Date:   Thu Aug 23 12:40:01 2012 +0100

map gtk-media-next and gtk-media-previous stock items

Change-Id: Id5c973942108a95649d1cc23b21820c2b981aef9

diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index ad792b9..6f0c9af 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -257,6 +257,18 @@ namespace
 pWindow = new CancelButton(pParent, nBits);
 else if (sType.equalsL(RTL_CONSTASCII_STRINGPARAM(gtk-help)))
 pWindow = new HelpButton(pParent, nBits);
+else if 
(sType.equalsL(RTL_CONSTASCII_STRINGPARAM(gtk-media-next)))
+{
+PushButton *pBtn = new PushButton(pParent, nBits);
+pBtn-SetSymbol(SYMBOL_NEXT);
+pWindow = pBtn;
+}
+else if 
(sType.equalsL(RTL_CONSTASCII_STRINGPARAM(gtk-media-previous)))
+{
+PushButton *pBtn = new PushButton(pParent, nBits);
+pBtn-SetSymbol(SYMBOL_PREV);
+pWindow = pBtn;
+}
 else
 fprintf(stderr, unknown stock type %s\n, sType.getStr());
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'feature/cmclayouttrans' - vcl/source

2012-08-10 Thread Caolán McNamara
 vcl/source/window/window.cxx  |  310 -
 vcl/source/window/window2.cxx |  311 ++
 2 files changed, 311 insertions(+), 310 deletions(-)

New commits:
commit e1d839cf6ff963bb121882cd154c4df2f765a545
Author: Caolán McNamara caol...@redhat.com
Date:   Fri Aug 10 11:31:09 2012 +0100

move from window.cxx to window2.cxx to build under windows

svsys.h on windows includes stuff that undefines WB_LEFT etc, sigh

Change-Id: I01dea9f1f6a4cf335402b04185047eeb99b07f9a

diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 71ef16d..d969698 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -36,7 +36,6 @@
 #include unotools/confignode.hxx
 
 #include vcl/unohelp.hxx
-#include vcl/layout.hxx
 #include vcl/salgtype.hxx
 #include vcl/event.hxx
 #include vcl/help.hxx
@@ -9668,313 +9667,4 @@ Selection Window::GetSurroundingTextSelection() const
   return Selection( 0, 0 );
 }
 
-//When a widget wants to renegotiate size, get toplevel parent dialog and call
-//resize on it. Maybe better to just find direct parent and if its a container
-//chain it upwards one step at a time until a dialog is found.
-void Window::queue_resize()
-{
-Dialog *pParent = GetParentDialog();
-if (!pParent || pParent == this)
-return;
-if (pParent-isLayoutEnabled())
-pParent-Resize();
-}
-
-void Window::setChildAnyProperty(const rtl::OString rString, const Any 
rValue)
-{
-m_aWidgetProperties[rString] = rValue;
-}
-
-uno::Any Window::getWidgetAnyProperty(const rtl::OString rString) const
-{
-uno::Any aAny;
-ChildPropertyMap::const_iterator aI = m_aWidgetProperties.find(rString);
-if (aI != m_aWidgetProperties.end())
-aAny = aI-second;
-return aAny;
-}
-
-Size Window::get_preferred_size() const
-{
-Size aRet(mpWindowImpl-mnWidthRequest, mpWindowImpl-mnHeightRequest);
-if (aRet.Width() == -1 || aRet.Height() == -1)
-{
-Size aOptimal = GetOptimalSize(WINDOWSIZE_PREFERRED);
-if (aRet.Width() == -1)
-aRet.Width() = aOptimal.Width();
-if (aRet.Height() == -1)
-aRet.Height() = aOptimal.Height();
-}
-return aRet;
-}
-
-void Window::take_properties(Window rOther)
-{
-if (!mpWindowImpl)
-{
-ImplInitWindowData(WINDOW_WINDOW);
-ImplInit(rOther.GetParent(), rOther.GetStyle(), NULL);
-}
-
-WindowImpl *pWindowImpl = rOther.mpWindowImpl;
-if (!mpWindowImpl-mpRealParent)
-ImplInit(pWindowImpl-mpRealParent, rOther.GetStyle(), NULL);
-std::swap(mpWindowImpl-mpUserData, pWindowImpl-mpUserData);
-std::swap(mpWindowImpl-mpExtImpl, pWindowImpl-mpExtImpl);
-std::swap(mpWindowImpl-mpCursor, pWindowImpl-mpCursor);
-std::swap(mpWindowImpl-maPointer, pWindowImpl-maPointer);
-mpWindowImpl-maZoom = pWindowImpl-maZoom;
-mpWindowImpl-maText = pWindowImpl-maText;
-std::swap(mpWindowImpl-mpControlFont, pWindowImpl-mpControlFont);
-mpWindowImpl-maControlForeground = pWindowImpl-maControlForeground;
-mpWindowImpl-maControlBackground = pWindowImpl-maControlBackground;
-mpWindowImpl-mnLeftBorder = pWindowImpl-mnLeftBorder;
-mpWindowImpl-mnTopBorder = pWindowImpl-mnTopBorder;
-mpWindowImpl-mnRightBorder = pWindowImpl-mnRightBorder;
-mpWindowImpl-mnBottomBorder = pWindowImpl-mnBottomBorder;
-mpWindowImpl-mnWidthRequest = pWindowImpl-mnWidthRequest;
-mpWindowImpl-mnHeightRequest = pWindowImpl-mnHeightRequest;
-mpWindowImpl-mnX = pWindowImpl-mnX;
-mpWindowImpl-mnY = pWindowImpl-mnY;
-mpWindowImpl-mnAbsScreenX = pWindowImpl-mnAbsScreenX;
-mpWindowImpl-maPos = pWindowImpl-maPos;
-mpWindowImpl-maHelpId = pWindowImpl-maHelpId;
-mpWindowImpl-maUniqId = pWindowImpl-maUniqId;
-mpWindowImpl-maHelpText = pWindowImpl-maHelpText;
-mpWindowImpl-maQuickHelpText = pWindowImpl-maQuickHelpText;
-std::swap(mpWindowImpl-maInputContext, pWindowImpl-maInputContext);
-mpWindowImpl-mnStyle = pWindowImpl-mnStyle;
-mpWindowImpl-mnPrevStyle = pWindowImpl-mnPrevStyle;
-mpWindowImpl-mnExtendedStyle = pWindowImpl-mnExtendedStyle;
-mpWindowImpl-mnPrevExtendedStyle = pWindowImpl-mnPrevExtendedStyle;
-mpWindowImpl-mnType = pWindowImpl-mnType;
-mpWindowImpl-mnNativeBackground = pWindowImpl-mnNativeBackground;
-mpWindowImpl-mnWaitCount = pWindowImpl-mnWaitCount;
-mpWindowImpl-mnPaintFlags = pWindowImpl-mnPaintFlags;
-mpWindowImpl-mnGetFocusFlags = pWindowImpl-mnGetFocusFlags;
-mpWindowImpl-mnParentClipMode = pWindowImpl-mnParentClipMode;
-mpWindowImpl-mnActivateMode = pWindowImpl-mnActivateMode;
-mpWindowImpl-mnDlgCtrlFlags = pWindowImpl-mnDlgCtrlFlags;
-mpWindowImpl-mnLockCount = pWindowImpl-mnLockCount;
-mpWindowImpl-meAlwaysInputMode = pWindowImpl-meAlwaysInputMode;
-mpWindowImpl-mbFrame = pWindowImpl-mbFrame;
-mpWindowImpl-mbBorderWin =