summaryrefslogtreecommitdiff
path: root/cui/source/options/optpath.cxx
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2019-07-01 12:35:43 +0200
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2019-07-01 14:59:39 +0200
commited7e547e1241cf913e138436fa3d7bca8319ec1d (patch)
treed23d0bd204e7cca813d1be1910e602c8853cf0f9 /cui/source/options/optpath.cxx
parentf19156fdb5893ae8aeae93d65011d99d8c5e7735 (diff)
tdf#126088 Display InternalPaths in UI
Change-Id: Ib729be9ff79a3e43d7ec838646b530be8beff2d8 Reviewed-on: https://gerrit.libreoffice.org/74952 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'cui/source/options/optpath.cxx')
-rw-r--r--cui/source/options/optpath.cxx25
1 files changed, 19 insertions, 6 deletions
diff --git a/cui/source/options/optpath.cxx b/cui/source/options/optpath.cxx
index 1543e1c964b9..5a53d1fe5267 100644
--- a/cui/source/options/optpath.cxx
+++ b/cui/source/options/optpath.cxx
@@ -65,7 +65,8 @@ using namespace svx;
#define TAB_WIDTH_MIN 10
#define ITEMID_TYPE 1
-#define ITEMID_PATH 2
+#define ITEMID_USER_PATHS 2
+#define ITEMID_INTERNAL_PATHS 3
#define POSTFIX_INTERNAL "_internal"
#define POSTFIX_USER "_user"
@@ -96,6 +97,7 @@ struct PathUserData_Impl
sal_uInt16 nRealId;
SfxItemState eState;
OUString sUserPath;
+ OUString sInternalPath;
OUString sWritablePath;
explicit PathUserData_Impl( sal_uInt16 nId ) :
@@ -217,16 +219,21 @@ SvxPathTabPage::SvxPathTabPage(vcl::Window* pParent, const SfxItemSet& rSet)
rBar.InsertItem( ITEMID_TYPE, get<FixedText>("type")->GetText(),
0,
HeaderBarItemBits::LEFT | HeaderBarItemBits::CLICKABLE | HeaderBarItemBits::UPARROW );
- rBar.InsertItem( ITEMID_PATH, get<FixedText>("path")->GetText(),
+ rBar.InsertItem( ITEMID_USER_PATHS, get<FixedText>("user_paths")->GetText(),
+ 0,
+ HeaderBarItemBits::LEFT );
+ rBar.InsertItem( ITEMID_INTERNAL_PATHS, get<FixedText>("internal_paths")->GetText(),
0,
HeaderBarItemBits::LEFT );
long nWidth1 = rBar.GetTextWidth(rBar.GetItemText(ITEMID_TYPE));
- long nWidth2 = rBar.GetTextWidth(rBar.GetItemText(ITEMID_PATH));
+ long nWidth2 = rBar.GetTextWidth(rBar.GetItemText(ITEMID_USER_PATHS));
+ long nWidth3 = rBar.GetTextWidth(rBar.GetItemText(ITEMID_INTERNAL_PATHS));
- long aTabs[] = {0, 0, 0};
+ long aTabs[] = {0, 0, 0, 0};
aTabs[1] = nWidth1 + 12;
aTabs[2] = aTabs[1] + nWidth2 + 12;
+ aTabs[3] = aTabs[2] + nWidth3 + 12;
pPathBox->SetTabs(SAL_N_ELEMENTS(aTabs), aTabs, MapUnit::MapPixel);
pPathBox->SetDoubleClickHdl( LINK( this, SvxPathTabPage, DoubleClickPathHdl_Impl ) );
@@ -283,6 +290,7 @@ void SvxPathTabPage::Reset( const SfxItemSet* )
HeaderBar &rBar = pPathBox->GetTheHeaderBar();
long nWidth1 = rBar.GetTextWidth(rBar.GetItemText(1));
long nWidth2 = rBar.GetTextWidth(rBar.GetItemText(2));
+ long nWidth3 = rBar.GetTextWidth(rBar.GetItemText(3));
for( sal_uInt16 i = 0; i <= sal_uInt16(SvtPathOptions::PATH_CLASSIFICATION); ++i )
{
@@ -348,6 +356,10 @@ void SvxPathTabPage::Reset( const SfxItemSet* )
const OUString aValue = Convert_Impl( sTmpPath );
nWidth2 = std::max(nWidth2, pPathBox->GetTextWidth(aValue));
aStr += aValue;
+ aStr += "\t";
+ const OUString aValueInternal = Convert_Impl( sInternal );
+ nWidth3 = std::max(nWidth3, pPathBox->GetTextWidth(aValueInternal));
+ aStr += aValueInternal;
SvTreeListEntry* pEntry = pPathBox->InsertEntry( aStr );
if ( bReadOnly )
{
@@ -355,15 +367,16 @@ void SvxPathTabPage::Reset( const SfxItemSet* )
}
PathUserData_Impl* pPathImpl = new PathUserData_Impl(i);
pPathImpl->sUserPath = sUser;
+ pPathImpl->sInternalPath = sInternal;
pPathImpl->sWritablePath = sWritable;
pEntry->SetUserData( pPathImpl );
}
-
}
- long aTabs[] = {0, 0, 0};
+ long aTabs[] = {0, 0, 0, 0};
aTabs[1] = nWidth1 + 12;
aTabs[2] = aTabs[1] + nWidth2 + 12;
+ aTabs[3] = aTabs[2] + nWidth3 + 12;
pPathBox->SetTabs(SAL_N_ELEMENTS(aTabs), aTabs, MapUnit::MapPixel);
PathSelect_Impl( nullptr );