[Libreoffice-commits] core.git: Branch 'feature/formula-core-rework' - 161 commits - android/sdremote animations/source basic/source chart2/AllLangResTarget_chartcontroller.mk chart2/source chart2/uiconfig chart2/UIConfig_chart2.mk configure.ac connectivity/Library_firebird_sdbc.mk connectivity/source cppuhelper/test cppu/source cui/AllLangResTarget_cui.mk cui/Library_cui.mk cui/source cui/uiconfig cui/UIConfig_cui.mk dbaccess/source dbaccess/uiconfig desktop/source extras/source framework/source helpcontent2 include/formula include/sal include/svl include/svtools include/svx include/toolkit include/vcl ios/iosremote offapi/com offapi/type_reference package/inc package/source qadevOOo/tests reportdesign/AllLangResTarget_rptui.mk reportdesign/inc reportdesign/source reportdesign/uiconfig reportdesign/UIConfig_dbreport.mk sal/osl sal/qa sax/source sc/inc sc/qa sc/source sd/source sd/uiconfig sd/UIConfig_simpress.mk setup_native/Library_getuid.mk sfx2/source solenv/bin starmath/source svl/so urce svtools/source svx/source sw/inc sw/qa sw/source sw/uiconfig sw/UIConfig_swriter.mk toolkit/source vcl/aqua vcl/inc vcl/source vcl/workben wizards/com xmloff/source
Kohei Yoshida
kohei.yoshida at gmail.com
Fri Aug 2 19:45:36 PDT 2013
Rebased ref, commits from common ancestor:
commit ac0041248bffa53f8da338a84ed6defafcb5435e
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date: Fri Aug 2 22:08:54 2013 -0400
Add a test that currently fails. We need to fix this bug.
Conflicts:
sc/qa/unit/subsequent_export-test.cxx
Change-Id: Ie09c668d952a6297ffe3c75e348c2a0348176bbe
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 9c30744..90e0148 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -817,7 +817,7 @@ public:
SCCOL nCol2, SCROW nRow2, const ScMarkData& rMark);
SC_DLLPUBLIC OUString GetString( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
- OUString GetString( const ScAddress& rPos ) const;
+ SC_DLLPUBLIC OUString GetString( const ScAddress& rPos ) const;
/**
* Return a pointer to the string object stored in string cell.
diff --git a/sc/qa/unit/data/ods/empty.ods b/sc/qa/unit/data/ods/empty.ods
new file mode 100644
index 0000000..14b4232
Binary files /dev/null and b/sc/qa/unit/data/ods/empty.ods differ
diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx
index f881923..90ced45 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -28,9 +28,13 @@
#include "cellform.hxx"
#include "formulacell.hxx"
#include "tokenarray.hxx"
+#include "editutil.hxx"
#include "svx/svdoole2.hxx"
#include "tabprotection.hxx"
+#include "editeng/wghtitem.hxx"
+#include "editeng/postitem.hxx"
+#include "editeng/editdata.hxx"
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -55,6 +59,7 @@ public:
void testDataBarExportXLSX();
void testMiscRowHeightExport();
void testNamedRangeBugfdo62729();
+ void testRichTextExportODS();
void testInlineArrayXLS();
void testEmbeddedChartXLS();
@@ -72,6 +77,7 @@ public:
CPPUNIT_TEST(testColorScaleExportXLSX);
CPPUNIT_TEST(testMiscRowHeightExport);
CPPUNIT_TEST(testNamedRangeBugfdo62729);
+// CPPUNIT_TEST(testRichTextExportODS); This currently fails.
CPPUNIT_TEST(testInlineArrayXLS);
CPPUNIT_TEST(testEmbeddedChartXLS);
CPPUNIT_TEST(testFormulaReferenceXLS);
@@ -334,6 +340,64 @@ void ScExportTest::testNamedRangeBugfdo62729()
xDocSh->DoClose();
}
+void ScExportTest::testRichTextExportODS()
+{
+ // Start with an empty document, put one edit text cell, and make sure it
+ // survives the save and reload.
+ ScDocShellRef xNewDocSh = loadDoc("empty.", ODS);
+ ScDocument* pDoc = xNewDocSh->GetDocument();
+ CPPUNIT_ASSERT(pDoc);
+ CPPUNIT_ASSERT_MESSAGE("This document should at least have one sheet.", pDoc->GetTableCount() > 0);
+
+ // Insert an edit text cell.
+ OUString aCellText("Bold and Italic");
+ ScFieldEditEngine& rEE = pDoc->GetEditEngine();
+ rEE.SetText(aCellText);
+ ESelection aSel;
+ aSel.nStartPara = aSel.nEndPara = 0;
+
+ {
+ // Set the 'Bold' part bold.
+ SfxItemSet aItemSet = rEE.GetEmptyItemSet();
+ aSel.nStartPos = 0;
+ aSel.nEndPos = 4;
+ SvxWeightItem aWeight(WEIGHT_BOLD, ATTR_FONT_WEIGHT);
+ aItemSet.Put(aWeight);
+ rEE.QuickSetAttribs(aItemSet, aSel);
+ }
+
+ {
+ // Set the 'Italic' part italic.
+ SfxItemSet aItemSet = rEE.GetEmptyItemSet();
+ SvxPostureItem aItalic(ITALIC_NORMAL, ATTR_FONT_POSTURE);
+ aItemSet.Put(aItalic);
+ aSel.nStartPos = 9;
+ aSel.nEndPos = 15;
+ rEE.QuickSetAttribs(aItemSet, aSel);
+ }
+
+ // Set this edit text to cell B2.
+ pDoc->SetEditText(ScAddress(1,1,0), rEE.CreateTextObject());
+ const EditTextObject* pEditText = pDoc->GetEditText(ScAddress(1,1,0));
+ CPPUNIT_ASSERT_MESSAGE("B2 should be an edit text.", pEditText);
+
+ // Now, save and reload this document.
+ ScDocShellRef xDocSh = saveAndReload(xNewDocSh, ODS);
+ xNewDocSh->DoClose();
+ CPPUNIT_ASSERT(xDocSh.Is());
+ pDoc = xDocSh->GetDocument();
+ CPPUNIT_ASSERT(pDoc);
+ CPPUNIT_ASSERT_MESSAGE("Reloaded document should at least have one sheet.", pDoc->GetTableCount() > 0);
+
+ // Make sure the content of B2 is still intact.
+ CPPUNIT_ASSERT_EQUAL(aCellText, pDoc->GetString(ScAddress(1,1,0)));
+
+ pEditText = pDoc->GetEditText(ScAddress(1,1,0));
+ CPPUNIT_ASSERT_MESSAGE("B2 should be an edit text.", pEditText);
+
+ xDocSh->DoClose();
+}
+
namespace {
void checkMatrixRange(ScDocument& rDoc, const ScRange& rRange)
commit 7b319cb9c11bb0f0100c16b6268e580a1d6e64aa
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date: Fri Aug 2 18:39:01 2013 -0400
fdo#67684: Store imported text style entries, else they won't get exported.
Change-Id: Id784772e677e176622e75ff5ae33ab3eb78b1d9a
diff --git a/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx
index 1fa56a0..de12fd2 100644
--- a/sc/source/filter/xml/xmlcelli.cxx
+++ b/sc/source/filter/xml/xmlcelli.cxx
@@ -404,6 +404,11 @@ void ScXMLTableRowCellContext::PushFormat(sal_Int32 nBegin, sal_Int32 nEnd, cons
rFmt.maSelection.nStartPos = nBegin;
rFmt.maSelection.nEndPos = nEnd;
+ // Store the used text styles for export.
+ ScSheetSaveData* pSheetData = ScModelObj::getImplementation(rXMLImport.GetModel())->GetSheetSaveData();
+ ScAddress aCellPos = rXMLImport.GetTables().GetCurrentCellPos();
+ pSheetData->AddTextStyle(rStyleName, aCellPos, rFmt.maSelection);
+
boost::scoped_ptr<SfxPoolItem> pPoolItem;
sal_uInt16 nLastItemID = EE_CHAR_END + 1;
commit 2382b8e8ec0ea65dc2a9ad1c401abe3be35a1487
Author: Tor Lillqvist <tml at iki.fi>
Date: Sat Aug 3 01:18:16 2013 +0300
WaE: unused private fields
Change-Id: I027e54cb3d43955fdcf67a327ab96a54cff6d28c
diff --git a/sd/source/ui/animations/CustomAnimationCreateDialog.hxx b/sd/source/ui/animations/CustomAnimationCreateDialog.hxx
index e126146..c7a705d 100644
--- a/sd/source/ui/animations/CustomAnimationCreateDialog.hxx
+++ b/sd/source/ui/animations/CustomAnimationCreateDialog.hxx
@@ -65,9 +65,6 @@ private:
bool mbIsPreview;
TabControl* mpTabControl;
- OKButton* mpOKButton;
- CancelButton* mpCancelButton;
- HelpButton* mpHelpButton;
CustomAnimationCreateTabPage* mpTabPages[5];
sal_Int16 mnEntranceId, mnEmphasisId, mnExitId, mnMPathId, mnMiscId;
commit 33983bdb94b63ffadd13bd10c976b4d3a6a5469c
Author: Katarina Behrens <bubli at bubli.org>
Date: Fri Aug 2 13:19:47 2013 +0200
Put back the string lost in .ui migration
Change-Id: I5f91a2889bce8bfb7524d819dab9fdec13c689bf
diff --git a/sd/source/ui/animations/CustomAnimation.hrc b/sd/source/ui/animations/CustomAnimation.hrc
index 55ff7b6..0003f30 100644
--- a/sd/source/ui/animations/CustomAnimation.hrc
+++ b/sd/source/ui/animations/CustomAnimation.hrc
@@ -93,6 +93,7 @@
#define STR_CUSTOMANIMATION_GRADUAL RID_CUSTOMANIMATION_START+34
#define STR_CUSTOMANIMATION_TRIGGER RID_CUSTOMANIMATION_START+35
#define STR_CUSTOMANIMATION_LIST_HELPTEXT RID_CUSTOMANIMATION_START+36
+#define STR_CUSTOMANIMATION_USERPATH RID_CUSTOMANIMATION_START+37
#define CM_WITH_CLICK 1
#define CM_WITH_PREVIOUS 2
diff --git a/sd/source/ui/animations/CustomAnimation.src b/sd/source/ui/animations/CustomAnimation.src
index 129eba7..74696b0 100644
--- a/sd/source/ui/animations/CustomAnimation.src
+++ b/sd/source/ui/animations/CustomAnimation.src
@@ -384,6 +384,11 @@ String STR_CUSTOMANIMATION_LIST_HELPTEXT
Text [ en-US ] = "First select the slide element and then click 'Add...' to add an animation effect.";
};
+String STR_CUSTOMANIMATION_USERPATH
+{
+ Text [ en-US ] = "User paths";
+};
+
Image IMG_CUSTOMANIMATION_ON_CLICK
{
ImageBitmap = Bitmap { File = "click_16.png" ; };
diff --git a/sd/source/ui/animations/CustomAnimationCreateDialog.cxx b/sd/source/ui/animations/CustomAnimationCreateDialog.cxx
index 138f8a0..a3f9a8a 100644
--- a/sd/source/ui/animations/CustomAnimationCreateDialog.cxx
+++ b/sd/source/ui/animations/CustomAnimationCreateDialog.cxx
@@ -206,7 +206,7 @@ private:
private:
CategoryListBox* mpLBEffects;
FixedText* mpFTSpeed;
- ListBox* mpCBSpeed;
+ ListBox* mpCBSpeed;
CheckBox* mpCBXPReview;
CustomAnimationCreateDialog* mpParent;
@@ -256,7 +256,7 @@ CustomAnimationCreateTabPage::CustomAnimationCreateTabPage( Window* pParent, Cus
get( mpCBSpeed, "effect_speed_list" );
get( mpCBXPReview, "auto_preview" );
- String sMotionPathLabel( SdResId( STR_USERPATH ) );
+ String sMotionPathLabel( SdResId( STR_CUSTOMANIMATION_USERPATH ) );
sal_uInt16 nFirstEffect = LISTBOX_ENTRY_NOTFOUND;
commit 9695f38ca4ab26b40524f2eade98c45f0360131d
Author: Katarina Behrens <bubli at bubli.org>
Date: Thu Aug 1 20:39:39 2013 +0200
Converted custom animation popup dialog to .ui
Change-Id: I9a3d0036b7313867aff928e1f8d4d24dff552643
diff --git a/sd/UIConfig_simpress.mk b/sd/UIConfig_simpress.mk
index eb3953c..5706e46 100644
--- a/sd/UIConfig_simpress.mk
+++ b/sd/UIConfig_simpress.mk
@@ -80,6 +80,8 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/simpress,\
sd/uiconfig/simpress/ui/optimpressgeneralpage \
sd/uiconfig/simpress/ui/prntopts \
sd/uiconfig/simpress/ui/customanimationspanel \
+ sd/uiconfig/simpress/ui/customanimationcreatedialog \
+ sd/uiconfig/simpress/ui/customanimationcreatetab \
))
# vim: set noet sw=4 ts=4:
diff --git a/sd/source/ui/animations/CustomAnimationCreateDialog.cxx b/sd/source/ui/animations/CustomAnimationCreateDialog.cxx
index 22dff09..138f8a0 100644
--- a/sd/source/ui/animations/CustomAnimationCreateDialog.cxx
+++ b/sd/source/ui/animations/CustomAnimationCreateDialog.cxx
@@ -64,14 +64,13 @@ const int EXIT = 2;
const int MOTIONPATH = 3;
const int MISCEFFECTS = 4;
-//extern void fillDurationComboBox( ComboBox* pBox );
-
// --------------------------------------------------------------------
class CategoryListBox : public ListBox
{
public:
CategoryListBox( Window* pParent, const ResId& rResId );
+ CategoryListBox( Window* pParent );
~CategoryListBox();
virtual void MouseButtonUp( const MouseEvent& rMEvt );
@@ -95,6 +94,18 @@ CategoryListBox::CategoryListBox( Window* pParent, const ResId& rResId )
SetDoubleClickHdl( LINK( this, CategoryListBox, implDoubleClickHdl ) );
}
+CategoryListBox::CategoryListBox( Window* pParent )
+: ListBox( pParent, WB_TABSTOP | WB_BORDER )
+{
+ EnableUserDraw( sal_True );
+ SetDoubleClickHdl( LINK( this, CategoryListBox, implDoubleClickHdl ) );
+}
+
+extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeCategoryListBox( Window *pParent )
+{
+ return new CategoryListBox( pParent );
+}
+
CategoryListBox::~CategoryListBox()
{
}
@@ -180,6 +191,8 @@ public:
bool getIsPreview() const;
void setIsPreview( bool bIsPreview );
+ bool getId() const;
+
bool select( const OUString& rsPresetId );
private:
@@ -193,11 +206,13 @@ private:
private:
CategoryListBox* mpLBEffects;
FixedText* mpFTSpeed;
- ComboBox* mpCBSpeed;
+ ListBox* mpCBSpeed;
CheckBox* mpCBXPReview;
CustomAnimationCreateDialog* mpParent;
+ sal_uInt16 mnId;
+
sal_uInt16 mnCurvePathPos;
sal_uInt16 mnPolygonPathPos;
sal_uInt16 mnFreeformPathPos;
@@ -227,20 +242,21 @@ bool ImplStlEffectCategorySortHelper::operator()( const CustomAnimationPresetPtr
}
CustomAnimationCreateTabPage::CustomAnimationCreateTabPage( Window* pParent, CustomAnimationCreateDialog* pDialogParent, int nTabId, const PresetCategoryList& rCategoryList, bool bHasText )
-: TabPage( pParent, SdResId( RID_TP_CUSTOMANIMATION_ENTRANCE ) )
+: TabPage( pParent, "CustomAnimationCreateTab", "modules/simpress/ui/customanimationcreatetab.ui" )
, mpParent( pDialogParent )
+, mnId( nTabId )
, mnCurvePathPos( LISTBOX_ENTRY_NOTFOUND )
, mnPolygonPathPos( LISTBOX_ENTRY_NOTFOUND )
, mnFreeformPathPos( LISTBOX_ENTRY_NOTFOUND )
{
- mpLBEffects = new CategoryListBox( this, SdResId( LB_EFFECTS ) );
- mpFTSpeed = new FixedText( this, SdResId( FT_SPEED ) );
- mpCBSpeed = new ComboBox( this, SdResId( CB_SPEED ) );
- mpCBXPReview = new CheckBox( this, SdResId( CBX_PREVIEW ) );
+ get( mpLBEffects, "effect_list" );
+ mpLBEffects->set_height_request( mpLBEffects->GetTextHeight() * 16 );
- String sMotionPathLabel( SdResId( STR_USERPATH ) );
+ get( mpFTSpeed, "effect_speed_label" );
+ get( mpCBSpeed, "effect_speed_list" );
+ get( mpCBXPReview, "auto_preview" );
- FreeResource();
+ String sMotionPathLabel( SdResId( STR_USERPATH ) );
sal_uInt16 nFirstEffect = LISTBOX_ENTRY_NOTFOUND;
@@ -286,8 +302,6 @@ CustomAnimationCreateTabPage::CustomAnimationCreateTabPage( Window* pParent, Cus
mpLBEffects->SelectEntryPos( nFirstEffect );
- //fillDurationComboBox( mpCBSpeed );
-
if( nFirstEffect != LISTBOX_ENTRY_NOTFOUND )
onSelectEffect();
@@ -298,11 +312,6 @@ CustomAnimationCreateTabPage::CustomAnimationCreateTabPage( Window* pParent, Cus
CustomAnimationCreateTabPage::~CustomAnimationCreateTabPage()
{
clearEffects();
-
- delete mpLBEffects;
- delete mpFTSpeed;
- delete mpCBSpeed;
- delete mpCBXPReview;
}
IMPL_LINK( CustomAnimationCreateTabPage, implSelectHdl, Control*, pControl )
@@ -467,6 +476,11 @@ void CustomAnimationCreateTabPage::setIsPreview( bool bIsPreview )
mpCBXPReview->Check( bIsPreview ? sal_True : sal_False );
}
+bool CustomAnimationCreateTabPage::getId() const
+{
+ return mnId;
+}
+
bool CustomAnimationCreateTabPage::select( const OUString& rsPresetId )
{
sal_uInt16 nPos = mpLBEffects->GetEntryCount();
@@ -490,37 +504,39 @@ bool CustomAnimationCreateTabPage::select( const OUString& rsPresetId )
// --------------------------------------------------------------------
CustomAnimationCreateDialog::CustomAnimationCreateDialog( Window* pParent, CustomAnimationPane* pPane, const std::vector< ::com::sun::star::uno::Any >& rTargets, bool bHasText, const OUString& rsPresetId, double fDuration )
-: TabDialog( pParent, SdResId( DLG_CUSTOMANIMATION_CREATE ) )
+: TabDialog( pParent, "CustomAnimationCreate", "modules/simpress/ui/customanimationcreatedialog.ui" )
, mpPane( pPane )
, mrTargets( rTargets )
, mfDuration( fDuration )
{
- mpTabControl = new TabControl( this, SdResId( 1 ) );
- mpOKButton = new OKButton(this, SdResId( 1 ) ) ;
- mpCancelButton = new CancelButton(this, SdResId( 1 ) );
- mpHelpButton = new HelpButton(this, SdResId( 1 ) );
-
- FreeResource();
+ get( mpTabControl, "tabs" );
SdOptions* pOptions = SD_MOD()->GetSdOptions(DOCUMENT_TYPE_IMPRESS);
mbIsPreview = pOptions->IsPreviewNewEffects();
+ mnEntranceId = mpTabControl->GetPageId("entrance");
+ mnEmphasisId = mpTabControl->GetPageId("emphasis");
+ mnExitId = mpTabControl->GetPageId("exit");
+ mnMPathId = mpTabControl->GetPageId("motion_paths");
+ mnMiscId = mpTabControl->GetPageId("misc_effects");
+
+ //FIXME: Figure out what to do w/ those help IDs
const CustomAnimationPresets& rPresets = CustomAnimationPresets::getCustomAnimationPresets();
- mpTabPages[ENTRANCE] = new CustomAnimationCreateTabPage( mpTabControl, this, ENTRANCE, rPresets.getEntrancePresets(), bHasText );
- mpTabPages[ENTRANCE]->SetHelpId( HID_SD_CUSTOMANIMATIONDIALOG_ENTRANCE );
- mpTabControl->SetTabPage( RID_TP_CUSTOMANIMATION_ENTRANCE, mpTabPages[ENTRANCE] );
- mpTabPages[EMPHASIS] = new CustomAnimationCreateTabPage( mpTabControl, this, EMPHASIS, rPresets.getEmphasisPresets(), bHasText );
- mpTabPages[EMPHASIS]->SetHelpId( HID_SD_CUSTOMANIMATIONDIALOG_EMPHASIS );
- mpTabControl->SetTabPage( RID_TP_CUSTOMANIMATION_EMPHASIS, mpTabPages[EMPHASIS] );
- mpTabPages[EXIT] = new CustomAnimationCreateTabPage( mpTabControl, this, EXIT, rPresets.getExitPresets(), bHasText );
- mpTabPages[EXIT]->SetHelpId( HID_SD_CUSTOMANIMATIONDIALOG_EXIT );
- mpTabControl->SetTabPage( RID_TP_CUSTOMANIMATION_EXIT, mpTabPages[EXIT] );
- mpTabPages[MOTIONPATH] = new CustomAnimationCreateTabPage( mpTabControl, this, MOTIONPATH, rPresets.getMotionPathsPresets(), bHasText );
- mpTabPages[MOTIONPATH]->SetHelpId( HID_SD_CUSTOMANIMATIONDIALOG_MOTIONPATH );
- mpTabControl->SetTabPage( RID_TP_CUSTOMANIMATION_MOTIONPATH, mpTabPages[MOTIONPATH] );
- mpTabPages[MISCEFFECTS] = new CustomAnimationCreateTabPage( mpTabControl, this, MISCEFFECTS, rPresets.getMiscPresets(), bHasText );
- mpTabPages[MISCEFFECTS]->SetHelpId( HID_SD_CUSTOMANIMATIONDIALOG_MISCEFFECTS );
- mpTabControl->SetTabPage( RID_TP_CUSTOMANIMATION_MISCEFFECTS, mpTabPages[MISCEFFECTS] );
+ mpTabPages[ENTRANCE] = new CustomAnimationCreateTabPage( mpTabControl, this, mnEntranceId, rPresets.getEntrancePresets(), bHasText );
+ //mpTabPages[ENTRANCE]->SetHelpId( HID_SD_CUSTOMANIMATIONDIALOG_ENTRANCE );
+ mpTabControl->SetTabPage( mnEntranceId, mpTabPages[ENTRANCE] );
+ mpTabPages[EMPHASIS] = new CustomAnimationCreateTabPage( mpTabControl, this, mnEmphasisId, rPresets.getEmphasisPresets(), bHasText );
+ //mpTabPages[EMPHASIS]->SetHelpId( HID_SD_CUSTOMANIMATIONDIALOG_EMPHASIS );
+ mpTabControl->SetTabPage( mnEmphasisId, mpTabPages[EMPHASIS] );
+ mpTabPages[EXIT] = new CustomAnimationCreateTabPage( mpTabControl, this, mnExitId, rPresets.getExitPresets(), bHasText );
+ //mpTabPages[EXIT]->SetHelpId( HID_SD_CUSTOMANIMATIONDIALOG_EXIT );
+ mpTabControl->SetTabPage( mnExitId, mpTabPages[EXIT] );
+ mpTabPages[MOTIONPATH] = new CustomAnimationCreateTabPage( mpTabControl, this, mnMPathId, rPresets.getMotionPathsPresets(), bHasText );
+ //mpTabPages[MOTIONPATH]->SetHelpId( HID_SD_CUSTOMANIMATIONDIALOG_MOTIONPATH );
+ mpTabControl->SetTabPage( mnMPathId, mpTabPages[MOTIONPATH] );
+ mpTabPages[MISCEFFECTS] = new CustomAnimationCreateTabPage( mpTabControl, this, mnMiscId, rPresets.getMiscPresets(), bHasText );
+ //mpTabPages[MISCEFFECTS]->SetHelpId( HID_SD_CUSTOMANIMATIONDIALOG_MISCEFFECTS );
+ mpTabControl->SetTabPage( mnMiscId, mpTabPages[MISCEFFECTS] );
getCurrentPage()->setDuration( mfDuration );
getCurrentPage()->setIsPreview( mbIsPreview );
@@ -537,7 +553,7 @@ CustomAnimationCreateDialog::CustomAnimationCreateDialog( Window* pParent, Custo
{
if( mpTabPages[i]->select( rsPresetId ) )
{
- mpTabControl->SetCurPageId( RID_TP_CUSTOMANIMATION_ENTRANCE + i );
+ mpTabControl->SetCurPageId( mpTabPages[i]->getId() );
break;
}
}
@@ -557,23 +573,18 @@ CustomAnimationCreateDialog::~CustomAnimationCreateDialog()
delete mpTabPages[MOTIONPATH];
delete mpTabPages[MISCEFFECTS];
- delete mpTabControl;
- delete mpOKButton;
- delete mpCancelButton;
- delete mpHelpButton;
}
CustomAnimationCreateTabPage* CustomAnimationCreateDialog::getCurrentPage() const
{
- switch( mpTabControl->GetCurPageId() )
+ sal_Int16 curPageId = mpTabControl->GetCurPageId();
+
+ for( sal_uInt16 i = ENTRANCE; i <= MOTIONPATH; i++ )
{
- case RID_TP_CUSTOMANIMATION_ENTRANCE: return mpTabPages[ENTRANCE];
- case RID_TP_CUSTOMANIMATION_EMPHASIS: return mpTabPages[EMPHASIS];
- case RID_TP_CUSTOMANIMATION_EXIT: return mpTabPages[EXIT];
- case RID_TP_CUSTOMANIMATION_MISCEFFECTS:return mpTabPages[MISCEFFECTS];
- default:
- return mpTabPages[MOTIONPATH];
+ if( mpTabPages[i]->getId() == curPageId )
+ return mpTabPages[i];
}
+ return mpTabPages[MOTIONPATH];
}
PathKind CustomAnimationCreateDialog::getCreatePathKind() const
diff --git a/sd/source/ui/animations/CustomAnimationCreateDialog.hxx b/sd/source/ui/animations/CustomAnimationCreateDialog.hxx
index 4a0af71..e126146 100644
--- a/sd/source/ui/animations/CustomAnimationCreateDialog.hxx
+++ b/sd/source/ui/animations/CustomAnimationCreateDialog.hxx
@@ -70,6 +70,7 @@ private:
HelpButton* mpHelpButton;
CustomAnimationCreateTabPage* mpTabPages[5];
+ sal_Int16 mnEntranceId, mnEmphasisId, mnExitId, mnMPathId, mnMiscId;
};
}
diff --git a/sd/uiconfig/simpress/ui/customanimationcreatedialog.ui b/sd/uiconfig/simpress/ui/customanimationcreatedialog.ui
new file mode 100644
index 0000000..e8c5cfe
--- /dev/null
+++ b/sd/uiconfig/simpress/ui/customanimationcreatedialog.ui
@@ -0,0 +1,158 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkDialog" id="CustomAnimationCreate">
+ <property name="can_focus">False</property>
+ <property name="border_width">5</property>
+ <property name="type_hint">dialog</property>
+ <child internal-child="vbox">
+ <object class="GtkBox" id="dialog-vbox1">
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
+ <child internal-child="action_area">
+ <object class="GtkButtonBox" id="dialog-action_area1">
+ <property name="can_focus">False</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="ok">
+ <property name="label">gtk-ok</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="cancel">
+ <property name="label">gtk-cancel</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="help">
+ <property name="label">gtk-help</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkNotebook" id="tabs">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <child type="tab">
+ <object class="GtkLabel" id="entrance">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Entrance</property>
+ </object>
+ <packing>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="emphasis">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Emphasis</property>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="exit">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Exit</property>
+ </object>
+ <packing>
+ <property name="position">2</property>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="motion_paths">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Motion Paths</property>
+ </object>
+ <packing>
+ <property name="position">3</property>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="misc_effects">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Misc Effects</property>
+ </object>
+ <packing>
+ <property name="position">4</property>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="0">ok</action-widget>
+ <action-widget response="0">cancel</action-widget>
+ <action-widget response="0">help</action-widget>
+ </action-widgets>
+ </object>
+</interface>
diff --git a/sd/uiconfig/simpress/ui/customanimationcreatetab.ui b/sd/uiconfig/simpress/ui/customanimationcreatetab.ui
new file mode 100644
index 0000000..0a8c370
--- /dev/null
+++ b/sd/uiconfig/simpress/ui/customanimationcreatetab.ui
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkBox" id="CustomAnimationCreateTab">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="sdlo-CategoryListBox" id="effect_list">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="box3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">end</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="effect_speed_label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">_Speed:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">effect_speed_list</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBoxText" id="effect_speed_list">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <items>
+ <item translatable="yes">Very slow</item>
+ <item translatable="yes">Slow</item>
+ <item translatable="yes">Normal</item>
+ <item translatable="yes">Fast</item>
+ <item translatable="yes">Very fast</item>
+ </items>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="auto_preview">
+ <property name="label" translatable="yes">_Automatic preview</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="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+</interface>
commit 6ed555d9889982f95b0846a451c95c9abd54c498
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date: Fri Aug 2 17:42:15 2013 -0400
Ensure that we import a value of 0 correctly.
Change-Id: I1ada3cf4a162bc4a85ce4e6d2cd0c13adf3156e6
diff --git a/sc/qa/unit/data/ods/basic-cell-content.ods b/sc/qa/unit/data/ods/basic-cell-content.ods
index 70f6b6e..2b8c8bc 100644
Binary files a/sc/qa/unit/data/ods/basic-cell-content.ods and b/sc/qa/unit/data/ods/basic-cell-content.ods differ
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index 61e3682..36ae617 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -46,6 +46,7 @@
#include "scitems.hxx"
#include "docsh.hxx"
#include "editutil.hxx"
+#include "cellvalue.hxx"
#include <com/sun/star/drawing/XDrawPageSupplier.hpp>
#include <com/sun/star/drawing/XControlShape.hpp>
@@ -278,6 +279,12 @@ void ScFiltersTest::testBasicCellContentODS()
aStr = pDoc->GetString(1, 3, 0); // B4
CPPUNIT_ASSERT_EQUAL(OUString("A < B"), aStr);
+ // Numeric value of 0.
+ ScRefCellValue aCell;
+ aCell.assign(*pDoc, ScAddress(1,4,0)); // B5
+ CPPUNIT_ASSERT_MESSAGE("This cell must be numeric.", aCell.meType == CELLTYPE_VALUE);
+ CPPUNIT_ASSERT_EQUAL(0.0, aCell.mfValue);
+
xDocSh->DoClose();
}
commit a43a18edb0023b2a9533e719c8cf3dd2f894dad7
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date: Fri Aug 2 23:35:20 2013 +0200
do *not* silently ignore errors when saving libraries
In case of error, it leads to *data* *loss*.
Change-Id: I80d806ef10a3364174eced3095ebf1ea217d75b4
diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx
index e49a846..6257731 100644
--- a/basic/source/uno/namecont.cxx
+++ b/basic/source/uno/namecont.cxx
@@ -1924,7 +1924,7 @@ void SfxLibraryContainer::storeLibraries_Impl( const uno::Reference< embed::XSto
<< rLib.aName << "\". Exception: "
<< comphelper::anyToString(aError));
#endif
- return;
+ throw;
}
}
@@ -1954,6 +1954,7 @@ void SfxLibraryContainer::storeLibraries_Impl( const uno::Reference< embed::XSto
{
DBG_UNHANDLED_EXCEPTION();
// TODO: error handling
+ throw;
}
}
}
@@ -2033,6 +2034,7 @@ void SfxLibraryContainer::storeLibraries_Impl( const uno::Reference< embed::XSto
catch( const Exception& )
{
DBG_UNHANDLED_EXCEPTION();
+ throw;
}
}
@@ -2384,7 +2386,7 @@ void SAL_CALL SfxLibraryContainer::loadLibrary( const OUString& Name )
<< "\". Exception: "
<< comphelper::anyToString(aError));
#endif
- return;
+ throw;
}
}
@@ -2418,12 +2420,7 @@ void SAL_CALL SfxLibraryContainer::loadLibrary( const OUString& Name )
aFile = aElementName;
aFile += ".";
aFile += maLibElementFileExtension;
- try
- {
- xElementStream = xLibraryStor->openStreamElement( aFile, embed::ElementModes::READ );
- }
- catch(const uno::Exception& )
- {}
+ xElementStream = xLibraryStor->openStreamElement( aFile, embed::ElementModes::READ );
}
if ( xElementStream.is() )
@@ -2436,7 +2433,7 @@ void SAL_CALL SfxLibraryContainer::loadLibrary( const OUString& Name )
"basic",
"couldn't open library element stream - attempted to"
" open library \"" << Name << '"');
- return;
+ throw RuntimeException("couln't open library element stream", *this);
}
}
else
commit fc9080a0c60f263d00eb71111fcda72b3c0a2ebb
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date: Fri Aug 2 23:33:47 2013 +0200
fdo#67685 open xSourceLibrariesStor only when needed
else it keeps loadLibrary from completing,
because the latter cannot open the storage
because it is already open in read/write mode.
Change-Id: Icd0aabfff6e67af2c38a8f9185f8485b46ab1516
diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx
index edf724e..e49a846 100644
--- a/basic/source/uno/namecont.cxx
+++ b/basic/source/uno/namecont.cxx
@@ -1870,21 +1870,6 @@ void SfxLibraryContainer::storeLibraries_Impl( const uno::Reference< embed::XSto
DBG_UNHANDLED_EXCEPTION();
return;
}
-
- // open the source storage which might be used to copy yet-unmodified libraries
- try
- {
- if ( mxStorage->hasByName( maLibrariesDir ) || bInplaceStorage )
- {
- xSourceLibrariesStor = mxStorage->openStorageElement( maLibrariesDir,
- bInplaceStorage ? embed::ElementModes::READWRITE : embed::ElementModes::READ );
- }
- }
- catch( const uno::Exception& )
- {
- DBG_UNHANDLED_EXCEPTION();
- return;
- }
}
int iArray = 0;
@@ -1984,6 +1969,21 @@ void SfxLibraryContainer::storeLibraries_Impl( const uno::Reference< embed::XSto
// then we need to clean up the temporary storage we used for this
if ( bInplaceStorage && !sTempTargetStorName.isEmpty() )
{
+ // open the source storage which might be used to copy yet-unmodified libraries
+ try
+ {
+ if ( mxStorage->hasByName( maLibrariesDir ) || bInplaceStorage )
+ {
+ xSourceLibrariesStor = mxStorage->openStorageElement( maLibrariesDir,
+ bInplaceStorage ? embed::ElementModes::READWRITE : embed::ElementModes::READ );
+ }
+ }
+ catch( const uno::Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ return;
+ }
+
SAL_WARN_IF(
!xSourceLibrariesStor.is(), "basic",
("SfxLibrariesContainer::storeLibraries_impl: unexpected: we should"
commit d82433b0051a93632d66fdd6ab1df10166879c6e
Author: Joren De Cuyper <joren.libreoffice at telenet.be>
Date: Fri Aug 2 22:48:20 2013 +0200
fdo#67470 Element Dock: Subset icon missing in Set Operation section
RID_XSUPSETY wasn't just listed, RID_XSUPSETEQY (notice the Q) was.
Adding it adds it to the dock.
Change-Id: I4c621aab74b424aacd5421ed90f35b42ae6e0a14
diff --git a/starmath/source/ElementsDockingWindow.cxx b/starmath/source/ElementsDockingWindow.cxx
index 5e2b229..893c2a0 100644
--- a/starmath/source/ElementsDockingWindow.cxx
+++ b/starmath/source/ElementsDockingWindow.cxx
@@ -81,7 +81,7 @@ const sal_uInt16 SmElementsControl::aSetOperations[] =
RID_XINY, RID_XNOTINY, RID_XOWNSY,
0xFFFF,
RID_XINTERSECTIONY, RID_XUNIONY, RID_XSETMINUSY, RID_XSLASHY,
- RID_XSUBSETY, RID_XSUBSETEQY, RID_XSUPSETEQY, RID_XNSUBSETY,
+ RID_XSUBSETY, RID_XSUBSETEQY, RID_XSUPSETY, RID_XSUPSETEQY, RID_XNSUBSETY,
RID_XNSUBSETEQY, RID_XNSUPSETY, RID_XNSUPSETEQY,
0xFFFF,
RID_EMPTYSET, RID_ALEPH, RID_SETN, RID_SETZ,
commit 55d7d03b0c70a8d8db61418a88559b8480a2e38d
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Aug 2 22:30:29 2013 +0200
convert attributes wrapper dialog to .ui
currently unresizable until all possible tabpages that can be inserted into it
get converted over
Change-Id: I1e7d28cf2f2a04ca2c596136b7d26626058f2e4b
diff --git a/chart2/AllLangResTarget_chartcontroller.mk b/chart2/AllLangResTarget_chartcontroller.mk
index c60a3f4..ce4309f 100644
--- a/chart2/AllLangResTarget_chartcontroller.mk
+++ b/chart2/AllLangResTarget_chartcontroller.mk
@@ -36,7 +36,6 @@ $(eval $(call gb_SrsTarget_add_files,chart2/res,\
chart2/source/controller/dialogs/dlg_InsertErrorBars.src \
chart2/source/controller/dialogs/dlg_InsertLegend.src \
chart2/source/controller/dialogs/dlg_InsertTitle.src \
- chart2/source/controller/dialogs/dlg_ObjectProperties.src \
chart2/source/controller/dialogs/dlg_ShapeFont.src \
chart2/source/controller/dialogs/dlg_ShapeParagraph.src \
chart2/source/controller/dialogs/dlg_View3D.src \
diff --git a/chart2/UIConfig_chart2.mk b/chart2/UIConfig_chart2.mk
index 76ab924..1ad18c7 100644
--- a/chart2/UIConfig_chart2.mk
+++ b/chart2/UIConfig_chart2.mk
@@ -30,6 +30,7 @@ $(eval $(call gb_UIConfig_add_toolbarfiles,modules/schart,\
))
$(eval $(call gb_UIConfig_add_uifiles,modules/schart,\
+ chart2/uiconfig/ui/attributedialog \
chart2/uiconfig/ui/insertaxisdlg \
chart2/uiconfig/ui/insertgriddlg \
chart2/uiconfig/ui/smoothlinesdlg \
diff --git a/chart2/source/controller/dialogs/ResourceIds.hrc b/chart2/source/controller/dialogs/ResourceIds.hrc
index 09aa8d2..209cee0 100644
--- a/chart2/source/controller/dialogs/ResourceIds.hrc
+++ b/chart2/source/controller/dialogs/ResourceIds.hrc
@@ -32,7 +32,6 @@
#define DLG_LEGEND 835
#define DLG_TITLE 834
#define DLG_3D_VIEW 752
-#define DLG_OBJECT_PROPERTIES 903
#define DLG_SPLINE_PROPERTIES 904
#define DLG_DATA_TRENDLINE 841
#define DLG_DATA_YERRORBAR 842
diff --git a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx
index bacd18e..d7c6587 100644
--- a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx
+++ b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx
@@ -335,7 +335,7 @@ SchAttribTabDlg::SchAttribTabDlg(Window* pParent,
const ViewElementListProvider* pViewElementListProvider,
const uno::Reference< util::XNumberFormatsSupplier >& xNumberFormatsSupplier
)
- : SfxTabDialog(pParent, SchResId(DLG_OBJECT_PROPERTIES), pAttr)
+ : SfxTabDialog(pParent, "AttributeDialog", "modules/schart/ui/attributedialog.ui", pAttr)
, eObjectType(pDialogParameter->getObjectType())
, nDlgType(nNoArrowNoShadowDlg)
, nPageType(0)
@@ -347,8 +347,6 @@ SchAttribTabDlg::SchAttribTabDlg(Window* pParent,
, m_fAxisMinorStepWidthForErrorBarDecimals(0.1)
, m_bOKPressed(false)
{
- FreeResource();
-
NumberFormatterWrapper aNumberFormatterWrapper( xNumberFormatsSupplier );
m_pNumberFormatter = aNumberFormatterWrapper.getSvNumberFormatter();
diff --git a/chart2/source/controller/dialogs/dlg_ObjectProperties.src b/chart2/source/controller/dialogs/dlg_ObjectProperties.src
deleted file mode 100644
index e0d173e..0000000
--- a/chart2/source/controller/dialogs/dlg_ObjectProperties.src
+++ /dev/null
@@ -1,33 +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 "ResourceIds.hrc"
-
-TabDialog DLG_OBJECT_PROPERTIES
-{
- OutputSize = TRUE ;
- SVLook = TRUE ;
- Moveable = TRUE ;
- TabControl 1
- {
- OutputSize = TRUE ;
- Pos = MAP_APPFONT ( 3 , 3 ) ;
- };
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/uiconfig/ui/attributedialog.ui b/chart2/uiconfig/ui/attributedialog.ui
new file mode 100644
index 0000000..27972c3
--- /dev/null
+++ b/chart2/uiconfig/ui/attributedialog.ui
@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkDialog" id="AttributeDialog">
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="resizable">False</property>
+ <property name="type_hint">dialog</property>
+ <child internal-child="vbox">
+ <object class="GtkBox" id="dialog-vbox1">
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">12</property>
+ <child internal-child="action_area">
+ <object class="GtkButtonBox" id="dialog-action_area1">
+ <property name="can_focus">False</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="ok">
+ <property name="label">gtk-ok</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="has_default">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="cancel">
+ <property name="label">gtk-cancel</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="help">
+ <property name="label">gtk-help</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="reset">
+ <property name="label">gtk-revert-to-saved</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">4</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkNotebook" id="tabcontrol">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="0">ok</action-widget>
+ <action-widget response="0">cancel</action-widget>
+ <action-widget response="0">help</action-widget>
+ <action-widget response="0">reset</action-widget>
+ </action-widgets>
+ </object>
+</interface>
commit 973094a999abd15835e76cc69087edcc320d53d4
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Aug 2 22:14:39 2013 +0200
Updated core
Project: help 33f8f1984f799c43d7bd1f8a0aee922c03d824e7
diff --git a/helpcontent2 b/helpcontent2
index 07886e6..33f8f19 160000
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 07886e67f36d3da3e36fc41e612ed0bb7593d6c1
+Subproject commit 33f8f1984f799c43d7bd1f8a0aee922c03d824e7
commit ae0493ccfe7c232557fb87eef4d0444709d8b729
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Aug 2 22:07:59 2013 +0200
got the ctors the wrong way around, fix resid loaded previews
Change-Id: I0a00a5bbd4616fd72e947cacd72ef23d38147638
diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx
index c8d1e39..ba848b9 100644
--- a/svx/source/dialog/dlgctrl.cxx
+++ b/svx/source/dialog/dlgctrl.cxx
@@ -1838,32 +1838,19 @@ SvxXLinePreview::SvxXLinePreview( Window* pParent, const ResId& rResId )
{
InitSettings( sal_True, sal_True );
- mpLineObjA = new SdrPathObj(OBJ_LINE);
- mpLineObjA->SetModel(&getModel());
-
- mpLineObjB = new SdrPathObj(OBJ_PLIN);
- mpLineObjB->SetModel(&getModel());
-
- mpLineObjC = new SdrPathObj(OBJ_PLIN);
- mpLineObjC->SetModel(&getModel());
-}
-
-void SvxXLinePreview::Resize()
-{
- SvxPreviewBase::Resize();
-
const Size aOutputSize(GetOutputSize());
const sal_Int32 nDistance(500L);
const sal_Int32 nAvailableLength(aOutputSize.Width() - (4 * nDistance));
- // create DrawObectA
+ // create DrawObjectA
const sal_Int32 aYPosA(aOutputSize.Height() / 2);
const basegfx::B2DPoint aPointA1( nDistance, aYPosA);
const basegfx::B2DPoint aPointA2( aPointA1.getX() + ((nAvailableLength * 14) / 20), aYPosA );
basegfx::B2DPolygon aPolygonA;
aPolygonA.append(aPointA1);
aPolygonA.append(aPointA2);
- mpLineObjA->SetPathPoly(basegfx::B2DPolyPolygon(aPolygonA));
+ mpLineObjA = new SdrPathObj(OBJ_LINE, basegfx::B2DPolyPolygon(aPolygonA));
+ mpLineObjA->SetModel(&getModel());
// create DrawObectB
const sal_Int32 aYPosB1((aOutputSize.Height() * 3) / 4);
@@ -1875,42 +1862,37 @@ void SvxXLinePreview::Resize()
aPolygonB.append(aPointB1);
aPolygonB.append(aPointB2);
aPolygonB.append(aPointB3);
- mpLineObjB->SetPathPoly(basegfx::B2DPolyPolygon(aPolygonB));
+ mpLineObjB = new SdrPathObj(OBJ_PLIN, basegfx::B2DPolyPolygon(aPolygonB));
+ mpLineObjB->SetModel(&getModel());
// create DrawObectC
- basegfx::B2DPolygon aPolygonC;
const basegfx::B2DPoint aPointC1( aPointB3.getX() + nDistance, aYPosB1);
const basegfx::B2DPoint aPointC2( aPointC1.getX() + ((nAvailableLength * 1) / 20), aYPosB2 );
const basegfx::B2DPoint aPointC3( aPointC2.getX() + ((nAvailableLength * 1) / 20), aYPosB1 );
+ basegfx::B2DPolygon aPolygonC;
aPolygonC.append(aPointC1);
aPolygonC.append(aPointC2);
aPolygonC.append(aPointC3);
- mpLineObjC->SetPathPoly(basegfx::B2DPolyPolygon(aPolygonC));
+ mpLineObjC = new SdrPathObj(OBJ_PLIN, basegfx::B2DPolyPolygon(aPolygonC));
+ mpLineObjC->SetModel(&getModel());
}
-SvxXLinePreview::SvxXLinePreview( Window* pParent)
-: SvxPreviewBase( pParent ),
-mpLineObjA( 0L ),
-mpLineObjB( 0L ),
-mpLineObjC( 0L ),
-mpGraphic( 0L ),
-mbWithSymbol( sal_False )
+void SvxXLinePreview::Resize()
{
- const Size aOutputSize(GetOutputSize());
- InitSettings( true, true );
+ SvxPreviewBase::Resize();
+ const Size aOutputSize(GetOutputSize());
const sal_Int32 nDistance(500L);
const sal_Int32 nAvailableLength(aOutputSize.Width() - (4 * nDistance));
- // create DrawObjectA
+ // create DrawObectA
const sal_Int32 aYPosA(aOutputSize.Height() / 2);
const basegfx::B2DPoint aPointA1( nDistance, aYPosA);
const basegfx::B2DPoint aPointA2( aPointA1.getX() + ((nAvailableLength * 14) / 20), aYPosA );
basegfx::B2DPolygon aPolygonA;
aPolygonA.append(aPointA1);
aPolygonA.append(aPointA2);
- mpLineObjA = new SdrPathObj(OBJ_LINE, basegfx::B2DPolyPolygon(aPolygonA));
- mpLineObjA->SetModel(&getModel());
+ mpLineObjA->SetPathPoly(basegfx::B2DPolyPolygon(aPolygonA));
// create DrawObectB
const sal_Int32 aYPosB1((aOutputSize.Height() * 3) / 4);
@@ -1922,26 +1904,44 @@ mbWithSymbol( sal_False )
aPolygonB.append(aPointB1);
aPolygonB.append(aPointB2);
aPolygonB.append(aPointB3);
- mpLineObjB = new SdrPathObj(OBJ_PLIN, basegfx::B2DPolyPolygon(aPolygonB));
- mpLineObjB->SetModel(&getModel());
+ mpLineObjB->SetPathPoly(basegfx::B2DPolyPolygon(aPolygonB));
// create DrawObectC
+ basegfx::B2DPolygon aPolygonC;
const basegfx::B2DPoint aPointC1( aPointB3.getX() + nDistance, aYPosB1);
const basegfx::B2DPoint aPointC2( aPointC1.getX() + ((nAvailableLength * 1) / 20), aYPosB2 );
const basegfx::B2DPoint aPointC3( aPointC2.getX() + ((nAvailableLength * 1) / 20), aYPosB1 );
- basegfx::B2DPolygon aPolygonC;
aPolygonC.append(aPointC1);
aPolygonC.append(aPointC2);
aPolygonC.append(aPointC3);
- mpLineObjC = new SdrPathObj(OBJ_PLIN, basegfx::B2DPolyPolygon(aPolygonC));
+ mpLineObjC->SetPathPoly(basegfx::B2DPolyPolygon(aPolygonC));
+}
+
+SvxXLinePreview::SvxXLinePreview(Window* pParent)
+ : SvxPreviewBase(pParent)
+ , mpLineObjA(NULL)
+ , mpLineObjB(NULL)
+ , mpLineObjC(NULL)
+ , mpGraphic(NULL)
+ , mbWithSymbol(false)
+{
+ InitSettings( true, true );
+
+ mpLineObjA = new SdrPathObj(OBJ_LINE);
+ mpLineObjA->SetModel(&getModel());
+
+ mpLineObjB = new SdrPathObj(OBJ_PLIN);
+ mpLineObjB->SetModel(&getModel());
+
+ mpLineObjC = new SdrPathObj(OBJ_PLIN);
mpLineObjC->SetModel(&getModel());
}
+
extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSvxXLinePreview(Window *pParent, VclBuilder::stringmap &)
{
return new SvxXLinePreview(pParent);
}
-
SvxXLinePreview::~SvxXLinePreview()
{
SdrObject *pFoo = mpLineObjA;
commit d7c82096e74123a9bd8325592bec78a4675b777c
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Aug 2 21:53:32 2013 +0200
adjust widget sizes of line tabpage a bit
Change-Id: I07471551ab61caa3a8454090f7cb6192acd7c849
diff --git a/cui/uiconfig/ui/linetabpage.ui b/cui/uiconfig/ui/linetabpage.ui
index fd5841e..8c5128b 100644
--- a/cui/uiconfig/ui/linetabpage.ui
+++ b/cui/uiconfig/ui/linetabpage.ui
@@ -12,9 +12,7 @@
<object class="GtkBox" id="box2">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="margin_left">12</property>
- <property name="margin_top">6</property>
- <property name="spacing">12</property>
+ <property name="spacing">18</property>
<child>
<object class="GtkFrame" id="FL_LINE">
<property name="visible">True</property>
@@ -123,6 +121,7 @@
<object class="GtkSpinButton" id="MTR_FLD_LINE_WIDTH:0cm">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="halign">start</property>
<property name="invisible_char">â¢</property>
<property name="adjustment">adjustmentWIDTH</property>
<property name="digits">2</property>
@@ -152,6 +151,7 @@
<object class="GtkSpinButton" id="MTR_LINE_TRANSPARENT:0%">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="halign">start</property>
<property name="invisible_char">â¢</property>
<property name="adjustment">adjustmentPERCENT</property>
</object>
@@ -300,6 +300,7 @@
<object class="GtkSpinButton" id="MTR_FLD_START_WIDTH:0cm">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="halign">start</property>
<property name="invisible_char">â¢</property>
<property name="invisible_char_set">True</property>
<property name="adjustment">adjustmentWIDTH</property>
@@ -361,6 +362,7 @@
<object class="GtkSpinButton" id="MTR_FLD_END_WIDTH:0cm">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="halign">start</property>
<property name="invisible_char">â¢</property>
<property name="invisible_char_set">True</property>
<property name="adjustment">adjustmentWIDTH</property>
@@ -619,7 +621,7 @@
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
- <property name="width">1</property>
+ <property name="width">2</property>
<property name="height">1</property>
</packing>
</child>
@@ -639,9 +641,6 @@
</packing>
</child>
<child>
- <placeholder/>
- </child>
- <child>
<object class="GtkSpinButton" id="MF_SYMBOL_HEIGHT:0cm">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -689,12 +688,13 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
+ <property name="pack_type">end</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
- <property name="expand">False</property>
+ <property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
@@ -722,14 +722,14 @@
<property name="page_increment">10</property>
</object>
<object class="GtkAdjustment" id="adjustmentWIDTH">
- <property name="upper">50</property>
- <property name="step_increment">0.050000000000000003</property>
- <property name="page_increment">10</property>
+ <property name="upper">5</property>
+ <property name="step_increment">0.10000000000000001</property>
+ <property name="page_increment">1</property>
</object>
<object class="GtkAdjustment" id="adjustmentWIDTH_SYMBOL">
- <property name="upper">1999</property>
+ <property name="upper">19.989999999999998</property>
<property name="step_increment">0.050000000000000003</property>
- <property name="page_increment">10</property>
+ <property name="page_increment">1</property>
</object>
<object class="GtkListStore" id="liststoreCAP_STYLE">
<columns>
@@ -823,4 +823,10 @@
</object>
</child>
</object>
+ <object class="GtkSizeGroup" id="sizegroup1">
+ <widgets>
+ <widget name="MTR_FLD_LINE_WIDTH:0cm"/>
+ <widget name="MTR_LINE_TRANSPARENT:0%"/>
+ </widgets>
+ </object>
</interface>
commit 241c670f06047a2298b6f2b0d80f898f530a6a33
Author: Olivier Hallot <olivier.hallot at edx.srv.br>
Date: Fri Aug 2 08:28:46 2013 -0300
Convert line tab page to widget UI
Change-Id: I26ee6e0b5b6d17dfb9a65d16aaee0db1b64f5e05
Reviewed-on: https://gerrit.libreoffice.org/5244
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk
index 99424f8..8ab2bcc 100644
--- a/cui/UIConfig_cui.mk
+++ b/cui/UIConfig_cui.mk
@@ -38,6 +38,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
cui/uiconfig/ui/insertoleobject \
cui/uiconfig/ui/insertplugin \
cui/uiconfig/ui/insertrowcolumn \
+ cui/uiconfig/ui/linetabpage \
cui/uiconfig/ui/macroselectordialog \
cui/uiconfig/ui/messbox \
cui/uiconfig/ui/namedialog \
diff --git a/cui/source/inc/cuitabline.hxx b/cui/source/inc/cuitabline.hxx
index 5207b7a..58329cd 100644
--- a/cui/source/inc/cuitabline.hxx
+++ b/cui/source/inc/cuitabline.hxx
@@ -87,36 +87,32 @@ class SvxLineTabPage : public SvxTabPage
using TabPage::ActivatePage;
using TabPage::DeactivatePage;
private:
- FixedLine aFlLine;
- FixedText aFtLineStyle;
- LineLB aLbLineStyle;
- FixedText aFtColor;
- ColorLB aLbColor;
- FixedText aFtLineWidth;
- MetricField aMtrLineWidth;
- FixedText aFtTransparent;
- MetricField aMtrTransparent;
- FixedLine aFlLineEnds;
- LineEndLB aLbStartStyle;
- MetricField aMtrStartWidth;
- TriStateBox aTsbCenterStart;
- FixedText aFtLineEndsStyle;
- LineEndLB aLbEndStyle;
- FixedText aFtLineEndsWidth;
- MetricField aMtrEndWidth;
- TriStateBox aTsbCenterEnd;
- CheckBox aCbxSynchronize;
- FixedLine aFLSeparator;
- SvxXLinePreview aCtlPreview;
+ VclBox* m_pBoxStyle;
+ LineLB* m_pLbLineStyle;
+ ColorLB* m_pLbColor;
+ MetricField* m_pMtrLineWidth;
+ MetricField* m_pMtrTransparent;
+
+ VclFrame* m_pFlLineEnds;
+ VclBox* m_pBoxArrowStyles;
+ LineEndLB* m_pLbStartStyle;
+ VclBox* m_pBoxStart;
+ MetricField* m_pMtrStartWidth;
+ TriStateBox* m_pTsbCenterStart;
+ VclBox* m_pBoxEnd;
+ LineEndLB* m_pLbEndStyle;
+ MetricField* m_pMtrEndWidth;
+ TriStateBox* m_pTsbCenterEnd;
+ CheckBox* m_pCbxSynchronize;
+ SvxXLinePreview* m_pCtlPreview;
// #116827#
- FixedLine maFLEdgeStyle;
- FixedText maFTEdgeStyle;
- LineEndLB maLBEdgeStyle;
+ VclFrame* m_pFLEdgeStyle;
+ VclGrid* m_pGridEdgeCaps;
+ ListBox* m_pLBEdgeStyle;
// LineCaps
- FixedText maFTCapStyle;
- LineEndLB maLBCapStyle;
+ ListBox* m_pLBCapStyle;
//#58425# symbols on a line (e. g. StarChart) ->
/** a list of symbols to be shown in menu. Symbol at position SID_ATTR_SYMBOLTYPE is to be shown in preview.
@@ -129,13 +125,12 @@ private:
long nSymbolType;
/// attributes for the shown symbols; only necessary if not equal to line properties
SfxItemSet* pSymbolAttr;
- FixedLine aFlSymbol;
- MenuButton aSymbolMB;
- FixedText aSymbolWidthFT;
- MetricField aSymbolWidthMF;
- FixedText aSymbolHeightFT;
- MetricField aSymbolHeightMF;
- CheckBox aSymbolRatioCB;
+ VclFrame* m_pFlSymbol;
+ VclGrid* m_pGridIconSize;
+ MenuButton* m_pSymbolMB;
+ MetricField* m_pSymbolWidthMF;
+ MetricField* m_pSymbolHeightMF;
+ CheckBox* m_pSymbolRatioCB;
std::vector<OUString> aGrfNames;
SvxBmpItemInfoList aGrfBrushItems;
sal_Bool bLastWidthModified;
diff --git a/cui/source/inc/helpid.hrc b/cui/source/inc/helpid.hrc
index b6ffdaa..d11061d 100644
--- a/cui/source/inc/helpid.hrc
+++ b/cui/source/inc/helpid.hrc
@@ -246,7 +246,7 @@
#define HID_TPSHADOW_CTRL "CUI_HID_TPSHADOW_CTRL"
#define HID_LINE_ENDDEF "CUI_HID_LINE_ENDDEF"
-#define HID_LINE_LINE "CUI_HID_LINE_LINE"
+
#define HID_LINE_DEF "CUI_HID_LINE_DEF"
#define HID_SPELLDLG_SETWORD "CUI_HID_SPELLDLG_SETWORD"
#define HID_PAGE_TEXTATTR "CUI_HID_PAGE_TEXTATTR"
diff --git a/cui/source/tabpages/tabline.hrc b/cui/source/tabpages/tabline.hrc
index 8fab6b6..9492a14 100644
--- a/cui/source/tabpages/tabline.hrc
+++ b/cui/source/tabpages/tabline.hrc
@@ -18,27 +18,6 @@
*/
#define TAB_CONTROL 1
-#define LB_COLOR 1
-#define FT_COLOR 1
-#define LB_LINE_STYLE 2
-#define FT_LINE_STYLE 3
-#define FT_LINE_WIDTH 2
-#define MTR_FLD_LINE_WIDTH 1
-#define TSB_INVISIBLE 1
-#define FL_LINE 1
-#define FL_LINE_ENDS 2
-#define FT_LINE_ENDS_STYLE 5
-#define FT_LINE_ENDS_WIDTH 6
-#define LB_START_STYLE 3
-#define LB_END_STYLE 4
-
-#define STR_STYLE (LB_END_STYLE+1)
-#define STR_LB_START_STYLE 30
-#define STR_LB_END_STYLE 31
-#define STR_MTR_FLD_START_WIDTH 32
-#define STR_MTR_FLD_END_WIDTH 33
-#define STR_CENTER_START 34
-#define STR_CENTER_END 35
#define STR_START_TYPE 36
#define STR_END_TYPE 37
#define STR_START_NUM 38
@@ -46,8 +25,6 @@
#define STR_START_LENGTH 40
#define STR_END_LENGTH 41
-#define MTR_FLD_START_WIDTH 3
-#define MTR_FLD_END_WIDTH 2
#define CBX_SYNCHRONIZE 1
#define CTL_POSITION 2
#define FT_POSITION 9
@@ -75,40 +52,7 @@
#define LB_LINEENDS 1
#define FL_TIP 1
#define FI_TIP 10
-#define TSB_CENTER_START 4
-#define TSB_CENTER_END 5
-#define FT_TRANSPARENT 10
-#define MTR_LINE_TRANSPARENT 5
-#define FL_SEPARATOR 4
#define FT_LINE_END_STYLE 11
#define FT_TITLE 12
-// #116827#
-#define FL_EDGE_STYLE 5
-#define FT_EDGE_STYLE 13
-#define LB_EDGE_STYLE 5
-
-// since LO3.6
-#define FT_CAP_STYLE 14
-#define LB_CAP_STYLE 6
-// not sure about IAccessibility2, add it nevertheless
-#define STR_LB_CAP_STYLE 42
-
-//Symbole (fuer StarChart)
-#define FT_SYMBOL_WIDTH 20
-#define FT_SYMBOL_HEIGHT 21
-#define MF_SYMBOL_WIDTH 22
-#define MF_SYMBOL_HEIGHT 23
-#define CB_SYMBOL_RATIO 24
-#define FL_SYMBOL_FORMAT 25
-#define MB_SYMBOL_BITMAP 26
-
-
-#define MN_GRAPHIC_DLG 1
-#define MN_GALLERY 2
-#define MN_SYMBOLS 3
-#define MN_SYMBOLS_NONE 4
-#define MN_SYMBOLS_AUTO 5
-#define MN_GALLERY_ENTRY 100
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/tabpages/tabline.src b/cui/source/tabpages/tabline.src
index 5225684..258e595 100644
--- a/cui/source/tabpages/tabline.src
+++ b/cui/source/tabpages/tabline.src
@@ -26,408 +26,6 @@
#define MASKCOLOR MaskColor = Color{ Red = 0xFFFF ; Green = 0x0000 ; Blue = 0xFFFF ; };
-
-TabPage RID_SVXPAGE_LINE
-{
- Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT );
- HelpId = HID_LINE_LINE ;
- Hide = TRUE ;
- Text [ en-US ] = "Lines" ;
- FixedLine FL_LINE
- {
- Pos = MAP_APPFONT ( 6 , 3 ) ;
- Size = MAP_APPFONT ( 112 , 8 ) ;
- Text [ en-US ] = "Line properties" ;
- };
- FixedText FT_LINE_STYLE
- {
- Pos = MAP_APPFONT ( 12 , 14 ) ;
- Size = MAP_APPFONT ( 100 , 8 ) ;
- Text [ en-US ] = "~Style" ;
- };
- ListBox LB_LINE_STYLE
- {
- HelpID = "cui:ListBox:RID_SVXPAGE_LINE:LB_LINE_STYLE";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 12 , 25 ) ;
- Size = MAP_APPFONT ( 100 , 100 ) ;
- TabStop = TRUE ;
- DropDown = TRUE ;
- DDExtraWidth = TRUE ;
- };
- FixedText FT_COLOR
- {
- Pos = MAP_APPFONT ( 12 , 41 ) ;
- Size = MAP_APPFONT ( 100 , 8 ) ;
- Text [ en-US ] = "Colo~r" ;
- };
- ListBox LB_COLOR
- {
- HelpID = "cui:ListBox:RID_SVXPAGE_LINE:LB_COLOR";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 12 , 52 ) ;
- Size = MAP_APPFONT ( 100 , 100 ) ;
- TabStop = TRUE ;
- DropDown = TRUE ;
- DDExtraWidth = TRUE ;
- };
- FixedText FT_LINE_WIDTH
- {
- Pos = MAP_APPFONT ( 12 , 68 ) ;
- Size = MAP_APPFONT ( 100 , 8 ) ;
- Text [ en-US ] = "~Width" ;
- };
- MetricField MTR_FLD_LINE_WIDTH
- {
- HelpID = "cui:MetricField:RID_SVXPAGE_LINE:MTR_FLD_LINE_WIDTH";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 12 , 79 ) ;
- Size = MAP_APPFONT ( 50 , 12 ) ;
- TabStop = TRUE ;
- Right = TRUE ;
- Repeat = TRUE ;
- Spin = TRUE ;
- Maximum = 5000 ;
- StrictFormat = TRUE ;
- DecimalDigits = 2 ;
- Value = 1 ;
- Unit = FUNIT_MM ;
- Last = 5000 ;
- SpinSize = 10 ;
- };
- FixedText FT_TRANSPARENT
- {
- Pos = MAP_APPFONT ( 12 , 95 ) ;
- Size = MAP_APPFONT ( 100 , 8 ) ;
- Text [ en-US ] = "~Transparency" ;
- };
- MetricField MTR_LINE_TRANSPARENT
- {
- HelpID = "cui:MetricField:RID_SVXPAGE_LINE:MTR_LINE_TRANSPARENT";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 12 , 106 ) ;
- Size = MAP_APPFONT ( 50 , 12 ) ;
- TabStop = TRUE ;
- Repeat = TRUE ;
- Spin = TRUE ;
- Maximum = 100 ;
- StrictFormat = TRUE ;
- Unit = FUNIT_CUSTOM ;
- CustomUnitText = "%" ;
- Last = 100 ;
- SpinSize = 5 ;
- };
- FixedLine FL_SEPARATOR
- {
- Pos = MAP_APPFONT ( 118 , 14 ) ;
- Size = MAP_APPFONT ( 6 , 111 ) ;
- Vert = TRUE;
- };
- FixedLine FL_LINE_ENDS
- {
- Pos = MAP_APPFONT ( 124 , 3 ) ;
- Size = MAP_APPFONT ( 130 , 8 ) ;
- Text [ en-US ] = "Arrow styles" ;
- };
- FixedText FT_LINE_ENDS_STYLE
- {
- Pos = MAP_APPFONT ( 130 , 14 ) ;
- Size = MAP_APPFONT ( 118 , 8 ) ;
- Text [ en-US ] = "St~yle" ;
- };
- ListBox LB_START_STYLE
- {
- HelpID = "cui:ListBox:RID_SVXPAGE_LINE:LB_START_STYLE";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 130 , 25 ) ;
- Size = MAP_APPFONT ( 57 , 99 ) ;
- TabStop = TRUE ;
- DropDown = TRUE ;
- DDExtraWidth = TRUE ;
- };
- ListBox LB_END_STYLE
- {
- HelpID = "cui:ListBox:RID_SVXPAGE_LINE:LB_END_STYLE";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 191 , 25 ) ;
- Size = MAP_APPFONT ( 57 , 100 ) ;
- TabStop = TRUE ;
- DropDown = TRUE ;
- DDExtraWidth = TRUE ;
- };
- FixedText FT_LINE_ENDS_WIDTH
- {
- Pos = MAP_APPFONT ( 130 , 41 ) ;
- Size = MAP_APPFONT ( 118 , 8 ) ;
- Text [ en-US ] = "Wi~dth" ;
- };
- MetricField MTR_FLD_START_WIDTH
- {
- HelpID = "cui:MetricField:RID_SVXPAGE_LINE:MTR_FLD_START_WIDTH";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 130 , 52 ) ;
- Size = MAP_APPFONT ( 45 , 12 ) ;
- TabStop = TRUE ;
- Right = TRUE ;
- Repeat = TRUE ;
- Spin = TRUE ;
- Maximum = 5000 ;
- StrictFormat = TRUE ;
- DecimalDigits = 2 ;
- Value = 1 ;
- Unit = FUNIT_MM ;
- Last = 5000 ;
- SpinSize = 10 ;
- };
- MetricField MTR_FLD_END_WIDTH
- {
- HelpID = "cui:MetricField:RID_SVXPAGE_LINE:MTR_FLD_END_WIDTH";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 191 , 52 ) ;
- Size = MAP_APPFONT ( 45 , 12 ) ;
- TabStop = TRUE ;
- Right = TRUE ;
- Repeat = TRUE ;
- Spin = TRUE ;
- Maximum = 5000 ;
- StrictFormat = TRUE ;
- DecimalDigits = 2 ;
- Value = 1 ;
- Unit = FUNIT_MM ;
- Last = 5000 ;
- SpinSize = 10 ;
- };
- TriStateBox TSB_CENTER_START
- {
- HelpID = "cui:TriStateBox:RID_SVXPAGE_LINE:TSB_CENTER_START";
- Pos = MAP_APPFONT ( 130 , 68 ) ;
- Size = MAP_APPFONT ( 57 , 10 ) ;
- Text [ en-US ] = "Ce~nter" ;
- TabStop = TRUE ;
- };
- TriStateBox TSB_CENTER_END
- {
- HelpID = "cui:TriStateBox:RID_SVXPAGE_LINE:TSB_CENTER_END";
- Pos = MAP_APPFONT ( 191 , 68 ) ;
- Size = MAP_APPFONT ( 57 , 10 ) ;
- Text [ en-US ] = "C~enter" ;
- TabStop = TRUE ;
- };
- CheckBox CBX_SYNCHRONIZE
- {
- HelpID = "cui:CheckBox:RID_SVXPAGE_LINE:CBX_SYNCHRONIZE";
- // #116827#
- // Pos = MAP_APPFONT ( 130 , 107 ) ;
- Pos = MAP_APPFONT ( 130 , 68 + (16 - 4) ) ;
- Size = MAP_APPFONT ( 118 , 10 ) ;
- Text [ en-US ] = "Synchroni~ze ends" ;
- TabStop = TRUE ;
- };
-
- //////////////////////////////////////////////////////////////////////////////
- // #116827#
-
- FixedLine FL_EDGE_STYLE
- {
- Pos = MAP_APPFONT ( 124 , 3 + (16 * 6) - 4 ) ;
- Size = MAP_APPFONT ( 130 , 8 ) ;
- Text [ en-US ] = "Corner and cap styles" ;
- };
- FixedText FT_EDGE_STYLE
- {
- Pos = MAP_APPFONT ( 130 , 14 + (16 * 6) - 4 ) ;
- Size = MAP_APPFONT ( 118 , 8 ) ;
- Text [ en-US ] = "~Corner style" ;
- };
- ListBox LB_EDGE_STYLE
- {
- HelpID = "cui:ListBox:RID_SVXPAGE_LINE:LB_EDGE_STYLE";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 130 , 25 + (16 * 6) - 4 ) ;
- Size = MAP_APPFONT ( 57 , 99 ) ;
- TabStop = TRUE ;
- DropDown = TRUE ;
- StringList [ en-US ] =
- {
- < "Rounded" ; Default ; > ;
- < "- none -" ; > ;
- < "Mitered" ; > ;
- < "Beveled" ; > ;
- };
- };
- FixedText FT_CAP_STYLE
- {
- Pos = MAP_APPFONT ( 191 , 14 + (16 * 6) - 4 ) ;
- Size = MAP_APPFONT ( 118 , 8 ) ;
- Text [ en-US ] = "Ca~p style" ;
- };
- ListBox LB_CAP_STYLE
- {
- HelpID = "cui:ListBox:RID_SVXPAGE_LINE:LB_CAP_STYLE";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 191 , 25 + (16 * 6) - 4 ) ;
- Size = MAP_APPFONT ( 57 , 99 ) ;
- TabStop = TRUE ;
- DropDown = TRUE ;
- StringList [ en-US ] =
- {
- < "Flat" ; Default ; > ; // Same string as in Excel
- < "Round" ; > ;
- < "Square" ; > ;
- };
- };
-
- //////////////////////////////////////////////////////////////////////////////
-
- Control CTL_PREVIEW
- {
- Border = TRUE ;
- Pos = MAP_APPFONT ( 6 , 135 ) ;
- Size = MAP_APPFONT ( 248 , 40 ) ;
- };
-
- //#58425# Symbole auf einer Linie (z.B. StarChart) ->
- FixedLine FL_SYMBOL_FORMAT
- {
- Hide = TRUE ;
-
- Pos = MAP_APPFONT ( 124 , 3 ) ;
- Size = MAP_APPFONT ( 130 , 8 ) ;
- Text [ en-US ] = "Icon";
- };
-
- MenuButton MB_SYMBOL_BITMAP
- {
- HelpID = "cui:MenuButton:RID_SVXPAGE_LINE:MB_SYMBOL_BITMAP";
- Hide = TRUE ;
- Pos = MAP_APPFONT ( 130 , 14 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- ButtonMenu = Menu
- {
- ItemList =
- {
- MenuItem
- {
- Identifier = MN_SYMBOLS_NONE;
- Text [ en-US ] = "No Symbol";
- };
- MenuItem
- {
- Identifier = MN_SYMBOLS_AUTO;
- Text [ en-US ] = "Automatic";
- };
- MenuItem
- {
- Identifier = MN_GRAPHIC_DLG ;
- Text [ en-US ] = "From file..." ;
- };
- MenuItem
- {
- Identifier = MN_GALLERY ;
- Text [ en-US ] = "Gallery";
- };
- MenuItem
- {
- Identifier = MN_SYMBOLS;
- Text [ en-US ] = "Symbols";
- };
- };
- };
- Text [ en-US ] = "Select..." ;
- };
- FixedText FT_SYMBOL_WIDTH
- {
- Hide = TRUE ;
- Pos = MAP_APPFONT ( 130 , 32 ) ;
- Size = MAP_APPFONT ( 57 , 8 ) ;
- Text [ en-US ] = "Width" ;
- };
- MetricField MF_SYMBOL_WIDTH
- {
- HelpID = "cui:MetricField:RID_SVXPAGE_LINE:MF_SYMBOL_WIDTH";
- Pos = MAP_APPFONT ( 191 , 30 );
- Size = MAP_APPFONT ( 57 , 12 ) ;
- Border = TRUE ;
- TabStop = TRUE ;
- Left = TRUE ;
- Repeat = TRUE ;
- Spin = TRUE ;
- Minimum = 0 ;
- Maximum = 1999 ;
- DecimalDigits = 2 ;
- Value = 0 ;
- Unit = FUNIT_CM ;
- First = 0 ;
- Last = 1999 ;
- SpinSize = 5 ;
- Hide = TRUE ;
- };
- FixedText FT_SYMBOL_HEIGHT
- {
- Hide = TRUE ;
- Pos = MAP_APPFONT ( 130 , 48 ) ;
- Size = MAP_APPFONT ( 57 , 8 ) ;
- Text [ en-US ] = "Height" ;
- };
- MetricField MF_SYMBOL_HEIGHT
- {
- HelpID = "cui:MetricField:RID_SVXPAGE_LINE:MF_SYMBOL_HEIGHT";
- Pos = MAP_APPFONT ( 191 , 46 );
- Size = MAP_APPFONT ( 57 , 12 ) ;
- Border = TRUE ;
- TabStop = TRUE ;
- Left = TRUE ;
- Repeat = TRUE ;
- Spin = TRUE ;
- Minimum = 0 ;
- Maximum = 1999 ;
- DecimalDigits = 2 ;
- Value = 0 ;
- Unit = FUNIT_CM ;
- First = 0 ;
- Last = 1999 ;
- SpinSize = 5 ;
- Hide = TRUE ;
- };
- CheckBox CB_SYMBOL_RATIO
- {
- HelpID = "cui:CheckBox:RID_SVXPAGE_LINE:CB_SYMBOL_RATIO";
- Hide = TRUE ;
- Pos = MAP_APPFONT ( 130 , 62 );
- Size = MAP_APPFONT ( 118 , 10 ) ;
- Text [ en-US ] = "Keep ratio" ;
- };
- String STR_STYLE
- {
- Text [ en-US ] = "Style" ;
- };
- String STR_LB_START_STYLE
- {
- Text [ en-US ] = "Start style" ;
- };
- String STR_LB_END_STYLE
- {
- Text [ en-US ] = "End style" ;
- };
- String STR_MTR_FLD_START_WIDTH
- {
- Text [ en-US ] = "Start width" ;
- };
- String STR_MTR_FLD_END_WIDTH
- {
- Text [ en-US ] = "End width" ;
- };
- String STR_CENTER_START
- {
- Text [ en-US ] = "Start with center" ;
- };
- String STR_CENTER_END
- {
- Text [ en-US ] = "End with center" ;
- };
-};
-
// Defining LineStyles --------------------
TabPage RID_SVXPAGE_LINE_DEF
diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx
index 465924c..4aa9f57 100644
--- a/cui/source/tabpages/tpline.cxx
+++ b/cui/source/tabpages/tpline.cxx
@@ -35,6 +35,7 @@
#include "svx/dlgutil.hxx"
#include "svx/svxgrahicitem.hxx"
#include <sfx2/request.hxx>
+#include <sfx2/dialoghelper.hxx>
#include "svx/ofaitem.hxx"
#include <svx/svdobj.hxx>
#include <svx/svdview.hxx>
@@ -55,6 +56,13 @@
#define MAX_BMP_WIDTH 16
#define MAX_BMP_HEIGHT 16
+#define MN_GALLERY 4
+#define MN_SYMBOLS 5
+#define MN_SYMBOLS_NONE 1
+#define MN_SYMBOLS_AUTO 2
+#define MN_GALLERY_ENTRY 100
+
+
// static ----------------------------------------------------------------
static sal_uInt16 pLineRanges[] =
@@ -71,51 +79,16 @@ SvxLineTabPage::SvxLineTabPage
Window* pParent,
const SfxItemSet& rInAttrs
) :
- SvxTabPage ( pParent, CUI_RES( RID_SVXPAGE_LINE ), rInAttrs ),
- aFlLine ( this, CUI_RES( FL_LINE ) ),
- aFtLineStyle ( this, CUI_RES( FT_LINE_STYLE ) ),
- aLbLineStyle ( this, CUI_RES( LB_LINE_STYLE ) ),
- aFtColor ( this, CUI_RES( FT_COLOR ) ),
- aLbColor ( this, CUI_RES( LB_COLOR ) ),
- aFtLineWidth ( this, CUI_RES( FT_LINE_WIDTH ) ),
- aMtrLineWidth ( this, CUI_RES( MTR_FLD_LINE_WIDTH ) ),
- aFtTransparent ( this, CUI_RES( FT_TRANSPARENT ) ),
- aMtrTransparent ( this, CUI_RES( MTR_LINE_TRANSPARENT ) ),
- aFlLineEnds ( this, CUI_RES( FL_LINE_ENDS ) ),
- aLbStartStyle ( this, CUI_RES( LB_START_STYLE ) ),
- aMtrStartWidth ( this, CUI_RES( MTR_FLD_START_WIDTH ) ),
- aTsbCenterStart ( this, CUI_RES( TSB_CENTER_START ) ),
- aFtLineEndsStyle ( this, CUI_RES( FT_LINE_ENDS_STYLE ) ),
- aLbEndStyle ( this, CUI_RES( LB_END_STYLE ) ),
- aFtLineEndsWidth ( this, CUI_RES( FT_LINE_ENDS_WIDTH ) ),
- aMtrEndWidth ( this, CUI_RES( MTR_FLD_END_WIDTH ) ),
- aTsbCenterEnd ( this, CUI_RES( TSB_CENTER_END ) ),
- aCbxSynchronize ( this, CUI_RES( CBX_SYNCHRONIZE ) ),
- aFLSeparator ( this, CUI_RES( FL_SEPARATOR ) ),
- aCtlPreview ( this, CUI_RES( CTL_PREVIEW ) ),
-
- // #116827#
- maFLEdgeStyle ( this, CUI_RES( FL_EDGE_STYLE ) ),
- maFTEdgeStyle ( this, CUI_RES( FT_EDGE_STYLE ) ),
- maLBEdgeStyle ( this, CUI_RES( LB_EDGE_STYLE ) ),
-
- // LineCaps
- maFTCapStyle ( this, CUI_RES( FT_CAP_STYLE ) ),
- maLBCapStyle ( this, CUI_RES( LB_CAP_STYLE ) ),
+ SvxTabPage ( pParent
+ ,"LineTabPage"
+ ,"cui/ui/linetabpage.ui"
+ , rInAttrs ),
pSymbolList(NULL),
bNewSize(false),
nNumMenuGalleryItems(0),
nSymbolType(SVX_SYMBOLTYPE_UNKNOWN), // unknown respectively unchanged
pSymbolAttr(NULL),
- //#58425# Symbols on a line (e.g. StarChart)
- aFlSymbol ( this, CUI_RES(FL_SYMBOL_FORMAT)),
- aSymbolMB ( this, CUI_RES(MB_SYMBOL_BITMAP)),
- aSymbolWidthFT ( this, CUI_RES(FT_SYMBOL_WIDTH)),
- aSymbolWidthMF ( this, CUI_RES(MF_SYMBOL_WIDTH)),
- aSymbolHeightFT ( this, CUI_RES(FT_SYMBOL_HEIGHT)),
- aSymbolHeightMF ( this, CUI_RES(MF_SYMBOL_HEIGHT)),
- aSymbolRatioCB ( this, CUI_RES(CB_SYMBOL_RATIO)),
bLastWidthModified(sal_False),
aSymbolLastSize(Size(0,0)),
@@ -136,17 +109,38 @@ SvxLineTabPage::SvxLineTabPage
pnColorListState( 0 ),
nPageType ( 0 )
{
- aLbEndStyle.SetAccessibleName(OUString(CUI_RES(STR_STYLE)));
- aLbStartStyle.SetAccessibleName(OUString(CUI_RES( STR_LB_START_STYLE ) ) );
- aMtrStartWidth.SetAccessibleName(OUString(CUI_RES( STR_MTR_FLD_START_WIDTH ) ) );
- aLbEndStyle.SetAccessibleName(OUString(CUI_RES( STR_LB_END_STYLE ) ) );
- aMtrEndWidth.SetAccessibleName(OUString(CUI_RES( STR_MTR_FLD_END_WIDTH ) ) );
- aTsbCenterStart.SetAccessibleName(OUString(CUI_RES( STR_CENTER_START ) ) );
- aTsbCenterEnd.SetAccessibleName(OUString(CUI_RES( STR_CENTER_END ) ) );
-
- FreeResource();
+ get(m_pLbLineStyle,"LB_LINE_STYLE");
+ get(m_pLbColor,"LB_COLOR");
+ get(m_pBoxStyle,"boxSTYLE_ATTR");
+ get(m_pMtrLineWidth,"MTR_FLD_LINE_WIDTH");
+ get(m_pMtrTransparent,"MTR_LINE_TRANSPARENT");
+
+ get(m_pFlLineEnds,"FL_LINE_ENDS");
+ get(m_pBoxArrowStyles,"boxARROW_STYLES");
+ get(m_pLbStartStyle,"LB_START_STYLE");
+ get(m_pBoxStart,"boxSTART");
+ get(m_pMtrStartWidth,"MTR_FLD_START_WIDTH");
+ get(m_pTsbCenterStart,"TSB_CENTER_START");
+ get(m_pBoxEnd,"boxEND");
+ get(m_pLbEndStyle,"LB_END_STYLE");
+ get(m_pMtrEndWidth,"MTR_FLD_END_WIDTH");
+ get(m_pTsbCenterEnd,"TSB_CENTER_END");
+ get(m_pCbxSynchronize,"CBX_SYNCHRONIZE");
+ get(m_pCtlPreview,"CTL_PREVIEW");
+
+ get(m_pGridEdgeCaps,"gridEDGE_CAPS");
+ get(m_pFLEdgeStyle,"FL_EDGE_STYLE");
+ get(m_pLBEdgeStyle,"LB_EDGE_STYLE");
+ // LineCaps
+ get(m_pLBCapStyle,"LB_CAP_STYLE");
- aCtlPreview.SetAccessibleName(OUString(CUI_RES(STR_EXAMPLE)));
+ //#58425# Symbols on a line (e.g. StarChart)
+ get(m_pFlSymbol,"FL_SYMBOL_FORMAT");
+ get(m_pGridIconSize,"gridICON_SIZE");
+ get(m_pSymbolMB,"MB_SYMBOL_BITMAP");
+ get(m_pSymbolWidthMF,"MF_SYMBOL_WIDTH");
+ get(m_pSymbolHeightMF,"MF_SYMBOL_HEIGHT");
+ get(m_pSymbolRatioCB,"CB_SYMBOL_RATIO");
// This Page requires ExchangeSupport
SetExchangeSupport();
@@ -161,61 +155,57 @@ SvxLineTabPage::SvxLineTabPage
eFUnit = FUNIT_MM;
// no break -> we now have mm
case FUNIT_MM:
- aMtrLineWidth.SetSpinSize( 50 );
- aMtrStartWidth.SetSpinSize( 50 );
- aMtrEndWidth.SetSpinSize( 50 );
+ m_pMtrLineWidth->SetSpinSize( 50 );
+ m_pMtrStartWidth->SetSpinSize( 50 );
+ m_pMtrEndWidth->SetSpinSize( 50 );
break;
case FUNIT_INCH:
- aMtrLineWidth.SetSpinSize( 2 );
- aMtrStartWidth.SetSpinSize( 2 );
- aMtrEndWidth.SetSpinSize( 2 );
+ m_pMtrLineWidth->SetSpinSize( 2 );
+ m_pMtrStartWidth->SetSpinSize( 2 );
+ m_pMtrEndWidth->SetSpinSize( 2 );
break;
default: ;// prevent warning
}
- SetFieldUnit( aMtrLineWidth, eFUnit );
- SetFieldUnit( aMtrStartWidth, eFUnit );
- SetFieldUnit( aMtrEndWidth, eFUnit );
+ SetFieldUnit( *m_pMtrLineWidth, eFUnit );
+ SetFieldUnit( *m_pMtrStartWidth, eFUnit );
+ SetFieldUnit( *m_pMtrEndWidth, eFUnit );
// determine PoolUnit
SfxItemPool* pPool = rOutAttrs.GetPool();
DBG_ASSERT( pPool, "Where is the pool?" );
ePoolUnit = pPool->GetMetric( SID_ATTR_LINE_WIDTH );
- aLbLineStyle.SetSelectHdl(
- LINK( this, SvxLineTabPage, ClickInvisibleHdl_Impl ) );
- aLbColor.SetSelectHdl(
- LINK( this, SvxLineTabPage, ChangePreviewHdl_Impl ) );
- aMtrLineWidth.SetModifyHdl(
- LINK( this, SvxLineTabPage, ChangePreviewHdl_Impl ) );
- aMtrTransparent.SetModifyHdl(
- LINK( this, SvxLineTabPage, ChangeTransparentHdl_Impl ) );
+ m_pLbLineStyle->SetSelectHdl( LINK( this, SvxLineTabPage, ClickInvisibleHdl_Impl ) );
+ m_pLbColor->SetSelectHdl( LINK( this, SvxLineTabPage, ChangePreviewHdl_Impl ) );
+ m_pMtrLineWidth->SetModifyHdl( LINK( this, SvxLineTabPage, ChangePreviewHdl_Impl ) );
+ m_pMtrTransparent->SetModifyHdl( LINK( this, SvxLineTabPage, ChangeTransparentHdl_Impl ) );
Link aStart = LINK( this, SvxLineTabPage, ChangeStartHdl_Impl );
Link aEnd = LINK( this, SvxLineTabPage, ChangeEndHdl_Impl );
- aLbStartStyle.SetSelectHdl( aStart );
- aLbEndStyle.SetSelectHdl( aEnd );
- aMtrStartWidth.SetModifyHdl( aStart );
- aMtrEndWidth.SetModifyHdl( aEnd );
- aTsbCenterStart.SetClickHdl( aStart );
- aTsbCenterEnd.SetClickHdl( aEnd );
+ m_pLbStartStyle->SetSelectHdl( aStart );
+ m_pLbEndStyle->SetSelectHdl( aEnd );
+ m_pMtrStartWidth->SetModifyHdl( aStart );
+ m_pMtrEndWidth->SetModifyHdl( aEnd );
+ m_pTsbCenterStart->SetClickHdl( aStart );
+ m_pTsbCenterEnd->SetClickHdl( aEnd );
// #116827#
Link aEdgeStyle = LINK( this, SvxLineTabPage, ChangeEdgeStyleHdl_Impl );
- maLBEdgeStyle.SetSelectHdl( aEdgeStyle );
+ m_pLBEdgeStyle->SetSelectHdl( aEdgeStyle );
// LineCaps
Link aCapStyle = LINK( this, SvxLineTabPage, ChangeCapStyleHdl_Impl );
- maLBCapStyle.SetSelectHdl( aCapStyle );
+ m_pLBCapStyle->SetSelectHdl( aCapStyle );
// Symbols on a line (eg star charts), MB-handler set
- aSymbolMB.SetSelectHdl(LINK(this, SvxLineTabPage, GraphicHdl_Impl));
- aSymbolMB.SetActivateHdl(LINK(this, SvxLineTabPage, MenuCreateHdl_Impl));
- aSymbolWidthMF.SetModifyHdl(LINK(this, SvxLineTabPage, SizeHdl_Impl));
- aSymbolHeightMF.SetModifyHdl(LINK(this, SvxLineTabPage, SizeHdl_Impl));
- aSymbolRatioCB.SetClickHdl(LINK(this, SvxLineTabPage, RatioHdl_Impl));
+ m_pSymbolMB->SetSelectHdl(LINK(this, SvxLineTabPage, GraphicHdl_Impl));
+ m_pSymbolMB->SetActivateHdl(LINK(this, SvxLineTabPage, MenuCreateHdl_Impl));
+ m_pSymbolWidthMF->SetModifyHdl(LINK(this, SvxLineTabPage, SizeHdl_Impl));
+ m_pSymbolHeightMF->SetModifyHdl(LINK(this, SvxLineTabPage, SizeHdl_Impl));
+ m_pSymbolRatioCB->SetClickHdl(LINK(this, SvxLineTabPage, RatioHdl_Impl));
- aSymbolRatioCB.Check(sal_True);
+ m_pSymbolRatioCB->Check(sal_True);
ShowSymbolControls(sal_False);
nActLineWidth = -1;
@@ -226,24 +216,18 @@ void SvxLineTabPage::ShowSymbolControls(sal_Bool bOn)
// Symbols on a line (e.g. StarCharts), symbol-enable controls
bSymbols=bOn;
- aSymbolWidthFT.Show(bOn);
- aSymbolWidthMF.Show(bOn);
- aSymbolHeightFT.Show(bOn);
- aSymbolHeightMF.Show(bOn);
- aFlSymbol.Show(bOn);
- aSymbolRatioCB.Show(bOn);
- aSymbolMB.Show(bOn);
- aCtlPreview.ShowSymbol(bOn);
+ m_pFlSymbol->Show(bOn);
+ m_pCtlPreview->ShowSymbol(bOn);
}
SvxLineTabPage::~SvxLineTabPage()
{
// Symbols on a line (e.g. StarCharts), dtor new!
- delete aSymbolMB.GetPopupMenu()->GetPopupMenu( MN_GALLERY );
+ delete m_pSymbolMB->GetPopupMenu()->GetPopupMenu( MN_GALLERY );
if(pSymbolList)
- delete aSymbolMB.GetPopupMenu()->GetPopupMenu( MN_SYMBOLS );
+ delete m_pSymbolMB->GetPopupMenu()->GetPopupMenu( MN_SYMBOLS );
for ( size_t i = 0, n = aGrfBrushItems.size(); i < n; ++i )
{
@@ -255,7 +239,7 @@ SvxLineTabPage::~SvxLineTabPage()
void SvxLineTabPage::Construct()
{
// Color chart
- aLbColor.Fill( pColorList );
+ m_pLbColor->Fill( pColorList );
FillListboxes();
}
@@ -289,9 +273,11 @@ void SvxLineTabPage::InitSymbols(MenuButton* pButton)
SvxBmpItemInfo* pInfo = new SvxBmpItemInfo();
pInfo->pBrushItem = pBrushItem;
pInfo->nItemId = (sal_uInt16)(MN_GALLERY_ENTRY + i);
- if ( i < aGrfBrushItems.size() ) {
+ if ( i < aGrfBrushItems.size() )
+ {
aGrfBrushItems.insert( aGrfBrushItems.begin() + i, pInfo );
- } else {
+ } else
+ {
aGrfBrushItems.push_back( pInfo );
}
const Graphic* pGraphic = pBrushItem->GetGraphic();
@@ -300,8 +286,7 @@ void SvxLineTabPage::InitSymbols(MenuButton* pButton)
{
Bitmap aBitmap(pGraphic->GetBitmap());
Size aSize(aBitmap.GetSizePixel());
- if(aSize.Width() > MAX_BMP_WIDTH ||
- aSize.Height() > MAX_BMP_HEIGHT)
+ if(aSize.Width() > MAX_BMP_WIDTH || aSize.Height() > MAX_BMP_HEIGHT)
{
sal_Bool bWidth = aSize.Width() > aSize.Height();
double nScale = bWidth ?
@@ -319,10 +304,10 @@ void SvxLineTabPage::InitSymbols(MenuButton* pButton)
pPopup->InsertItem(pInfo->nItemId, *pUIName, aImage );
}
}
- aSymbolMB.GetPopupMenu()->SetPopupMenu( MN_GALLERY, pPopup );
+ m_pSymbolMB->GetPopupMenu()->SetPopupMenu( MN_GALLERY, pPopup );
if(aGrfNames.empty())
- aSymbolMB.GetPopupMenu()->EnableItem(MN_GALLERY, sal_False);
+ m_pSymbolMB->GetPopupMenu()->EnableItem(MN_GALLERY, sal_False);
}
if(!pButton->GetPopupMenu()->GetPopupMenu( MN_SYMBOLS ) && pSymbolList)
@@ -401,10 +386,10 @@ void SvxLineTabPage::InitSymbols(MenuButton* pButton)
pInvisibleSquare=pPage->RemoveObject(0);
SdrObject::Free(pInvisibleSquare);
- aSymbolMB.GetPopupMenu()->SetPopupMenu( MN_SYMBOLS, pPopup );
+ m_pSymbolMB->GetPopupMenu()->SetPopupMenu( MN_SYMBOLS, pPopup );
if(aGrfNames.empty())
- aSymbolMB.GetPopupMenu()->EnableItem(MN_SYMBOLS, sal_False);
+ m_pSymbolMB->GetPopupMenu()->EnableItem(MN_SYMBOLS, sal_False);
delete pView;
delete pModel;
@@ -490,45 +475,42 @@ void SvxLineTabPage::SymbolSelected(MenuButton* pButton)
aSymbolSize = aSize;
}
}
- aCtlPreview.SetSymbol(&aSymbolGraphic,aSymbolSize);
+ m_pCtlPreview->SetSymbol(&aSymbolGraphic,aSymbolSize);
}
else
{
aSymbolGraphic=Graphic();
- aCtlPreview.SetSymbol(NULL,aSymbolSize);
+ m_pCtlPreview->SetSymbol(NULL,aSymbolSize);
bEnable = false;
}
aSymbolLastSize=aSymbolSize;
- SetMetricValue(aSymbolWidthMF, aSymbolSize.Width(), ePoolUnit);
- SetMetricValue(aSymbolHeightMF, aSymbolSize.Height(), ePoolUnit);
- aSymbolRatioCB.Enable(bEnable);
- aSymbolHeightFT.Enable(bEnable);
- aSymbolWidthFT.Enable(bEnable);
- aSymbolWidthMF.Enable(bEnable);
- aSymbolHeightMF.Enable(bEnable);
- aCtlPreview.Invalidate();
+ SetMetricValue(*m_pSymbolWidthMF, aSymbolSize.Width(), ePoolUnit);
+ SetMetricValue(*m_pSymbolHeightMF, aSymbolSize.Height(), ePoolUnit);
+
+ m_pGridIconSize->Enable(bEnable);
+ m_pCtlPreview->Invalidate();
}
void SvxLineTabPage::FillListboxes()
{
// Line styles
- sal_uInt16 nOldSelect = aLbLineStyle.GetSelectEntryPos();
+ sal_uInt16 nOldSelect = m_pLbLineStyle->GetSelectEntryPos();
// aLbLineStyle.FillStyles();
- aLbLineStyle.Fill( pDashList );
- aLbLineStyle.SelectEntryPos( nOldSelect );
+ m_pLbLineStyle->Fill( pDashList );
+ m_pLbLineStyle->SelectEntryPos( nOldSelect );
// Line end style
OUString sNone( SVX_RES( RID_SVXSTR_NONE ) );
- nOldSelect = aLbStartStyle.GetSelectEntryPos();
- aLbStartStyle.Clear();
- aLbStartStyle.InsertEntry( sNone );
- aLbStartStyle.Fill( pLineEndList );
- aLbStartStyle.SelectEntryPos( nOldSelect );
- nOldSelect = aLbEndStyle.GetSelectEntryPos();
- aLbEndStyle.Clear();
- aLbEndStyle.InsertEntry( sNone );
- aLbEndStyle.Fill( pLineEndList, sal_False );
- aLbEndStyle.SelectEntryPos( nOldSelect );
+ nOldSelect = m_pLbStartStyle->GetSelectEntryPos();
+ m_pLbStartStyle->Clear();
+ m_pLbStartStyle->InsertEntry( sNone );
+ m_pLbStartStyle->Fill( pLineEndList );
+ m_pLbStartStyle->SelectEntryPos( nOldSelect );
+ nOldSelect = m_pLbEndStyle->GetSelectEntryPos();
+ m_pLbEndStyle->Clear();
+ m_pLbEndStyle->InsertEntry( sNone );
+ m_pLbEndStyle->Fill( pLineEndList, sal_False );
+ m_pLbEndStyle->SelectEntryPos( nOldSelect );
}
// -----------------------------------------------------------------------
@@ -548,27 +530,25 @@ void SvxLineTabPage::ActivatePage( const SfxItemSet& rSet )
( *pnDashListState & CT_CHANGED ) )
{
if( *pnDashListState & CT_CHANGED )
- pDashList = ( (SvxLineTabDialog*) GetParentDialog() )->
- GetNewDashList();
+ pDashList = ( (SvxLineTabDialog*) GetParentDialog() )->GetNewDashList();
+
*pnDashListState = CT_NONE;
// Style list
- nPos = aLbLineStyle.GetSelectEntryPos();
+ nPos = m_pLbLineStyle->GetSelectEntryPos();
- aLbLineStyle.Clear();
- aLbLineStyle.InsertEntry(
- SVX_RESSTR( RID_SVXSTR_INVISIBLE ) );
- aLbLineStyle.InsertEntry(
- SVX_RESSTR( RID_SVXSTR_SOLID ) );
- aLbLineStyle.Fill( pDashList );
- nCount = aLbLineStyle.GetEntryCount();
+ m_pLbLineStyle->Clear();
+ m_pLbLineStyle->InsertEntry( SVX_RESSTR( RID_SVXSTR_INVISIBLE ) );
+ m_pLbLineStyle->InsertEntry( SVX_RESSTR( RID_SVXSTR_SOLID ) );
+ m_pLbLineStyle->Fill( pDashList );
+ nCount = m_pLbLineStyle->GetEntryCount();
if ( nCount == 0 )
; // This case should never occur
else if( nCount <= nPos )
- aLbLineStyle.SelectEntryPos( 0 );
+ m_pLbLineStyle->SelectEntryPos( 0 );
else
- aLbLineStyle.SelectEntryPos( nPos );
+ m_pLbLineStyle->SelectEntryPos( nPos );
// SelectStyleHdl_Impl( this );
}
@@ -577,57 +557,56 @@ void SvxLineTabPage::ActivatePage( const SfxItemSet& rSet )
aDashURL.Append( pDashList->GetName() );
DBG_ASSERT( aDashURL.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" );
// LineEnd list
- if( ( *pnLineEndListState & CT_MODIFIED ) ||
- ( *pnLineEndListState & CT_CHANGED ) )
+ if( ( *pnLineEndListState & CT_MODIFIED ) || ( *pnLineEndListState & CT_CHANGED ) )
{
if( *pnLineEndListState & CT_CHANGED )
- pLineEndList = ( (SvxLineTabDialog*) GetParentDialog() )->
- GetNewLineEndList();
+ pLineEndList = ( (SvxLineTabDialog*) GetParentDialog() )->GetNewLineEndList();
+
*pnLineEndListState = CT_NONE;
- nPos = aLbLineStyle.GetSelectEntryPos();
+ nPos = m_pLbLineStyle->GetSelectEntryPos();
OUString sNone( SVX_RES( RID_SVXSTR_NONE ) );
- aLbStartStyle.Clear();
- aLbStartStyle.InsertEntry( sNone );
+ m_pLbStartStyle->Clear();
+ m_pLbStartStyle->InsertEntry( sNone );
- aLbStartStyle.Fill( pLineEndList );
- nCount = aLbStartStyle.GetEntryCount();
+ m_pLbStartStyle->Fill( pLineEndList );
+ nCount = m_pLbStartStyle->GetEntryCount();
if( nCount == 0 )
; // This case should never occur
else if( nCount <= nPos )
- aLbStartStyle.SelectEntryPos( 0 );
+ m_pLbStartStyle->SelectEntryPos( 0 );
else
- aLbStartStyle.SelectEntryPos( nPos );
+ m_pLbStartStyle->SelectEntryPos( nPos );
- aLbEndStyle.Clear();
- aLbEndStyle.InsertEntry( sNone );
+ m_pLbEndStyle->Clear();
+ m_pLbEndStyle->InsertEntry( sNone );
- aLbEndStyle.Fill( pLineEndList, sal_False );
- nCount = aLbEndStyle.GetEntryCount();
+ m_pLbEndStyle->Fill( pLineEndList, sal_False );
+ nCount = m_pLbEndStyle->GetEntryCount();
if( nCount == 0 )
; // This case should never occur
else if( nCount <= nPos )
- aLbEndStyle.SelectEntryPos( 0 );
+ m_pLbEndStyle->SelectEntryPos( 0 );
else
- aLbEndStyle.SelectEntryPos( nPos );
+ m_pLbEndStyle->SelectEntryPos( nPos );
}
INetURLObject aLineURL( pLineEndList->GetPath() );
aLineURL.Append( pLineEndList->GetName() );
DBG_ASSERT( aLineURL.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" );
// Evaluate if another TabPage set another fill type
- if( aLbLineStyle.GetSelectEntryPos() != 0 )
+ if( m_pLbLineStyle->GetSelectEntryPos() != 0 )
{
if( nPageType == 2 ) // 1
{
- aLbLineStyle.SelectEntryPos( *pPosDashLb + 2 ); // +2 due to SOLID and INVLISIBLE
+ m_pLbLineStyle->SelectEntryPos( *pPosDashLb + 2 ); // +2 due to SOLID and INVLISIBLE
ChangePreviewHdl_Impl( this );
}
if( nPageType == 3 )
{
- aLbStartStyle.SelectEntryPos( *pPosLineEndLb + 1 );// +1 due to SOLID
- aLbEndStyle.SelectEntryPos( *pPosLineEndLb + 1 );// +1 due to SOLID
+ m_pLbStartStyle->SelectEntryPos( *pPosLineEndLb + 1 );// +1 due to SOLID
+ m_pLbEndStyle->SelectEntryPos( *pPosLineEndLb + 1 );// +1 due to SOLID
ChangePreviewHdl_Impl( this );
}
}
@@ -638,16 +617,16 @@ void SvxLineTabPage::ActivatePage( const SfxItemSet& rSet )
if( *pnColorListState & CT_CHANGED )
pColorList = ( (SvxLineTabDialog*) GetParentDialog() )->GetNewColorList();
// aLbColor
- sal_uInt16 nColorPos = aLbColor.GetSelectEntryPos();
- aLbColor.Clear();
- aLbColor.Fill( pColorList );
- nCount = aLbColor.GetEntryCount();
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list