[Libreoffice-commits] core.git: 2 commits - cui/AllLangResTarget_cui.mk cui/source cui/uiconfig cui/UI_cui.mk sw/uiconfig vcl/inc vcl/source
Caolán McNamara
caolanm at redhat.com
Tue Feb 19 02:49:01 PST 2013
cui/AllLangResTarget_cui.mk | 1
cui/UI_cui.mk | 1
cui/source/inc/helpid.hrc | 1
cui/source/options/optmemory.cxx | 93 +++----
cui/source/options/optmemory.hrc | 77 ------
cui/source/options/optmemory.hxx | 25 --
cui/source/options/optmemory.src | 202 -----------------
cui/uiconfig/ui/optmemorypage.ui | 424 ++++++++++++++++++++++++++++++++++++
sw/uiconfig/swriter/ui/libmemory.ui | 329 ---------------------------
vcl/inc/vcl/builder.hxx | 13 -
vcl/source/window/builder.cxx | 114 +++++++--
11 files changed, 571 insertions(+), 709 deletions(-)
New commits:
commit b23887e901706814e2c046d8ccd10549d6892554
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Feb 18 21:28:31 2013 +0000
move memory option page to cui and adapt code
Change-Id: I0660592f233d9f190d11337068f33f2c13ba9251
diff --git a/cui/AllLangResTarget_cui.mk b/cui/AllLangResTarget_cui.mk
index 1178e4e..6867afc 100644
--- a/cui/AllLangResTarget_cui.mk
+++ b/cui/AllLangResTarget_cui.mk
@@ -92,7 +92,6 @@ $(eval $(call gb_SrsTarget_add_files,cui/res,\
cui/source/options/optjava.src \
cui/source/options/optjsearch.src \
cui/source/options/optlingu.src \
- cui/source/options/optmemory.src \
cui/source/options/optpath.src \
cui/source/options/optsave.src \
cui/source/options/optupdt.src \
diff --git a/cui/UI_cui.mk b/cui/UI_cui.mk
index 5c781ca..dd8a1f3 100644
--- a/cui/UI_cui.mk
+++ b/cui/UI_cui.mk
@@ -37,6 +37,7 @@ $(eval $(call gb_UI_add_uifiles,cui,\
cui/uiconfig/ui/optappearancepage \
cui/uiconfig/ui/optfontspage \
cui/uiconfig/ui/optgeneralpage \
+ cui/uiconfig/ui/optmemorypage \
cui/uiconfig/ui/optpathspage \
cui/uiconfig/ui/optsecuritypage \
cui/uiconfig/ui/personalization_tab \
diff --git a/cui/source/inc/helpid.hrc b/cui/source/inc/helpid.hrc
index 85fa297..782605e 100644
--- a/cui/source/inc/helpid.hrc
+++ b/cui/source/inc/helpid.hrc
@@ -51,7 +51,6 @@
#define HID_OFA_FONT_SUBST_CLB "CUI_HID_OFA_FONT_SUBST_CLB"
#define HID_OFA_TP_VIEW "CUI_HID_OFA_TP_VIEW"
#define HID_OFA_TP_LANGUAGES "CUI_HID_OFA_TP_LANGUAGES"
-#define HID_OFA_TP_MEMORY "CUI_HID_OFA_TP_MEMORY"
#define HID_DBPATH_CTL_PATH "CUI_HID_DBPATH_CTL_PATH"
#define HID_DBPATH_HEADERBAR "CUI_HID_DBPATH_HEADERBAR"
#define HID_OFAPAGE_SMARTTAG_OPTIONS "CUI_HID_OFAPAGE_SMARTTAG_OPTIONS"
diff --git a/cui/source/options/optmemory.cxx b/cui/source/options/optmemory.cxx
index e5c43f7..506372f 100644
--- a/cui/source/options/optmemory.cxx
+++ b/cui/source/options/optmemory.cxx
@@ -52,7 +52,6 @@
#include <svx/xpool.hxx>
#include <svx/dlgutil.hxx>
#include "cuitabarea.hxx"
-#include "optmemory.hrc"
#include "optmemory.hxx"
#include <svx/ofaitem.hxx>
#include <cuires.hrc>
@@ -69,38 +68,38 @@ using namespace ::rtl;
using namespace ::sfx2;
-#define NF2BYTES 104857.6 // 2^20/10, used for aNfGraphicObjectCache-unit -> Byte
+#define NF2BYTES 104857.6 // 2^20/10, used for M_pNfGraphicObjectCache-unit -> Byte
#define BYTES2NF (1.0/NF2BYTES) // 10/2^20
sal_Int32 OfaMemoryOptionsPage::GetNfGraphicCacheVal() const
{
- return aNfGraphicCache.GetValue() << 20;
+ return m_pNfGraphicCache->GetValue() << 20;
}
inline void OfaMemoryOptionsPage::SetNfGraphicCacheVal( long nSizeInBytes )
{
- aNfGraphicCache.SetValue( nSizeInBytes >> 20 );
+ m_pNfGraphicCache->SetValue( nSizeInBytes >> 20 );
}
long OfaMemoryOptionsPage::GetNfGraphicObjectCacheVal( void ) const
{
- return long( ::rtl::math::round( double( aNfGraphicObjectCache.GetValue() ) * NF2BYTES ) );
+ return long( ::rtl::math::round( double( m_pNfGraphicObjectCache->GetValue() ) * NF2BYTES ) );
}
void OfaMemoryOptionsPage::SetNfGraphicObjectCacheVal( long nSizeInBytes )
{
- aNfGraphicObjectCache.SetValue( long( ::rtl::math::round( double( nSizeInBytes ) * BYTES2NF ) ) );
+ m_pNfGraphicObjectCache->SetValue( long( ::rtl::math::round( double( nSizeInBytes ) * BYTES2NF ) ) );
}
inline void OfaMemoryOptionsPage::SetNfGraphicObjectCacheMax( long nSizeInBytes )
{
- aNfGraphicObjectCache.SetMax( long( double( nSizeInBytes ) * BYTES2NF ) );
+ m_pNfGraphicObjectCache->SetMax( long( double( nSizeInBytes ) * BYTES2NF ) );
}
inline void OfaMemoryOptionsPage::SetNfGraphicObjectCacheLast( long nSizeInBytes )
{
- aNfGraphicObjectCache.SetLast( long( double( nSizeInBytes ) * BYTES2NF ) );
+ m_pNfGraphicObjectCache->SetLast( long( double( nSizeInBytes ) * BYTES2NF ) );
}
int OfaMemoryOptionsPage::DeactivatePage( SfxItemSet* _pSet )
@@ -112,46 +111,33 @@ int OfaMemoryOptionsPage::DeactivatePage( SfxItemSet* _pSet )
// -----------------------------------------------------------------------
-OfaMemoryOptionsPage::OfaMemoryOptionsPage(Window* pParent, const SfxItemSet& rSet ) :
-
- SfxTabPage( pParent, CUI_RES( OFA_TP_MEMORY ), rSet ),
-
- aUndoBox ( this, CUI_RES( GB_UNDO ) ),
- aUndoText ( this, CUI_RES( FT_UNDO ) ),
- aUndoEdit ( this, CUI_RES( ED_UNDO ) ),
- aGbGraphicCache ( this, CUI_RES( GB_GRAPHICCACHE ) ),
- aFtGraphicCache ( this, CUI_RES( FT_GRAPHICCACHE ) ),
- aNfGraphicCache ( this, CUI_RES( NF_GRAPHICCACHE ) ),
- aFtGraphicCacheUnit ( this, CUI_RES( FT_GRAPHICCACHE_UNIT ) ),
- aFtGraphicObjectCache ( this, CUI_RES( FT_GRAPHICOBJECTCACHE ) ),
- aNfGraphicObjectCache ( this, CUI_RES( NF_GRAPHICOBJECTCACHE ) ),
- aFtGraphicObjectCacheUnit(this, CUI_RES( FT_GRAPHICOBJECTCACHE_UNIT ) ),
- aFtGraphicObjectTime ( this, CUI_RES( FT_GRAPHICOBJECTTIME ) ),
- aTfGraphicObjectTime ( this, CUI_RES( TF_GRAPHICOBJECTTIME ) ),
- aFtGraphicObjectTimeUnit( this, CUI_RES( FT_GRAPHICOBJECTTIME_UNIT ) ),
-
- aGbOLECache ( this, CUI_RES( GB_OLECACHE ) ),
- aFtOLECache ( this, CUI_RES( FT_OLECACHE ) ),
- aNfOLECache ( this, CUI_RES( NF_OLECACHE ) ),
- aQuickLaunchFL ( this, CUI_RES( FL_QUICKLAUNCH ) ),
- aQuickLaunchCB ( this, CUI_RES( CB_QUICKLAUNCH ) )//,
+OfaMemoryOptionsPage::OfaMemoryOptionsPage(Window* pParent, const SfxItemSet& rSet)
+ : SfxTabPage(pParent, "OptMemoryPage", "cui/ui/optmemorypage.ui", rSet)
{
+ get(m_pUndoEdit, "undo");
+ get(m_pNfGraphicCache, "graphiccache");
+ get(m_pNfGraphicObjectCache, "objectcache");
+ get(m_pTfGraphicObjectTime,"objecttime");
+ get(m_pNfOLECache, "olecache");
+ get(m_pQuickStarterFrame, "quickstarter");
+
#if defined(UNX)
- aQuickLaunchCB.SetText( CUI_RES( STR_QUICKLAUNCH_UNX ) );
+ get(m_pQuickLaunchCB, "systray");
+#else
+ get(m_pQuickLaunchCB, "quicklaunch");
#endif
- FreeResource();
+ m_pQuickLaunchCB->Show();
- //quick launch only available in Win
+ //Only available in Win or if building the gtk systray
#if !defined(WNT) && !defined(ENABLE_GTK)
- aQuickLaunchFL.Hide();
- aQuickLaunchCB.Hide();
+ m_pQuickStarterFrame->Hide();
#endif
- aTfGraphicObjectTime.SetExtFormat( EXTTIMEF_24H_SHORT );
+ m_pTfGraphicObjectTime->SetExtFormat( EXTTIMEF_24H_SHORT );
SetExchangeSupport();
- aNfGraphicCache.SetModifyHdl( LINK( this, OfaMemoryOptionsPage, GraphicCacheConfigHdl ) );
+ m_pNfGraphicCache->SetModifyHdl( LINK( this, OfaMemoryOptionsPage, GraphicCacheConfigHdl ) );
}
// -----------------------------------------------------------------------
@@ -176,9 +162,9 @@ sal_Bool OfaMemoryOptionsPage::FillItemSet( SfxItemSet& rSet )
boost::shared_ptr< comphelper::ConfigurationChanges > batch(
comphelper::ConfigurationChanges::create());
- if ( aUndoEdit.GetText() != aUndoEdit.GetSavedValue() )
+ if ( m_pUndoEdit->GetText() != m_pUndoEdit->GetSavedValue() )
officecfg::Office::Common::Undo::Steps::set(
- aUndoEdit.GetValue(), batch);
+ m_pUndoEdit->GetValue(), batch);
// GraphicCache
sal_Int32 totalCacheSize = GetNfGraphicCacheVal();
@@ -188,7 +174,7 @@ sal_Bool OfaMemoryOptionsPage::FillItemSet( SfxItemSet& rSet )
officecfg::Office::Common::Cache::GraphicManager::ObjectCacheSize::set(
objectCacheSize, batch);
- const Time aTime( aTfGraphicObjectTime.GetTime() );
+ const Time aTime( m_pTfGraphicObjectTime->GetTime() );
sal_Int32 objectReleaseTime =
aTime.GetSec() + aTime.GetMin() * 60 + aTime.GetHour() * 3600;
officecfg::Office::Common::Cache::GraphicManager::ObjectReleaseTime::set(
@@ -204,15 +190,15 @@ sal_Bool OfaMemoryOptionsPage::FillItemSet( SfxItemSet& rSet )
// OLECache
officecfg::Office::Common::Cache::Writer::OLE_Objects::set(
- aNfOLECache.GetValue(), batch);
+ m_pNfOLECache->GetValue(), batch);
officecfg::Office::Common::Cache::DrawingEngine::OLE_Objects::set(
- aNfOLECache.GetValue(), batch);
+ m_pNfOLECache->GetValue(), batch);
batch->commit();
- if( aQuickLaunchCB.IsChecked() != aQuickLaunchCB.GetSavedValue())
+ if( m_pQuickLaunchCB->IsChecked() != m_pQuickLaunchCB->GetSavedValue())
{
- rSet.Put(SfxBoolItem(SID_ATTR_QUICKLAUNCHER, aQuickLaunchCB.IsChecked()));
+ rSet.Put(SfxBoolItem(SID_ATTR_QUICKLAUNCHER, m_pQuickLaunchCB->IsChecked()));
bModified = sal_True;
}
@@ -225,8 +211,8 @@ void OfaMemoryOptionsPage::Reset( const SfxItemSet& rSet )
{
const SfxPoolItem* pItem;
- aUndoEdit.SetValue(officecfg::Office::Common::Undo::Steps::get());
- aUndoEdit.SaveValue();
+ m_pUndoEdit->SetValue(officecfg::Office::Common::Undo::Steps::get());
+ m_pUndoEdit->SaveValue();
// GraphicCache
long n =
@@ -242,12 +228,12 @@ void OfaMemoryOptionsPage::Reset( const SfxItemSet& rSet )
officecfg::Office::Common::Cache::GraphicManager::ObjectReleaseTime::
get();
Time aTime( (sal_uInt16)( nTime / 3600 ), (sal_uInt16)( ( nTime % 3600 ) / 60 ), (sal_uInt16)( ( nTime % 3600 ) % 60 ) );
- aTfGraphicObjectTime.SetTime( aTime );
+ m_pTfGraphicObjectTime->SetTime( aTime );
- GraphicCacheConfigHdl( &aNfGraphicCache );
+ GraphicCacheConfigHdl(m_pNfGraphicCache);
// OLECache
- aNfOLECache.SetValue(
+ m_pNfOLECache->SetValue(
std::max(
officecfg::Office::Common::Cache::Writer::OLE_Objects::get(),
(officecfg::Office::Common::Cache::DrawingEngine::OLE_Objects::
@@ -255,15 +241,14 @@ void OfaMemoryOptionsPage::Reset( const SfxItemSet& rSet )
SfxItemState eState = rSet.GetItemState( SID_ATTR_QUICKLAUNCHER, sal_False, &pItem );
if ( SFX_ITEM_SET == eState )
- aQuickLaunchCB.Check( ( (SfxBoolItem*)pItem )->GetValue() );
+ m_pQuickLaunchCB->Check( ( (SfxBoolItem*)pItem )->GetValue() );
else if ( SFX_ITEM_DISABLED == eState )
{
// quickstart not installed
- aQuickLaunchFL.Hide();
- aQuickLaunchCB.Hide();
+ m_pQuickStarterFrame->Hide();
}
- aQuickLaunchCB.SaveValue();
+ m_pQuickLaunchCB->SaveValue();
}
// -----------------------------------------------------------------------
diff --git a/cui/source/options/optmemory.hrc b/cui/source/options/optmemory.hrc
deleted file mode 100644
index ed620e9..0000000
--- a/cui/source/options/optmemory.hrc
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * 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 _OFA_OPTMEMORY_HRC
-#define _OFA_OPTMEMORY_HRC
-
-#include <svtools/controldims.hrc>
-
-// defines for positions and sizes ---------------------------------------
-
-#define WHOLE_WIDTH 248
-
-#define COLSPACE RSC_SP_CTRL_DESC_X
-#define COL0 6
-#define COL1 (COL0+6)
-#define COL2 (COL1+140) // width text before control
-#define COL3 (COL2+COLSPACE)
-#define COL4 (COL3+30) // width control
-#define COL5 (COL4+COLSPACE)
-#define COL6 (WHOLE_WIDTH) // width text after control (unit)
-
-#define ROWSPACE RSC_SP_CTRL_DESC_Y
-#define ROW0 3
-#define ROW1 ( ROW0+RSC_CD_FIXEDLINE_HEIGHT+ROWSPACE )
-#define ROW2 ( ROW1+RSC_CD_TEXTBOX_HEIGHT+ROWSPACE )
-#define ROW3 ( ROW2+RSC_CD_FIXEDLINE_HEIGHT+ROWSPACE )
-#define ROW4 ( ROW3+RSC_CD_TEXTBOX_HEIGHT+ROWSPACE )
-#define ROW5 ( ROW4+RSC_CD_TEXTBOX_HEIGHT+ROWSPACE )
-#define ROW6 ( ROW5+RSC_CD_TEXTBOX_HEIGHT+ROWSPACE )
-#define ROW7 ( ROW6+RSC_CD_FIXEDLINE_HEIGHT+ROWSPACE )
-#define ROW8 ( ROW7+RSC_CD_TEXTBOX_HEIGHT+ROWSPACE )
-#define ROW9 ( ROW8+RSC_CD_FIXEDLINE_HEIGHT+ROWSPACE )
-
-#define DIFF(v1,v2) (v2-v1)
-#define OFFS_TEXTBOX_FIXEDTEXT(base) (base+(RSC_CD_TEXTBOX_HEIGHT-RSC_CD_FIXEDTEXT_HEIGHT)/2)
-
-#define WIDTH1 DIFF( COL1, COL2 )
-#define WIDTH2 DIFF( COL3, COL4 )
-#define WIDTH3 DIFF( COL5, COL6 )
-// tabpage memory --------------------------------------------------------
-
-#define GB_UNDO 10
-#define FT_UNDO 11
-#define ED_UNDO 12
-#define GB_GRAPHICCACHE 13
-#define FT_GRAPHICCACHE 14
-#define FT_GRAPHICCACHE_UNIT 15
-#define FT_GRAPHICOBJECTCACHE_UNIT 16
-#define FT_GRAPHICOBJECTTIME_UNIT 17
-#define NF_GRAPHICCACHE 18
-#define FT_GRAPHICOBJECTCACHE 19
-#define NF_GRAPHICOBJECTCACHE 20
-#define FT_GRAPHICOBJECTTIME 21
-#define TF_GRAPHICOBJECTTIME 22
-#define GB_OLECACHE 23
-#define FT_OLECACHE 24
-#define NF_OLECACHE 25
-#define FL_QUICKLAUNCH 26
-#define CB_QUICKLAUNCH 27
-#define STR_QUICKLAUNCH_UNX 28
-
-#endif // #ifndef _OFA_OPTMEMORY_HRC
-
diff --git a/cui/source/options/optmemory.hxx b/cui/source/options/optmemory.hxx
index 93feff9..a22c5ac 100644
--- a/cui/source/options/optmemory.hxx
+++ b/cui/source/options/optmemory.hxx
@@ -32,27 +32,16 @@ class OfaMemoryOptionsPage : public SfxTabPage
{
using SfxTabPage::DeactivatePage;
private:
- FixedLine aUndoBox;
- FixedText aUndoText;
- NumericField aUndoEdit;
+ NumericField* m_pUndoEdit;
- FixedLine aGbGraphicCache;
- FixedText aFtGraphicCache;
- NumericField aNfGraphicCache;
- FixedText aFtGraphicCacheUnit;
- FixedText aFtGraphicObjectCache;
- NumericField aNfGraphicObjectCache;
- FixedText aFtGraphicObjectCacheUnit;
- FixedText aFtGraphicObjectTime;
- TimeField aTfGraphicObjectTime;
- FixedText aFtGraphicObjectTimeUnit;
+ NumericField* m_pNfGraphicCache;
+ NumericField* m_pNfGraphicObjectCache;
+ TimeField* m_pTfGraphicObjectTime;
- FixedLine aGbOLECache;
- FixedText aFtOLECache;
- NumericField aNfOLECache;
+ NumericField* m_pNfOLECache;
- FixedLine aQuickLaunchFL;
- CheckBox aQuickLaunchCB;
+ VclContainer* m_pQuickStarterFrame;
+ CheckBox* m_pQuickLaunchCB;
DECL_LINK(GraphicCacheConfigHdl, void *);
diff --git a/cui/source/options/optmemory.src b/cui/source/options/optmemory.src
deleted file mode 100644
index 78f1281..0000000
--- a/cui/source/options/optmemory.src
+++ /dev/null
@@ -1,202 +0,0 @@
-/*
- * 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 <cuires.hrc>
-#include "optmemory.hrc"
-#include "helpid.hrc"
-
-TabPage OFA_TP_MEMORY
-{
- HelpID = HID_OFA_TP_MEMORY ;
- SVLook = TRUE ;
- Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ;
- Hide = TRUE ;
- FixedLine GB_UNDO
- {
- Pos = MAP_APPFONT( COL0, ROW0 );
- Size = MAP_APPFONT( WHOLE_WIDTH, RSC_CD_FIXEDLINE_HEIGHT );
- Text [ en-US ] = "Undo" ;
- };
- FixedText FT_UNDO
- {
- Pos = MAP_APPFONT( COL1, OFFS_TEXTBOX_FIXEDTEXT( ROW1 ) );
- Size = MAP_APPFONT( WIDTH1, RSC_CD_FIXEDTEXT_HEIGHT );
- Text [ en-US ] = "Number of steps";
- };
- NumericField ED_UNDO
- {
- HelpID = "cui:NumericField:OFA_TP_MEMORY:ED_UNDO";
- Border = TRUE ;
- Pos = MAP_APPFONT( COL3, ROW1 );
- Size = MAP_APPFONT( WIDTH2, RSC_CD_TEXTBOX_HEIGHT );
- TabStop = TRUE ;
- Left = TRUE ;
- Repeat = TRUE ;
- Spin = TRUE ;
- Minimum = 1 ;
- First = 1 ;
- Maximum = 1000 ;
- Value = 100 ;
- Last = 100 ;
- SpinSize = 1 ;
- MaxTextLength = 5;
- };
- FixedLine GB_GRAPHICCACHE
- {
- Pos = MAP_APPFONT( COL0, ROW2 );
- Size = MAP_APPFONT( WHOLE_WIDTH, RSC_CD_FIXEDLINE_HEIGHT );
- Text [ en-US ] = "Graphics cache";
- };
- FixedText FT_GRAPHICCACHE
- {
- Pos = MAP_APPFONT( COL1, OFFS_TEXTBOX_FIXEDTEXT( ROW3 ) );
- Size = MAP_APPFONT( WIDTH1, RSC_CD_FIXEDTEXT_HEIGHT );
- Text [ en-US ] = "Use for %PRODUCTNAME";
- };
- NumericField NF_GRAPHICCACHE
- {
- HelpID = "cui:NumericField:OFA_TP_MEMORY:NF_GRAPHICCACHE";
- Border = TRUE ;
- Pos = MAP_APPFONT( COL3, ROW3 );
- Size = MAP_APPFONT( WIDTH2, RSC_CD_TEXTBOX_HEIGHT );
- Minimum = 1;
- Maximum = 256;
- SpinSize = 1;
- Spin = TRUE ;
- Repeat = TRUE ;
- };
- FixedText FT_GRAPHICCACHE_UNIT
- {
- Pos = MAP_APPFONT( COL5, OFFS_TEXTBOX_FIXEDTEXT( ROW3 ) );
- Size = MAP_APPFONT( WIDTH3, RSC_CD_FIXEDTEXT_HEIGHT );
- Text [ en-US ] = "MB";
- };
- FixedText FT_GRAPHICOBJECTCACHE
- {
- Pos = MAP_APPFONT( COL1, OFFS_TEXTBOX_FIXEDTEXT( ROW4 ) );
- Size = MAP_APPFONT( WIDTH1, RSC_CD_FIXEDTEXT_HEIGHT );
- Text [ en-US ] = "Memory per object" ;
- };
- NumericField NF_GRAPHICOBJECTCACHE
- {
- HelpID = "cui:NumericField:OFA_TP_MEMORY:NF_GRAPHICOBJECTCACHE";
- Border = TRUE ;
- Pos = MAP_APPFONT( COL3, ROW4 );
- Size = MAP_APPFONT( WIDTH2, RSC_CD_TEXTBOX_HEIGHT );
- Minimum = 10;
- Maximum = 2560;
- SpinSize = 1;
- Spin = TRUE ;
- Repeat = TRUE ;
- DecimalDigits = 1;
- };
- FixedText FT_GRAPHICOBJECTCACHE_UNIT
- {
- Pos = MAP_APPFONT( COL5, OFFS_TEXTBOX_FIXEDTEXT( ROW4 ) );
- Size = MAP_APPFONT( WIDTH3, RSC_CD_FIXEDTEXT_HEIGHT );
- Text [ en-US ] = "MB";
- };
- FixedText FT_GRAPHICOBJECTTIME
- {
- Pos = MAP_APPFONT( COL1, OFFS_TEXTBOX_FIXEDTEXT( ROW5 ) );
- Size = MAP_APPFONT( WIDTH1, RSC_CD_FIXEDTEXT_HEIGHT );
- Text [ en-US ] = "Remove from memory after";
- };
- TimeField TF_GRAPHICOBJECTTIME
- {
- HelpID = "cui:TimeField:OFA_TP_MEMORY:TF_GRAPHICOBJECTTIME";
- Border = TRUE ;
- Pos = MAP_APPFONT( COL3, ROW5 );
- Size = MAP_APPFONT( WIDTH2, RSC_CD_TEXTBOX_HEIGHT );
- TabStop = TRUE ;
- Repeat = TRUE ;
- Spin = TRUE ;
- Value = Time
- {
- Minute = 10;
- };
- Minimum = Time
- {
- Minute = 1;
- };
- Maximum = Time
- {
- Hour = 23 ;
- Minute = 59 ;
- };
- First = Time
- {
- Minute = 10;
- };
- Last = Time
- {
- Hour = 23 ;
- Minute = 59 ;
- };
- Format = TIMEF_NONE ;
- Duration = TRUE ;
- StrictFormat = TRUE ;
- };
- FixedText FT_GRAPHICOBJECTTIME_UNIT
- {
- Pos = MAP_APPFONT( COL5, OFFS_TEXTBOX_FIXEDTEXT( ROW5 ) );
- Size = MAP_APPFONT( WIDTH3, RSC_CD_FIXEDTEXT_HEIGHT );
- Text [ en-US ] = "hh:mm";
- };
- FixedLine GB_OLECACHE
- {
- Pos = MAP_APPFONT( COL0, ROW6 );
- Size = MAP_APPFONT( WHOLE_WIDTH, RSC_CD_FIXEDLINE_HEIGHT );
- Text [ en-US ] = "Cache for inserted objects";
- };
- FixedText FT_OLECACHE
- {
- Pos = MAP_APPFONT( COL1, OFFS_TEXTBOX_FIXEDTEXT( ROW7 ) );
- Size = MAP_APPFONT( WIDTH1, RSC_CD_FIXEDTEXT_HEIGHT );
- Text [ en-US ] = "Number of objects";
- };
- NumericField NF_OLECACHE
- {
- HelpID = "cui:NumericField:OFA_TP_MEMORY:NF_OLECACHE";
- Border = TRUE ;
- Pos = MAP_APPFONT( COL3, ROW7 );
- Size = MAP_APPFONT( WIDTH2, RSC_CD_TEXTBOX_HEIGHT );
- Minimum = 1;
- Maximum = 1024;
- Spin = TRUE ;
- Repeat = TRUE ;
- };
- FixedLine FL_QUICKLAUNCH
- {
- Pos = MAP_APPFONT( COL0, ROW8 );
- Size = MAP_APPFONT( WHOLE_WIDTH, RSC_CD_FIXEDLINE_HEIGHT );
- Text [ en-US ] = "%PRODUCTNAME Quickstarter";
- };
- CheckBox CB_QUICKLAUNCH
- {
- HelpID = "cui:CheckBox:OFA_TP_MEMORY:CB_QUICKLAUNCH";
- Pos = MAP_APPFONT( COL1, ROW9 );
- Size = MAP_APPFONT( WHOLE_WIDTH - COL1, RSC_CD_CHECKBOX_HEIGHT );
- Text [ en-US ] = "Load %PRODUCTNAME during system start-up";
- };
- String STR_QUICKLAUNCH_UNX
- {
- Text[ en-US ] = "Enable systray Quickstarter";
- };
-};
-
diff --git a/cui/uiconfig/ui/optmemorypage.ui b/cui/uiconfig/ui/optmemorypage.ui
new file mode 100644
index 0000000..e3be9b6
--- /dev/null
+++ b/cui/uiconfig/ui/optmemorypage.ui
@@ -0,0 +1,424 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkAdjustment" id="adjustment1">
+ <property name="lower">1</property>
+ <property name="upper">1000</property>
+ <property name="value">100</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkAdjustment" id="adjustment2">
+ <property name="lower">1</property>
+ <property name="upper">256</property>
+ <property name="value">1</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkAdjustment" id="adjustment3">
+ <property name="lower">1</property>
+ <property name="upper">1024</property>
+ <property name="value">1</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkAdjustment" id="adjustment4">
+ <property name="lower">1</property>
+ <property name="upper">1439</property>
+ <property name="value">10</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkBox" id="OptMemoryPage">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkFrame" id="frame1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="top_padding">6</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkGrid" id="grid1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="column_spacing">12</property>
+ <child>
+ <object class="GtkLabel" id="label5">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Number of steps</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">undo</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="undo">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">â¢</property>
+ <property name="adjustment">adjustment1</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Undo</property>
+ <attributes>
+ <attribute name="weight" value="semibold"/>
+ </attributes>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="frame2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="top_padding">6</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkGrid" id="grid2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">12</property>
+ <child>
+ <object class="GtkLabel" id="label6">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Use for LibreOffice</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">graphiccache</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label7">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Memory per object</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">objectcache</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label8">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Remove _from memory after</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">objecttime:hh:mm</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">2</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label9">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">MB</property>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label10">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">MB</property>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="graphiccache">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">â¢</property>
+ <property name="adjustment">adjustment2</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="objectcache">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">â¢</property>
+ <property name="adjustment">adjustment2</property>
+ <property name="digits">1</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="objecttime:hh:mm">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">â¢</property>
+ <property name="adjustment">adjustment4</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">2</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label12">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">hh:mm</property>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Graphics cache</property>
+ <attributes>
+ <attribute name="weight" value="semibold"/>
+ </attributes>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="frame3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="top_padding">6</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkGrid" id="grid3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="column_spacing">12</property>
+ <child>
+ <object class="GtkSpinButton" id="olecache">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">â¢</property>
+ <property name="adjustment">adjustment3</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label11">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Number of objects </property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">olecache</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Cache for inserted objects</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="quickstarter">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="top_padding">6</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkGrid" id="grid4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkCheckButton" id="quicklaunch">
+ <property name="label" translatable="yes">Load %PRODUCTNAME during system start-up</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="no_show_all">True</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="systray">
+ <property name="label" translatable="yes">Enable systray Quickstarter</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="no_show_all">True</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">%PRODUCTNAME Quickstarter</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ </object>
+ <object class="GtkSizeGroup" id="sizegroup1">
+ <widgets>
+ <widget name="label5"/>
+ <widget name="label6"/>
+ <widget name="label7"/>
+ <widget name="label8"/>
+ <widget name="label11"/>
+ </widgets>
+ </object>
+</interface>
diff --git a/sw/uiconfig/swriter/ui/libmemory.ui b/sw/uiconfig/swriter/ui/libmemory.ui
deleted file mode 100644
index 83dfe7c..0000000
--- a/sw/uiconfig/swriter/ui/libmemory.ui
+++ /dev/null
@@ -1,329 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<interface>
- <!-- interface-requires gtk+ 3.0 -->
- <object class="GtkBox" id="box1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <property name="spacing">12</property>
- <child>
- <object class="GtkFrame" id="frame1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
- <child>
- <object class="GtkAlignment" id="alignment1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="left_padding">12</property>
- <child>
- <object class="GtkGrid" id="grid1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="column_spacing">24</property>
- <child>
- <object class="GtkLabel" id="label5">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">~Number of steps</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkSpinButton" id="spinbutton1">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="invisible_char">â¢</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="label1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Undo</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkFrame" id="frame2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
- <child>
- <object class="GtkAlignment" id="alignment2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="left_padding">12</property>
- <child>
- <object class="GtkGrid" id="grid2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="column_spacing">24</property>
- <child>
- <object class="GtkLabel" id="label6">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.50999999046325684</property>
- <property name="label" translatable="yes">~Use for LibreOffice</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label7">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">~Memory per object</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label8">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Remove ~from memory after</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">2</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label9">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">MB</property>
- </object>
- <packing>
- <property name="left_attach">2</property>
- <property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label10">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">MB</property>
- </object>
- <packing>
- <property name="left_attach">2</property>
- <property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkAccelLabel" id="accellabel1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">hh:mm</property>
- </object>
- <packing>
- <property name="left_attach">2</property>
- <property name="top_attach">2</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkSpinButton" id="spinbutton2">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="invisible_char">â¢</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkSpinButton" id="spinbutton3">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="invisible_char">â¢</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkSpinButton" id="spinbutton4">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="invisible_char">â¢</property>
- <property name="digits">2</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">2</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="label2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Graphics cache</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkFrame" id="frame3">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
- <child>
- <object class="GtkAlignment" id="alignment3">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="left_padding">12</property>
- <child>
- <object class="GtkGrid" id="grid3">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="column_spacing">24</property>
- <child>
- <object class="GtkSpinButton" id="spinbutton5">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="invisible_char">â¢</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label11">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Number of objects </property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="label3">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Cache for inserted objects</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkFrame" id="frame4">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
- <child>
- <object class="GtkAlignment" id="alignment4">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="left_padding">12</property>
- <child>
- <object class="GtkCheckButton" id="checkbutton1">
- <property name="label" translatable="yes">Enable systray Quickstarter</property>
- <property name="use_action_appearance">False</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
- <property name="xalign">0</property>
- <property name="draw_indicator">True</property>
- </object>
- </child>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="label4">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">LibreOffice Quickstarter</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">3</property>
- </packing>
- </child>
- </object>
-</interface>
commit 7cf8320c5db2355da1983ef8cd2fd6737338d33b
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Feb 18 21:59:21 2013 +0000
add a mechanism to load TimeFields from .ui files
Change-Id: I7704f46d262888639a17c5219e784559db91b847
diff --git a/vcl/inc/vcl/builder.hxx b/vcl/inc/vcl/builder.hxx
index 220e5b1..41178ed 100644
--- a/vcl/inc/vcl/builder.hxx
+++ b/vcl/inc/vcl/builder.hxx
@@ -23,6 +23,7 @@ class ListBox;
class NumericFormatter;
class PopupMenu;
class ScrollBar;
+class TimeField;
class VclMultiLineEdit;
class VCL_DLLPUBLIC VclBuilder
@@ -127,8 +128,9 @@ private:
typedef stringmap Adjustment;
const Adjustment *get_adjustment_by_name(OString sID) const;
- static void mungeSpinAdjustment(NumericFormatter &rTarget, const Adjustment &rAdjustment);
- static void mungeScrollAdjustment(ScrollBar &rTarget, const Adjustment &rAdjustment);
+ static void mungeAdjustment(NumericFormatter &rTarget, const Adjustment &rAdjustment);
+ static void mungeAdjustment(TimeField &rTarget, const Adjustment &rAdjustment);
+ static void mungeAdjustment(ScrollBar &rTarget, const Adjustment &rAdjustment);
typedef std::map<OString, OString> WidgetTranslations;
typedef std::map<OString, WidgetTranslations> Translations;
@@ -165,7 +167,8 @@ private:
std::vector<TextBufferMap> m_aTextBufferMaps;
std::map<OString, TextBuffer> m_aTextBuffers;
- std::vector<WidgetAdjustmentMap> m_aSpinAdjustmentMaps;
+ std::vector<WidgetAdjustmentMap> m_aNumericFormatterAdjustmentMaps;
+ std::vector<WidgetAdjustmentMap> m_aTimeFormatterAdjustmentMaps;
std::vector<WidgetAdjustmentMap> m_aScrollAdjustmentMaps;
std::map<OString, Adjustment> m_aAdjustments;
@@ -258,10 +261,12 @@ private:
Window *makeObject(Window *pParent, const OString &rClass, const OString &rID,
stringmap &rVec, const std::vector<OString> &rItems);
+ void connectNumericFormatterAdjustment(const OString &id, const OString &rAdjustment);
+ void connectTimeFormatterAdjustment(const OString &id, const OString &rAdjustment);
+
bool extractGroup(const OString &id, stringmap &rVec);
bool extractModel(const OString &id, stringmap &rVec);
bool extractBuffer(const OString &id, stringmap &rVec);
- bool extractSpinAdjustment(const OString &id, stringmap &rVec);
bool extractScrollAdjustment(const OString &id, stringmap &rVec);
bool extractButtonImage(const OString &id, stringmap &rMap, bool bRadio);
bool extractStock(const OString &id, stringmap &rMap);
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 13251a4..9b3da1b 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -236,14 +236,24 @@ VclBuilder::VclBuilder(Window *pParent, OUString sUIDir, OUString sUIFile, OStri
}
//Set SpinButton adjustments when everything has been imported
- for (std::vector<WidgetAdjustmentMap>::iterator aI = m_pParserState->m_aSpinAdjustmentMaps.begin(),
- aEnd = m_pParserState->m_aSpinAdjustmentMaps.end(); aI != aEnd; ++aI)
+ for (std::vector<WidgetAdjustmentMap>::iterator aI = m_pParserState->m_aNumericFormatterAdjustmentMaps.begin(),
+ aEnd = m_pParserState->m_aNumericFormatterAdjustmentMaps.end(); aI != aEnd; ++aI)
{
NumericFormatter *pTarget = dynamic_cast<NumericFormatter*>(get<Window>(aI->m_sID));
const Adjustment *pAdjustment = get_adjustment_by_name(aI->m_sValue);
SAL_WARN_IF(!pTarget || !pAdjustment, "vcl", "missing elements of spinbutton/adjustment");
if (pTarget && pAdjustment)
- mungeSpinAdjustment(*pTarget, *pAdjustment);
+ mungeAdjustment(*pTarget, *pAdjustment);
+ }
+
+ for (std::vector<WidgetAdjustmentMap>::iterator aI = m_pParserState->m_aTimeFormatterAdjustmentMaps.begin(),
+ aEnd = m_pParserState->m_aTimeFormatterAdjustmentMaps.end(); aI != aEnd; ++aI)
+ {
+ TimeField *pTarget = dynamic_cast<TimeField*>(get<Window>(aI->m_sID));
+ const Adjustment *pAdjustment = get_adjustment_by_name(aI->m_sValue);
+ SAL_WARN_IF(!pTarget || !pAdjustment, "vcl", "missing elements of spinbutton/adjustment");
+ if (pTarget && pAdjustment)
+ mungeAdjustment(*pTarget, *pAdjustment);
}
//Set ScrollBar adjustments when everything has been imported
@@ -254,7 +264,7 @@ VclBuilder::VclBuilder(Window *pParent, OUString sUIDir, OUString sUIFile, OStri
const Adjustment *pAdjustment = get_adjustment_by_name(aI->m_sValue);
SAL_WARN_IF(!pTarget || !pAdjustment, "vcl", "missing elements of scrollbar/adjustment");
if (pTarget && pAdjustment)
- mungeScrollAdjustment(*pTarget, *pAdjustment);
+ mungeAdjustment(*pTarget, *pAdjustment);
}
//Set size-groups when all widgets have been imported
@@ -663,6 +673,8 @@ namespace
else if (sUnit == "%")
eUnit = FUNIT_PERCENT;
+ assert(eUnit != FUNIT_NONE); //unknown unit
+
return eUnit;
}
@@ -691,19 +703,19 @@ bool VclBuilder::extractGroup(const OString &id, stringmap &rMap)
return false;
}
-bool VclBuilder::extractSpinAdjustment(const OString &id, stringmap &rMap)
+void VclBuilder::connectNumericFormatterAdjustment(const OString &id, const OString &rAdjustment)
{
- VclBuilder::stringmap::iterator aFind = rMap.find(OString("adjustment"));
- if (aFind != rMap.end())
- {
- m_pParserState->m_aSpinAdjustmentMaps.push_back(WidgetAdjustmentMap(id, aFind->second));
- rMap.erase(aFind);
- return true;
- }
- return false;
+ if (!rAdjustment.isEmpty())
+ m_pParserState->m_aNumericFormatterAdjustmentMaps.push_back(WidgetAdjustmentMap(id, rAdjustment));
+}
+
+void VclBuilder::connectTimeFormatterAdjustment(const OString &id, const OString &rAdjustment)
+{
+ if (!rAdjustment.isEmpty())
+ m_pParserState->m_aTimeFormatterAdjustmentMaps.push_back(WidgetAdjustmentMap(id, rAdjustment));
}
-bool VclBuilder::extractScrollAdjustment(const OString &id, stringmap &rMap)
+bool VclBuilder::extractScrollAdjustment(const OString &id, VclBuilder::stringmap &rMap)
{
VclBuilder::stringmap::iterator aFind = rMap.find(OString("adjustment"));
if (aFind != rMap.end())
@@ -741,6 +753,18 @@ namespace
return bSelectable;
}
+ OString extractAdjustment(VclBuilder::stringmap &rMap)
+ {
+ OString sAdjustment;
+ VclBuilder::stringmap::iterator aFind = rMap.find(OString("adjustment"));
+ if (aFind != rMap.end())
+ {
+ sAdjustment= aFind->second;
+ rMap.erase(aFind);
+ return sAdjustment;
+ }
+ return sAdjustment;
+ }
}
bool VclBuilder::extractModel(const OString &id, stringmap &rMap)
@@ -968,7 +992,7 @@ Window *VclBuilder::makeObject(Window *pParent, const OString &name, const OStri
}
else if (name == "GtkSpinButton")
{
- extractSpinAdjustment(id, rMap);
+ OString sAdjustment = extractAdjustment(rMap);
OString sPattern = extractCustomProperty(rMap);
OString sUnit = sPattern;
@@ -981,23 +1005,34 @@ Window *VclBuilder::makeObject(Window *pParent, const OString &name, const OStri
}
}
- FieldUnit eUnit = detectMetricUnit(sUnit);
-
WinBits nBits = WB_LEFT|WB_BORDER|WB_3DLOOK;
if (!id.endsWith("-nospin"))
nBits |= WB_SPIN;
if (sPattern.isEmpty())
{
+ connectNumericFormatterAdjustment(id, sAdjustment);
SAL_INFO("vcl.layout", "making numeric field for " << name.getStr() << " " << sUnit.getStr());
pWindow = new NumericField(pParent, nBits);
}
else
{
- SAL_INFO("vcl.layout", "making metric field for " << name.getStr() << " " << sUnit.getStr());
- MetricField *pField = new MetricField(pParent, nBits);
- pField->SetUnit(eUnit);
- pWindow = pField;
+ if (sPattern == "hh:mm")
+ {
+ connectTimeFormatterAdjustment(id, sAdjustment);
+ SAL_INFO("vcl.layout", "making time field for " << name.getStr() << " " << sUnit.getStr());
+ TimeField *pField = new TimeField(pParent, nBits);
+ pWindow = pField;
+ }
+ else
+ {
+ connectNumericFormatterAdjustment(id, sAdjustment);
+ FieldUnit eUnit = detectMetricUnit(sUnit);
+ SAL_INFO("vcl.layout", "making metric field for " << name.getStr() << " " << sUnit.getStr());
+ MetricField *pField = new MetricField(pParent, nBits);
+ pField->SetUnit(eUnit);
+ pWindow = pField;
+ }
}
}
else if (name == "GtkLinkButton")
@@ -2467,7 +2502,7 @@ void VclBuilder::mungeModel(ListBox &rTarget, const ListStore &rStore, sal_uInt1
rTarget.SelectEntryPos(nActiveId);
}
-void VclBuilder::mungeSpinAdjustment(NumericFormatter &rTarget, const Adjustment &rAdjustment)
+void VclBuilder::mungeAdjustment(NumericFormatter &rTarget, const Adjustment &rAdjustment)
{
int nMul = rtl_math_pow10Exp(1, rTarget.GetDecimalDigits());
@@ -2505,7 +2540,40 @@ void VclBuilder::mungeSpinAdjustment(NumericFormatter &rTarget, const Adjustment
}
}
-void VclBuilder::mungeScrollAdjustment(ScrollBar &rTarget, const Adjustment &rAdjustment)
+//assume all in minutes for the moment
+void VclBuilder::mungeAdjustment(TimeField &rTarget, const Adjustment &rAdjustment)
+{
+ for (stringmap::const_iterator aI = rAdjustment.begin(), aEnd = rAdjustment.end(); aI != aEnd; ++aI)
+ {
+ const OString &rKey = aI->first;
+ const OString &rValue = aI->second;
+
+ if (rKey == "upper")
+ {
+ Time aUpper(0, rValue.toInt32());
+ rTarget.SetMax(aUpper);
+ rTarget.SetLast(aUpper);
+ }
+ else if (rKey == "lower")
+ {
+ Time aLower(0, rValue.toInt32());
+ rTarget.SetMin(aLower);
+ rTarget.SetFirst(aLower);
+ }
+ else if (rKey == "value")
+ {
+ Time aValue(0, rValue.toInt32());
+ rTarget.SetTime(aValue);
+ }
+ else
+ {
+ SAL_INFO("vcl.layout", "unhandled property :" << rKey.getStr());
+ }
+ }
+}
+
+
+void VclBuilder::mungeAdjustment(ScrollBar &rTarget, const Adjustment &rAdjustment)
{
for (stringmap::const_iterator aI = rAdjustment.begin(), aEnd = rAdjustment.end(); aI != aEnd; ++aI)
{
More information about the Libreoffice-commits
mailing list