Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
05e2fd16
Kaydet (Commit)
05e2fd16
authored
May 28, 2014
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Related: fdo#79142 make SetName default to Reindexing
Change-Id: I408042bc7bf1a5a955203d65d2c68ebf9527b9b5
üst
7b9b57b4
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
29 additions
and
34 deletions
+29
-34
mgetempl.hxx
include/sfx2/mgetempl.hxx
+0
-1
style.hxx
include/svl/style.hxx
+7
-2
stlsheet.hxx
sc/inc/stlsheet.hxx
+1
-1
stlsheet.cxx
sc/source/core/data/stlsheet.cxx
+2
-2
stlsheet.hxx
sd/inc/stlsheet.hxx
+1
-1
drawdoc4.cxx
sd/source/core/drawdoc4.cxx
+0
-1
stlpool.cxx
sd/source/core/stlpool.cxx
+7
-5
stlsheet.cxx
sd/source/core/stlsheet.cxx
+2
-6
mgetempl.cxx
sfx2/source/dialog/mgetempl.cxx
+3
-11
style.cxx
svl/source/items/style.cxx
+3
-1
docstyle.hxx
sw/inc/docstyle.hxx
+1
-1
docstyle.cxx
sw/source/uibase/app/docstyle.cxx
+2
-2
No files found.
include/sfx2/mgetempl.hxx
Dosyayı görüntüle @
05e2fd16
...
...
@@ -54,7 +54,6 @@ class SfxManageStyleSheetPage : public SfxTabPage
SfxStyleSheetBase
*
pStyle
;
SfxStyleFamilies
*
pFamilies
;
SfxStyleSheetBasePool
*
pPool
;
const
SfxStyleFamilyItem
*
pItem
;
OUString
aBuf
;
bool
bModified
;
...
...
include/svl/style.hxx
Dosyayı görüntüle @
05e2fd16
...
...
@@ -105,8 +105,13 @@ public:
// returns the internal name of this style
virtual
const
OUString
&
GetName
()
const
;
// sets the internal name of this style
virtual
bool
SetName
(
const
OUString
&
);
// sets the internal name of this style.
//
// If the name of a style is changed, then the styles container needs to be
// reindexed (see IndexedStyleSheets). If you set bReindexNow to false to
// defer that indexing, then you must call the Reindex manually on the
// SfxStyleSheetBasePool parent.
virtual
bool
SetName
(
const
OUString
&
rNewName
,
bool
bReindexNow
=
true
);
/** returns the display name of this style, it is used at the user interface.
If the display name is empty, this method returns the internal name. */
...
...
sc/inc/stlsheet.hxx
Dosyayı görüntüle @
05e2fd16
...
...
@@ -57,7 +57,7 @@ public:
virtual
const
OUString
&
GetParent
()
const
SAL_OVERRIDE
;
virtual
const
OUString
&
GetFollow
()
const
SAL_OVERRIDE
;
virtual
bool
SetName
(
const
OUString
&
)
SAL_OVERRIDE
;
virtual
bool
SetName
(
const
OUString
&
rNewName
,
bool
bReindexNow
=
true
)
SAL_OVERRIDE
;
void
SetUsage
(
ScStyleSheet
::
Usage
eUse
)
const
{
eUsage
=
eUse
;
}
...
...
sc/source/core/data/stlsheet.cxx
Dosyayı görüntüle @
05e2fd16
...
...
@@ -303,13 +303,13 @@ const OUString& ScStyleSheet::GetFollow() const
//! Flag gesetzt und abgefragt werden.
//! Die ganze Abfrage muss raus, wenn fuer eine neue Datei-Version die Namens-Umsetzung wegfaellt.
bool
ScStyleSheet
::
SetName
(
const
OUString
&
rNew
)
bool
ScStyleSheet
::
SetName
(
const
OUString
&
rNew
,
bool
bReindexNow
)
{
OUString
aFileStdName
=
OUString
(
STRING_STANDARD
);
if
(
rNew
==
aFileStdName
&&
aFileStdName
!=
ScGlobal
::
GetRscString
(
STR_STYLENAME_STANDARD
)
)
return
false
;
else
return
SfxStyleSheet
::
SetName
(
rNew
);
return
SfxStyleSheet
::
SetName
(
rNew
,
bReindexNow
);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sd/inc/stlsheet.hxx
Dosyayı görüntüle @
05e2fd16
...
...
@@ -60,7 +60,7 @@ public:
virtual
bool
HasFollowSupport
()
const
SAL_OVERRIDE
;
virtual
bool
HasParentSupport
()
const
SAL_OVERRIDE
;
virtual
bool
HasClearParentSupport
()
const
SAL_OVERRIDE
;
virtual
bool
SetName
(
const
OUString
&
)
SAL_OVERRIDE
;
virtual
bool
SetName
(
const
OUString
&
rNewName
,
bool
bReindexNow
=
true
)
SAL_OVERRIDE
;
virtual
void
SetHelpId
(
const
OUString
&
r
,
sal_uLong
nId
)
SAL_OVERRIDE
;
void
AdjustToFontHeight
(
SfxItemSet
&
rSet
,
bool
bOnlyMissingItems
=
true
);
...
...
sd/source/core/drawdoc4.cxx
Dosyayı görüntüle @
05e2fd16
...
...
@@ -1103,7 +1103,6 @@ void SdDrawDocument::RenameLayoutTemplate(const OUString& rOldLayoutName, const
aReplList
.
push_back
(
aReplData
);
pSheet
->
SetName
(
aSheetName
);
mxStyleSheetPool
.
get
()
->
Reindex
();
}
pSheet
=
aIter
.
Next
();
...
...
sd/source/core/stlpool.cxx
Dosyayı görüntüle @
05e2fd16
...
...
@@ -1038,16 +1038,18 @@ void SdStyleSheetPool::UpdateStdNames()
// Sheet does exist: old sheet has to be removed
aEraseList
.
push_back
(
pStyle
);
}
Reindex
();
}
}
}
}
// styles that could not be renamed, must be removed
for
(
size_t
i
=
0
,
n
=
aEraseList
.
size
();
i
<
n
;
++
i
)
Remove
(
aEraseList
[
i
]
);
Reindex
();
if
(
!
aEraseList
.
empty
())
{
// styles that could not be renamed, must be removed
for
(
size_t
i
=
0
,
n
=
aEraseList
.
size
();
i
<
n
;
++
i
)
Remove
(
aEraseList
[
i
]
);
Reindex
();
}
}
// Set new SvxNumBulletItem for the respective style sheet
...
...
sd/source/core/stlsheet.cxx
Dosyayı görüntüle @
05e2fd16
...
...
@@ -625,15 +625,11 @@ bool SdStyleSheet::HasClearParentSupport() const
return
true
;
}
bool
SdStyleSheet
::
SetName
(
const
OUString
&
rName
)
bool
SdStyleSheet
::
SetName
(
const
OUString
&
rName
,
bool
bReindexNow
)
{
return
SfxStyleSheet
::
SetName
(
rName
);
return
SfxStyleSheet
::
SetName
(
rName
,
bReindexNow
);
}
void
SdStyleSheet
::
SetHelpId
(
const
OUString
&
r
,
sal_uLong
nId
)
{
SfxStyleSheet
::
SetHelpId
(
r
,
nId
);
...
...
sfx2/source/dialog/mgetempl.cxx
Dosyayı görüntüle @
05e2fd16
...
...
@@ -45,7 +45,6 @@
SfxManageStyleSheetPage
::
SfxManageStyleSheetPage
(
Window
*
pParent
,
const
SfxItemSet
&
rAttrSet
)
:
SfxTabPage
(
pParent
,
"ManageStylePage"
,
"sfx/ui/managestylepage.ui"
,
rAttrSet
)
,
pStyle
(
&
((
SfxStyleDialog
*
)
GetParentDialog
())
->
GetStyleSheet
())
,
pPool
(
NULL
)
,
pItem
(
0
)
,
bModified
(
false
)
,
aName
(
pStyle
->
GetName
())
...
...
@@ -79,6 +78,7 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage(Window* pParent, const SfxItemS
OSL_ENSURE
(
pResMgr
,
"No ResMgr in Module"
);
pFamilies
=
new
SfxStyleFamilies
(
ResId
(
DLG_STYLE_DESIGNER
,
*
pResMgr
)
);
SfxStyleSheetBasePool
*
pPool
=
0
;
SfxObjectShell
*
pDocShell
=
SfxObjectShell
::
Current
();
if
(
pDocShell
)
...
...
@@ -105,7 +105,6 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage(Window* pParent, const SfxItemS
aNoName
+=
OUString
::
number
(
nNo
);
}
pStyle
->
SetName
(
aNoName
);
pPool
->
Reindex
();
aName
=
aNoName
;
aFollow
=
pStyle
->
GetFollow
();
aParent
=
pStyle
->
GetParent
();
...
...
@@ -420,11 +419,7 @@ void SfxManageStyleSheetPage::Reset( const SfxItemSet& /*rAttrSet*/ )
OUString
sCmp
(
pStyle
->
GetName
()
);
if
(
sCmp
!=
aName
)
{
pStyle
->
SetName
(
aName
);
if
(
pPool
)
pPool
->
Reindex
();
}
pStyle
->
SetName
(
aName
);
m_pNameRw
->
SetText
(
aName
);
m_pNameRw
->
SetSelection
(
Selection
(
SELECTION_MIN
,
SELECTION_MAX
)
);
...
...
@@ -547,8 +542,7 @@ int SfxManageStyleSheetPage::DeactivatePage( SfxItemSet* pItemSet )
if
(
m_pNameRw
->
HasFocus
()
)
LoseFocusHdl
(
m_pNameRw
);
bool
bOk
=
pStyle
->
SetName
(
comphelper
::
string
::
stripStart
(
m_pNameRw
->
GetText
(),
' '
));
if
(
!
bOk
)
if
(
!
pStyle
->
SetName
(
comphelper
::
string
::
stripStart
(
m_pNameRw
->
GetText
(),
' '
)))
{
InfoBox
aBox
(
this
,
SfxResId
(
MSG_TABPAGE_INVALIDNAME
)
);
aBox
.
Execute
();
...
...
@@ -556,8 +550,6 @@ int SfxManageStyleSheetPage::DeactivatePage( SfxItemSet* pItemSet )
m_pNameRw
->
SetSelection
(
Selection
(
SELECTION_MIN
,
SELECTION_MAX
)
);
return
SfxTabPage
::
KEEP_PAGE
;
}
else
if
(
pPool
)
pPool
->
Reindex
();
bModified
=
true
;
}
...
...
svl/source/items/style.cxx
Dosyayı görüntüle @
05e2fd16
...
...
@@ -155,7 +155,7 @@ const OUString& SfxStyleSheetBase::GetName() const
return
aName
;
}
bool
SfxStyleSheetBase
::
SetName
(
const
OUString
&
rName
)
bool
SfxStyleSheetBase
::
SetName
(
const
OUString
&
rName
,
bool
bReIndexNow
)
{
if
(
rName
.
isEmpty
())
return
false
;
...
...
@@ -178,6 +178,8 @@ bool SfxStyleSheetBase::SetName( const OUString& rName )
if
(
aFollow
==
aName
)
aFollow
=
rName
;
aName
=
rName
;
if
(
bReIndexNow
)
pPool
->
Reindex
();
pPool
->
SetSearchMask
(
eTmpFam
,
nTmpMask
);
pPool
->
Broadcast
(
SfxStyleSheetHintExtended
(
SFX_STYLESHEET_MODIFIED
,
aOldName
,
*
this
)
);
...
...
sw/inc/docstyle.hxx
Dosyayı görüntüle @
05e2fd16
...
...
@@ -123,7 +123,7 @@ public:
void
PresetParent
(
const
OUString
&
rName
){
aParent
=
rName
;
}
void
PresetFollow
(
const
OUString
&
rName
){
aFollow
=
rName
;
}
virtual
bool
SetName
(
const
OUString
&
rStr
)
SAL_OVERRIDE
;
virtual
bool
SetName
(
const
OUString
&
rNewName
,
bool
bReindexNow
=
true
)
SAL_OVERRIDE
;
virtual
bool
SetParent
(
const
OUString
&
rStr
)
SAL_OVERRIDE
;
virtual
bool
SetFollow
(
const
OUString
&
rStr
)
SAL_OVERRIDE
;
...
...
sw/source/uibase/app/docstyle.cxx
Dosyayı görüntüle @
05e2fd16
...
...
@@ -869,14 +869,14 @@ OUString SwDocStyleSheet::GetDescription()
}
// Set names
bool
SwDocStyleSheet
::
SetName
(
const
OUString
&
rStr
)
bool
SwDocStyleSheet
::
SetName
(
const
OUString
&
rStr
,
bool
bReindexNow
)
{
if
(
rStr
.
isEmpty
()
)
return
false
;
if
(
aName
!=
rStr
)
{
if
(
!
SfxStyleSheetBase
::
SetName
(
rStr
))
if
(
!
SfxStyleSheetBase
::
SetName
(
rStr
,
bReindexNow
))
return
false
;
}
else
if
(
!
bPhysical
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment