[Libreoffice-commits] .: Branch 'libreoffice-3-5' - desktop/source

2012-04-02 Thread Andras Timar
 desktop/source/deployment/gui/dp_gui_dialog2.cxx |3 ---
 1 file changed, 3 deletions(-)

New commits:
commit 330726cc715df115420b04b974f263a23651e75f
Author: David Tardon dtar...@redhat.com
Date:   Mon Apr 2 12:46:43 2012 +0200

fdo#47963 do not increase height of checkboxes

Especially as it is obvious the grow is unbounded .-)

Signed-off-by: Andras Timar ati...@suse.com

diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx 
b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index de324ef..58e06ed 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -1247,19 +1247,16 @@ void ExtMgrDialog::Resize()
 long nWidth = m_aBundledCbx.GetCtrlTextWidth( m_aBundledCbx.GetText() );
 Size aBCBSize(m_aBundledCbx.GetSizePixel());
 aBCBSize.Width() = nWidth + 30;
-aBCBSize.Height() += 3;
 m_aBundledCbx.SetSizePixel( aBCBSize );
 
 nWidth = m_aSharedCbx.GetCtrlTextWidth( m_aSharedCbx.GetText() );
 Size aSCBSize(m_aSharedCbx.GetSizePixel());
 aSCBSize.Width() = nWidth + 30;
-aSCBSize.Height() += 3;
 m_aSharedCbx.SetSizePixel( aSCBSize );
 
 nWidth = m_aUserCbx.GetCtrlTextWidth( m_aUserCbx.GetText() );
 Size aUCBSize(m_aUserCbx.GetSizePixel());
 aUCBSize.Width() = nWidth + 30;
-aUCBSize.Height() += 3;
 m_aUserCbx.SetSizePixel( aUCBSize );
 
 offsetX = 0.5*(aTotalSize.Width() - RSC_SP_DLG_INNERBORDER_LEFT - 
RSC_SP_DLG_INNERBORDER_RIGHT - 3*RSC_SP_CTRL_GROUP_X - aBCBSize.Width() - 
aSCBSize.Width() - aUCBSize.Width() );
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-5' - desktop/source

2012-02-14 Thread Andras Timar
 desktop/source/deployment/gui/dp_gui_dialog2.cxx |   34 ---
 1 file changed, 25 insertions(+), 9 deletions(-)

New commits:
commit ef95aa6facbefaa49a8c9b3b6bb2a88b0fb3df83
Author: Tomcsik Bence tomcsikbe...@gmail.com
Date:   Tue Feb 14 18:25:47 2012 +0100

fix layout of checkboxes on Extension Manager dialog fdo#45851

I changed the sizes and the positions of the checkboxes. So there won't be
truncated checkboxes in any languages.

Signed-off-by: Andras Timar ati...@suse.com

diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx 
b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index 7199aaf..de324ef 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -1244,16 +1244,32 @@ void ExtMgrDialog::Resize()
 
 // checkboxes + text type of extensions
 
-Size aCBSize(m_aBundledCbx.GetSizePixel());
-
-offsetX = 0.5*(aTotalSize.Width() - RSC_SP_DLG_INNERBORDER_LEFT - 
RSC_SP_DLG_INNERBORDER_RIGHT - 3*(aCBSize.Width() + RSC_SP_CTRL_GROUP_X) );
+long nWidth = m_aBundledCbx.GetCtrlTextWidth( m_aBundledCbx.GetText() );
+Size aBCBSize(m_aBundledCbx.GetSizePixel());
+aBCBSize.Width() = nWidth + 30;
+aBCBSize.Height() += 3;
+m_aBundledCbx.SetSizePixel( aBCBSize );
+
+nWidth = m_aSharedCbx.GetCtrlTextWidth( m_aSharedCbx.GetText() );
+Size aSCBSize(m_aSharedCbx.GetSizePixel());
+aSCBSize.Width() = nWidth + 30;
+aSCBSize.Height() += 3;
+m_aSharedCbx.SetSizePixel( aSCBSize );
+
+nWidth = m_aUserCbx.GetCtrlTextWidth( m_aUserCbx.GetText() );
+Size aUCBSize(m_aUserCbx.GetSizePixel());
+aUCBSize.Width() = nWidth + 30;
+aUCBSize.Height() += 3;
+m_aUserCbx.SetSizePixel( aUCBSize );
+
+offsetX = 0.5*(aTotalSize.Width() - RSC_SP_DLG_INNERBORDER_LEFT - 
RSC_SP_DLG_INNERBORDER_RIGHT - 3*RSC_SP_CTRL_GROUP_X - aBCBSize.Width() - 
aSCBSize.Width() - aUCBSize.Width() );
 
 aPos = Point(offsetX, aPos.Y() - RSC_CD_CHECKBOX_HEIGHT - 
2*RSC_SP_DLG_INNERBORDER_BOTTOM);
-m_aBundledCbx.SetPosSizePixel(aPos, aCBSize);
-aPos.X() = aPos.X() + aCBSize.Width() + 2 * RSC_SP_CTRL_GROUP_X;
-m_aSharedCbx.SetPosSizePixel(aPos, aCBSize);
-aPos.X() = aPos.X() + aCBSize.Width() + 2 * RSC_SP_CTRL_GROUP_X;
-m_aUserCbx.SetPosSizePixel(aPos, aCBSize);
+m_aBundledCbx.SetPosPixel( aPos );
+aPos.X() += aBCBSize.Width() + 3 * RSC_SP_CTRL_GROUP_X;
+m_aSharedCbx.SetPosPixel( aPos );
+aPos.X() += aSCBSize.Width() + 3 * RSC_SP_CTRL_GROUP_X;
+m_aUserCbx.SetPosPixel( aPos );
 
 Size aFTTypeOfExtSize(m_aTypeOfExtTxt.GetSizePixel());
 aPos = Point(RSC_SP_DLG_INNERBORDER_LEFT , aPos.Y() - 
RSC_CD_FIXEDTEXT_HEIGHT - 2*RSC_SP_DLG_INNERBORDER_BOTTOM);
@@ -1269,7 +1285,7 @@ void ExtMgrDialog::Resize()
 
 Size aSize( aTotalSize.Width() - RSC_SP_DLG_INNERBORDER_LEFT - 
RSC_SP_DLG_INNERBORDER_RIGHT,
 aTotalSize.Height() - aBtnSize.Height() - LINE_SIZE - 
aBtnSize.Height()
-- aCBSize.Height() - aFTTypeOfExtSize.Height()
+- aBCBSize.Height() - aFTTypeOfExtSize.Height()
 - RSC_SP_DLG_INNERBORDER_TOP - 5*RSC_SP_DLG_INNERBORDER_BOTTOM 
);
 
 m_pExtensionBox-SetSizePixel(aSize );
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-5' - desktop/source

2012-01-30 Thread Noel Power
 desktop/source/migration/migration.cxx |   62 +
 1 file changed, 40 insertions(+), 22 deletions(-)

New commits:
commit 305d20133c1418405418a6c698b48eb8114ade5b
Author: Petr Mladek pmla...@suse.cz
Date:   Fri Jan 27 18:07:03 2012 +0100

allow to migrate the shared registrymodifications.xcu

LO-3.3 and older wrote configuration into many files under
user/registry/data. LO-3.4 spped up startup by moving these
files into a single /user/registrymodifications.xcu.

officecfg/registry/data/org/openoffice/Setup.xcu defines what registry
nodes are migrated and what are excluded.

Finally, the old migration code detected the name of the .xcu file
by the first entry in IncludedNodes. This fix allows to search
the data in the single registrymodifications.xcu when available.

diff --git a/desktop/source/migration/migration.cxx 
b/desktop/source/migration/migration.cxx
index 7520eb8..d7f9765 100644
--- a/desktop/source/migration/migration.cxx
+++ b/desktop/source/migration/migration.cxx
@@ -773,33 +773,51 @@ void MigrationImpl::copyConfig() {
 }
 }
 }
+
+// check if the shared registrymodifications.xcu file exists
+bool bRegistryModificationsXcuExists = false;
+rtl::OUString regFilePath(m_aInfo.userdata);
+regFilePath += 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(/user/registrymodifications.xcu));
+File regFile(regFilePath);
+::osl::FileBase::RC nError = regFile.open(osl_File_OpenFlag_Read);
+if ( nError == ::osl::FileBase::E_None ) {
+bRegistryModificationsXcuExists = true;
+regFile.close();
+}
+
 for (Components::const_iterator i(comps.begin()); i != comps.end(); ++i) {
 if (!i-second.includedPaths.empty()) {
-rtl::OUStringBuffer buf(m_aInfo.userdata);
-buf.appendAscii(RTL_CONSTASCII_STRINGPARAM(/user/registry/data));
-sal_Int32 n = 0;
-do {
-rtl::OUString seg(i-first.getToken(0, '.', n));
-rtl::OUString enc(
-rtl::Uri::encode(
-seg, rtl_UriCharClassPchar, rtl_UriEncodeStrict,
-RTL_TEXTENCODING_UTF8));
-if (enc.getLength() == 0  seg.getLength() != 0) {
-OSL_TRACE(
-(configuration migration component %s ignored (cannot
-  be encoded as file path)),
-rtl::OUStringToOString(
-i-first, RTL_TEXTENCODING_UTF8).getStr());
-goto next;
-}
-buf.append(sal_Unicode('/'));
-buf.append(enc);
-} while (n = 0);
-buf.appendAscii(RTL_CONSTASCII_STRINGPARAM(.xcu));
+if (!bRegistryModificationsXcuExists) {
+// shared registrymodifications.xcu does not exists
+// the configuration is split in many registry files
+// determine the file names from the first element in included 
paths
+rtl::OUStringBuffer buf(m_aInfo.userdata);
+
buf.appendAscii(RTL_CONSTASCII_STRINGPARAM(/user/registry/data));
+sal_Int32 n = 0;
+do {
+rtl::OUString seg(i-first.getToken(0, '.', n));
+rtl::OUString enc(
+rtl::Uri::encode(
+seg, rtl_UriCharClassPchar, rtl_UriEncodeStrict,
+RTL_TEXTENCODING_UTF8));
+if (enc.getLength() == 0  seg.getLength() != 0) {
+OSL_TRACE(
+(configuration migration component %s ignored 
(cannot
+ be encoded as file path)),
+rtl::OUStringToOString(
+i-first, RTL_TEXTENCODING_UTF8).getStr());
+goto next;
+}
+buf.append(sal_Unicode('/'));
+buf.append(enc);
+} while (n = 0);
+buf.appendAscii(RTL_CONSTASCII_STRINGPARAM(.xcu));
+regFilePath = buf.toString();
+}
 configuration::Update::get(
 comphelper::getProcessComponentContext())-
 insertModificationXcuFile(
-buf.makeStringAndClear(), 
setToSeq(i-second.includedPaths),
+regFilePath, setToSeq(i-second.includedPaths),
 setToSeq(i-second.excludedPaths));
 } else {
 OSL_TRACE(
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-5' - desktop/source

2012-01-03 Thread Michael Stahl
 desktop/source/deployment/gui/dp_gui_dialog2.cxx |   60 +--
 1 file changed, 35 insertions(+), 25 deletions(-)

New commits:
commit 901d6ae378d45c1e3538e351754d85af4f1871c6
Author: Olivier Hallot olivier.hal...@alta.org.br
Date:   Thu Dec 29 15:59:29 2011 -0200

Fix for FDO#44280: Wrong position in Extension Mgr

This patch fixes fdo 44280

[GUI] wrong position of 'Adding extension...' at Extension Manager dialog
Added some comments to help in hacking
(cherry picked from commit fd982205e6fe6eb4333d22c3494931ab7f7b3faf)

diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx 
b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index 58e719a..7199aaf 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -1177,6 +1177,8 @@ void ExtMgrDialog::Resize()
 Size aUpdBtnSize( m_aUpdateBtn.GetSizePixel() );
 long offsetX;
 
+// last row of the box, lower 4 buttons
+
 Point aPos( RSC_SP_DLG_INNERBORDER_LEFT,
 aTotalSize.Height() - RSC_SP_DLG_INNERBORDER_BOTTOM - 
aBtnSize.Height() );
 
@@ -1191,42 +1193,25 @@ void ExtMgrDialog::Resize()
 aPos.X() -= ( RSC_SP_CTRL_GROUP_X + aBtnSize.Width() );
 m_aAddBtn.SetPosPixel( aPos );
 
+// horizontal line above lower buttons
+
 Size aDivSize( aTotalSize.Width(), LINE_SIZE );
 aPos = Point( 0, aPos.Y() - LINE_SIZE - RSC_SP_DLG_INNERBORDER_BOTTOM );
 m_aDivider.SetPosSizePixel( aPos, aDivSize );
 
+// text get more extensions
+
 Size aFTSize( m_aGetExtensions.CalcMinimumSize() );
-aPos = Point( RSC_SP_DLG_INNERBORDER_LEFT, aPos.Y() - 
RSC_CD_FIXEDTEXT_HEIGHT - 2*RSC_SP_DLG_INNERBORDER_BOTTOM );
+//aPos = Point( RSC_SP_DLG_INNERBORDER_LEFT, aPos.Y() - 
RSC_CD_FIXEDTEXT_HEIGHT - 2*RSC_SP_DLG_INNERBORDER_BOTTOM );
+aPos = Point( RSC_SP_DLG_INNERBORDER_LEFT, aPos.Y() - 
RSC_CD_PUSHBUTTON_HEIGHT - 2*RSC_SP_DLG_INNERBORDER_BOTTOM );
 
 m_aGetExtensions.SetPosSizePixel( aPos, aFTSize );
 
-Size aCBSize(m_aBundledCbx.GetSizePixel());
-
-offsetX = 0.5*(aTotalSize.Width() - RSC_SP_DLG_INNERBORDER_LEFT - 
RSC_SP_DLG_INNERBORDER_RIGHT - 3*(aCBSize.Width() + RSC_SP_CTRL_GROUP_X) );
-
-aPos = Point(offsetX, aPos.Y() - RSC_CD_CHECKBOX_HEIGHT - 
2*RSC_SP_DLG_INNERBORDER_BOTTOM);
-m_aBundledCbx.SetPosSizePixel(aPos, aCBSize);
-aPos.X() = aPos.X() + aCBSize.Width() + 2 * RSC_SP_CTRL_GROUP_X;
-m_aSharedCbx.SetPosSizePixel(aPos, aCBSize);
-aPos.X() = aPos.X() + aCBSize.Width() + 2 * RSC_SP_CTRL_GROUP_X;
-m_aUserCbx.SetPosSizePixel(aPos, aCBSize);
-
-Size aFTTypeOfExtSize(m_aTypeOfExtTxt.GetSizePixel());
-aPos = Point(RSC_SP_DLG_INNERBORDER_LEFT , aPos.Y() - 
RSC_CD_FIXEDTEXT_HEIGHT - 2*RSC_SP_DLG_INNERBORDER_BOTTOM);
-
-m_aTypeOfExtTxt.SetPosSizePixel(aPos, aFTTypeOfExtSize);
-
-aPos.X() = RSC_SP_DLG_INNERBORDER_LEFT + aFTTypeOfExtSize.Width();
-aPos.Y() = aPos.Y() + RSC_CD_FIXEDTEXT_HEIGHT;
-aDivSize.Width() = aTotalSize.Width() - aFTTypeOfExtSize.Width() - 
RSC_SP_DLG_INNERBORDER_LEFT - RSC_SP_DLG_INNERBORDER_RIGHT;
-m_aDivider2.SetPosSizePixel( aPos , aDivSize );
-
-
+// installation progress bar + cancel button , on the right of the text to get 
extensions
 
 aPos.X() = aTotalSize.Width() - RSC_SP_DLG_INNERBORDER_RIGHT - 
aBtnSize.Width();
 m_aCancelBtn.SetPosPixel( Point( aPos.X(), aPos.Y() - 
((aBtnSize.Height()-aFTSize.Height())/2) ) );
 
-
 // Calc progress height
 long nProgressHeight = aFTSize.Height();
 
@@ -1257,8 +1242,33 @@ void ExtMgrDialog::Resize()
 aPos.X() = aRect1.Right() + RSC_SP_DLG_INNERBORDER_LEFT;
 m_aProgressText.SetPosSizePixel( aPos, aFTSize );
 
+// checkboxes + text type of extensions
+
+Size aCBSize(m_aBundledCbx.GetSizePixel());
+
+offsetX = 0.5*(aTotalSize.Width() - RSC_SP_DLG_INNERBORDER_LEFT - 
RSC_SP_DLG_INNERBORDER_RIGHT - 3*(aCBSize.Width() + RSC_SP_CTRL_GROUP_X) );
+
+aPos = Point(offsetX, aPos.Y() - RSC_CD_CHECKBOX_HEIGHT - 
2*RSC_SP_DLG_INNERBORDER_BOTTOM);
+m_aBundledCbx.SetPosSizePixel(aPos, aCBSize);
+aPos.X() = aPos.X() + aCBSize.Width() + 2 * RSC_SP_CTRL_GROUP_X;
+m_aSharedCbx.SetPosSizePixel(aPos, aCBSize);
+aPos.X() = aPos.X() + aCBSize.Width() + 2 * RSC_SP_CTRL_GROUP_X;
+m_aUserCbx.SetPosSizePixel(aPos, aCBSize);
+
+Size aFTTypeOfExtSize(m_aTypeOfExtTxt.GetSizePixel());
+aPos = Point(RSC_SP_DLG_INNERBORDER_LEFT , aPos.Y() - 
RSC_CD_FIXEDTEXT_HEIGHT - 2*RSC_SP_DLG_INNERBORDER_BOTTOM);
+
+m_aTypeOfExtTxt.SetPosSizePixel(aPos, aFTTypeOfExtSize);
+
+aPos.X() = RSC_SP_DLG_INNERBORDER_LEFT + aFTTypeOfExtSize.Width();
+aPos.Y() = aPos.Y() + RSC_CD_FIXEDTEXT_HEIGHT;
+aDivSize.Width() = aTotalSize.Width() - aFTTypeOfExtSize.Width() - 
RSC_SP_DLG_INNERBORDER_LEFT - RSC_SP_DLG_INNERBORDER_RIGHT;
+m_aDivider2.SetPosSizePixel( aPos , aDivSize );
+
+// extension listbox
+
 Size aSize( aTotalSize.Width() - RSC_SP_DLG_INNERBORDER_LEFT